Skip to content

Commit

Permalink
Update eslint, refine eslint config
Browse files Browse the repository at this point in the history
Update eslint, refine eslint config
  • Loading branch information
sabio committed Oct 20, 2023
1 parent 22e7d43 commit 953d076
Show file tree
Hide file tree
Showing 5 changed files with 1,289 additions and 2,211 deletions.
21 changes: 10 additions & 11 deletions .eslintrc.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ const bannedFunctions = require('./eslintBannedFunctions');
*/
module.exports = {
root: true,
extends: ['airbnb', 'prettier'],
extends: ['airbnb-base', 'prettier'],
parser: '@typescript-eslint/parser',
parserOptions: {
project: './tsconfig.eslint.json',
Expand All @@ -15,14 +15,14 @@ module.exports = {
BigInt: true,
},
settings: {
'import/extensions': ['.js', '.ts', '.tsx'],
'import/extensions': ['.js', '.ts'],
'import/parsers': {
'@typescript-eslint/parser': ['.ts', '.tsx'],
'@typescript-eslint/parser': ['.ts'],
},
'import/resolver': {
typescript: {},
node: {
extensions: ['.js', '.ts', '.tsx'],
extensions: ['.js', '.ts'],
},
},
},
Expand All @@ -38,9 +38,9 @@ module.exports = {
],
overrides: [
{
files: ['*.ts', '*.tsx'],
files: ['*.ts'],
extends: [
'airbnb',
'airbnb-base',
'plugin:@typescript-eslint/recommended',
'prettier',
'prettier/@typescript-eslint',
Expand Down Expand Up @@ -92,13 +92,11 @@ module.exports = {
'@typescript-eslint/explicit-module-boundary-types': 'off',
'@typescript-eslint/no-unused-vars': 'off',
'@typescript-eslint/ban-types': 'off',
'react/jsx-filename-extension': [
'error',
{ extensions: ['.tsx'] },
],
'react/react-in-jsx-scope': 'off',
'prefer-rest-params': 'off',
'prefer-spread': 'off',
'prefer-object-spread': 'off',
'prefer-regex-literals': 'off',
'default-param-last': 'off',
},
},
{
Expand All @@ -125,6 +123,7 @@ module.exports = {
block: ['describe', 'it', 'onlyForBrowserTest'],
},
],
'max-classes-per-file': 'off',
},
},
{
Expand Down
Loading

0 comments on commit 953d076

Please sign in to comment.