Skip to content

Commit

Permalink
migrate to eslint 9, remove old eslint-disables, add import-x plugin
Browse files Browse the repository at this point in the history
  • Loading branch information
ayan4m1 committed Sep 19, 2024
1 parent c28e977 commit 5f258c3
Show file tree
Hide file tree
Showing 6 changed files with 1,299 additions and 1,434 deletions.
13 changes: 12 additions & 1 deletion eslint.config.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,11 @@ import reactPlugin from 'eslint-plugin-react';
import babelParser from '@babel/eslint-parser';
import prettierPlugin from 'eslint-plugin-prettier';
import reactHooksPlugin from 'eslint-plugin-react-hooks';
import importPlugin from 'eslint-plugin-import-x';

export default [
importPlugin.flatConfigs.recommended,
importPlugin.flatConfigs.react,
{
plugins: {
react: reactPlugin,
Expand All @@ -15,7 +18,10 @@ export default [
globals: {
...globals.browser
},
parser: babelParser
parser: babelParser,
parserOptions: {
requireConfigFile: false
}
},
rules: {
'react/jsx-uses-react': 0,
Expand All @@ -25,6 +31,11 @@ export default [
settings: {
react: {
version: 'detect'
},
'import-x/resolver': {
node: {
paths: ['./src/']
}
}
}
}
Expand Down
Loading

0 comments on commit 5f258c3

Please sign in to comment.