@tofrankie/eslint 0.2.0 → 0.2.2
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/CHANGELOG.md +8 -0
- package/dist/index.cjs +65 -104
- package/dist/index.mjs +64 -103
- package/package.json +5 -5
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,13 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
|
+
## eslint@0.2.2 (2026-05-12)
|
|
4
|
+
|
|
5
|
+
- Update `@antfu/eslint-config` to `v8.3.0`
|
|
6
|
+
|
|
7
|
+
## eslint@0.2.1 (2026-04-09)
|
|
8
|
+
|
|
9
|
+
- Update `style/operator-linebreak` rule
|
|
10
|
+
|
|
3
11
|
## eslint@0.2.0 (2026-04-09)
|
|
4
12
|
|
|
5
13
|
- Update `@antfu/eslint-config` to `v8.1.1`
|
package/dist/index.cjs
CHANGED
|
@@ -22,7 +22,7 @@ var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__ge
|
|
|
22
22
|
}) : target, mod));
|
|
23
23
|
//#endregion
|
|
24
24
|
let _antfu_eslint_config = require("@antfu/eslint-config");
|
|
25
|
-
_antfu_eslint_config = __toESM(_antfu_eslint_config);
|
|
25
|
+
_antfu_eslint_config = __toESM(_antfu_eslint_config, 1);
|
|
26
26
|
let eslint_plugin_jsdoc = require("eslint-plugin-jsdoc");
|
|
27
27
|
let defu = require("defu");
|
|
28
28
|
let find_up_simple = require("find-up-simple");
|
|
@@ -125,105 +125,6 @@ const NODE_RULES = { "node/prefer-global/process": "off" };
|
|
|
125
125
|
*/
|
|
126
126
|
const PNPM_RULES = { "pnpm/yaml-enforce-settings": "off" };
|
|
127
127
|
//#endregion
|
|
128
|
-
//#region src/presets/react.ts
|
|
129
|
-
/**
|
|
130
|
-
* - rule: `react/*`
|
|
131
|
-
* - original rule: `react-x/*`
|
|
132
|
-
* - plugin: `@eslint-react/eslint-plugin`
|
|
133
|
-
* @see https://github.com/Rel1cx/eslint-react/tree/main/packages/plugins/eslint-plugin
|
|
134
|
-
*/
|
|
135
|
-
const REACT_RULES = { "react/set-state-in-effect": "off" };
|
|
136
|
-
//#endregion
|
|
137
|
-
//#region src/presets/stylistic.ts
|
|
138
|
-
/**
|
|
139
|
-
* - rule: `style/*`
|
|
140
|
-
* - original rule: `@stylistic/*`
|
|
141
|
-
* - plugin: `@stylistic/eslint-plugin`
|
|
142
|
-
* @see https://github.com/antfu/eslint-config#stylistic
|
|
143
|
-
* @see https://eslint.style/rules
|
|
144
|
-
*/
|
|
145
|
-
const STYLISTIC_RULES = {
|
|
146
|
-
"style/quotes": [
|
|
147
|
-
"error",
|
|
148
|
-
"single",
|
|
149
|
-
{
|
|
150
|
-
avoidEscape: true,
|
|
151
|
-
allowTemplateLiterals: "avoidEscape"
|
|
152
|
-
}
|
|
153
|
-
],
|
|
154
|
-
"style/quote-props": ["error", "as-needed"],
|
|
155
|
-
"style/arrow-parens": ["error", "as-needed"],
|
|
156
|
-
"style/brace-style": [
|
|
157
|
-
"error",
|
|
158
|
-
"1tbs",
|
|
159
|
-
{ allowSingleLine: false }
|
|
160
|
-
],
|
|
161
|
-
"style/operator-linebreak": [
|
|
162
|
-
"error",
|
|
163
|
-
"after",
|
|
164
|
-
{ overrides: {
|
|
165
|
-
"?": "before",
|
|
166
|
-
":": "before"
|
|
167
|
-
} }
|
|
168
|
-
],
|
|
169
|
-
"style/member-delimiter-style": ["error", {
|
|
170
|
-
multiline: {
|
|
171
|
-
delimiter: "none",
|
|
172
|
-
requireLast: false
|
|
173
|
-
},
|
|
174
|
-
singleline: {
|
|
175
|
-
delimiter: "semi",
|
|
176
|
-
requireLast: false
|
|
177
|
-
},
|
|
178
|
-
multilineDetection: "brackets",
|
|
179
|
-
overrides: { interface: { multiline: {
|
|
180
|
-
delimiter: "none",
|
|
181
|
-
requireLast: false
|
|
182
|
-
} } }
|
|
183
|
-
}],
|
|
184
|
-
"style/comma-dangle": "off",
|
|
185
|
-
"style/indent": "off",
|
|
186
|
-
"style/indent-binary-ops": "off",
|
|
187
|
-
"style/jsx-curly-newline": "off",
|
|
188
|
-
"style/jsx-one-expression-per-line": "off",
|
|
189
|
-
"style/jsx-wrap-multilines": "off",
|
|
190
|
-
"style/multiline-ternary": "off",
|
|
191
|
-
"style/object-curly-spacing": "off"
|
|
192
|
-
};
|
|
193
|
-
//#endregion
|
|
194
|
-
//#region src/presets/test.ts
|
|
195
|
-
/**
|
|
196
|
-
* - rule: `test/*`
|
|
197
|
-
* - original rule: `vitest/*`, `no-only-tests/*`
|
|
198
|
-
* - plugin: `@vitest/eslint-plugin`, `eslint-plugin-no-only-tests`
|
|
199
|
-
* @see https://github.com/antfu/eslint-config#test
|
|
200
|
-
* @see https://github.com/vitest-dev/eslint-plugin-vitest
|
|
201
|
-
* @see https://github.com/levibuzolic/eslint-plugin-no-only-tests
|
|
202
|
-
*/
|
|
203
|
-
const TEST_RULES = { "test/prefer-lowercase-title": "off" };
|
|
204
|
-
//#endregion
|
|
205
|
-
//#region src/presets/typescript.ts
|
|
206
|
-
/**
|
|
207
|
-
* - rule: `ts/*`
|
|
208
|
-
* - original rule: `@typescript-eslint/*`
|
|
209
|
-
* - plugin: `@typescript-eslint/eslint-plugin`
|
|
210
|
-
* @see https://github.com/antfu/eslint-config#typescript
|
|
211
|
-
* @see https://typescript-eslint.io/rules/
|
|
212
|
-
*/
|
|
213
|
-
const TYPESCRIPT_RULES = {
|
|
214
|
-
"no-unused-vars": "off",
|
|
215
|
-
"unused-imports/no-unused-vars": "off",
|
|
216
|
-
"ts/no-unused-vars": ["error", {
|
|
217
|
-
args: "all",
|
|
218
|
-
argsIgnorePattern: "^_",
|
|
219
|
-
caughtErrors: "all",
|
|
220
|
-
caughtErrorsIgnorePattern: "^_",
|
|
221
|
-
destructuredArrayIgnorePattern: "^_",
|
|
222
|
-
varsIgnorePattern: "^_",
|
|
223
|
-
ignoreRestSiblings: true
|
|
224
|
-
}]
|
|
225
|
-
};
|
|
226
|
-
//#endregion
|
|
227
128
|
//#region src/presets/index.ts
|
|
228
129
|
const INTEGRATION_RULE_PRESETS = [
|
|
229
130
|
{
|
|
@@ -243,12 +144,60 @@ const INTEGRATION_RULE_PRESETS = [
|
|
|
243
144
|
{
|
|
244
145
|
key: "react",
|
|
245
146
|
option: "react",
|
|
246
|
-
rules:
|
|
147
|
+
rules: { "react/set-state-in-effect": "off" }
|
|
247
148
|
},
|
|
248
149
|
{
|
|
249
150
|
key: "stylistic",
|
|
250
151
|
option: "stylistic",
|
|
251
|
-
rules:
|
|
152
|
+
rules: {
|
|
153
|
+
"style/quotes": [
|
|
154
|
+
"error",
|
|
155
|
+
"single",
|
|
156
|
+
{
|
|
157
|
+
avoidEscape: true,
|
|
158
|
+
allowTemplateLiterals: "avoidEscape"
|
|
159
|
+
}
|
|
160
|
+
],
|
|
161
|
+
"style/quote-props": ["error", "as-needed"],
|
|
162
|
+
"style/arrow-parens": ["error", "as-needed"],
|
|
163
|
+
"style/brace-style": [
|
|
164
|
+
"error",
|
|
165
|
+
"1tbs",
|
|
166
|
+
{ allowSingleLine: false }
|
|
167
|
+
],
|
|
168
|
+
"style/operator-linebreak": [
|
|
169
|
+
"error",
|
|
170
|
+
"after",
|
|
171
|
+
{ overrides: {
|
|
172
|
+
"?": "before",
|
|
173
|
+
":": "before",
|
|
174
|
+
"|": "before"
|
|
175
|
+
} }
|
|
176
|
+
],
|
|
177
|
+
"style/member-delimiter-style": ["error", {
|
|
178
|
+
multiline: {
|
|
179
|
+
delimiter: "none",
|
|
180
|
+
requireLast: false
|
|
181
|
+
},
|
|
182
|
+
singleline: {
|
|
183
|
+
delimiter: "semi",
|
|
184
|
+
requireLast: false
|
|
185
|
+
},
|
|
186
|
+
multilineDetection: "brackets",
|
|
187
|
+
overrides: { interface: { multiline: {
|
|
188
|
+
delimiter: "none",
|
|
189
|
+
requireLast: false
|
|
190
|
+
} } }
|
|
191
|
+
}],
|
|
192
|
+
"style/comma-dangle": "off",
|
|
193
|
+
"style/indent": "off",
|
|
194
|
+
"style/indent-binary-ops": "off",
|
|
195
|
+
"style/jsx-curly-newline": "off",
|
|
196
|
+
"style/jsx-one-expression-per-line": "off",
|
|
197
|
+
"style/jsx-wrap-multilines": "off",
|
|
198
|
+
"style/multiline-ternary": "off",
|
|
199
|
+
"style/object-curly-spacing": "off"
|
|
200
|
+
}
|
|
252
201
|
},
|
|
253
202
|
{
|
|
254
203
|
key: "stylistic",
|
|
@@ -259,12 +208,24 @@ const INTEGRATION_RULE_PRESETS = [
|
|
|
259
208
|
{
|
|
260
209
|
key: "test",
|
|
261
210
|
option: "test",
|
|
262
|
-
rules:
|
|
211
|
+
rules: { "test/prefer-lowercase-title": "off" }
|
|
263
212
|
},
|
|
264
213
|
{
|
|
265
214
|
key: "typescript",
|
|
266
215
|
option: "typescript",
|
|
267
|
-
rules:
|
|
216
|
+
rules: {
|
|
217
|
+
"no-unused-vars": "off",
|
|
218
|
+
"unused-imports/no-unused-vars": "off",
|
|
219
|
+
"ts/no-unused-vars": ["error", {
|
|
220
|
+
args: "all",
|
|
221
|
+
argsIgnorePattern: "^_",
|
|
222
|
+
caughtErrors: "all",
|
|
223
|
+
caughtErrorsIgnorePattern: "^_",
|
|
224
|
+
destructuredArrayIgnorePattern: "^_",
|
|
225
|
+
varsIgnorePattern: "^_",
|
|
226
|
+
ignoreRestSiblings: true
|
|
227
|
+
}]
|
|
228
|
+
}
|
|
268
229
|
},
|
|
269
230
|
{
|
|
270
231
|
key: "vue",
|
package/dist/index.mjs
CHANGED
|
@@ -102,105 +102,6 @@ const NODE_RULES = { "node/prefer-global/process": "off" };
|
|
|
102
102
|
*/
|
|
103
103
|
const PNPM_RULES = { "pnpm/yaml-enforce-settings": "off" };
|
|
104
104
|
//#endregion
|
|
105
|
-
//#region src/presets/react.ts
|
|
106
|
-
/**
|
|
107
|
-
* - rule: `react/*`
|
|
108
|
-
* - original rule: `react-x/*`
|
|
109
|
-
* - plugin: `@eslint-react/eslint-plugin`
|
|
110
|
-
* @see https://github.com/Rel1cx/eslint-react/tree/main/packages/plugins/eslint-plugin
|
|
111
|
-
*/
|
|
112
|
-
const REACT_RULES = { "react/set-state-in-effect": "off" };
|
|
113
|
-
//#endregion
|
|
114
|
-
//#region src/presets/stylistic.ts
|
|
115
|
-
/**
|
|
116
|
-
* - rule: `style/*`
|
|
117
|
-
* - original rule: `@stylistic/*`
|
|
118
|
-
* - plugin: `@stylistic/eslint-plugin`
|
|
119
|
-
* @see https://github.com/antfu/eslint-config#stylistic
|
|
120
|
-
* @see https://eslint.style/rules
|
|
121
|
-
*/
|
|
122
|
-
const STYLISTIC_RULES = {
|
|
123
|
-
"style/quotes": [
|
|
124
|
-
"error",
|
|
125
|
-
"single",
|
|
126
|
-
{
|
|
127
|
-
avoidEscape: true,
|
|
128
|
-
allowTemplateLiterals: "avoidEscape"
|
|
129
|
-
}
|
|
130
|
-
],
|
|
131
|
-
"style/quote-props": ["error", "as-needed"],
|
|
132
|
-
"style/arrow-parens": ["error", "as-needed"],
|
|
133
|
-
"style/brace-style": [
|
|
134
|
-
"error",
|
|
135
|
-
"1tbs",
|
|
136
|
-
{ allowSingleLine: false }
|
|
137
|
-
],
|
|
138
|
-
"style/operator-linebreak": [
|
|
139
|
-
"error",
|
|
140
|
-
"after",
|
|
141
|
-
{ overrides: {
|
|
142
|
-
"?": "before",
|
|
143
|
-
":": "before"
|
|
144
|
-
} }
|
|
145
|
-
],
|
|
146
|
-
"style/member-delimiter-style": ["error", {
|
|
147
|
-
multiline: {
|
|
148
|
-
delimiter: "none",
|
|
149
|
-
requireLast: false
|
|
150
|
-
},
|
|
151
|
-
singleline: {
|
|
152
|
-
delimiter: "semi",
|
|
153
|
-
requireLast: false
|
|
154
|
-
},
|
|
155
|
-
multilineDetection: "brackets",
|
|
156
|
-
overrides: { interface: { multiline: {
|
|
157
|
-
delimiter: "none",
|
|
158
|
-
requireLast: false
|
|
159
|
-
} } }
|
|
160
|
-
}],
|
|
161
|
-
"style/comma-dangle": "off",
|
|
162
|
-
"style/indent": "off",
|
|
163
|
-
"style/indent-binary-ops": "off",
|
|
164
|
-
"style/jsx-curly-newline": "off",
|
|
165
|
-
"style/jsx-one-expression-per-line": "off",
|
|
166
|
-
"style/jsx-wrap-multilines": "off",
|
|
167
|
-
"style/multiline-ternary": "off",
|
|
168
|
-
"style/object-curly-spacing": "off"
|
|
169
|
-
};
|
|
170
|
-
//#endregion
|
|
171
|
-
//#region src/presets/test.ts
|
|
172
|
-
/**
|
|
173
|
-
* - rule: `test/*`
|
|
174
|
-
* - original rule: `vitest/*`, `no-only-tests/*`
|
|
175
|
-
* - plugin: `@vitest/eslint-plugin`, `eslint-plugin-no-only-tests`
|
|
176
|
-
* @see https://github.com/antfu/eslint-config#test
|
|
177
|
-
* @see https://github.com/vitest-dev/eslint-plugin-vitest
|
|
178
|
-
* @see https://github.com/levibuzolic/eslint-plugin-no-only-tests
|
|
179
|
-
*/
|
|
180
|
-
const TEST_RULES = { "test/prefer-lowercase-title": "off" };
|
|
181
|
-
//#endregion
|
|
182
|
-
//#region src/presets/typescript.ts
|
|
183
|
-
/**
|
|
184
|
-
* - rule: `ts/*`
|
|
185
|
-
* - original rule: `@typescript-eslint/*`
|
|
186
|
-
* - plugin: `@typescript-eslint/eslint-plugin`
|
|
187
|
-
* @see https://github.com/antfu/eslint-config#typescript
|
|
188
|
-
* @see https://typescript-eslint.io/rules/
|
|
189
|
-
*/
|
|
190
|
-
const TYPESCRIPT_RULES = {
|
|
191
|
-
"no-unused-vars": "off",
|
|
192
|
-
"unused-imports/no-unused-vars": "off",
|
|
193
|
-
"ts/no-unused-vars": ["error", {
|
|
194
|
-
args: "all",
|
|
195
|
-
argsIgnorePattern: "^_",
|
|
196
|
-
caughtErrors: "all",
|
|
197
|
-
caughtErrorsIgnorePattern: "^_",
|
|
198
|
-
destructuredArrayIgnorePattern: "^_",
|
|
199
|
-
varsIgnorePattern: "^_",
|
|
200
|
-
ignoreRestSiblings: true
|
|
201
|
-
}]
|
|
202
|
-
};
|
|
203
|
-
//#endregion
|
|
204
105
|
//#region src/presets/index.ts
|
|
205
106
|
const INTEGRATION_RULE_PRESETS = [
|
|
206
107
|
{
|
|
@@ -220,12 +121,60 @@ const INTEGRATION_RULE_PRESETS = [
|
|
|
220
121
|
{
|
|
221
122
|
key: "react",
|
|
222
123
|
option: "react",
|
|
223
|
-
rules:
|
|
124
|
+
rules: { "react/set-state-in-effect": "off" }
|
|
224
125
|
},
|
|
225
126
|
{
|
|
226
127
|
key: "stylistic",
|
|
227
128
|
option: "stylistic",
|
|
228
|
-
rules:
|
|
129
|
+
rules: {
|
|
130
|
+
"style/quotes": [
|
|
131
|
+
"error",
|
|
132
|
+
"single",
|
|
133
|
+
{
|
|
134
|
+
avoidEscape: true,
|
|
135
|
+
allowTemplateLiterals: "avoidEscape"
|
|
136
|
+
}
|
|
137
|
+
],
|
|
138
|
+
"style/quote-props": ["error", "as-needed"],
|
|
139
|
+
"style/arrow-parens": ["error", "as-needed"],
|
|
140
|
+
"style/brace-style": [
|
|
141
|
+
"error",
|
|
142
|
+
"1tbs",
|
|
143
|
+
{ allowSingleLine: false }
|
|
144
|
+
],
|
|
145
|
+
"style/operator-linebreak": [
|
|
146
|
+
"error",
|
|
147
|
+
"after",
|
|
148
|
+
{ overrides: {
|
|
149
|
+
"?": "before",
|
|
150
|
+
":": "before",
|
|
151
|
+
"|": "before"
|
|
152
|
+
} }
|
|
153
|
+
],
|
|
154
|
+
"style/member-delimiter-style": ["error", {
|
|
155
|
+
multiline: {
|
|
156
|
+
delimiter: "none",
|
|
157
|
+
requireLast: false
|
|
158
|
+
},
|
|
159
|
+
singleline: {
|
|
160
|
+
delimiter: "semi",
|
|
161
|
+
requireLast: false
|
|
162
|
+
},
|
|
163
|
+
multilineDetection: "brackets",
|
|
164
|
+
overrides: { interface: { multiline: {
|
|
165
|
+
delimiter: "none",
|
|
166
|
+
requireLast: false
|
|
167
|
+
} } }
|
|
168
|
+
}],
|
|
169
|
+
"style/comma-dangle": "off",
|
|
170
|
+
"style/indent": "off",
|
|
171
|
+
"style/indent-binary-ops": "off",
|
|
172
|
+
"style/jsx-curly-newline": "off",
|
|
173
|
+
"style/jsx-one-expression-per-line": "off",
|
|
174
|
+
"style/jsx-wrap-multilines": "off",
|
|
175
|
+
"style/multiline-ternary": "off",
|
|
176
|
+
"style/object-curly-spacing": "off"
|
|
177
|
+
}
|
|
229
178
|
},
|
|
230
179
|
{
|
|
231
180
|
key: "stylistic",
|
|
@@ -236,12 +185,24 @@ const INTEGRATION_RULE_PRESETS = [
|
|
|
236
185
|
{
|
|
237
186
|
key: "test",
|
|
238
187
|
option: "test",
|
|
239
|
-
rules:
|
|
188
|
+
rules: { "test/prefer-lowercase-title": "off" }
|
|
240
189
|
},
|
|
241
190
|
{
|
|
242
191
|
key: "typescript",
|
|
243
192
|
option: "typescript",
|
|
244
|
-
rules:
|
|
193
|
+
rules: {
|
|
194
|
+
"no-unused-vars": "off",
|
|
195
|
+
"unused-imports/no-unused-vars": "off",
|
|
196
|
+
"ts/no-unused-vars": ["error", {
|
|
197
|
+
args: "all",
|
|
198
|
+
argsIgnorePattern: "^_",
|
|
199
|
+
caughtErrors: "all",
|
|
200
|
+
caughtErrorsIgnorePattern: "^_",
|
|
201
|
+
destructuredArrayIgnorePattern: "^_",
|
|
202
|
+
varsIgnorePattern: "^_",
|
|
203
|
+
ignoreRestSiblings: true
|
|
204
|
+
}]
|
|
205
|
+
}
|
|
245
206
|
},
|
|
246
207
|
{
|
|
247
208
|
key: "vue",
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@tofrankie/eslint",
|
|
3
3
|
"type": "module",
|
|
4
|
-
"version": "0.2.
|
|
4
|
+
"version": "0.2.2",
|
|
5
5
|
"description": "Shared ESLint configuration",
|
|
6
6
|
"author": "Frankie <1426203851@qq.com>",
|
|
7
7
|
"license": "MIT",
|
|
@@ -55,9 +55,9 @@
|
|
|
55
55
|
"@angular-eslint/eslint-plugin": "^21.3.1",
|
|
56
56
|
"@angular-eslint/eslint-plugin-template": "^21.3.1",
|
|
57
57
|
"@angular-eslint/template-parser": "^21.3.1",
|
|
58
|
-
"@antfu/eslint-config": "^8.
|
|
58
|
+
"@antfu/eslint-config": "^8.3.0",
|
|
59
59
|
"@eslint-react/eslint-plugin": "^3.0.0",
|
|
60
|
-
"@next/eslint-plugin-next": "^16.2.
|
|
60
|
+
"@next/eslint-plugin-next": "^16.2.6",
|
|
61
61
|
"@prettier/plugin-xml": "^3.4.2",
|
|
62
62
|
"@unocss/eslint-plugin": "^66.6.8",
|
|
63
63
|
"defu": "^6.1.7",
|
|
@@ -67,13 +67,13 @@
|
|
|
67
67
|
"eslint-plugin-jsx-a11y": "^6.10.2",
|
|
68
68
|
"eslint-plugin-react-refresh": "^0.5.2",
|
|
69
69
|
"eslint-plugin-solid": "^0.14.5",
|
|
70
|
-
"eslint-plugin-svelte": "^3.17.
|
|
70
|
+
"eslint-plugin-svelte": "^3.17.1",
|
|
71
71
|
"find-up-simple": "^1.0.1",
|
|
72
72
|
"local-pkg": "^1.1.2",
|
|
73
73
|
"prettier-plugin-astro": "^0.14.1"
|
|
74
74
|
},
|
|
75
75
|
"devDependencies": {
|
|
76
|
-
"eslint": "^10.
|
|
76
|
+
"eslint": "^10.3.0",
|
|
77
77
|
"@tofrankie/tsconfig": "0.0.5"
|
|
78
78
|
},
|
|
79
79
|
"scripts": {
|