Skip to content

Commit cb767c8

Browse files
authored
Merge pull request #30 from Byndyusoft/feature/eslint-v8
Add ESLint v8 support
2 parents 9d82590 + 865a939 commit cb767c8

File tree

7 files changed

+1496
-2010
lines changed

7 files changed

+1496
-2010
lines changed

configs/testing-library.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ module.exports = {
33
plugins: ['testing-library'],
44
rules: {
55
'testing-library/no-await-sync-query': 'error',
6-
'testing-library/no-debug': 'warn',
6+
'testing-library/no-debugging-utils': 'warn',
77
'testing-library/no-dom-import': ['error', 'react'],
88
'testing-library/no-manual-cleanup': 'warn',
99
'testing-library/no-wait-for-snapshot': 'warn',

javascript.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ module.exports = {
1616
files: ['*.js', '*.jsx'],
1717
parser: 'espree',
1818
parserOptions: {
19-
ecmaVersion: 2019,
19+
ecmaVersion: 2020,
2020
sourceType: 'module'
2121
}
2222
}

jest.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ module.exports = {
1414
'jest/prefer-called-with': 'warn',
1515
'jest/prefer-hooks-on-top': 'warn',
1616
'jest/prefer-strict-equal': 'warn',
17-
'jest/prefer-to-be-null': 'warn',
17+
'jest/prefer-to-be': 'warn',
1818
'jest/prefer-to-contain': 'warn',
1919
'jest/prefer-to-have-length': 'warn',
2020
'jest/prefer-todo': 'warn',

node.js

+21-21
Original file line numberDiff line numberDiff line change
@@ -2,38 +2,38 @@ module.exports = {
22
env: {
33
node: true
44
},
5-
extends: ['plugin:node/recommended'],
5+
extends: ['plugin:n/recommended'],
66
rules: {
7-
// eslint-plugin-node Possible Errors
8-
'node/handle-callback-err': 'error',
9-
'node/no-new-require': 'error',
10-
'node/no-path-concat': 'error',
11-
// eslint-plugin-node Stylistic Issues
12-
'node/callback-return': 'error',
13-
'node/exports-style': 'error',
14-
'node/file-extension-in-import': ['warn', 'never'],
15-
'node/global-require': 'error',
16-
'node/no-sync': 'error',
17-
'node/prefer-promises/dns': 'error',
18-
'node/prefer-promises/fs': 'error'
7+
// eslint-plugin-n Possible Errors
8+
'n/handle-callback-err': 'error',
9+
'n/no-new-require': 'error',
10+
'n/no-path-concat': 'error',
11+
// eslint-plugin-n Stylistic Issues
12+
'n/callback-return': 'error',
13+
'n/exports-style': 'error',
14+
'n/file-extension-in-import': ['warn', 'never'],
15+
'n/global-require': 'error',
16+
'n/no-sync': 'error',
17+
'n/prefer-promises/dns': 'error',
18+
'n/prefer-promises/fs': 'error'
1919
},
2020
overrides: [
2121
{
2222
files: ['*.ts'],
2323
rules: {
24-
// eslint-plugin-node Possible Errors
25-
'node/no-missing-import': 'off', // unnecessary for TypeScript
26-
'node/no-unpublished-import': 'off', // doesn't support import types from devDependencies
27-
'node/no-unsupported-features/es-syntax': 'off', // unnecessary for TypeScript
28-
// eslint-plugin-node Stylistic Issues
29-
'node/file-extension-in-import': 'off' // unnecessary for TypeScript
24+
// eslint-plugin-n Possible Errors
25+
'n/no-missing-import': 'off', // unnecessary for TypeScript
26+
'n/no-unpublished-import': 'off', // doesn't support import types from devDependencies
27+
'n/no-unsupported-features/es-syntax': 'off', // unnecessary for TypeScript
28+
// eslint-plugin-n Stylistic Issues
29+
'n/file-extension-in-import': 'off' // unnecessary for TypeScript
3030
}
3131
},
3232
{
3333
files: ['*{spec, test, tests}.*', '**/__tests__/**', '**/test/**'],
3434
rules: {
35-
// eslint-plugin-node Stylistic Issues
36-
'node/no-sync': 'off' // allow sync methods in tests, e.g. when use factory.ts
35+
// eslint-plugin-n Stylistic Issues
36+
'n/no-sync': 'off' // allow sync methods in tests, e.g. when use factory.ts
3737
}
3838
}
3939
]

0 commit comments

Comments
 (0)