@wkovacs64/eslint-config 7.14.0 → 7.14.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/README.md +4 -6
- package/index.js +160 -160
- package/package.json +32 -34
package/README.md
CHANGED
|
@@ -24,8 +24,8 @@ default.
|
|
|
24
24
|
#### `eslint.config.js`
|
|
25
25
|
|
|
26
26
|
```js
|
|
27
|
-
import { defineConfig } from
|
|
28
|
-
import baseConfig from
|
|
27
|
+
import { defineConfig } from "eslint/config";
|
|
28
|
+
import baseConfig from "@wkovacs64/eslint-config";
|
|
29
29
|
|
|
30
30
|
const config = defineConfig([
|
|
31
31
|
baseConfig,
|
|
@@ -51,12 +51,10 @@ export default config;
|
|
|
51
51
|
|
|
52
52
|
[npm-image]: https://img.shields.io/npm/v/@wkovacs64/eslint-config.svg?style=flat-square
|
|
53
53
|
[npm-url]: https://www.npmjs.com/package/@wkovacs64/eslint-config
|
|
54
|
-
[ci-image]:
|
|
55
|
-
https://img.shields.io/github/actions/workflow/status/wKovacs64/eslint-config/ci.yml?logo=github&style=flat-square
|
|
54
|
+
[ci-image]: https://img.shields.io/github/actions/workflow/status/wKovacs64/eslint-config/ci.yml?logo=github&style=flat-square
|
|
56
55
|
[ci-url]: https://github.com/wKovacs64/eslint-config/actions?query=workflow%3Aci
|
|
57
56
|
[changesets-image]: https://img.shields.io/badge/maintained%20with-changesets-blue?style=flat-square
|
|
58
57
|
[changesets-url]: https://github.com/changesets/changesets
|
|
59
58
|
[eslint]: https://eslint.org/
|
|
60
|
-
[eslint-sharing]:
|
|
61
|
-
https://eslint.org/docs/latest/use/configure/configuration-files#using-a-shareable-configuration-package
|
|
59
|
+
[eslint-sharing]: https://eslint.org/docs/latest/use/configure/configuration-files#using-a-shareable-configuration-package
|
|
62
60
|
[eslint-ignores]: https://eslint.org/docs/latest/use/configure/migration-guide#ignoring-files
|
package/index.js
CHANGED
|
@@ -1,17 +1,17 @@
|
|
|
1
1
|
//
|
|
2
2
|
// Forked from https://github.com/epicweb-dev/config
|
|
3
3
|
//
|
|
4
|
-
import globals from
|
|
5
|
-
import eslint from
|
|
6
|
-
import tseslint from
|
|
7
|
-
import reactPlugin from
|
|
8
|
-
import jsxA11yPlugin from
|
|
9
|
-
import playwright from
|
|
10
|
-
import astro from
|
|
4
|
+
import globals from "globals";
|
|
5
|
+
import eslint from "@eslint/js";
|
|
6
|
+
import tseslint from "typescript-eslint";
|
|
7
|
+
import reactPlugin from "eslint-plugin-react";
|
|
8
|
+
import jsxA11yPlugin from "eslint-plugin-jsx-a11y";
|
|
9
|
+
import playwright from "eslint-plugin-playwright";
|
|
10
|
+
import astro from "eslint-plugin-astro";
|
|
11
11
|
|
|
12
|
-
const ERROR =
|
|
13
|
-
const WARN =
|
|
14
|
-
const OFF =
|
|
12
|
+
const ERROR = "error";
|
|
13
|
+
const WARN = "warn";
|
|
14
|
+
const OFF = "off";
|
|
15
15
|
|
|
16
16
|
function has(pkgName) {
|
|
17
17
|
try {
|
|
@@ -22,37 +22,37 @@ function has(pkgName) {
|
|
|
22
22
|
}
|
|
23
23
|
}
|
|
24
24
|
|
|
25
|
-
const hasTypeScript = has(
|
|
26
|
-
const hasReact = has(
|
|
27
|
-
const hasTestingLibrary = has(
|
|
28
|
-
const hasJestDom = has(
|
|
29
|
-
const hasVitest = has(
|
|
30
|
-
const hasPlaywright = has(
|
|
31
|
-
const hasAstro = has(
|
|
25
|
+
const hasTypeScript = has("typescript");
|
|
26
|
+
const hasReact = has("react");
|
|
27
|
+
const hasTestingLibrary = has("@testing-library/dom");
|
|
28
|
+
const hasJestDom = has("@testing-library/jest-dom");
|
|
29
|
+
const hasVitest = has("vitest");
|
|
30
|
+
const hasPlaywright = has("@playwright/test");
|
|
31
|
+
const hasAstro = has("astro");
|
|
32
32
|
|
|
33
|
-
const vitestFiles = [
|
|
34
|
-
const testFiles = [
|
|
35
|
-
const allPlaywrightFiles = [
|
|
36
|
-
const playwrightTestFiles = [
|
|
33
|
+
const vitestFiles = ["**/__tests__/**/*", "**/*.test.*"];
|
|
34
|
+
const testFiles = ["**/tests/**", "**/#tests/**", ...vitestFiles];
|
|
35
|
+
const allPlaywrightFiles = ["**/playwright/**"];
|
|
36
|
+
const playwrightTestFiles = ["**/playwright/**/*.spec.*"];
|
|
37
37
|
|
|
38
38
|
export const config = [
|
|
39
39
|
{
|
|
40
40
|
ignores: [
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
41
|
+
"**/.astro/**",
|
|
42
|
+
"**/.cache/**",
|
|
43
|
+
"**/.react-router/**",
|
|
44
|
+
"**/.next/**",
|
|
45
|
+
"**/.vercel/**",
|
|
46
|
+
"**/node_modules/**",
|
|
47
|
+
"**/build/**",
|
|
48
|
+
"**/public/build/**",
|
|
49
|
+
"**/playwright-report/**",
|
|
50
|
+
"**/playwright-results/**",
|
|
51
|
+
"**/playwright/report/**",
|
|
52
|
+
"**/playwright/results/**",
|
|
53
|
+
"**/server-build/**",
|
|
54
|
+
"**/dist/**",
|
|
55
|
+
"**/coverage/**",
|
|
56
56
|
],
|
|
57
57
|
},
|
|
58
58
|
|
|
@@ -60,7 +60,7 @@ export const config = [
|
|
|
60
60
|
eslint.configs.recommended,
|
|
61
61
|
{
|
|
62
62
|
plugins: {
|
|
63
|
-
import: (await import(
|
|
63
|
+
import: (await import("eslint-plugin-import-x")).default,
|
|
64
64
|
},
|
|
65
65
|
languageOptions: {
|
|
66
66
|
globals: {
|
|
@@ -69,15 +69,15 @@ export const config = [
|
|
|
69
69
|
},
|
|
70
70
|
},
|
|
71
71
|
rules: {
|
|
72
|
-
|
|
73
|
-
|
|
72
|
+
"import/no-duplicates": [WARN, { "prefer-inline": true }],
|
|
73
|
+
"import/order": [
|
|
74
74
|
WARN,
|
|
75
75
|
{
|
|
76
76
|
pathGroups: [
|
|
77
|
-
{ pattern:
|
|
78
|
-
{ pattern:
|
|
77
|
+
{ pattern: "#*/**", group: "internal" },
|
|
78
|
+
{ pattern: "~/**", group: "internal" },
|
|
79
79
|
],
|
|
80
|
-
groups: [
|
|
80
|
+
groups: ["builtin", "external", "internal", "parent", "sibling", "index"],
|
|
81
81
|
},
|
|
82
82
|
],
|
|
83
83
|
},
|
|
@@ -86,10 +86,10 @@ export const config = [
|
|
|
86
86
|
// JSX/TSX files
|
|
87
87
|
hasReact
|
|
88
88
|
? {
|
|
89
|
-
files: [
|
|
89
|
+
files: ["**/*.tsx", "**/*.jsx"],
|
|
90
90
|
plugins: {
|
|
91
91
|
react: reactPlugin,
|
|
92
|
-
|
|
92
|
+
"jsx-a11y": jsxA11yPlugin,
|
|
93
93
|
},
|
|
94
94
|
languageOptions: {
|
|
95
95
|
parserOptions: {
|
|
@@ -101,25 +101,25 @@ export const config = [
|
|
|
101
101
|
rules: {
|
|
102
102
|
...reactPlugin.configs.recommended.rules,
|
|
103
103
|
...jsxA11yPlugin.configs.recommended.rules,
|
|
104
|
-
|
|
105
|
-
|
|
104
|
+
"react/function-component-definition": [
|
|
105
|
+
"error",
|
|
106
106
|
{
|
|
107
|
-
namedComponents:
|
|
108
|
-
unnamedComponents:
|
|
107
|
+
namedComponents: "function-declaration",
|
|
108
|
+
unnamedComponents: "arrow-function",
|
|
109
109
|
},
|
|
110
110
|
],
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
111
|
+
"react/react-in-jsx-scope": OFF,
|
|
112
|
+
"react/prop-types": OFF,
|
|
113
|
+
"jsx-a11y/label-has-associated-control": [
|
|
114
114
|
ERROR,
|
|
115
115
|
{
|
|
116
|
-
assert:
|
|
116
|
+
assert: "either",
|
|
117
117
|
},
|
|
118
118
|
],
|
|
119
119
|
},
|
|
120
120
|
settings: {
|
|
121
121
|
react: {
|
|
122
|
-
version:
|
|
122
|
+
version: "detect",
|
|
123
123
|
},
|
|
124
124
|
},
|
|
125
125
|
}
|
|
@@ -128,38 +128,38 @@ export const config = [
|
|
|
128
128
|
// react-hook rules are applicable in ts/js/tsx/jsx, but only with React as a dep
|
|
129
129
|
hasReact
|
|
130
130
|
? {
|
|
131
|
-
files: [
|
|
131
|
+
files: ["**/*.ts?(x)", "**/*.js?(x)"],
|
|
132
132
|
ignores: [...allPlaywrightFiles],
|
|
133
133
|
plugins: {
|
|
134
|
-
|
|
134
|
+
"react-hooks": (await import("eslint-plugin-react-hooks")).default,
|
|
135
135
|
},
|
|
136
136
|
rules: {
|
|
137
137
|
// Core hooks rules
|
|
138
|
-
|
|
139
|
-
|
|
138
|
+
"react-hooks/rules-of-hooks": ERROR,
|
|
139
|
+
"react-hooks/exhaustive-deps": ERROR,
|
|
140
140
|
// React Compiler rules
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
141
|
+
"react-hooks/config": ERROR,
|
|
142
|
+
"react-hooks/error-boundaries": ERROR,
|
|
143
|
+
"react-hooks/component-hook-factories": ERROR,
|
|
144
|
+
"react-hooks/gating": ERROR,
|
|
145
|
+
"react-hooks/globals": ERROR,
|
|
146
|
+
"react-hooks/immutability": ERROR,
|
|
147
|
+
"react-hooks/preserve-manual-memoization": ERROR,
|
|
148
|
+
"react-hooks/purity": ERROR,
|
|
149
|
+
"react-hooks/refs": ERROR,
|
|
150
|
+
"react-hooks/set-state-in-effect": ERROR,
|
|
151
|
+
"react-hooks/set-state-in-render": ERROR,
|
|
152
|
+
"react-hooks/static-components": ERROR,
|
|
153
|
+
"react-hooks/unsupported-syntax": ERROR,
|
|
154
|
+
"react-hooks/use-memo": ERROR,
|
|
155
|
+
"react-hooks/incompatible-library": ERROR,
|
|
156
156
|
},
|
|
157
157
|
}
|
|
158
158
|
: null,
|
|
159
159
|
|
|
160
160
|
// JS, JSX, and CJS files
|
|
161
161
|
{
|
|
162
|
-
files: [
|
|
162
|
+
files: ["**/*.{js,jsx,cjs}"],
|
|
163
163
|
// most of these rules are useful for JS but not TS because TS handles these better
|
|
164
164
|
rules: {
|
|
165
165
|
// Blocked by https://github.com/import-js/eslint-plugin-import/issues/2132
|
|
@@ -169,13 +169,13 @@ export const config = [
|
|
|
169
169
|
// ignore: ['^#icons/icon', '^~/icons/icon', './icons-sprite.svg'],
|
|
170
170
|
// },
|
|
171
171
|
// ],
|
|
172
|
-
|
|
172
|
+
"no-unused-vars": [
|
|
173
173
|
WARN,
|
|
174
174
|
{
|
|
175
|
-
args:
|
|
176
|
-
argsIgnorePattern:
|
|
175
|
+
args: "after-used",
|
|
176
|
+
argsIgnorePattern: "^_",
|
|
177
177
|
ignoreRestSiblings: true,
|
|
178
|
-
varsIgnorePattern:
|
|
178
|
+
varsIgnorePattern: "^ignored",
|
|
179
179
|
},
|
|
180
180
|
],
|
|
181
181
|
},
|
|
@@ -188,7 +188,7 @@ export const config = [
|
|
|
188
188
|
...tseslint.configs.recommended,
|
|
189
189
|
...tseslint.configs.stylistic,
|
|
190
190
|
{
|
|
191
|
-
files: [
|
|
191
|
+
files: ["**/*.ts?(x)"],
|
|
192
192
|
languageOptions: {
|
|
193
193
|
parserOptions: {
|
|
194
194
|
parser: tseslint.parser,
|
|
@@ -196,18 +196,18 @@ export const config = [
|
|
|
196
196
|
},
|
|
197
197
|
},
|
|
198
198
|
plugins: {
|
|
199
|
-
|
|
199
|
+
"@typescript-eslint": tseslint.plugin,
|
|
200
200
|
},
|
|
201
201
|
rules: {
|
|
202
|
-
|
|
203
|
-
|
|
202
|
+
"@typescript-eslint/ban-ts-comment": OFF,
|
|
203
|
+
"@typescript-eslint/consistent-type-assertions": [
|
|
204
204
|
ERROR,
|
|
205
205
|
{
|
|
206
|
-
assertionStyle:
|
|
207
|
-
objectLiteralTypeAssertions:
|
|
206
|
+
assertionStyle: "as",
|
|
207
|
+
objectLiteralTypeAssertions: "allow-as-parameter",
|
|
208
208
|
},
|
|
209
209
|
],
|
|
210
|
-
|
|
210
|
+
"@typescript-eslint/consistent-type-definitions": OFF,
|
|
211
211
|
// Note: use this rule _OR_ verbatimModuleSyntax in tsconfig.json - not both
|
|
212
212
|
// '@typescript-eslint/consistent-type-imports': [
|
|
213
213
|
// ERROR,
|
|
@@ -217,48 +217,48 @@ export const config = [
|
|
|
217
217
|
// fixStyle: 'inline-type-imports',
|
|
218
218
|
// },
|
|
219
219
|
// ],
|
|
220
|
-
|
|
221
|
-
|
|
220
|
+
"@typescript-eslint/explicit-module-boundary-types": OFF,
|
|
221
|
+
"@typescript-eslint/naming-convention": [
|
|
222
222
|
ERROR,
|
|
223
223
|
{
|
|
224
|
-
selector:
|
|
225
|
-
format: [
|
|
226
|
-
custom: { regex:
|
|
224
|
+
selector: "typeLike",
|
|
225
|
+
format: ["PascalCase"],
|
|
226
|
+
custom: { regex: "^I[A-Z]", match: false },
|
|
227
227
|
},
|
|
228
228
|
],
|
|
229
|
-
|
|
229
|
+
"@typescript-eslint/no-confusing-void-expression": [
|
|
230
230
|
ERROR,
|
|
231
231
|
{
|
|
232
232
|
ignoreArrowShorthand: true,
|
|
233
233
|
},
|
|
234
234
|
],
|
|
235
|
-
|
|
236
|
-
|
|
235
|
+
"@typescript-eslint/no-explicit-any": OFF,
|
|
236
|
+
"@typescript-eslint/no-floating-promises": [
|
|
237
237
|
ERROR,
|
|
238
238
|
{
|
|
239
239
|
ignoreIIFE: true,
|
|
240
240
|
},
|
|
241
241
|
],
|
|
242
|
-
|
|
243
|
-
|
|
244
|
-
|
|
245
|
-
|
|
246
|
-
|
|
247
|
-
|
|
248
|
-
|
|
249
|
-
|
|
250
|
-
|
|
251
|
-
|
|
242
|
+
"@typescript-eslint/no-import-type-side-effects": ERROR,
|
|
243
|
+
"no-invalid-this": OFF,
|
|
244
|
+
"@typescript-eslint/no-invalid-this": ERROR,
|
|
245
|
+
"no-redeclare": OFF,
|
|
246
|
+
"@typescript-eslint/no-non-null-assertion": OFF,
|
|
247
|
+
"@typescript-eslint/no-redeclare": ERROR,
|
|
248
|
+
"no-shadow": OFF,
|
|
249
|
+
"@typescript-eslint/no-shadow": ERROR,
|
|
250
|
+
"@typescript-eslint/no-unnecessary-type-constraint": "warn",
|
|
251
|
+
"@typescript-eslint/no-unused-vars": [
|
|
252
252
|
ERROR,
|
|
253
253
|
{
|
|
254
|
-
vars:
|
|
255
|
-
args:
|
|
256
|
-
argsIgnorePattern:
|
|
254
|
+
vars: "all",
|
|
255
|
+
args: "after-used",
|
|
256
|
+
argsIgnorePattern: "^_",
|
|
257
257
|
ignoreRestSiblings: true,
|
|
258
258
|
},
|
|
259
259
|
],
|
|
260
|
-
|
|
261
|
-
|
|
260
|
+
"no-use-before-define": OFF,
|
|
261
|
+
"@typescript-eslint/no-use-before-define": [
|
|
262
262
|
ERROR,
|
|
263
263
|
{
|
|
264
264
|
functions: false,
|
|
@@ -266,19 +266,19 @@ export const config = [
|
|
|
266
266
|
variables: true,
|
|
267
267
|
},
|
|
268
268
|
],
|
|
269
|
-
|
|
270
|
-
|
|
269
|
+
"@typescript-eslint/prefer-nullish-coalescing": OFF,
|
|
270
|
+
"@typescript-eslint/restrict-template-expressions": [
|
|
271
271
|
ERROR,
|
|
272
272
|
{
|
|
273
273
|
allowBoolean: true,
|
|
274
274
|
allowNullish: true,
|
|
275
275
|
},
|
|
276
276
|
],
|
|
277
|
-
|
|
278
|
-
|
|
277
|
+
"@typescript-eslint/require-await": OFF,
|
|
278
|
+
"@typescript-eslint/unified-signatures": "warn",
|
|
279
279
|
},
|
|
280
280
|
settings: {
|
|
281
|
-
|
|
281
|
+
"import/resolver": {
|
|
282
282
|
typescript: {
|
|
283
283
|
alwaysTryTypes: true,
|
|
284
284
|
},
|
|
@@ -292,16 +292,16 @@ export const config = [
|
|
|
292
292
|
// *.test.* in the filename. If a file doesn't match this assumption, then it
|
|
293
293
|
// will not be allowed to import test files.
|
|
294
294
|
{
|
|
295
|
-
files: [
|
|
295
|
+
files: ["**/*.ts?(x)", "**/*.js?(x)"],
|
|
296
296
|
ignores: testFiles,
|
|
297
297
|
rules: {
|
|
298
|
-
|
|
298
|
+
"no-restricted-imports": [
|
|
299
299
|
ERROR,
|
|
300
300
|
{
|
|
301
301
|
patterns: [
|
|
302
302
|
{
|
|
303
303
|
group: testFiles,
|
|
304
|
-
message:
|
|
304
|
+
message: "Do not import test files in source files",
|
|
305
305
|
},
|
|
306
306
|
],
|
|
307
307
|
},
|
|
@@ -314,35 +314,35 @@ export const config = [
|
|
|
314
314
|
files: testFiles,
|
|
315
315
|
ignores: [...playwrightTestFiles],
|
|
316
316
|
plugins: {
|
|
317
|
-
|
|
317
|
+
"testing-library": (await import("eslint-plugin-testing-library")).default,
|
|
318
318
|
},
|
|
319
319
|
rules: {
|
|
320
|
-
|
|
321
|
-
|
|
322
|
-
|
|
323
|
-
|
|
324
|
-
|
|
325
|
-
|
|
326
|
-
|
|
327
|
-
|
|
328
|
-
|
|
329
|
-
|
|
330
|
-
|
|
331
|
-
|
|
332
|
-
|
|
333
|
-
|
|
334
|
-
|
|
335
|
-
|
|
336
|
-
|
|
337
|
-
|
|
338
|
-
|
|
339
|
-
|
|
340
|
-
|
|
341
|
-
|
|
342
|
-
|
|
343
|
-
|
|
344
|
-
|
|
345
|
-
|
|
320
|
+
"testing-library/await-async-events": ERROR,
|
|
321
|
+
"testing-library/await-async-queries": ERROR,
|
|
322
|
+
"testing-library/await-async-utils": ERROR,
|
|
323
|
+
"testing-library/consistent-data-testid": OFF,
|
|
324
|
+
"testing-library/no-await-sync-events": ERROR,
|
|
325
|
+
"testing-library/no-await-sync-queries": ERROR,
|
|
326
|
+
"testing-library/no-container": ERROR,
|
|
327
|
+
"testing-library/no-debugging-utils": OFF,
|
|
328
|
+
"testing-library/no-dom-import": [ERROR, "react"],
|
|
329
|
+
"testing-library/no-global-regexp-flag-in-query": ERROR,
|
|
330
|
+
"testing-library/no-manual-cleanup": ERROR,
|
|
331
|
+
"testing-library/no-node-access": ERROR,
|
|
332
|
+
"testing-library/no-promise-in-fire-event": ERROR,
|
|
333
|
+
"testing-library/no-render-in-lifecycle": ERROR,
|
|
334
|
+
"testing-library/no-unnecessary-act": ERROR,
|
|
335
|
+
"testing-library/no-wait-for-multiple-assertions": ERROR,
|
|
336
|
+
"testing-library/no-wait-for-side-effects": ERROR,
|
|
337
|
+
"testing-library/no-wait-for-snapshot": ERROR,
|
|
338
|
+
"testing-library/prefer-explicit-assert": ERROR,
|
|
339
|
+
"testing-library/prefer-find-by": ERROR,
|
|
340
|
+
"testing-library/prefer-presence-queries": ERROR,
|
|
341
|
+
"testing-library/prefer-query-by-disappearance": ERROR,
|
|
342
|
+
"testing-library/prefer-query-matchers": OFF,
|
|
343
|
+
"testing-library/prefer-screen-queries": ERROR,
|
|
344
|
+
"testing-library/prefer-user-event": ERROR,
|
|
345
|
+
"testing-library/render-result-naming-convention": ERROR,
|
|
346
346
|
},
|
|
347
347
|
}
|
|
348
348
|
: null,
|
|
@@ -352,20 +352,20 @@ export const config = [
|
|
|
352
352
|
files: testFiles,
|
|
353
353
|
ignores: [...playwrightTestFiles],
|
|
354
354
|
plugins: {
|
|
355
|
-
|
|
355
|
+
"jest-dom": (await import("eslint-plugin-jest-dom")).default,
|
|
356
356
|
},
|
|
357
357
|
rules: {
|
|
358
|
-
|
|
359
|
-
|
|
360
|
-
|
|
361
|
-
|
|
362
|
-
|
|
363
|
-
|
|
364
|
-
|
|
365
|
-
|
|
366
|
-
|
|
367
|
-
|
|
368
|
-
|
|
358
|
+
"jest-dom/prefer-checked": ERROR,
|
|
359
|
+
"jest-dom/prefer-empty": ERROR,
|
|
360
|
+
"jest-dom/prefer-enabled-disabled": ERROR,
|
|
361
|
+
"jest-dom/prefer-focus": ERROR,
|
|
362
|
+
"jest-dom/prefer-in-document": ERROR,
|
|
363
|
+
"jest-dom/prefer-required": ERROR,
|
|
364
|
+
"jest-dom/prefer-to-have-attribute": ERROR,
|
|
365
|
+
"jest-dom/prefer-to-have-class": ERROR,
|
|
366
|
+
"jest-dom/prefer-to-have-style": ERROR,
|
|
367
|
+
"jest-dom/prefer-to-have-text-content": ERROR,
|
|
368
|
+
"jest-dom/prefer-to-have-value": ERROR,
|
|
369
369
|
},
|
|
370
370
|
}
|
|
371
371
|
: null,
|
|
@@ -375,12 +375,12 @@ export const config = [
|
|
|
375
375
|
files: testFiles,
|
|
376
376
|
ignores: [...playwrightTestFiles],
|
|
377
377
|
plugins: {
|
|
378
|
-
vitest: (await import(
|
|
378
|
+
vitest: (await import("@vitest/eslint-plugin")).default,
|
|
379
379
|
},
|
|
380
380
|
rules: {
|
|
381
381
|
// you don't want the editor to autofix this, but we do want to be
|
|
382
382
|
// made aware of it
|
|
383
|
-
|
|
383
|
+
"vitest/no-focused-tests": [WARN, { fixable: false }],
|
|
384
384
|
},
|
|
385
385
|
}
|
|
386
386
|
: null,
|
|
@@ -388,14 +388,14 @@ export const config = [
|
|
|
388
388
|
// Astro support
|
|
389
389
|
...(hasAstro
|
|
390
390
|
? [
|
|
391
|
-
...astro.configs[
|
|
391
|
+
...astro.configs["flat/recommended"],
|
|
392
392
|
// No idea why this override is needed as it should inherit from the base config, but for
|
|
393
393
|
// some reason, enabling the Astro plugin screws that up and it tries to enforce interfaces
|
|
394
394
|
// over types. 🤷♂️
|
|
395
395
|
{
|
|
396
|
-
files: [
|
|
396
|
+
files: ["**/*.astro"],
|
|
397
397
|
rules: {
|
|
398
|
-
|
|
398
|
+
"@typescript-eslint/consistent-type-definitions": OFF,
|
|
399
399
|
},
|
|
400
400
|
},
|
|
401
401
|
]
|
|
@@ -404,7 +404,7 @@ export const config = [
|
|
|
404
404
|
hasPlaywright
|
|
405
405
|
? {
|
|
406
406
|
files: playwrightTestFiles,
|
|
407
|
-
...playwright.configs[
|
|
407
|
+
...playwright.configs["flat/recommended"],
|
|
408
408
|
}
|
|
409
409
|
: null,
|
|
410
410
|
].filter(Boolean);
|
package/package.json
CHANGED
|
@@ -1,75 +1,73 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@wkovacs64/eslint-config",
|
|
3
|
-
"version": "7.14.
|
|
3
|
+
"version": "7.14.1",
|
|
4
|
+
"private": false,
|
|
4
5
|
"description": "@wKovacs64 ESLint config",
|
|
5
6
|
"keywords": [
|
|
6
7
|
"eslint",
|
|
7
|
-
"eslintconfig",
|
|
8
|
-
"eslintplugin",
|
|
9
8
|
"eslint-config",
|
|
10
9
|
"eslint-plugin",
|
|
10
|
+
"eslintconfig",
|
|
11
|
+
"eslintplugin",
|
|
11
12
|
"wkovacs64"
|
|
12
13
|
],
|
|
14
|
+
"homepage": "https://github.com/wKovacs64/eslint-config#readme",
|
|
15
|
+
"bugs": {
|
|
16
|
+
"url": "https://github.com/wKovacs64/eslint-config/issues"
|
|
17
|
+
},
|
|
18
|
+
"license": "MIT",
|
|
13
19
|
"author": {
|
|
14
20
|
"name": "Justin Hall",
|
|
15
21
|
"email": "justin.r.hall@gmail.com"
|
|
16
22
|
},
|
|
17
|
-
"
|
|
23
|
+
"repository": {
|
|
24
|
+
"url": "git+https://github.com/wKovacs64/eslint-config.git"
|
|
25
|
+
},
|
|
26
|
+
"files": [
|
|
27
|
+
"index.js"
|
|
28
|
+
],
|
|
18
29
|
"type": "module",
|
|
19
30
|
"main": "index.js",
|
|
20
31
|
"exports": {
|
|
21
32
|
".": "./index.js",
|
|
22
33
|
"./package.json": "./package.json"
|
|
23
34
|
},
|
|
24
|
-
"files": [
|
|
25
|
-
"index.js"
|
|
26
|
-
],
|
|
27
|
-
"homepage": "https://github.com/wKovacs64/eslint-config#readme",
|
|
28
|
-
"repository": {
|
|
29
|
-
"url": "git+https://github.com/wKovacs64/eslint-config.git"
|
|
30
|
-
},
|
|
31
|
-
"bugs": {
|
|
32
|
-
"url": "https://github.com/wKovacs64/eslint-config/issues"
|
|
33
|
-
},
|
|
34
|
-
"private": false,
|
|
35
|
-
"prettier": "@wkovacs64/prettier-config",
|
|
36
35
|
"publishConfig": {
|
|
37
36
|
"access": "public"
|
|
38
37
|
},
|
|
39
|
-
"engines": {
|
|
40
|
-
"node": "^18.18.0 || >=20.0.0"
|
|
41
|
-
},
|
|
42
38
|
"dependencies": {
|
|
43
39
|
"@eslint/js": "^9.39.3",
|
|
44
|
-
"@vitest/eslint-plugin": "^1.6.
|
|
45
|
-
"eslint-plugin-astro": "^1.
|
|
46
|
-
"eslint-plugin-import-x": "^4.16.
|
|
40
|
+
"@vitest/eslint-plugin": "^1.6.16",
|
|
41
|
+
"eslint-plugin-astro": "^1.7.0",
|
|
42
|
+
"eslint-plugin-import-x": "^4.16.2",
|
|
47
43
|
"eslint-plugin-jest-dom": "^5.5.0",
|
|
48
44
|
"eslint-plugin-jsx-a11y": "^6.10.2",
|
|
49
|
-
"eslint-plugin-playwright": "^2.
|
|
45
|
+
"eslint-plugin-playwright": "^2.10.2",
|
|
50
46
|
"eslint-plugin-react": "^7.37.5",
|
|
51
|
-
"eslint-plugin-react-hooks": "^7.
|
|
52
|
-
"eslint-plugin-testing-library": "^7.16.
|
|
53
|
-
"globals": "^17.
|
|
54
|
-
"typescript-eslint": "^8.
|
|
47
|
+
"eslint-plugin-react-hooks": "^7.1.1",
|
|
48
|
+
"eslint-plugin-testing-library": "^7.16.2",
|
|
49
|
+
"globals": "^17.6.0",
|
|
50
|
+
"typescript-eslint": "^8.59.2"
|
|
55
51
|
},
|
|
56
52
|
"devDependencies": {
|
|
57
|
-
"@changesets/changelog-github": "0.
|
|
58
|
-
"@changesets/cli": "2.
|
|
59
|
-
"@types/node": "24.
|
|
53
|
+
"@changesets/changelog-github": "0.6.0",
|
|
54
|
+
"@changesets/cli": "2.31.0",
|
|
55
|
+
"@types/node": "24.12.2",
|
|
60
56
|
"@types/react": "19.2.14",
|
|
61
57
|
"@types/react-dom": "19.2.3",
|
|
62
|
-
"@wkovacs64/prettier-config": "4.2.4",
|
|
63
58
|
"eslint": "^9.39.3",
|
|
64
|
-
"
|
|
59
|
+
"oxfmt": "0.47.0",
|
|
65
60
|
"typescript": "5.9.3"
|
|
66
61
|
},
|
|
62
|
+
"engines": {
|
|
63
|
+
"node": "^18.18.0 || >=20.0.0"
|
|
64
|
+
},
|
|
67
65
|
"scripts": {
|
|
68
66
|
"changeset": "changeset",
|
|
69
67
|
"changeset:version": "changeset version && pnpm install",
|
|
70
68
|
"changeset:publish": "changeset publish",
|
|
71
|
-
"format": "
|
|
72
|
-
"format:check": "
|
|
69
|
+
"format": "oxfmt --write .",
|
|
70
|
+
"format:check": "oxfmt --check .",
|
|
73
71
|
"lint": "eslint .",
|
|
74
72
|
"typecheck": "tsc"
|
|
75
73
|
}
|