@wkovacs64/eslint-config 7.2.4 → 7.2.5
Sign up to get free protection for your applications and to get access to all the features.
- package/index.js +29 -27
- package/package.json +13 -12
package/index.js
CHANGED
@@ -1,8 +1,8 @@
|
|
1
|
-
// @ts-check
|
2
1
|
//
|
3
2
|
// Forked from https://github.com/epicweb-dev/config
|
4
3
|
//
|
5
4
|
import globals from 'globals';
|
5
|
+
import { fixupPluginRules } from '@eslint/compat';
|
6
6
|
import eslint from '@eslint/js';
|
7
7
|
import tseslint from 'typescript-eslint';
|
8
8
|
import reactPlugin from 'eslint-plugin-react';
|
@@ -31,7 +31,7 @@ const hasPlaywright = has('@playwright/test');
|
|
31
31
|
|
32
32
|
const vitestFiles = ['**/__tests__/**/*', '**/*.test.*'];
|
33
33
|
const testFiles = ['**/tests/**', '**/#tests/**', ...vitestFiles];
|
34
|
-
const playwrightFiles = ['**/playwright/**/*.
|
34
|
+
const playwrightFiles = ['**/playwright/**/*.spec.*'];
|
35
35
|
|
36
36
|
export const config = [
|
37
37
|
{
|
@@ -124,7 +124,7 @@ export const config = [
|
|
124
124
|
? {
|
125
125
|
files: ['**/*.ts?(x)', '**/*.js?(x)'],
|
126
126
|
plugins: {
|
127
|
-
'react-hooks': (await import('eslint-plugin-react-hooks'))
|
127
|
+
'react-hooks': fixupPluginRules(await import('eslint-plugin-react-hooks')),
|
128
128
|
},
|
129
129
|
rules: {
|
130
130
|
'react-hooks/rules-of-hooks': ERROR,
|
@@ -290,35 +290,37 @@ export const config = [
|
|
290
290
|
files: testFiles,
|
291
291
|
ignores: [...playwrightFiles],
|
292
292
|
plugins: {
|
293
|
-
'testing-library': (
|
293
|
+
'testing-library': fixupPluginRules(
|
294
|
+
(await import('eslint-plugin-testing-library')).default,
|
295
|
+
),
|
294
296
|
},
|
295
297
|
rules: {
|
296
|
-
|
297
|
-
|
298
|
-
|
299
|
-
|
300
|
-
|
301
|
-
|
302
|
-
|
303
|
-
|
304
|
-
|
305
|
-
|
306
|
-
|
307
|
-
|
308
|
-
|
309
|
-
|
298
|
+
'testing-library/await-async-events': ERROR,
|
299
|
+
'testing-library/await-async-queries': ERROR,
|
300
|
+
'testing-library/await-async-utils': ERROR,
|
301
|
+
'testing-library/consistent-data-testid': OFF,
|
302
|
+
'testing-library/no-await-sync-events': ERROR,
|
303
|
+
'testing-library/no-await-sync-queries': ERROR,
|
304
|
+
'testing-library/no-container': ERROR,
|
305
|
+
'testing-library/no-debugging-utils': OFF,
|
306
|
+
'testing-library/no-dom-import': [ERROR, 'react'],
|
307
|
+
'testing-library/no-global-regexp-flag-in-query': ERROR,
|
308
|
+
'testing-library/no-manual-cleanup': ERROR,
|
309
|
+
'testing-library/no-node-access': ERROR,
|
310
|
+
'testing-library/no-promise-in-fire-event': ERROR,
|
311
|
+
'testing-library/no-render-in-lifecycle': ERROR,
|
310
312
|
'testing-library/no-unnecessary-act': ERROR,
|
311
|
-
|
313
|
+
'testing-library/no-wait-for-multiple-assertions': ERROR,
|
312
314
|
'testing-library/no-wait-for-side-effects': ERROR,
|
313
|
-
|
314
|
-
|
315
|
+
'testing-library/no-wait-for-snapshot': ERROR,
|
316
|
+
'testing-library/prefer-explicit-assert': ERROR,
|
315
317
|
'testing-library/prefer-find-by': ERROR,
|
316
|
-
|
317
|
-
|
318
|
-
|
319
|
-
|
320
|
-
|
321
|
-
|
318
|
+
'testing-library/prefer-presence-queries': ERROR,
|
319
|
+
'testing-library/prefer-query-by-disappearance': ERROR,
|
320
|
+
'testing-library/prefer-query-matchers': OFF,
|
321
|
+
'testing-library/prefer-screen-queries': ERROR,
|
322
|
+
'testing-library/prefer-user-event': ERROR,
|
323
|
+
'testing-library/render-result-naming-convention': ERROR,
|
322
324
|
},
|
323
325
|
}
|
324
326
|
: null,
|
package/package.json
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
{
|
2
2
|
"name": "@wkovacs64/eslint-config",
|
3
|
-
"version": "7.2.
|
3
|
+
"version": "7.2.5",
|
4
4
|
"description": "@wKovacs64 ESLint config",
|
5
5
|
"keywords": [
|
6
6
|
"eslint",
|
@@ -50,28 +50,29 @@
|
|
50
50
|
"node": "^18.18.0 || >=20.0.0"
|
51
51
|
},
|
52
52
|
"dependencies": {
|
53
|
-
"@eslint/
|
54
|
-
"eslint
|
53
|
+
"@eslint/compat": "^1.1.1",
|
54
|
+
"@eslint/js": "^9.7.0",
|
55
|
+
"eslint-plugin-import-x": "^3.0.1",
|
55
56
|
"eslint-plugin-jest-dom": "^5.4.0",
|
56
|
-
"eslint-plugin-jsx-a11y": "^6.
|
57
|
+
"eslint-plugin-jsx-a11y": "^6.9.0",
|
57
58
|
"eslint-plugin-playwright": "^1.6.2",
|
58
|
-
"eslint-plugin-react": "^7.34.
|
59
|
+
"eslint-plugin-react": "^7.34.3",
|
59
60
|
"eslint-plugin-react-hooks": "^4.6.2",
|
60
61
|
"eslint-plugin-testing-library": "^6.2.2",
|
61
62
|
"eslint-plugin-vitest": "^0.5.4",
|
62
|
-
"globals": "^15.
|
63
|
-
"typescript-eslint": "^8.0.0-alpha.
|
63
|
+
"globals": "^15.8.0",
|
64
|
+
"typescript-eslint": "^8.0.0-alpha.41"
|
64
65
|
},
|
65
66
|
"devDependencies": {
|
66
67
|
"@changesets/changelog-github": "0.5.0",
|
67
|
-
"@changesets/cli": "2.27.
|
68
|
+
"@changesets/cli": "2.27.7",
|
68
69
|
"@types/eslint__js": "8.42.3",
|
69
|
-
"@types/node": "20.14.
|
70
|
+
"@types/node": "20.14.10",
|
70
71
|
"@types/react": "18.3.3",
|
71
72
|
"@types/react-dom": "18.3.0",
|
72
|
-
"@wkovacs64/prettier-config": "4.1.
|
73
|
+
"@wkovacs64/prettier-config": "4.1.1",
|
73
74
|
"eslint": "8.57.0",
|
74
|
-
"prettier": "3.3.
|
75
|
-
"typescript": "5.
|
75
|
+
"prettier": "3.3.2",
|
76
|
+
"typescript": "5.5.3"
|
76
77
|
}
|
77
78
|
}
|