@lqbach/eslint-config 0.7.0 → 0.8.1
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 +15 -0
- package/dist/index.cjs +33 -346
- package/dist/index.d.cts +15 -11
- package/dist/index.d.ts +15 -11
- package/dist/index.js +66 -402
- package/package.json +10 -7
- package/src/index.ts +39 -3
- package/src/libs.ts +2 -2
- package/src/types.ts +18 -13
- package/test/astro.spec.ts +120 -0
package/dist/index.js
CHANGED
|
@@ -1,387 +1,24 @@
|
|
|
1
|
-
var __create = Object.create;
|
|
2
|
-
var __defProp = Object.defineProperty;
|
|
3
|
-
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
4
|
-
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
5
|
-
var __getProtoOf = Object.getPrototypeOf;
|
|
6
|
-
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
7
|
-
var __commonJS = (cb, mod) => function __require() {
|
|
8
|
-
return mod || (0, cb[__getOwnPropNames(cb)[0]])((mod = { exports: {} }).exports, mod), mod.exports;
|
|
9
|
-
};
|
|
10
|
-
var __copyProps = (to, from, except, desc) => {
|
|
11
|
-
if (from && typeof from === "object" || typeof from === "function") {
|
|
12
|
-
for (let key of __getOwnPropNames(from))
|
|
13
|
-
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
14
|
-
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
15
|
-
}
|
|
16
|
-
return to;
|
|
17
|
-
};
|
|
18
|
-
var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
|
|
19
|
-
// If the importer is in node compatibility mode or this is not an ESM
|
|
20
|
-
// file that has been converted to a CommonJS file using a Babel-
|
|
21
|
-
// compatible transform (i.e. "__esModule" has not been set), then set
|
|
22
|
-
// "default" to the CommonJS "module.exports" for node compatibility.
|
|
23
|
-
isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
|
|
24
|
-
mod
|
|
25
|
-
));
|
|
26
|
-
|
|
27
|
-
// ../../node_modules/.pnpm/@eslint+js@9.17.0/node_modules/@eslint/js/package.json
|
|
28
|
-
var require_package = __commonJS({
|
|
29
|
-
"../../node_modules/.pnpm/@eslint+js@9.17.0/node_modules/@eslint/js/package.json"(exports, module) {
|
|
30
|
-
module.exports = {
|
|
31
|
-
name: "@eslint/js",
|
|
32
|
-
version: "9.17.0",
|
|
33
|
-
description: "ESLint JavaScript language implementation",
|
|
34
|
-
main: "./src/index.js",
|
|
35
|
-
types: "./types/index.d.ts",
|
|
36
|
-
scripts: {
|
|
37
|
-
"test:types": "tsc -p tests/types/tsconfig.json"
|
|
38
|
-
},
|
|
39
|
-
files: [
|
|
40
|
-
"LICENSE",
|
|
41
|
-
"README.md",
|
|
42
|
-
"src",
|
|
43
|
-
"types"
|
|
44
|
-
],
|
|
45
|
-
publishConfig: {
|
|
46
|
-
access: "public"
|
|
47
|
-
},
|
|
48
|
-
repository: {
|
|
49
|
-
type: "git",
|
|
50
|
-
url: "https://github.com/eslint/eslint.git",
|
|
51
|
-
directory: "packages/js"
|
|
52
|
-
},
|
|
53
|
-
homepage: "https://eslint.org",
|
|
54
|
-
bugs: "https://github.com/eslint/eslint/issues/",
|
|
55
|
-
keywords: [
|
|
56
|
-
"javascript",
|
|
57
|
-
"eslint-plugin",
|
|
58
|
-
"eslint"
|
|
59
|
-
],
|
|
60
|
-
license: "MIT",
|
|
61
|
-
engines: {
|
|
62
|
-
node: "^18.18.0 || ^20.9.0 || >=21.1.0"
|
|
63
|
-
}
|
|
64
|
-
};
|
|
65
|
-
}
|
|
66
|
-
});
|
|
67
|
-
|
|
68
|
-
// ../../node_modules/.pnpm/@eslint+js@9.17.0/node_modules/@eslint/js/src/configs/eslint-all.js
|
|
69
|
-
var require_eslint_all = __commonJS({
|
|
70
|
-
"../../node_modules/.pnpm/@eslint+js@9.17.0/node_modules/@eslint/js/src/configs/eslint-all.js"(exports, module) {
|
|
71
|
-
"use strict";
|
|
72
|
-
module.exports = Object.freeze({
|
|
73
|
-
"rules": {
|
|
74
|
-
"accessor-pairs": "error",
|
|
75
|
-
"array-callback-return": "error",
|
|
76
|
-
"arrow-body-style": "error",
|
|
77
|
-
"block-scoped-var": "error",
|
|
78
|
-
"camelcase": "error",
|
|
79
|
-
"capitalized-comments": "error",
|
|
80
|
-
"class-methods-use-this": "error",
|
|
81
|
-
"complexity": "error",
|
|
82
|
-
"consistent-return": "error",
|
|
83
|
-
"consistent-this": "error",
|
|
84
|
-
"constructor-super": "error",
|
|
85
|
-
"curly": "error",
|
|
86
|
-
"default-case": "error",
|
|
87
|
-
"default-case-last": "error",
|
|
88
|
-
"default-param-last": "error",
|
|
89
|
-
"dot-notation": "error",
|
|
90
|
-
"eqeqeq": "error",
|
|
91
|
-
"for-direction": "error",
|
|
92
|
-
"func-name-matching": "error",
|
|
93
|
-
"func-names": "error",
|
|
94
|
-
"func-style": "error",
|
|
95
|
-
"getter-return": "error",
|
|
96
|
-
"grouped-accessor-pairs": "error",
|
|
97
|
-
"guard-for-in": "error",
|
|
98
|
-
"id-denylist": "error",
|
|
99
|
-
"id-length": "error",
|
|
100
|
-
"id-match": "error",
|
|
101
|
-
"init-declarations": "error",
|
|
102
|
-
"logical-assignment-operators": "error",
|
|
103
|
-
"max-classes-per-file": "error",
|
|
104
|
-
"max-depth": "error",
|
|
105
|
-
"max-lines": "error",
|
|
106
|
-
"max-lines-per-function": "error",
|
|
107
|
-
"max-nested-callbacks": "error",
|
|
108
|
-
"max-params": "error",
|
|
109
|
-
"max-statements": "error",
|
|
110
|
-
"new-cap": "error",
|
|
111
|
-
"no-alert": "error",
|
|
112
|
-
"no-array-constructor": "error",
|
|
113
|
-
"no-async-promise-executor": "error",
|
|
114
|
-
"no-await-in-loop": "error",
|
|
115
|
-
"no-bitwise": "error",
|
|
116
|
-
"no-caller": "error",
|
|
117
|
-
"no-case-declarations": "error",
|
|
118
|
-
"no-class-assign": "error",
|
|
119
|
-
"no-compare-neg-zero": "error",
|
|
120
|
-
"no-cond-assign": "error",
|
|
121
|
-
"no-console": "error",
|
|
122
|
-
"no-const-assign": "error",
|
|
123
|
-
"no-constant-binary-expression": "error",
|
|
124
|
-
"no-constant-condition": "error",
|
|
125
|
-
"no-constructor-return": "error",
|
|
126
|
-
"no-continue": "error",
|
|
127
|
-
"no-control-regex": "error",
|
|
128
|
-
"no-debugger": "error",
|
|
129
|
-
"no-delete-var": "error",
|
|
130
|
-
"no-div-regex": "error",
|
|
131
|
-
"no-dupe-args": "error",
|
|
132
|
-
"no-dupe-class-members": "error",
|
|
133
|
-
"no-dupe-else-if": "error",
|
|
134
|
-
"no-dupe-keys": "error",
|
|
135
|
-
"no-duplicate-case": "error",
|
|
136
|
-
"no-duplicate-imports": "error",
|
|
137
|
-
"no-else-return": "error",
|
|
138
|
-
"no-empty": "error",
|
|
139
|
-
"no-empty-character-class": "error",
|
|
140
|
-
"no-empty-function": "error",
|
|
141
|
-
"no-empty-pattern": "error",
|
|
142
|
-
"no-empty-static-block": "error",
|
|
143
|
-
"no-eq-null": "error",
|
|
144
|
-
"no-eval": "error",
|
|
145
|
-
"no-ex-assign": "error",
|
|
146
|
-
"no-extend-native": "error",
|
|
147
|
-
"no-extra-bind": "error",
|
|
148
|
-
"no-extra-boolean-cast": "error",
|
|
149
|
-
"no-extra-label": "error",
|
|
150
|
-
"no-fallthrough": "error",
|
|
151
|
-
"no-func-assign": "error",
|
|
152
|
-
"no-global-assign": "error",
|
|
153
|
-
"no-implicit-coercion": "error",
|
|
154
|
-
"no-implicit-globals": "error",
|
|
155
|
-
"no-implied-eval": "error",
|
|
156
|
-
"no-import-assign": "error",
|
|
157
|
-
"no-inline-comments": "error",
|
|
158
|
-
"no-inner-declarations": "error",
|
|
159
|
-
"no-invalid-regexp": "error",
|
|
160
|
-
"no-invalid-this": "error",
|
|
161
|
-
"no-irregular-whitespace": "error",
|
|
162
|
-
"no-iterator": "error",
|
|
163
|
-
"no-label-var": "error",
|
|
164
|
-
"no-labels": "error",
|
|
165
|
-
"no-lone-blocks": "error",
|
|
166
|
-
"no-lonely-if": "error",
|
|
167
|
-
"no-loop-func": "error",
|
|
168
|
-
"no-loss-of-precision": "error",
|
|
169
|
-
"no-magic-numbers": "error",
|
|
170
|
-
"no-misleading-character-class": "error",
|
|
171
|
-
"no-multi-assign": "error",
|
|
172
|
-
"no-multi-str": "error",
|
|
173
|
-
"no-negated-condition": "error",
|
|
174
|
-
"no-nested-ternary": "error",
|
|
175
|
-
"no-new": "error",
|
|
176
|
-
"no-new-func": "error",
|
|
177
|
-
"no-new-native-nonconstructor": "error",
|
|
178
|
-
"no-new-wrappers": "error",
|
|
179
|
-
"no-nonoctal-decimal-escape": "error",
|
|
180
|
-
"no-obj-calls": "error",
|
|
181
|
-
"no-object-constructor": "error",
|
|
182
|
-
"no-octal": "error",
|
|
183
|
-
"no-octal-escape": "error",
|
|
184
|
-
"no-param-reassign": "error",
|
|
185
|
-
"no-plusplus": "error",
|
|
186
|
-
"no-promise-executor-return": "error",
|
|
187
|
-
"no-proto": "error",
|
|
188
|
-
"no-prototype-builtins": "error",
|
|
189
|
-
"no-redeclare": "error",
|
|
190
|
-
"no-regex-spaces": "error",
|
|
191
|
-
"no-restricted-exports": "error",
|
|
192
|
-
"no-restricted-globals": "error",
|
|
193
|
-
"no-restricted-imports": "error",
|
|
194
|
-
"no-restricted-properties": "error",
|
|
195
|
-
"no-restricted-syntax": "error",
|
|
196
|
-
"no-return-assign": "error",
|
|
197
|
-
"no-script-url": "error",
|
|
198
|
-
"no-self-assign": "error",
|
|
199
|
-
"no-self-compare": "error",
|
|
200
|
-
"no-sequences": "error",
|
|
201
|
-
"no-setter-return": "error",
|
|
202
|
-
"no-shadow": "error",
|
|
203
|
-
"no-shadow-restricted-names": "error",
|
|
204
|
-
"no-sparse-arrays": "error",
|
|
205
|
-
"no-template-curly-in-string": "error",
|
|
206
|
-
"no-ternary": "error",
|
|
207
|
-
"no-this-before-super": "error",
|
|
208
|
-
"no-throw-literal": "error",
|
|
209
|
-
"no-undef": "error",
|
|
210
|
-
"no-undef-init": "error",
|
|
211
|
-
"no-undefined": "error",
|
|
212
|
-
"no-underscore-dangle": "error",
|
|
213
|
-
"no-unexpected-multiline": "error",
|
|
214
|
-
"no-unmodified-loop-condition": "error",
|
|
215
|
-
"no-unneeded-ternary": "error",
|
|
216
|
-
"no-unreachable": "error",
|
|
217
|
-
"no-unreachable-loop": "error",
|
|
218
|
-
"no-unsafe-finally": "error",
|
|
219
|
-
"no-unsafe-negation": "error",
|
|
220
|
-
"no-unsafe-optional-chaining": "error",
|
|
221
|
-
"no-unused-expressions": "error",
|
|
222
|
-
"no-unused-labels": "error",
|
|
223
|
-
"no-unused-private-class-members": "error",
|
|
224
|
-
"no-unused-vars": "error",
|
|
225
|
-
"no-use-before-define": "error",
|
|
226
|
-
"no-useless-assignment": "error",
|
|
227
|
-
"no-useless-backreference": "error",
|
|
228
|
-
"no-useless-call": "error",
|
|
229
|
-
"no-useless-catch": "error",
|
|
230
|
-
"no-useless-computed-key": "error",
|
|
231
|
-
"no-useless-concat": "error",
|
|
232
|
-
"no-useless-constructor": "error",
|
|
233
|
-
"no-useless-escape": "error",
|
|
234
|
-
"no-useless-rename": "error",
|
|
235
|
-
"no-useless-return": "error",
|
|
236
|
-
"no-var": "error",
|
|
237
|
-
"no-void": "error",
|
|
238
|
-
"no-warning-comments": "error",
|
|
239
|
-
"no-with": "error",
|
|
240
|
-
"object-shorthand": "error",
|
|
241
|
-
"one-var": "error",
|
|
242
|
-
"operator-assignment": "error",
|
|
243
|
-
"prefer-arrow-callback": "error",
|
|
244
|
-
"prefer-const": "error",
|
|
245
|
-
"prefer-destructuring": "error",
|
|
246
|
-
"prefer-exponentiation-operator": "error",
|
|
247
|
-
"prefer-named-capture-group": "error",
|
|
248
|
-
"prefer-numeric-literals": "error",
|
|
249
|
-
"prefer-object-has-own": "error",
|
|
250
|
-
"prefer-object-spread": "error",
|
|
251
|
-
"prefer-promise-reject-errors": "error",
|
|
252
|
-
"prefer-regex-literals": "error",
|
|
253
|
-
"prefer-rest-params": "error",
|
|
254
|
-
"prefer-spread": "error",
|
|
255
|
-
"prefer-template": "error",
|
|
256
|
-
"radix": "error",
|
|
257
|
-
"require-atomic-updates": "error",
|
|
258
|
-
"require-await": "error",
|
|
259
|
-
"require-unicode-regexp": "error",
|
|
260
|
-
"require-yield": "error",
|
|
261
|
-
"sort-imports": "error",
|
|
262
|
-
"sort-keys": "error",
|
|
263
|
-
"sort-vars": "error",
|
|
264
|
-
"strict": "error",
|
|
265
|
-
"symbol-description": "error",
|
|
266
|
-
"unicode-bom": "error",
|
|
267
|
-
"use-isnan": "error",
|
|
268
|
-
"valid-typeof": "error",
|
|
269
|
-
"vars-on-top": "error",
|
|
270
|
-
"yoda": "error"
|
|
271
|
-
}
|
|
272
|
-
});
|
|
273
|
-
}
|
|
274
|
-
});
|
|
275
|
-
|
|
276
|
-
// ../../node_modules/.pnpm/@eslint+js@9.17.0/node_modules/@eslint/js/src/configs/eslint-recommended.js
|
|
277
|
-
var require_eslint_recommended = __commonJS({
|
|
278
|
-
"../../node_modules/.pnpm/@eslint+js@9.17.0/node_modules/@eslint/js/src/configs/eslint-recommended.js"(exports, module) {
|
|
279
|
-
"use strict";
|
|
280
|
-
module.exports = Object.freeze({
|
|
281
|
-
rules: Object.freeze({
|
|
282
|
-
"constructor-super": "error",
|
|
283
|
-
"for-direction": "error",
|
|
284
|
-
"getter-return": "error",
|
|
285
|
-
"no-async-promise-executor": "error",
|
|
286
|
-
"no-case-declarations": "error",
|
|
287
|
-
"no-class-assign": "error",
|
|
288
|
-
"no-compare-neg-zero": "error",
|
|
289
|
-
"no-cond-assign": "error",
|
|
290
|
-
"no-const-assign": "error",
|
|
291
|
-
"no-constant-binary-expression": "error",
|
|
292
|
-
"no-constant-condition": "error",
|
|
293
|
-
"no-control-regex": "error",
|
|
294
|
-
"no-debugger": "error",
|
|
295
|
-
"no-delete-var": "error",
|
|
296
|
-
"no-dupe-args": "error",
|
|
297
|
-
"no-dupe-class-members": "error",
|
|
298
|
-
"no-dupe-else-if": "error",
|
|
299
|
-
"no-dupe-keys": "error",
|
|
300
|
-
"no-duplicate-case": "error",
|
|
301
|
-
"no-empty": "error",
|
|
302
|
-
"no-empty-character-class": "error",
|
|
303
|
-
"no-empty-pattern": "error",
|
|
304
|
-
"no-empty-static-block": "error",
|
|
305
|
-
"no-ex-assign": "error",
|
|
306
|
-
"no-extra-boolean-cast": "error",
|
|
307
|
-
"no-fallthrough": "error",
|
|
308
|
-
"no-func-assign": "error",
|
|
309
|
-
"no-global-assign": "error",
|
|
310
|
-
"no-import-assign": "error",
|
|
311
|
-
"no-invalid-regexp": "error",
|
|
312
|
-
"no-irregular-whitespace": "error",
|
|
313
|
-
"no-loss-of-precision": "error",
|
|
314
|
-
"no-misleading-character-class": "error",
|
|
315
|
-
"no-new-native-nonconstructor": "error",
|
|
316
|
-
"no-nonoctal-decimal-escape": "error",
|
|
317
|
-
"no-obj-calls": "error",
|
|
318
|
-
"no-octal": "error",
|
|
319
|
-
"no-prototype-builtins": "error",
|
|
320
|
-
"no-redeclare": "error",
|
|
321
|
-
"no-regex-spaces": "error",
|
|
322
|
-
"no-self-assign": "error",
|
|
323
|
-
"no-setter-return": "error",
|
|
324
|
-
"no-shadow-restricted-names": "error",
|
|
325
|
-
"no-sparse-arrays": "error",
|
|
326
|
-
"no-this-before-super": "error",
|
|
327
|
-
"no-undef": "error",
|
|
328
|
-
"no-unexpected-multiline": "error",
|
|
329
|
-
"no-unreachable": "error",
|
|
330
|
-
"no-unsafe-finally": "error",
|
|
331
|
-
"no-unsafe-negation": "error",
|
|
332
|
-
"no-unsafe-optional-chaining": "error",
|
|
333
|
-
"no-unused-labels": "error",
|
|
334
|
-
"no-unused-private-class-members": "error",
|
|
335
|
-
"no-unused-vars": "error",
|
|
336
|
-
"no-useless-backreference": "error",
|
|
337
|
-
"no-useless-catch": "error",
|
|
338
|
-
"no-useless-escape": "error",
|
|
339
|
-
"no-with": "error",
|
|
340
|
-
"require-yield": "error",
|
|
341
|
-
"use-isnan": "error",
|
|
342
|
-
"valid-typeof": "error"
|
|
343
|
-
})
|
|
344
|
-
});
|
|
345
|
-
}
|
|
346
|
-
});
|
|
347
|
-
|
|
348
|
-
// ../../node_modules/.pnpm/@eslint+js@9.17.0/node_modules/@eslint/js/src/index.js
|
|
349
|
-
var require_src = __commonJS({
|
|
350
|
-
"../../node_modules/.pnpm/@eslint+js@9.17.0/node_modules/@eslint/js/src/index.js"(exports, module) {
|
|
351
|
-
"use strict";
|
|
352
|
-
var { version } = require_package();
|
|
353
|
-
module.exports = {
|
|
354
|
-
meta: {
|
|
355
|
-
name: "@eslint/js",
|
|
356
|
-
version
|
|
357
|
-
},
|
|
358
|
-
configs: {
|
|
359
|
-
all: require_eslint_all(),
|
|
360
|
-
recommended: require_eslint_recommended()
|
|
361
|
-
}
|
|
362
|
-
};
|
|
363
|
-
}
|
|
364
|
-
});
|
|
365
|
-
|
|
366
1
|
// src/index.ts
|
|
367
2
|
import globals from "globals";
|
|
368
3
|
|
|
369
4
|
// src/libs.ts
|
|
370
|
-
|
|
5
|
+
import { default as default2 } from "@eslint/js";
|
|
371
6
|
import { default as default3 } from "@next/eslint-plugin-next";
|
|
372
7
|
import { default as default4 } from "@typescript-eslint/eslint-plugin";
|
|
373
8
|
import { default as default5 } from "@typescript-eslint/parser";
|
|
374
|
-
import { default as default6 } from "eslint-
|
|
375
|
-
import { default as default7 } from "eslint-
|
|
376
|
-
import { default as default8 } from "eslint-plugin-
|
|
377
|
-
import { default as default9 } from "eslint-plugin-
|
|
378
|
-
import { default as default10 } from "eslint-plugin-
|
|
379
|
-
import { default as default11 } from "eslint-plugin-
|
|
380
|
-
import { default as default12 } from "eslint-plugin-
|
|
381
|
-
import { default as default13 } from "eslint-plugin-
|
|
382
|
-
import { default as default14 } from "
|
|
383
|
-
import { default as default15 } from "
|
|
384
|
-
import { default as default16 } from "
|
|
9
|
+
import { default as default6 } from "astro-eslint-parser";
|
|
10
|
+
import { default as default7 } from "eslint-config-prettier";
|
|
11
|
+
import { default as default8 } from "eslint-plugin-astro";
|
|
12
|
+
import { default as default9 } from "eslint-plugin-jsonc";
|
|
13
|
+
import { default as default10 } from "eslint-plugin-perfectionist";
|
|
14
|
+
import { default as default11 } from "eslint-plugin-react";
|
|
15
|
+
import { default as default12 } from "eslint-plugin-react-hooks";
|
|
16
|
+
import { default as default13 } from "eslint-plugin-unused-imports";
|
|
17
|
+
import { default as default14 } from "eslint-plugin-vue";
|
|
18
|
+
import { default as default15 } from "eslint-plugin-yml";
|
|
19
|
+
import { default as default16 } from "jsonc-eslint-parser";
|
|
20
|
+
import { default as default17 } from "vue-eslint-parser";
|
|
21
|
+
import { default as default18 } from "yaml-eslint-parser";
|
|
385
22
|
|
|
386
23
|
// src/index.ts
|
|
387
24
|
function config(params = {}) {
|
|
@@ -415,7 +52,7 @@ function config(params = {}) {
|
|
|
415
52
|
};
|
|
416
53
|
const javascriptConfig = [
|
|
417
54
|
// Default
|
|
418
|
-
|
|
55
|
+
default2.configs.recommended,
|
|
419
56
|
{
|
|
420
57
|
files: ["**/*.js", "**/*.mjs"],
|
|
421
58
|
languageOptions: {
|
|
@@ -431,7 +68,7 @@ function config(params = {}) {
|
|
|
431
68
|
},
|
|
432
69
|
name: "lqbach/javascript",
|
|
433
70
|
plugins: {
|
|
434
|
-
"unused-imports":
|
|
71
|
+
"unused-imports": default13
|
|
435
72
|
},
|
|
436
73
|
rules: {
|
|
437
74
|
"unused-imports/no-unused-imports": "error",
|
|
@@ -478,10 +115,10 @@ function config(params = {}) {
|
|
|
478
115
|
},
|
|
479
116
|
name: "lqbach/react",
|
|
480
117
|
plugins: {
|
|
481
|
-
react:
|
|
118
|
+
react: default11
|
|
482
119
|
},
|
|
483
120
|
rules: {
|
|
484
|
-
...
|
|
121
|
+
...default11.configs.flat?.recommended.rules,
|
|
485
122
|
// ignore `css` for emotion usage
|
|
486
123
|
"react/no-unknown-property": ["error", { ignore: ["css"] }]
|
|
487
124
|
}
|
|
@@ -490,16 +127,17 @@ function config(params = {}) {
|
|
|
490
127
|
files: ["**/*.{js,jsx,mjs,cjs,ts,tsx}"],
|
|
491
128
|
name: "lqbach/react-hooks",
|
|
492
129
|
plugins: {
|
|
493
|
-
"react-hooks":
|
|
130
|
+
"react-hooks": default12
|
|
494
131
|
},
|
|
495
132
|
rules: {
|
|
496
|
-
|
|
133
|
+
"react-hooks/exhaustive-deps": "warn",
|
|
134
|
+
"react-hooks/rules-of-hooks": "error"
|
|
497
135
|
}
|
|
498
136
|
} : {};
|
|
499
137
|
const vueConfig = params.vue ?? false ? {
|
|
500
138
|
files: ["**/*.vue"],
|
|
501
139
|
languageOptions: {
|
|
502
|
-
parser:
|
|
140
|
+
parser: default17,
|
|
503
141
|
parserOptions: {
|
|
504
142
|
parser: params.typescript ? default5 : null,
|
|
505
143
|
sourceType: "module"
|
|
@@ -507,13 +145,13 @@ function config(params = {}) {
|
|
|
507
145
|
},
|
|
508
146
|
name: "lqbach/vue",
|
|
509
147
|
plugins: {
|
|
510
|
-
vue:
|
|
148
|
+
vue: default14
|
|
511
149
|
},
|
|
512
|
-
processor:
|
|
150
|
+
processor: default14.processors[".vue"],
|
|
513
151
|
rules: {
|
|
514
|
-
...
|
|
515
|
-
...
|
|
516
|
-
...
|
|
152
|
+
...default14.configs["base"].rules,
|
|
153
|
+
...default14.configs["essential"].rules,
|
|
154
|
+
...default14.configs["strongly-recommended"].rules
|
|
517
155
|
}
|
|
518
156
|
} : {};
|
|
519
157
|
const nextConfig = params.next ?? false ? {
|
|
@@ -537,35 +175,35 @@ function config(params = {}) {
|
|
|
537
175
|
const yamlConfig = params.yaml ?? true ? {
|
|
538
176
|
files: ["**/*.{yaml, yml}"],
|
|
539
177
|
languageOptions: {
|
|
540
|
-
parser:
|
|
178
|
+
parser: default18
|
|
541
179
|
},
|
|
542
180
|
name: "lqbach/yaml",
|
|
543
181
|
plugins: {
|
|
544
|
-
yml:
|
|
182
|
+
yml: default15
|
|
545
183
|
},
|
|
546
184
|
rules: {
|
|
547
|
-
...
|
|
548
|
-
...
|
|
185
|
+
...default15.configs["standard"].rules,
|
|
186
|
+
...default15.configs["prettier"].rules
|
|
549
187
|
}
|
|
550
188
|
} : {};
|
|
551
189
|
const jsoncConfig = params.json ?? true ? [
|
|
552
190
|
{
|
|
553
191
|
name: "lqbach/jsonc-plugin",
|
|
554
192
|
plugins: {
|
|
555
|
-
jsonc:
|
|
193
|
+
jsonc: default9
|
|
556
194
|
}
|
|
557
195
|
},
|
|
558
196
|
{
|
|
559
197
|
files: ["**/*.{json, json5, jsonc}"],
|
|
560
198
|
languageOptions: {
|
|
561
|
-
parser:
|
|
199
|
+
parser: default16
|
|
562
200
|
},
|
|
563
201
|
name: "lqbach/json",
|
|
564
202
|
rules: {
|
|
565
|
-
...
|
|
566
|
-
...
|
|
567
|
-
...
|
|
568
|
-
...
|
|
203
|
+
...default9.configs["recommended-with-json"].rules,
|
|
204
|
+
...default9.configs["recommended-with-jsonc"].rules,
|
|
205
|
+
...default9.configs["recommended-with-json5"].rules,
|
|
206
|
+
...default9.configs["prettier"].rules,
|
|
569
207
|
"jsonc/no-comments": "off"
|
|
570
208
|
}
|
|
571
209
|
}
|
|
@@ -573,13 +211,38 @@ function config(params = {}) {
|
|
|
573
211
|
const perfectionistConfig = params.perfectionist ?? true ? {
|
|
574
212
|
name: "lqbach/perfectionist",
|
|
575
213
|
plugins: {
|
|
576
|
-
perfectionist:
|
|
214
|
+
perfectionist: default10
|
|
215
|
+
},
|
|
216
|
+
rules: {
|
|
217
|
+
...default10.configs["recommended-natural"].rules
|
|
218
|
+
}
|
|
219
|
+
} : {};
|
|
220
|
+
const astroConfig = params.astro ?? false ? {
|
|
221
|
+
files: ["**/*.astro"],
|
|
222
|
+
languageOptions: {
|
|
223
|
+
parser: default6,
|
|
224
|
+
parserOptions: params.typescript ? {
|
|
225
|
+
extraFileExtensions: [".astro"],
|
|
226
|
+
parser: default5,
|
|
227
|
+
sourceType: "module"
|
|
228
|
+
} : {}
|
|
229
|
+
},
|
|
230
|
+
name: "lqbach/astro",
|
|
231
|
+
plugins: {
|
|
232
|
+
astro: default8
|
|
577
233
|
},
|
|
578
234
|
rules: {
|
|
579
|
-
|
|
235
|
+
"astro/missing-client-only-directive-value": "error",
|
|
236
|
+
"astro/no-conflict-set-directives": "error",
|
|
237
|
+
"astro/no-deprecated-astro-canonicalurl": "error",
|
|
238
|
+
"astro/no-deprecated-astro-fetchcontent": "error",
|
|
239
|
+
"astro/no-deprecated-astro-resolve": "error",
|
|
240
|
+
"astro/no-deprecated-getentrybyslug": "error",
|
|
241
|
+
"astro/no-unused-define-vars-in-style": "error",
|
|
242
|
+
"astro/valid-compile": "error"
|
|
580
243
|
}
|
|
581
244
|
} : {};
|
|
582
|
-
const prettierConfig =
|
|
245
|
+
const prettierConfig = default7;
|
|
583
246
|
let config2 = [];
|
|
584
247
|
config2.push(ignoresConfig);
|
|
585
248
|
config2.push(...javascriptConfig);
|
|
@@ -588,6 +251,7 @@ function config(params = {}) {
|
|
|
588
251
|
config2.push(reactHooksConfig);
|
|
589
252
|
config2.push(vueConfig);
|
|
590
253
|
config2.push(nextConfig);
|
|
254
|
+
config2.push(astroConfig);
|
|
591
255
|
config2.push(yamlConfig);
|
|
592
256
|
config2.push(...jsoncConfig);
|
|
593
257
|
config2.push(perfectionistConfig);
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@lqbach/eslint-config",
|
|
3
3
|
"type": "module",
|
|
4
|
-
"version": "0.
|
|
4
|
+
"version": "0.8.1",
|
|
5
5
|
"description": "lqbach's Personal Eslint Config",
|
|
6
6
|
"private": false,
|
|
7
7
|
"license": "MIT",
|
|
@@ -18,20 +18,23 @@
|
|
|
18
18
|
"main": "./dist/index.js",
|
|
19
19
|
"types": "./dist/index.d.ts",
|
|
20
20
|
"dependencies": {
|
|
21
|
+
"@eslint/js": "^9.11.0",
|
|
21
22
|
"@next/eslint-plugin-next": "^15.1.2",
|
|
22
23
|
"@typescript-eslint/eslint-plugin": "^8.18.0",
|
|
23
24
|
"@typescript-eslint/parser": "^8.18.0",
|
|
24
|
-
"eslint-
|
|
25
|
+
"astro-eslint-parser": "^1.2.2",
|
|
26
|
+
"eslint-config-prettier": "^10.1.8",
|
|
27
|
+
"eslint-plugin-astro": "^1.3.1",
|
|
25
28
|
"eslint-plugin-jsonc": "^2.16.0",
|
|
26
|
-
"eslint-plugin-perfectionist": "^
|
|
29
|
+
"eslint-plugin-perfectionist": "^4.15.0",
|
|
27
30
|
"eslint-plugin-react": "^7.37.1",
|
|
28
|
-
"eslint-plugin-react-hooks": "^
|
|
31
|
+
"eslint-plugin-react-hooks": "^6.1.1",
|
|
29
32
|
"eslint-plugin-unused-imports": "^4.1.4",
|
|
30
|
-
"eslint-plugin-vue": "^
|
|
33
|
+
"eslint-plugin-vue": "^10.5.0",
|
|
31
34
|
"eslint-plugin-yml": "^1.14.0",
|
|
32
|
-
"globals": "^
|
|
35
|
+
"globals": "^16.0.0",
|
|
33
36
|
"jsonc-eslint-parser": "^2.4.0",
|
|
34
|
-
"vue-eslint-parser": "^
|
|
37
|
+
"vue-eslint-parser": "^10.2.0",
|
|
35
38
|
"yaml-eslint-parser": "^1.2.2"
|
|
36
39
|
},
|
|
37
40
|
"peerDependencies": {
|