Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add ESLint v8 support #30

Merged
merged 2 commits into from
Jun 1, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion configs/testing-library.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ module.exports = {
plugins: ['testing-library'],
rules: {
'testing-library/no-await-sync-query': 'error',
'testing-library/no-debug': 'warn',
'testing-library/no-debugging-utils': 'warn',
'testing-library/no-dom-import': ['error', 'react'],
'testing-library/no-manual-cleanup': 'warn',
'testing-library/no-wait-for-snapshot': 'warn',
Expand Down
2 changes: 1 addition & 1 deletion javascript.js
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ module.exports = {
files: ['*.js', '*.jsx'],
parser: 'espree',
parserOptions: {
ecmaVersion: 2019,
ecmaVersion: 2020,
sourceType: 'module'
}
}
Expand Down
2 changes: 1 addition & 1 deletion jest.js
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ module.exports = {
'jest/prefer-called-with': 'warn',
'jest/prefer-hooks-on-top': 'warn',
'jest/prefer-strict-equal': 'warn',
'jest/prefer-to-be-null': 'warn',
'jest/prefer-to-be': 'warn',
'jest/prefer-to-contain': 'warn',
'jest/prefer-to-have-length': 'warn',
'jest/prefer-todo': 'warn',
Expand Down
42 changes: 21 additions & 21 deletions node.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,38 +2,38 @@ module.exports = {
env: {
node: true
},
extends: ['plugin:node/recommended'],
extends: ['plugin:n/recommended'],
rules: {
// eslint-plugin-node Possible Errors
'node/handle-callback-err': 'error',
'node/no-new-require': 'error',
'node/no-path-concat': 'error',
// eslint-plugin-node Stylistic Issues
'node/callback-return': 'error',
'node/exports-style': 'error',
'node/file-extension-in-import': ['warn', 'never'],
'node/global-require': 'error',
'node/no-sync': 'error',
'node/prefer-promises/dns': 'error',
'node/prefer-promises/fs': 'error'
// eslint-plugin-n Possible Errors
'n/handle-callback-err': 'error',
'n/no-new-require': 'error',
'n/no-path-concat': 'error',
// eslint-plugin-n Stylistic Issues
'n/callback-return': 'error',
'n/exports-style': 'error',
'n/file-extension-in-import': ['warn', 'never'],
'n/global-require': 'error',
'n/no-sync': 'error',
'n/prefer-promises/dns': 'error',
'n/prefer-promises/fs': 'error'
},
overrides: [
{
files: ['*.ts'],
rules: {
// eslint-plugin-node Possible Errors
'node/no-missing-import': 'off', // unnecessary for TypeScript
'node/no-unpublished-import': 'off', // doesn't support import types from devDependencies
'node/no-unsupported-features/es-syntax': 'off', // unnecessary for TypeScript
// eslint-plugin-node Stylistic Issues
'node/file-extension-in-import': 'off' // unnecessary for TypeScript
// eslint-plugin-n Possible Errors
'n/no-missing-import': 'off', // unnecessary for TypeScript
'n/no-unpublished-import': 'off', // doesn't support import types from devDependencies
'n/no-unsupported-features/es-syntax': 'off', // unnecessary for TypeScript
// eslint-plugin-n Stylistic Issues
'n/file-extension-in-import': 'off' // unnecessary for TypeScript
}
},
{
files: ['*{spec, test, tests}.*', '**/__tests__/**', '**/test/**'],
rules: {
// eslint-plugin-node Stylistic Issues
'node/no-sync': 'off' // allow sync methods in tests, e.g. when use factory.ts
// eslint-plugin-n Stylistic Issues
'n/no-sync': 'off' // allow sync methods in tests, e.g. when use factory.ts
}
}
]
Expand Down
Loading