@apst/oxlint 0.0.0-dev.20260324.019d1d21
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/LICENSE +21 -0
- package/dist/@types/preset.d.ts +25 -0
- package/dist/constants/default.d.ts +8 -0
- package/dist/constants/default.js +10 -0
- package/dist/constants/default.js.map +1 -0
- package/dist/constants/default.mjs +9 -0
- package/dist/constants/default.mjs.map +1 -0
- package/dist/constants/ignore-patterns.d.ts +3 -0
- package/dist/constants/ignore-patterns.js +26 -0
- package/dist/constants/ignore-patterns.js.map +1 -0
- package/dist/constants/ignore-patterns.mjs +24 -0
- package/dist/constants/ignore-patterns.mjs.map +1 -0
- package/dist/functions/define.d.ts +46 -0
- package/dist/functions/define.js +19 -0
- package/dist/functions/define.js.map +1 -0
- package/dist/functions/define.mjs +19 -0
- package/dist/functions/define.mjs.map +1 -0
- package/dist/functions/merge.js +11 -0
- package/dist/functions/merge.js.map +1 -0
- package/dist/functions/merge.mjs +11 -0
- package/dist/functions/merge.mjs.map +1 -0
- package/dist/index.d.ts +2 -0
- package/dist/index.js +4 -0
- package/dist/index.mjs +3 -0
- package/dist/presets/common/index.d.ts +9 -0
- package/dist/presets/common/index.js +45 -0
- package/dist/presets/common/index.mjs +10 -0
- package/dist/presets/common/plugin/index.d.ts +3 -0
- package/dist/presets/common/plugin/index.js +12 -0
- package/dist/presets/common/plugin/index.js.map +1 -0
- package/dist/presets/common/plugin/index.mjs +11 -0
- package/dist/presets/common/plugin/index.mjs.map +1 -0
- package/dist/presets/common/preset/index.d.ts +4 -0
- package/dist/presets/common/preset/index.js +27 -0
- package/dist/presets/common/preset/index.js.map +1 -0
- package/dist/presets/common/preset/index.mjs +27 -0
- package/dist/presets/common/preset/index.mjs.map +1 -0
- package/dist/presets/common/rules/eslint.d.ts +174 -0
- package/dist/presets/common/rules/eslint.js +93 -0
- package/dist/presets/common/rules/eslint.js.map +1 -0
- package/dist/presets/common/rules/eslint.mjs +86 -0
- package/dist/presets/common/rules/eslint.mjs.map +1 -0
- package/dist/presets/common/rules/import.d.ts +64 -0
- package/dist/presets/common/rules/import.js +55 -0
- package/dist/presets/common/rules/import.js.map +1 -0
- package/dist/presets/common/rules/import.mjs +49 -0
- package/dist/presets/common/rules/import.mjs.map +1 -0
- package/dist/presets/common/rules/oxc.d.ts +15 -0
- package/dist/presets/common/rules/oxc.js +18 -0
- package/dist/presets/common/rules/oxc.js.map +1 -0
- package/dist/presets/common/rules/oxc.mjs +15 -0
- package/dist/presets/common/rules/oxc.mjs.map +1 -0
- package/dist/presets/common/rules/promise.d.ts +34 -0
- package/dist/presets/common/rules/promise.js +30 -0
- package/dist/presets/common/rules/promise.js.map +1 -0
- package/dist/presets/common/rules/promise.mjs +24 -0
- package/dist/presets/common/rules/promise.mjs.map +1 -0
- package/dist/presets/common/rules/typescript.d.ts +288 -0
- package/dist/presets/common/rules/typescript.js +149 -0
- package/dist/presets/common/rules/typescript.js.map +1 -0
- package/dist/presets/common/rules/typescript.mjs +143 -0
- package/dist/presets/common/rules/typescript.mjs.map +1 -0
- package/dist/presets/common/rules/unicorn.d.ts +168 -0
- package/dist/presets/common/rules/unicorn.js +90 -0
- package/dist/presets/common/rules/unicorn.js.map +1 -0
- package/dist/presets/common/rules/unicorn.mjs +85 -0
- package/dist/presets/common/rules/unicorn.mjs.map +1 -0
- package/dist/presets/jsx/index.d.ts +4 -0
- package/dist/presets/jsx/index.js +9 -0
- package/dist/presets/jsx/index.mjs +5 -0
- package/dist/presets/jsx/plugin/index.d.ts +3 -0
- package/dist/presets/jsx/plugin/index.js +5 -0
- package/dist/presets/jsx/plugin/index.js.map +1 -0
- package/dist/presets/jsx/plugin/index.mjs +4 -0
- package/dist/presets/jsx/plugin/index.mjs.map +1 -0
- package/dist/presets/jsx/preset/index.d.ts +4 -0
- package/dist/presets/jsx/preset/index.js +15 -0
- package/dist/presets/jsx/preset/index.js.map +1 -0
- package/dist/presets/jsx/preset/index.mjs +15 -0
- package/dist/presets/jsx/preset/index.mjs.map +1 -0
- package/dist/presets/jsx/rules/jsx-a11y.d.ts +36 -0
- package/dist/presets/jsx/rules/jsx-a11y.js +23 -0
- package/dist/presets/jsx/rules/jsx-a11y.js.map +1 -0
- package/dist/presets/jsx/rules/jsx-a11y.mjs +21 -0
- package/dist/presets/jsx/rules/jsx-a11y.mjs.map +1 -0
- package/dist/presets/next/index.d.ts +3 -0
- package/dist/presets/next/index.js +6 -0
- package/dist/presets/next/index.mjs +4 -0
- package/dist/presets/next/plugin/index.d.ts +3 -0
- package/dist/presets/next/plugin/index.js +5 -0
- package/dist/presets/next/plugin/index.js.map +1 -0
- package/dist/presets/next/plugin/index.mjs +4 -0
- package/dist/presets/next/plugin/index.mjs.map +1 -0
- package/dist/presets/next/preset/index.d.ts +4 -0
- package/dist/presets/next/preset/index.js +15 -0
- package/dist/presets/next/preset/index.js.map +1 -0
- package/dist/presets/next/preset/index.mjs +15 -0
- package/dist/presets/next/preset/index.mjs.map +1 -0
- package/dist/presets/next/rules/nextjs.js +26 -0
- package/dist/presets/next/rules/nextjs.js.map +1 -0
- package/dist/presets/next/rules/nextjs.mjs +25 -0
- package/dist/presets/next/rules/nextjs.mjs.map +1 -0
- package/dist/presets/node/index.d.ts +4 -0
- package/dist/presets/node/index.js +10 -0
- package/dist/presets/node/index.mjs +5 -0
- package/dist/presets/node/plugin/index.d.ts +3 -0
- package/dist/presets/node/plugin/index.js +5 -0
- package/dist/presets/node/plugin/index.js.map +1 -0
- package/dist/presets/node/plugin/index.mjs +4 -0
- package/dist/presets/node/plugin/index.mjs.map +1 -0
- package/dist/presets/node/preset/index.d.ts +4 -0
- package/dist/presets/node/preset/index.js +15 -0
- package/dist/presets/node/preset/index.js.map +1 -0
- package/dist/presets/node/preset/index.mjs +15 -0
- package/dist/presets/node/preset/index.mjs.map +1 -0
- package/dist/presets/node/rules/node.d.ts +16 -0
- package/dist/presets/node/rules/node.js +16 -0
- package/dist/presets/node/rules/node.js.map +1 -0
- package/dist/presets/node/rules/node.mjs +13 -0
- package/dist/presets/node/rules/node.mjs.map +1 -0
- package/dist/presets/react/index.d.ts +4 -0
- package/dist/presets/react/index.js +14 -0
- package/dist/presets/react/index.mjs +5 -0
- package/dist/presets/react/plugin/index.d.ts +3 -0
- package/dist/presets/react/plugin/index.js +5 -0
- package/dist/presets/react/plugin/index.js.map +1 -0
- package/dist/presets/react/plugin/index.mjs +4 -0
- package/dist/presets/react/plugin/index.mjs.map +1 -0
- package/dist/presets/react/preset/index.d.ts +4 -0
- package/dist/presets/react/preset/index.js +15 -0
- package/dist/presets/react/preset/index.js.map +1 -0
- package/dist/presets/react/preset/index.mjs +15 -0
- package/dist/presets/react/preset/index.mjs.map +1 -0
- package/dist/presets/react/rules/react.d.ts +130 -0
- package/dist/presets/react/rules/react.js +83 -0
- package/dist/presets/react/rules/react.js.map +1 -0
- package/dist/presets/react/rules/react.mjs +76 -0
- package/dist/presets/react/rules/react.mjs.map +1 -0
- package/dist/presets/vitest/index.d.ts +4 -0
- package/dist/presets/vitest/index.js +10 -0
- package/dist/presets/vitest/index.mjs +5 -0
- package/dist/presets/vitest/plugin/index.d.ts +3 -0
- package/dist/presets/vitest/plugin/index.js +5 -0
- package/dist/presets/vitest/plugin/index.js.map +1 -0
- package/dist/presets/vitest/plugin/index.mjs +4 -0
- package/dist/presets/vitest/plugin/index.mjs.map +1 -0
- package/dist/presets/vitest/preset/index.d.ts +4 -0
- package/dist/presets/vitest/preset/index.js +15 -0
- package/dist/presets/vitest/preset/index.js.map +1 -0
- package/dist/presets/vitest/preset/index.mjs +15 -0
- package/dist/presets/vitest/preset/index.mjs.map +1 -0
- package/dist/presets/vitest/rules/vitest.d.ts +42 -0
- package/dist/presets/vitest/rules/vitest.js +27 -0
- package/dist/presets/vitest/rules/vitest.js.map +1 -0
- package/dist/presets/vitest/rules/vitest.mjs +24 -0
- package/dist/presets/vitest/rules/vitest.mjs.map +1 -0
- package/package.json +97 -0
|
@@ -0,0 +1,174 @@
|
|
|
1
|
+
declare const RULES_ESLINT_NURSERY: {
|
|
2
|
+
readonly "getter-return": "error";
|
|
3
|
+
readonly "no-undef": ["error", {
|
|
4
|
+
readonly typeof: true;
|
|
5
|
+
}];
|
|
6
|
+
readonly "no-unreachable": "error";
|
|
7
|
+
};
|
|
8
|
+
declare const RULES_ESLINT_PEDANTIC: {
|
|
9
|
+
readonly eqeqeq: ["error", "always"];
|
|
10
|
+
readonly "no-array-constructor": "error";
|
|
11
|
+
readonly "no-case-declarations": "error";
|
|
12
|
+
readonly "no-constructor-return": "error";
|
|
13
|
+
readonly "no-else-return": ["error", {
|
|
14
|
+
readonly allowElseIf: false;
|
|
15
|
+
}];
|
|
16
|
+
readonly "no-fallthrough": ["error", {
|
|
17
|
+
readonly allowEmptyCase: true;
|
|
18
|
+
}];
|
|
19
|
+
readonly "no-loop-func": "error";
|
|
20
|
+
readonly "no-new-wrappers": "error";
|
|
21
|
+
readonly "no-object-constructor": "error";
|
|
22
|
+
readonly "no-promise-executor-return": ["error", {
|
|
23
|
+
readonly allowVoid: false;
|
|
24
|
+
}];
|
|
25
|
+
readonly "no-redeclare": ["error", {
|
|
26
|
+
readonly builtinGlobals: true;
|
|
27
|
+
}];
|
|
28
|
+
readonly "no-useless-return": "error";
|
|
29
|
+
readonly radix: "error";
|
|
30
|
+
};
|
|
31
|
+
declare const RULES_ESLINT_PERF: {
|
|
32
|
+
readonly "no-useless-call": "error";
|
|
33
|
+
};
|
|
34
|
+
declare const RULES_ESLINT_RESTRICTION: {
|
|
35
|
+
readonly "no-div-regex": "error";
|
|
36
|
+
readonly "no-param-reassign": ["error", {
|
|
37
|
+
readonly props: true;
|
|
38
|
+
}];
|
|
39
|
+
readonly "no-undefined": "error";
|
|
40
|
+
readonly "no-use-before-define": ["error", {
|
|
41
|
+
readonly allowNamedExports: false;
|
|
42
|
+
readonly classes: true;
|
|
43
|
+
readonly enums: true;
|
|
44
|
+
readonly functions: true;
|
|
45
|
+
readonly ignoreTypeReferences: true;
|
|
46
|
+
readonly typedefs: true;
|
|
47
|
+
readonly variables: true;
|
|
48
|
+
}];
|
|
49
|
+
readonly "no-var": "error";
|
|
50
|
+
};
|
|
51
|
+
declare const RULES_ESLINT_STYLE: {
|
|
52
|
+
readonly "arrow-body-style": ["error", "as-needed", {
|
|
53
|
+
readonly requireReturnForObjectLiteral: false;
|
|
54
|
+
}];
|
|
55
|
+
readonly "default-case-last": "error";
|
|
56
|
+
readonly "grouped-accessor-pairs": ["error", "getBeforeSet", {
|
|
57
|
+
readonly enforceForTSTypes: true;
|
|
58
|
+
}];
|
|
59
|
+
readonly "no-extra-label": "error";
|
|
60
|
+
readonly "no-implicit-coercion": "error";
|
|
61
|
+
readonly "no-label-var": "error";
|
|
62
|
+
readonly "no-multi-assign": ["error", {
|
|
63
|
+
readonly ignoreNonDeclaration: false;
|
|
64
|
+
}];
|
|
65
|
+
readonly "no-template-curly-in-string": "error";
|
|
66
|
+
readonly "no-useless-computed-key": ["error", {
|
|
67
|
+
readonly enforceForClassMembers: true;
|
|
68
|
+
}];
|
|
69
|
+
readonly "prefer-const": ["error", {
|
|
70
|
+
readonly destructuring: "all";
|
|
71
|
+
readonly ignoreReadBeforeAssign: true;
|
|
72
|
+
}];
|
|
73
|
+
readonly "prefer-promise-reject-errors": ["error", {
|
|
74
|
+
readonly allowEmptyReject: false;
|
|
75
|
+
}];
|
|
76
|
+
readonly "prefer-rest-params": "error";
|
|
77
|
+
readonly "prefer-spread": "error";
|
|
78
|
+
};
|
|
79
|
+
declare const RULES_ESLINT_SUSPICIOUS: {
|
|
80
|
+
readonly "block-scoped-var": "error";
|
|
81
|
+
readonly "no-extend-native": "error";
|
|
82
|
+
readonly "no-shadow": ["error", {
|
|
83
|
+
readonly builtinGlobals: true;
|
|
84
|
+
readonly host: "all";
|
|
85
|
+
readonly ignoreFunctionTypeParameterNameValueShadow: false;
|
|
86
|
+
readonly ignoreOnInitialization: false;
|
|
87
|
+
readonly ignoreTypeValueShadow: false;
|
|
88
|
+
}];
|
|
89
|
+
readonly "no-unexpected-multiline": "error";
|
|
90
|
+
readonly "no-unneeded-ternary": "error";
|
|
91
|
+
};
|
|
92
|
+
declare const RULES_ESLINT: {
|
|
93
|
+
readonly "block-scoped-var": "error";
|
|
94
|
+
readonly "no-extend-native": "error";
|
|
95
|
+
readonly "no-shadow": ["error", {
|
|
96
|
+
readonly builtinGlobals: true;
|
|
97
|
+
readonly host: "all";
|
|
98
|
+
readonly ignoreFunctionTypeParameterNameValueShadow: false;
|
|
99
|
+
readonly ignoreOnInitialization: false;
|
|
100
|
+
readonly ignoreTypeValueShadow: false;
|
|
101
|
+
}];
|
|
102
|
+
readonly "no-unexpected-multiline": "error";
|
|
103
|
+
readonly "no-unneeded-ternary": "error";
|
|
104
|
+
readonly "arrow-body-style": ["error", "as-needed", {
|
|
105
|
+
readonly requireReturnForObjectLiteral: false;
|
|
106
|
+
}];
|
|
107
|
+
readonly "default-case-last": "error";
|
|
108
|
+
readonly "grouped-accessor-pairs": ["error", "getBeforeSet", {
|
|
109
|
+
readonly enforceForTSTypes: true;
|
|
110
|
+
}];
|
|
111
|
+
readonly "no-extra-label": "error";
|
|
112
|
+
readonly "no-implicit-coercion": "error";
|
|
113
|
+
readonly "no-label-var": "error";
|
|
114
|
+
readonly "no-multi-assign": ["error", {
|
|
115
|
+
readonly ignoreNonDeclaration: false;
|
|
116
|
+
}];
|
|
117
|
+
readonly "no-template-curly-in-string": "error";
|
|
118
|
+
readonly "no-useless-computed-key": ["error", {
|
|
119
|
+
readonly enforceForClassMembers: true;
|
|
120
|
+
}];
|
|
121
|
+
readonly "prefer-const": ["error", {
|
|
122
|
+
readonly destructuring: "all";
|
|
123
|
+
readonly ignoreReadBeforeAssign: true;
|
|
124
|
+
}];
|
|
125
|
+
readonly "prefer-promise-reject-errors": ["error", {
|
|
126
|
+
readonly allowEmptyReject: false;
|
|
127
|
+
}];
|
|
128
|
+
readonly "prefer-rest-params": "error";
|
|
129
|
+
readonly "prefer-spread": "error";
|
|
130
|
+
readonly "no-div-regex": "error";
|
|
131
|
+
readonly "no-param-reassign": ["error", {
|
|
132
|
+
readonly props: true;
|
|
133
|
+
}];
|
|
134
|
+
readonly "no-undefined": "error";
|
|
135
|
+
readonly "no-use-before-define": ["error", {
|
|
136
|
+
readonly allowNamedExports: false;
|
|
137
|
+
readonly classes: true;
|
|
138
|
+
readonly enums: true;
|
|
139
|
+
readonly functions: true;
|
|
140
|
+
readonly ignoreTypeReferences: true;
|
|
141
|
+
readonly typedefs: true;
|
|
142
|
+
readonly variables: true;
|
|
143
|
+
}];
|
|
144
|
+
readonly "no-var": "error";
|
|
145
|
+
readonly "no-useless-call": "error";
|
|
146
|
+
readonly eqeqeq: ["error", "always"];
|
|
147
|
+
readonly "no-array-constructor": "error";
|
|
148
|
+
readonly "no-case-declarations": "error";
|
|
149
|
+
readonly "no-constructor-return": "error";
|
|
150
|
+
readonly "no-else-return": ["error", {
|
|
151
|
+
readonly allowElseIf: false;
|
|
152
|
+
}];
|
|
153
|
+
readonly "no-fallthrough": ["error", {
|
|
154
|
+
readonly allowEmptyCase: true;
|
|
155
|
+
}];
|
|
156
|
+
readonly "no-loop-func": "error";
|
|
157
|
+
readonly "no-new-wrappers": "error";
|
|
158
|
+
readonly "no-object-constructor": "error";
|
|
159
|
+
readonly "no-promise-executor-return": ["error", {
|
|
160
|
+
readonly allowVoid: false;
|
|
161
|
+
}];
|
|
162
|
+
readonly "no-redeclare": ["error", {
|
|
163
|
+
readonly builtinGlobals: true;
|
|
164
|
+
}];
|
|
165
|
+
readonly "no-useless-return": "error";
|
|
166
|
+
readonly radix: "error";
|
|
167
|
+
readonly "getter-return": "error";
|
|
168
|
+
readonly "no-undef": ["error", {
|
|
169
|
+
readonly typeof: true;
|
|
170
|
+
}];
|
|
171
|
+
readonly "no-unreachable": "error";
|
|
172
|
+
};
|
|
173
|
+
export { RULES_ESLINT, RULES_ESLINT_NURSERY, RULES_ESLINT_PEDANTIC, RULES_ESLINT_PERF, RULES_ESLINT_RESTRICTION, RULES_ESLINT_STYLE, RULES_ESLINT_SUSPICIOUS };
|
|
174
|
+
//# sourceMappingURL=eslint.d.ts.map
|
|
@@ -0,0 +1,93 @@
|
|
|
1
|
+
|
|
2
|
+
const RULES_ESLINT_NURSERY = {
|
|
3
|
+
"getter-return": "error",
|
|
4
|
+
"no-undef": ["error", { typeof: true }],
|
|
5
|
+
"no-unreachable": "error"
|
|
6
|
+
};
|
|
7
|
+
const RULES_ESLINT_PEDANTIC = {
|
|
8
|
+
eqeqeq: ["error", "always"],
|
|
9
|
+
"no-array-constructor": "error",
|
|
10
|
+
"no-case-declarations": "error",
|
|
11
|
+
"no-constructor-return": "error",
|
|
12
|
+
"no-else-return": ["error", { allowElseIf: false }],
|
|
13
|
+
"no-fallthrough": ["error", { allowEmptyCase: true }],
|
|
14
|
+
"no-loop-func": "error",
|
|
15
|
+
"no-new-wrappers": "error",
|
|
16
|
+
"no-object-constructor": "error",
|
|
17
|
+
"no-promise-executor-return": ["error", { allowVoid: false }],
|
|
18
|
+
"no-redeclare": ["error", { builtinGlobals: true }],
|
|
19
|
+
"no-useless-return": "error",
|
|
20
|
+
radix: "error"
|
|
21
|
+
};
|
|
22
|
+
const RULES_ESLINT_PERF = { "no-useless-call": "error" };
|
|
23
|
+
const RULES_ESLINT_RESTRICTION = {
|
|
24
|
+
"no-div-regex": "error",
|
|
25
|
+
"no-param-reassign": ["error", { props: true }],
|
|
26
|
+
"no-undefined": "error",
|
|
27
|
+
"no-use-before-define": ["error", {
|
|
28
|
+
allowNamedExports: false,
|
|
29
|
+
classes: true,
|
|
30
|
+
enums: true,
|
|
31
|
+
functions: true,
|
|
32
|
+
ignoreTypeReferences: true,
|
|
33
|
+
typedefs: true,
|
|
34
|
+
variables: true
|
|
35
|
+
}],
|
|
36
|
+
"no-var": "error"
|
|
37
|
+
};
|
|
38
|
+
const RULES_ESLINT_STYLE = {
|
|
39
|
+
"arrow-body-style": [
|
|
40
|
+
"error",
|
|
41
|
+
"as-needed",
|
|
42
|
+
{ requireReturnForObjectLiteral: false }
|
|
43
|
+
],
|
|
44
|
+
"default-case-last": "error",
|
|
45
|
+
"grouped-accessor-pairs": [
|
|
46
|
+
"error",
|
|
47
|
+
"getBeforeSet",
|
|
48
|
+
{ enforceForTSTypes: true }
|
|
49
|
+
],
|
|
50
|
+
"no-extra-label": "error",
|
|
51
|
+
"no-implicit-coercion": "error",
|
|
52
|
+
"no-label-var": "error",
|
|
53
|
+
"no-multi-assign": ["error", { ignoreNonDeclaration: false }],
|
|
54
|
+
"no-template-curly-in-string": "error",
|
|
55
|
+
"no-useless-computed-key": ["error", { enforceForClassMembers: true }],
|
|
56
|
+
"prefer-const": ["error", {
|
|
57
|
+
destructuring: "all",
|
|
58
|
+
ignoreReadBeforeAssign: true
|
|
59
|
+
}],
|
|
60
|
+
"prefer-promise-reject-errors": ["error", { allowEmptyReject: false }],
|
|
61
|
+
"prefer-rest-params": "error",
|
|
62
|
+
"prefer-spread": "error"
|
|
63
|
+
};
|
|
64
|
+
const RULES_ESLINT_SUSPICIOUS = {
|
|
65
|
+
"block-scoped-var": "error",
|
|
66
|
+
"no-extend-native": "error",
|
|
67
|
+
"no-shadow": ["error", {
|
|
68
|
+
builtinGlobals: true,
|
|
69
|
+
host: "all",
|
|
70
|
+
ignoreFunctionTypeParameterNameValueShadow: false,
|
|
71
|
+
ignoreOnInitialization: false,
|
|
72
|
+
ignoreTypeValueShadow: false
|
|
73
|
+
}],
|
|
74
|
+
"no-unexpected-multiline": "error",
|
|
75
|
+
"no-unneeded-ternary": "error"
|
|
76
|
+
};
|
|
77
|
+
const RULES_ESLINT = {
|
|
78
|
+
...RULES_ESLINT_NURSERY,
|
|
79
|
+
...RULES_ESLINT_PEDANTIC,
|
|
80
|
+
...RULES_ESLINT_PERF,
|
|
81
|
+
...RULES_ESLINT_RESTRICTION,
|
|
82
|
+
...RULES_ESLINT_STYLE,
|
|
83
|
+
...RULES_ESLINT_SUSPICIOUS
|
|
84
|
+
};
|
|
85
|
+
|
|
86
|
+
exports.RULES_ESLINT = RULES_ESLINT;
|
|
87
|
+
exports.RULES_ESLINT_NURSERY = RULES_ESLINT_NURSERY;
|
|
88
|
+
exports.RULES_ESLINT_PEDANTIC = RULES_ESLINT_PEDANTIC;
|
|
89
|
+
exports.RULES_ESLINT_PERF = RULES_ESLINT_PERF;
|
|
90
|
+
exports.RULES_ESLINT_RESTRICTION = RULES_ESLINT_RESTRICTION;
|
|
91
|
+
exports.RULES_ESLINT_STYLE = RULES_ESLINT_STYLE;
|
|
92
|
+
exports.RULES_ESLINT_SUSPICIOUS = RULES_ESLINT_SUSPICIOUS;
|
|
93
|
+
//# sourceMappingURL=eslint.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"eslint.js","names":[],"sources":["../../../../src/presets/common/rules/eslint.ts"],"sourcesContent":["import type { LintRules } from \"#/@types/oxlint\";\n\nconst RULES_ESLINT_NURSERY = {\n \"getter-return\": \"error\",\n \"no-undef\": [\n \"error\",\n {\n typeof: true,\n },\n ],\n \"no-unreachable\": \"error\",\n} as const satisfies LintRules;\n\nconst RULES_ESLINT_PEDANTIC = {\n eqeqeq: [\n \"error\",\n \"always\",\n ],\n \"no-array-constructor\": \"error\",\n \"no-case-declarations\": \"error\",\n \"no-constructor-return\": \"error\",\n \"no-else-return\": [\n \"error\",\n {\n allowElseIf: false,\n },\n ],\n \"no-fallthrough\": [\n \"error\",\n {\n allowEmptyCase: true,\n },\n ],\n \"no-loop-func\": \"error\",\n \"no-new-wrappers\": \"error\",\n \"no-object-constructor\": \"error\",\n \"no-promise-executor-return\": [\n \"error\",\n {\n allowVoid: false,\n },\n ],\n \"no-redeclare\": [\n \"error\",\n {\n builtinGlobals: true,\n },\n ],\n \"no-useless-return\": \"error\",\n radix: \"error\",\n} as const satisfies LintRules;\n\nconst RULES_ESLINT_PERF = {\n \"no-useless-call\": \"error\",\n} as const satisfies LintRules;\n\nconst RULES_ESLINT_RESTRICTION = {\n \"no-div-regex\": \"error\",\n \"no-param-reassign\": [\n \"error\",\n {\n props: true,\n },\n ],\n \"no-undefined\": \"error\",\n \"no-use-before-define\": [\n \"error\",\n {\n allowNamedExports: false,\n classes: true,\n enums: true,\n functions: true,\n ignoreTypeReferences: true,\n typedefs: true,\n variables: true,\n },\n ],\n \"no-var\": \"error\",\n} as const satisfies LintRules;\n\nconst RULES_ESLINT_STYLE = {\n \"arrow-body-style\": [\n \"error\",\n \"as-needed\",\n {\n requireReturnForObjectLiteral: false,\n },\n ],\n \"default-case-last\": \"error\",\n \"grouped-accessor-pairs\": [\n \"error\",\n \"getBeforeSet\",\n {\n enforceForTSTypes: true,\n },\n ],\n \"no-extra-label\": \"error\",\n \"no-implicit-coercion\": \"error\",\n \"no-label-var\": \"error\",\n \"no-multi-assign\": [\n \"error\",\n {\n ignoreNonDeclaration: false,\n },\n ],\n \"no-template-curly-in-string\": \"error\",\n \"no-useless-computed-key\": [\n \"error\",\n {\n enforceForClassMembers: true,\n },\n ],\n \"prefer-const\": [\n \"error\",\n {\n destructuring: \"all\",\n // avoid conflicts with `no-use-before-define`\n ignoreReadBeforeAssign: true,\n },\n ],\n \"prefer-promise-reject-errors\": [\n \"error\",\n {\n allowEmptyReject: false,\n },\n ],\n \"prefer-rest-params\": \"error\",\n \"prefer-spread\": \"error\",\n} as const satisfies LintRules;\n\nconst RULES_ESLINT_SUSPICIOUS = {\n \"block-scoped-var\": \"error\",\n \"no-extend-native\": \"error\",\n \"no-shadow\": [\n \"error\",\n {\n builtinGlobals: true,\n host: \"all\",\n ignoreFunctionTypeParameterNameValueShadow: false,\n ignoreOnInitialization: false,\n ignoreTypeValueShadow: false,\n },\n ],\n \"no-unexpected-multiline\": \"error\",\n \"no-unneeded-ternary\": \"error\",\n} as const satisfies LintRules;\n\nconst RULES_ESLINT = {\n ...RULES_ESLINT_NURSERY,\n ...RULES_ESLINT_PEDANTIC,\n ...RULES_ESLINT_PERF,\n ...RULES_ESLINT_RESTRICTION,\n ...RULES_ESLINT_STYLE,\n ...RULES_ESLINT_SUSPICIOUS,\n} as const satisfies LintRules;\n\nexport {\n RULES_ESLINT,\n RULES_ESLINT_NURSERY,\n RULES_ESLINT_PEDANTIC,\n RULES_ESLINT_PERF,\n RULES_ESLINT_RESTRICTION,\n RULES_ESLINT_STYLE,\n RULES_ESLINT_SUSPICIOUS,\n};\n"],"mappings":";AAEA,MAAM,uBAAuB;CACzB,iBAAiB;CACjB,YAAY,CACR,SACA,EACI,QAAQ,MACX,CACJ;CACD,kBAAkB;CACrB;AAED,MAAM,wBAAwB;CAC1B,QAAQ,CACJ,SACA,SACH;CACD,wBAAwB;CACxB,wBAAwB;CACxB,yBAAyB;CACzB,kBAAkB,CACd,SACA,EACI,aAAa,OAChB,CACJ;CACD,kBAAkB,CACd,SACA,EACI,gBAAgB,MACnB,CACJ;CACD,gBAAgB;CAChB,mBAAmB;CACnB,yBAAyB;CACzB,8BAA8B,CAC1B,SACA,EACI,WAAW,OACd,CACJ;CACD,gBAAgB,CACZ,SACA,EACI,gBAAgB,MACnB,CACJ;CACD,qBAAqB;CACrB,OAAO;CACV;AAED,MAAM,oBAAoB,EACtB,mBAAmB,SACtB;AAED,MAAM,2BAA2B;CAC7B,gBAAgB;CAChB,qBAAqB,CACjB,SACA,EACI,OAAO,MACV,CACJ;CACD,gBAAgB;CAChB,wBAAwB,CACpB,SACA;EACI,mBAAmB;EACnB,SAAS;EACT,OAAO;EACP,WAAW;EACX,sBAAsB;EACtB,UAAU;EACV,WAAW;EACd,CACJ;CACD,UAAU;CACb;AAED,MAAM,qBAAqB;CACvB,oBAAoB;EAChB;EACA;EACA,EACI,+BAA+B,OAClC;EACJ;CACD,qBAAqB;CACrB,0BAA0B;EACtB;EACA;EACA,EACI,mBAAmB,MACtB;EACJ;CACD,kBAAkB;CAClB,wBAAwB;CACxB,gBAAgB;CAChB,mBAAmB,CACf,SACA,EACI,sBAAsB,OACzB,CACJ;CACD,+BAA+B;CAC/B,2BAA2B,CACvB,SACA,EACI,wBAAwB,MAC3B,CACJ;CACD,gBAAgB,CACZ,SACA;EACI,eAAe;EAEf,wBAAwB;EAC3B,CACJ;CACD,gCAAgC,CAC5B,SACA,EACI,kBAAkB,OACrB,CACJ;CACD,sBAAsB;CACtB,iBAAiB;CACpB;AAED,MAAM,0BAA0B;CAC5B,oBAAoB;CACpB,oBAAoB;CACpB,aAAa,CACT,SACA;EACI,gBAAgB;EAChB,MAAM;EACN,4CAA4C;EAC5C,wBAAwB;EACxB,uBAAuB;EAC1B,CACJ;CACD,2BAA2B;CAC3B,uBAAuB;CAC1B;AAED,MAAM,eAAe;CACjB,GAAG;CACH,GAAG;CACH,GAAG;CACH,GAAG;CACH,GAAG;CACH,GAAG;CACN"}
|
|
@@ -0,0 +1,86 @@
|
|
|
1
|
+
const RULES_ESLINT_NURSERY = {
|
|
2
|
+
"getter-return": "error",
|
|
3
|
+
"no-undef": ["error", { typeof: true }],
|
|
4
|
+
"no-unreachable": "error"
|
|
5
|
+
};
|
|
6
|
+
const RULES_ESLINT_PEDANTIC = {
|
|
7
|
+
eqeqeq: ["error", "always"],
|
|
8
|
+
"no-array-constructor": "error",
|
|
9
|
+
"no-case-declarations": "error",
|
|
10
|
+
"no-constructor-return": "error",
|
|
11
|
+
"no-else-return": ["error", { allowElseIf: false }],
|
|
12
|
+
"no-fallthrough": ["error", { allowEmptyCase: true }],
|
|
13
|
+
"no-loop-func": "error",
|
|
14
|
+
"no-new-wrappers": "error",
|
|
15
|
+
"no-object-constructor": "error",
|
|
16
|
+
"no-promise-executor-return": ["error", { allowVoid: false }],
|
|
17
|
+
"no-redeclare": ["error", { builtinGlobals: true }],
|
|
18
|
+
"no-useless-return": "error",
|
|
19
|
+
radix: "error"
|
|
20
|
+
};
|
|
21
|
+
const RULES_ESLINT_PERF = { "no-useless-call": "error" };
|
|
22
|
+
const RULES_ESLINT_RESTRICTION = {
|
|
23
|
+
"no-div-regex": "error",
|
|
24
|
+
"no-param-reassign": ["error", { props: true }],
|
|
25
|
+
"no-undefined": "error",
|
|
26
|
+
"no-use-before-define": ["error", {
|
|
27
|
+
allowNamedExports: false,
|
|
28
|
+
classes: true,
|
|
29
|
+
enums: true,
|
|
30
|
+
functions: true,
|
|
31
|
+
ignoreTypeReferences: true,
|
|
32
|
+
typedefs: true,
|
|
33
|
+
variables: true
|
|
34
|
+
}],
|
|
35
|
+
"no-var": "error"
|
|
36
|
+
};
|
|
37
|
+
const RULES_ESLINT_STYLE = {
|
|
38
|
+
"arrow-body-style": [
|
|
39
|
+
"error",
|
|
40
|
+
"as-needed",
|
|
41
|
+
{ requireReturnForObjectLiteral: false }
|
|
42
|
+
],
|
|
43
|
+
"default-case-last": "error",
|
|
44
|
+
"grouped-accessor-pairs": [
|
|
45
|
+
"error",
|
|
46
|
+
"getBeforeSet",
|
|
47
|
+
{ enforceForTSTypes: true }
|
|
48
|
+
],
|
|
49
|
+
"no-extra-label": "error",
|
|
50
|
+
"no-implicit-coercion": "error",
|
|
51
|
+
"no-label-var": "error",
|
|
52
|
+
"no-multi-assign": ["error", { ignoreNonDeclaration: false }],
|
|
53
|
+
"no-template-curly-in-string": "error",
|
|
54
|
+
"no-useless-computed-key": ["error", { enforceForClassMembers: true }],
|
|
55
|
+
"prefer-const": ["error", {
|
|
56
|
+
destructuring: "all",
|
|
57
|
+
ignoreReadBeforeAssign: true
|
|
58
|
+
}],
|
|
59
|
+
"prefer-promise-reject-errors": ["error", { allowEmptyReject: false }],
|
|
60
|
+
"prefer-rest-params": "error",
|
|
61
|
+
"prefer-spread": "error"
|
|
62
|
+
};
|
|
63
|
+
const RULES_ESLINT_SUSPICIOUS = {
|
|
64
|
+
"block-scoped-var": "error",
|
|
65
|
+
"no-extend-native": "error",
|
|
66
|
+
"no-shadow": ["error", {
|
|
67
|
+
builtinGlobals: true,
|
|
68
|
+
host: "all",
|
|
69
|
+
ignoreFunctionTypeParameterNameValueShadow: false,
|
|
70
|
+
ignoreOnInitialization: false,
|
|
71
|
+
ignoreTypeValueShadow: false
|
|
72
|
+
}],
|
|
73
|
+
"no-unexpected-multiline": "error",
|
|
74
|
+
"no-unneeded-ternary": "error"
|
|
75
|
+
};
|
|
76
|
+
const RULES_ESLINT = {
|
|
77
|
+
...RULES_ESLINT_NURSERY,
|
|
78
|
+
...RULES_ESLINT_PEDANTIC,
|
|
79
|
+
...RULES_ESLINT_PERF,
|
|
80
|
+
...RULES_ESLINT_RESTRICTION,
|
|
81
|
+
...RULES_ESLINT_STYLE,
|
|
82
|
+
...RULES_ESLINT_SUSPICIOUS
|
|
83
|
+
};
|
|
84
|
+
|
|
85
|
+
export { RULES_ESLINT, RULES_ESLINT_NURSERY, RULES_ESLINT_PEDANTIC, RULES_ESLINT_PERF, RULES_ESLINT_RESTRICTION, RULES_ESLINT_STYLE, RULES_ESLINT_SUSPICIOUS };
|
|
86
|
+
//# sourceMappingURL=eslint.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"eslint.mjs","names":[],"sources":["../../../../src/presets/common/rules/eslint.ts"],"sourcesContent":["import type { LintRules } from \"#/@types/oxlint\";\n\nconst RULES_ESLINT_NURSERY = {\n \"getter-return\": \"error\",\n \"no-undef\": [\n \"error\",\n {\n typeof: true,\n },\n ],\n \"no-unreachable\": \"error\",\n} as const satisfies LintRules;\n\nconst RULES_ESLINT_PEDANTIC = {\n eqeqeq: [\n \"error\",\n \"always\",\n ],\n \"no-array-constructor\": \"error\",\n \"no-case-declarations\": \"error\",\n \"no-constructor-return\": \"error\",\n \"no-else-return\": [\n \"error\",\n {\n allowElseIf: false,\n },\n ],\n \"no-fallthrough\": [\n \"error\",\n {\n allowEmptyCase: true,\n },\n ],\n \"no-loop-func\": \"error\",\n \"no-new-wrappers\": \"error\",\n \"no-object-constructor\": \"error\",\n \"no-promise-executor-return\": [\n \"error\",\n {\n allowVoid: false,\n },\n ],\n \"no-redeclare\": [\n \"error\",\n {\n builtinGlobals: true,\n },\n ],\n \"no-useless-return\": \"error\",\n radix: \"error\",\n} as const satisfies LintRules;\n\nconst RULES_ESLINT_PERF = {\n \"no-useless-call\": \"error\",\n} as const satisfies LintRules;\n\nconst RULES_ESLINT_RESTRICTION = {\n \"no-div-regex\": \"error\",\n \"no-param-reassign\": [\n \"error\",\n {\n props: true,\n },\n ],\n \"no-undefined\": \"error\",\n \"no-use-before-define\": [\n \"error\",\n {\n allowNamedExports: false,\n classes: true,\n enums: true,\n functions: true,\n ignoreTypeReferences: true,\n typedefs: true,\n variables: true,\n },\n ],\n \"no-var\": \"error\",\n} as const satisfies LintRules;\n\nconst RULES_ESLINT_STYLE = {\n \"arrow-body-style\": [\n \"error\",\n \"as-needed\",\n {\n requireReturnForObjectLiteral: false,\n },\n ],\n \"default-case-last\": \"error\",\n \"grouped-accessor-pairs\": [\n \"error\",\n \"getBeforeSet\",\n {\n enforceForTSTypes: true,\n },\n ],\n \"no-extra-label\": \"error\",\n \"no-implicit-coercion\": \"error\",\n \"no-label-var\": \"error\",\n \"no-multi-assign\": [\n \"error\",\n {\n ignoreNonDeclaration: false,\n },\n ],\n \"no-template-curly-in-string\": \"error\",\n \"no-useless-computed-key\": [\n \"error\",\n {\n enforceForClassMembers: true,\n },\n ],\n \"prefer-const\": [\n \"error\",\n {\n destructuring: \"all\",\n // avoid conflicts with `no-use-before-define`\n ignoreReadBeforeAssign: true,\n },\n ],\n \"prefer-promise-reject-errors\": [\n \"error\",\n {\n allowEmptyReject: false,\n },\n ],\n \"prefer-rest-params\": \"error\",\n \"prefer-spread\": \"error\",\n} as const satisfies LintRules;\n\nconst RULES_ESLINT_SUSPICIOUS = {\n \"block-scoped-var\": \"error\",\n \"no-extend-native\": \"error\",\n \"no-shadow\": [\n \"error\",\n {\n builtinGlobals: true,\n host: \"all\",\n ignoreFunctionTypeParameterNameValueShadow: false,\n ignoreOnInitialization: false,\n ignoreTypeValueShadow: false,\n },\n ],\n \"no-unexpected-multiline\": \"error\",\n \"no-unneeded-ternary\": \"error\",\n} as const satisfies LintRules;\n\nconst RULES_ESLINT = {\n ...RULES_ESLINT_NURSERY,\n ...RULES_ESLINT_PEDANTIC,\n ...RULES_ESLINT_PERF,\n ...RULES_ESLINT_RESTRICTION,\n ...RULES_ESLINT_STYLE,\n ...RULES_ESLINT_SUSPICIOUS,\n} as const satisfies LintRules;\n\nexport {\n RULES_ESLINT,\n RULES_ESLINT_NURSERY,\n RULES_ESLINT_PEDANTIC,\n RULES_ESLINT_PERF,\n RULES_ESLINT_RESTRICTION,\n RULES_ESLINT_STYLE,\n RULES_ESLINT_SUSPICIOUS,\n};\n"],"mappings":"AAEA,MAAM,uBAAuB;CACzB,iBAAiB;CACjB,YAAY,CACR,SACA,EACI,QAAQ,MACX,CACJ;CACD,kBAAkB;CACrB;AAED,MAAM,wBAAwB;CAC1B,QAAQ,CACJ,SACA,SACH;CACD,wBAAwB;CACxB,wBAAwB;CACxB,yBAAyB;CACzB,kBAAkB,CACd,SACA,EACI,aAAa,OAChB,CACJ;CACD,kBAAkB,CACd,SACA,EACI,gBAAgB,MACnB,CACJ;CACD,gBAAgB;CAChB,mBAAmB;CACnB,yBAAyB;CACzB,8BAA8B,CAC1B,SACA,EACI,WAAW,OACd,CACJ;CACD,gBAAgB,CACZ,SACA,EACI,gBAAgB,MACnB,CACJ;CACD,qBAAqB;CACrB,OAAO;CACV;AAED,MAAM,oBAAoB,EACtB,mBAAmB,SACtB;AAED,MAAM,2BAA2B;CAC7B,gBAAgB;CAChB,qBAAqB,CACjB,SACA,EACI,OAAO,MACV,CACJ;CACD,gBAAgB;CAChB,wBAAwB,CACpB,SACA;EACI,mBAAmB;EACnB,SAAS;EACT,OAAO;EACP,WAAW;EACX,sBAAsB;EACtB,UAAU;EACV,WAAW;EACd,CACJ;CACD,UAAU;CACb;AAED,MAAM,qBAAqB;CACvB,oBAAoB;EAChB;EACA;EACA,EACI,+BAA+B,OAClC;EACJ;CACD,qBAAqB;CACrB,0BAA0B;EACtB;EACA;EACA,EACI,mBAAmB,MACtB;EACJ;CACD,kBAAkB;CAClB,wBAAwB;CACxB,gBAAgB;CAChB,mBAAmB,CACf,SACA,EACI,sBAAsB,OACzB,CACJ;CACD,+BAA+B;CAC/B,2BAA2B,CACvB,SACA,EACI,wBAAwB,MAC3B,CACJ;CACD,gBAAgB,CACZ,SACA;EACI,eAAe;EAEf,wBAAwB;EAC3B,CACJ;CACD,gCAAgC,CAC5B,SACA,EACI,kBAAkB,OACrB,CACJ;CACD,sBAAsB;CACtB,iBAAiB;CACpB;AAED,MAAM,0BAA0B;CAC5B,oBAAoB;CACpB,oBAAoB;CACpB,aAAa,CACT,SACA;EACI,gBAAgB;EAChB,MAAM;EACN,4CAA4C;EAC5C,wBAAwB;EACxB,uBAAuB;EAC1B,CACJ;CACD,2BAA2B;CAC3B,uBAAuB;CAC1B;AAED,MAAM,eAAe;CACjB,GAAG;CACH,GAAG;CACH,GAAG;CACH,GAAG;CACH,GAAG;CACH,GAAG;CACN"}
|
|
@@ -0,0 +1,64 @@
|
|
|
1
|
+
declare const RULES_IMPORT_CORRECTNESS: {
|
|
2
|
+
readonly "import/default": "error";
|
|
3
|
+
readonly "import/namespace": "error";
|
|
4
|
+
};
|
|
5
|
+
declare const RULES_IMPORT_NURSERY: {
|
|
6
|
+
readonly "import/export": "error";
|
|
7
|
+
readonly "import/named": "error";
|
|
8
|
+
};
|
|
9
|
+
declare const RULES_IMPORT_RESTRICTION: {
|
|
10
|
+
readonly "import/extensions": ["error", "always", {
|
|
11
|
+
readonly js: "never";
|
|
12
|
+
readonly ts: "never";
|
|
13
|
+
readonly jsx: "never";
|
|
14
|
+
readonly tsx: "never";
|
|
15
|
+
readonly checkTypeImports: true;
|
|
16
|
+
readonly ignorePackages: true;
|
|
17
|
+
}];
|
|
18
|
+
readonly "import/no-cycle": "error";
|
|
19
|
+
};
|
|
20
|
+
declare const RULES_IMPORT_STYLE: {
|
|
21
|
+
readonly "import/consistent-type-specifier-style": ["error", "prefer-top-level"];
|
|
22
|
+
readonly "import/exports-last": "error";
|
|
23
|
+
readonly "import/first": "error";
|
|
24
|
+
readonly "import/group-exports": "error";
|
|
25
|
+
readonly "import/no-duplicates": ["error", {
|
|
26
|
+
readonly considerQueryString: true;
|
|
27
|
+
readonly preferInline: false;
|
|
28
|
+
}];
|
|
29
|
+
readonly "import/no-mutable-exports": "error";
|
|
30
|
+
};
|
|
31
|
+
declare const RULES_IMPORT_SUSPICIOUS: {
|
|
32
|
+
readonly "import/no-empty-named-blocks": "error";
|
|
33
|
+
readonly "import/no-named-as-default": "error";
|
|
34
|
+
readonly "import/no-self-import": "error";
|
|
35
|
+
};
|
|
36
|
+
declare const RULES_IMPORT: {
|
|
37
|
+
readonly "import/no-empty-named-blocks": "error";
|
|
38
|
+
readonly "import/no-named-as-default": "error";
|
|
39
|
+
readonly "import/no-self-import": "error";
|
|
40
|
+
readonly "import/consistent-type-specifier-style": ["error", "prefer-top-level"];
|
|
41
|
+
readonly "import/exports-last": "error";
|
|
42
|
+
readonly "import/first": "error";
|
|
43
|
+
readonly "import/group-exports": "error";
|
|
44
|
+
readonly "import/no-duplicates": ["error", {
|
|
45
|
+
readonly considerQueryString: true;
|
|
46
|
+
readonly preferInline: false;
|
|
47
|
+
}];
|
|
48
|
+
readonly "import/no-mutable-exports": "error";
|
|
49
|
+
readonly "import/extensions": ["error", "always", {
|
|
50
|
+
readonly js: "never";
|
|
51
|
+
readonly ts: "never";
|
|
52
|
+
readonly jsx: "never";
|
|
53
|
+
readonly tsx: "never";
|
|
54
|
+
readonly checkTypeImports: true;
|
|
55
|
+
readonly ignorePackages: true;
|
|
56
|
+
}];
|
|
57
|
+
readonly "import/no-cycle": "error";
|
|
58
|
+
readonly "import/export": "error";
|
|
59
|
+
readonly "import/named": "error";
|
|
60
|
+
readonly "import/default": "error";
|
|
61
|
+
readonly "import/namespace": "error";
|
|
62
|
+
};
|
|
63
|
+
export { RULES_IMPORT, RULES_IMPORT_CORRECTNESS, RULES_IMPORT_NURSERY, RULES_IMPORT_RESTRICTION, RULES_IMPORT_STYLE, RULES_IMPORT_SUSPICIOUS };
|
|
64
|
+
//# sourceMappingURL=import.d.ts.map
|
|
@@ -0,0 +1,55 @@
|
|
|
1
|
+
|
|
2
|
+
const RULES_IMPORT_CORRECTNESS = {
|
|
3
|
+
"import/default": "error",
|
|
4
|
+
"import/namespace": "error"
|
|
5
|
+
};
|
|
6
|
+
const RULES_IMPORT_NURSERY = {
|
|
7
|
+
"import/export": "error",
|
|
8
|
+
"import/named": "error"
|
|
9
|
+
};
|
|
10
|
+
const RULES_IMPORT_RESTRICTION = {
|
|
11
|
+
"import/extensions": [
|
|
12
|
+
"error",
|
|
13
|
+
"always",
|
|
14
|
+
{
|
|
15
|
+
js: "never",
|
|
16
|
+
ts: "never",
|
|
17
|
+
jsx: "never",
|
|
18
|
+
tsx: "never",
|
|
19
|
+
checkTypeImports: true,
|
|
20
|
+
ignorePackages: true
|
|
21
|
+
}
|
|
22
|
+
],
|
|
23
|
+
"import/no-cycle": "error"
|
|
24
|
+
};
|
|
25
|
+
const RULES_IMPORT_STYLE = {
|
|
26
|
+
"import/consistent-type-specifier-style": ["error", "prefer-top-level"],
|
|
27
|
+
"import/exports-last": "error",
|
|
28
|
+
"import/first": "error",
|
|
29
|
+
"import/group-exports": "error",
|
|
30
|
+
"import/no-duplicates": ["error", {
|
|
31
|
+
considerQueryString: true,
|
|
32
|
+
preferInline: false
|
|
33
|
+
}],
|
|
34
|
+
"import/no-mutable-exports": "error"
|
|
35
|
+
};
|
|
36
|
+
const RULES_IMPORT_SUSPICIOUS = {
|
|
37
|
+
"import/no-empty-named-blocks": "error",
|
|
38
|
+
"import/no-named-as-default": "error",
|
|
39
|
+
"import/no-self-import": "error"
|
|
40
|
+
};
|
|
41
|
+
const RULES_IMPORT = {
|
|
42
|
+
...RULES_IMPORT_CORRECTNESS,
|
|
43
|
+
...RULES_IMPORT_NURSERY,
|
|
44
|
+
...RULES_IMPORT_RESTRICTION,
|
|
45
|
+
...RULES_IMPORT_STYLE,
|
|
46
|
+
...RULES_IMPORT_SUSPICIOUS
|
|
47
|
+
};
|
|
48
|
+
|
|
49
|
+
exports.RULES_IMPORT = RULES_IMPORT;
|
|
50
|
+
exports.RULES_IMPORT_CORRECTNESS = RULES_IMPORT_CORRECTNESS;
|
|
51
|
+
exports.RULES_IMPORT_NURSERY = RULES_IMPORT_NURSERY;
|
|
52
|
+
exports.RULES_IMPORT_RESTRICTION = RULES_IMPORT_RESTRICTION;
|
|
53
|
+
exports.RULES_IMPORT_STYLE = RULES_IMPORT_STYLE;
|
|
54
|
+
exports.RULES_IMPORT_SUSPICIOUS = RULES_IMPORT_SUSPICIOUS;
|
|
55
|
+
//# sourceMappingURL=import.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"import.js","names":[],"sources":["../../../../src/presets/common/rules/import.ts"],"sourcesContent":["import type { LintRules } from \"#/@types/oxlint\";\n\nconst RULES_IMPORT_CORRECTNESS = {\n \"import/default\": \"error\",\n \"import/namespace\": \"error\",\n} as const satisfies LintRules;\n\nconst RULES_IMPORT_NURSERY = {\n \"import/export\": \"error\",\n \"import/named\": \"error\",\n} as const satisfies LintRules;\n\nconst RULES_IMPORT_RESTRICTION = {\n \"import/extensions\": [\n \"error\",\n \"always\",\n {\n // source\n js: \"never\",\n ts: \"never\",\n jsx: \"never\",\n tsx: \"never\",\n // configurations\n checkTypeImports: true,\n ignorePackages: true,\n },\n ],\n \"import/no-cycle\": \"error\",\n} as const satisfies LintRules;\n\nconst RULES_IMPORT_STYLE = {\n \"import/consistent-type-specifier-style\": [\n \"error\",\n \"prefer-top-level\",\n ],\n \"import/exports-last\": \"error\",\n \"import/first\": \"error\",\n \"import/group-exports\": \"error\",\n \"import/no-duplicates\": [\n \"error\",\n {\n considerQueryString: true,\n preferInline: false,\n },\n ],\n \"import/no-mutable-exports\": \"error\",\n} as const satisfies LintRules;\n\nconst RULES_IMPORT_SUSPICIOUS = {\n \"import/no-empty-named-blocks\": \"error\",\n \"import/no-named-as-default\": \"error\",\n \"import/no-self-import\": \"error\",\n} as const satisfies LintRules;\n\nconst RULES_IMPORT = {\n ...RULES_IMPORT_CORRECTNESS,\n ...RULES_IMPORT_NURSERY,\n ...RULES_IMPORT_RESTRICTION,\n ...RULES_IMPORT_STYLE,\n ...RULES_IMPORT_SUSPICIOUS,\n} as const satisfies LintRules;\n\nexport {\n RULES_IMPORT,\n RULES_IMPORT_CORRECTNESS,\n RULES_IMPORT_NURSERY,\n RULES_IMPORT_RESTRICTION,\n RULES_IMPORT_STYLE,\n RULES_IMPORT_SUSPICIOUS,\n};\n"],"mappings":";AAEA,MAAM,2BAA2B;CAC7B,kBAAkB;CAClB,oBAAoB;CACvB;AAED,MAAM,uBAAuB;CACzB,iBAAiB;CACjB,gBAAgB;CACnB;AAED,MAAM,2BAA2B;CAC7B,qBAAqB;EACjB;EACA;EACA;GAEI,IAAI;GACJ,IAAI;GACJ,KAAK;GACL,KAAK;GAEL,kBAAkB;GAClB,gBAAgB;GACnB;EACJ;CACD,mBAAmB;CACtB;AAED,MAAM,qBAAqB;CACvB,0CAA0C,CACtC,SACA,mBACH;CACD,uBAAuB;CACvB,gBAAgB;CAChB,wBAAwB;CACxB,wBAAwB,CACpB,SACA;EACI,qBAAqB;EACrB,cAAc;EACjB,CACJ;CACD,6BAA6B;CAChC;AAED,MAAM,0BAA0B;CAC5B,gCAAgC;CAChC,8BAA8B;CAC9B,yBAAyB;CAC5B;AAED,MAAM,eAAe;CACjB,GAAG;CACH,GAAG;CACH,GAAG;CACH,GAAG;CACH,GAAG;CACN"}
|
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
const RULES_IMPORT_CORRECTNESS = {
|
|
2
|
+
"import/default": "error",
|
|
3
|
+
"import/namespace": "error"
|
|
4
|
+
};
|
|
5
|
+
const RULES_IMPORT_NURSERY = {
|
|
6
|
+
"import/export": "error",
|
|
7
|
+
"import/named": "error"
|
|
8
|
+
};
|
|
9
|
+
const RULES_IMPORT_RESTRICTION = {
|
|
10
|
+
"import/extensions": [
|
|
11
|
+
"error",
|
|
12
|
+
"always",
|
|
13
|
+
{
|
|
14
|
+
js: "never",
|
|
15
|
+
ts: "never",
|
|
16
|
+
jsx: "never",
|
|
17
|
+
tsx: "never",
|
|
18
|
+
checkTypeImports: true,
|
|
19
|
+
ignorePackages: true
|
|
20
|
+
}
|
|
21
|
+
],
|
|
22
|
+
"import/no-cycle": "error"
|
|
23
|
+
};
|
|
24
|
+
const RULES_IMPORT_STYLE = {
|
|
25
|
+
"import/consistent-type-specifier-style": ["error", "prefer-top-level"],
|
|
26
|
+
"import/exports-last": "error",
|
|
27
|
+
"import/first": "error",
|
|
28
|
+
"import/group-exports": "error",
|
|
29
|
+
"import/no-duplicates": ["error", {
|
|
30
|
+
considerQueryString: true,
|
|
31
|
+
preferInline: false
|
|
32
|
+
}],
|
|
33
|
+
"import/no-mutable-exports": "error"
|
|
34
|
+
};
|
|
35
|
+
const RULES_IMPORT_SUSPICIOUS = {
|
|
36
|
+
"import/no-empty-named-blocks": "error",
|
|
37
|
+
"import/no-named-as-default": "error",
|
|
38
|
+
"import/no-self-import": "error"
|
|
39
|
+
};
|
|
40
|
+
const RULES_IMPORT = {
|
|
41
|
+
...RULES_IMPORT_CORRECTNESS,
|
|
42
|
+
...RULES_IMPORT_NURSERY,
|
|
43
|
+
...RULES_IMPORT_RESTRICTION,
|
|
44
|
+
...RULES_IMPORT_STYLE,
|
|
45
|
+
...RULES_IMPORT_SUSPICIOUS
|
|
46
|
+
};
|
|
47
|
+
|
|
48
|
+
export { RULES_IMPORT, RULES_IMPORT_CORRECTNESS, RULES_IMPORT_NURSERY, RULES_IMPORT_RESTRICTION, RULES_IMPORT_STYLE, RULES_IMPORT_SUSPICIOUS };
|
|
49
|
+
//# sourceMappingURL=import.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"import.mjs","names":[],"sources":["../../../../src/presets/common/rules/import.ts"],"sourcesContent":["import type { LintRules } from \"#/@types/oxlint\";\n\nconst RULES_IMPORT_CORRECTNESS = {\n \"import/default\": \"error\",\n \"import/namespace\": \"error\",\n} as const satisfies LintRules;\n\nconst RULES_IMPORT_NURSERY = {\n \"import/export\": \"error\",\n \"import/named\": \"error\",\n} as const satisfies LintRules;\n\nconst RULES_IMPORT_RESTRICTION = {\n \"import/extensions\": [\n \"error\",\n \"always\",\n {\n // source\n js: \"never\",\n ts: \"never\",\n jsx: \"never\",\n tsx: \"never\",\n // configurations\n checkTypeImports: true,\n ignorePackages: true,\n },\n ],\n \"import/no-cycle\": \"error\",\n} as const satisfies LintRules;\n\nconst RULES_IMPORT_STYLE = {\n \"import/consistent-type-specifier-style\": [\n \"error\",\n \"prefer-top-level\",\n ],\n \"import/exports-last\": \"error\",\n \"import/first\": \"error\",\n \"import/group-exports\": \"error\",\n \"import/no-duplicates\": [\n \"error\",\n {\n considerQueryString: true,\n preferInline: false,\n },\n ],\n \"import/no-mutable-exports\": \"error\",\n} as const satisfies LintRules;\n\nconst RULES_IMPORT_SUSPICIOUS = {\n \"import/no-empty-named-blocks\": \"error\",\n \"import/no-named-as-default\": \"error\",\n \"import/no-self-import\": \"error\",\n} as const satisfies LintRules;\n\nconst RULES_IMPORT = {\n ...RULES_IMPORT_CORRECTNESS,\n ...RULES_IMPORT_NURSERY,\n ...RULES_IMPORT_RESTRICTION,\n ...RULES_IMPORT_STYLE,\n ...RULES_IMPORT_SUSPICIOUS,\n} as const satisfies LintRules;\n\nexport {\n RULES_IMPORT,\n RULES_IMPORT_CORRECTNESS,\n RULES_IMPORT_NURSERY,\n RULES_IMPORT_RESTRICTION,\n RULES_IMPORT_STYLE,\n RULES_IMPORT_SUSPICIOUS,\n};\n"],"mappings":"AAEA,MAAM,2BAA2B;CAC7B,kBAAkB;CAClB,oBAAoB;CACvB;AAED,MAAM,uBAAuB;CACzB,iBAAiB;CACjB,gBAAgB;CACnB;AAED,MAAM,2BAA2B;CAC7B,qBAAqB;EACjB;EACA;EACA;GAEI,IAAI;GACJ,IAAI;GACJ,KAAK;GACL,KAAK;GAEL,kBAAkB;GAClB,gBAAgB;GACnB;EACJ;CACD,mBAAmB;CACtB;AAED,MAAM,qBAAqB;CACvB,0CAA0C,CACtC,SACA,mBACH;CACD,uBAAuB;CACvB,gBAAgB;CAChB,wBAAwB;CACxB,wBAAwB,CACpB,SACA;EACI,qBAAqB;EACrB,cAAc;EACjB,CACJ;CACD,6BAA6B;CAChC;AAED,MAAM,0BAA0B;CAC5B,gCAAgC;CAChC,8BAA8B;CAC9B,yBAAyB;CAC5B;AAED,MAAM,eAAe;CACjB,GAAG;CACH,GAAG;CACH,GAAG;CACH,GAAG;CACH,GAAG;CACN"}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
declare const RULES_OXC_NURSERY: {
|
|
2
|
+
readonly "oxc/branches-sharing-code": "error";
|
|
3
|
+
};
|
|
4
|
+
declare const RULES_OXC_RESTRICTION: {
|
|
5
|
+
readonly "oxc/no-const-enum": "error";
|
|
6
|
+
};
|
|
7
|
+
declare const RULES_OXC: {
|
|
8
|
+
readonly "oxc/approx-constant": "error";
|
|
9
|
+
readonly "oxc/misrefactored-assign-op": "error";
|
|
10
|
+
readonly "oxc/no-this-in-exported-function": "error";
|
|
11
|
+
readonly "oxc/no-const-enum": "error";
|
|
12
|
+
readonly "oxc/branches-sharing-code": "error";
|
|
13
|
+
};
|
|
14
|
+
export { RULES_OXC, RULES_OXC_NURSERY, RULES_OXC_RESTRICTION };
|
|
15
|
+
//# sourceMappingURL=oxc.d.ts.map
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
|
|
2
|
+
const RULES_OXC_NURSERY = { "oxc/branches-sharing-code": "error" };
|
|
3
|
+
const RULES_OXC_RESTRICTION = { "oxc/no-const-enum": "error" };
|
|
4
|
+
const RULES_OXC_SUSPICIOUS = {
|
|
5
|
+
"oxc/approx-constant": "error",
|
|
6
|
+
"oxc/misrefactored-assign-op": "error",
|
|
7
|
+
"oxc/no-this-in-exported-function": "error"
|
|
8
|
+
};
|
|
9
|
+
const RULES_OXC = {
|
|
10
|
+
...RULES_OXC_NURSERY,
|
|
11
|
+
...RULES_OXC_RESTRICTION,
|
|
12
|
+
...RULES_OXC_SUSPICIOUS
|
|
13
|
+
};
|
|
14
|
+
|
|
15
|
+
exports.RULES_OXC = RULES_OXC;
|
|
16
|
+
exports.RULES_OXC_NURSERY = RULES_OXC_NURSERY;
|
|
17
|
+
exports.RULES_OXC_RESTRICTION = RULES_OXC_RESTRICTION;
|
|
18
|
+
//# sourceMappingURL=oxc.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"oxc.js","names":[],"sources":["../../../../src/presets/common/rules/oxc.ts"],"sourcesContent":["import type { LintRules } from \"#/@types/oxlint\";\n\nconst RULES_OXC_NURSERY = {\n \"oxc/branches-sharing-code\": \"error\",\n} as const satisfies LintRules;\n\nconst RULES_OXC_RESTRICTION = {\n \"oxc/no-const-enum\": \"error\",\n} as const satisfies LintRules;\n\nconst RULES_OXC_SUSPICIOUS = {\n \"oxc/approx-constant\": \"error\",\n \"oxc/misrefactored-assign-op\": \"error\",\n \"oxc/no-this-in-exported-function\": \"error\",\n} as const satisfies LintRules;\n\nconst RULES_OXC = {\n ...RULES_OXC_NURSERY,\n ...RULES_OXC_RESTRICTION,\n ...RULES_OXC_SUSPICIOUS,\n} as const satisfies LintRules;\n\nexport { RULES_OXC, RULES_OXC_NURSERY, RULES_OXC_RESTRICTION };\n"],"mappings":";AAEA,MAAM,oBAAoB,EACtB,6BAA6B,SAChC;AAED,MAAM,wBAAwB,EAC1B,qBAAqB,SACxB;AAED,MAAM,uBAAuB;CACzB,uBAAuB;CACvB,+BAA+B;CAC/B,oCAAoC;CACvC;AAED,MAAM,YAAY;CACd,GAAG;CACH,GAAG;CACH,GAAG;CACN"}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
const RULES_OXC_NURSERY = { "oxc/branches-sharing-code": "error" };
|
|
2
|
+
const RULES_OXC_RESTRICTION = { "oxc/no-const-enum": "error" };
|
|
3
|
+
const RULES_OXC_SUSPICIOUS = {
|
|
4
|
+
"oxc/approx-constant": "error",
|
|
5
|
+
"oxc/misrefactored-assign-op": "error",
|
|
6
|
+
"oxc/no-this-in-exported-function": "error"
|
|
7
|
+
};
|
|
8
|
+
const RULES_OXC = {
|
|
9
|
+
...RULES_OXC_NURSERY,
|
|
10
|
+
...RULES_OXC_RESTRICTION,
|
|
11
|
+
...RULES_OXC_SUSPICIOUS
|
|
12
|
+
};
|
|
13
|
+
|
|
14
|
+
export { RULES_OXC, RULES_OXC_NURSERY, RULES_OXC_RESTRICTION };
|
|
15
|
+
//# sourceMappingURL=oxc.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"oxc.mjs","names":[],"sources":["../../../../src/presets/common/rules/oxc.ts"],"sourcesContent":["import type { LintRules } from \"#/@types/oxlint\";\n\nconst RULES_OXC_NURSERY = {\n \"oxc/branches-sharing-code\": \"error\",\n} as const satisfies LintRules;\n\nconst RULES_OXC_RESTRICTION = {\n \"oxc/no-const-enum\": \"error\",\n} as const satisfies LintRules;\n\nconst RULES_OXC_SUSPICIOUS = {\n \"oxc/approx-constant\": \"error\",\n \"oxc/misrefactored-assign-op\": \"error\",\n \"oxc/no-this-in-exported-function\": \"error\",\n} as const satisfies LintRules;\n\nconst RULES_OXC = {\n ...RULES_OXC_NURSERY,\n ...RULES_OXC_RESTRICTION,\n ...RULES_OXC_SUSPICIOUS,\n} as const satisfies LintRules;\n\nexport { RULES_OXC, RULES_OXC_NURSERY, RULES_OXC_RESTRICTION };\n"],"mappings":"AAEA,MAAM,oBAAoB,EACtB,6BAA6B,SAChC;AAED,MAAM,wBAAwB,EAC1B,qBAAqB,SACxB;AAED,MAAM,uBAAuB;CACzB,uBAAuB;CACvB,+BAA+B;CAC/B,oCAAoC;CACvC;AAED,MAAM,YAAY;CACd,GAAG;CACH,GAAG;CACH,GAAG;CACN"}
|