Skip to content

Commit

Permalink
fix eslint config
Browse files Browse the repository at this point in the history
  • Loading branch information
ayan4m1 committed Sep 22, 2024
1 parent 514c057 commit 1a7da16
Show file tree
Hide file tree
Showing 3 changed files with 53 additions and 55 deletions.
26 changes: 11 additions & 15 deletions eslint.config.mjs
Original file line number Diff line number Diff line change
@@ -1,35 +1,30 @@
import js from '@eslint/js';
import globals from 'globals';
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';
import reactHooksPlugin from 'eslint-plugin-react-hooks';
import prettierPlugin from 'eslint-plugin-prettier/recommended';

export default [
js.configs.recommended,
importPlugin.flatConfigs.recommended,
importPlugin.flatConfigs.react,
{
plugins: {
react: reactPlugin,
reactHooks: reactHooksPlugin,
prettierPlugin
'react-hooks': reactHooksPlugin
},
languageOptions: {
globals: {
...globals.browser
},
globals: globals.browser,
parser: babelParser,
parserOptions: {
requireConfigFile: false,
babelOptions: {
presets: [
'@babel/preset-env',
['@babel/preset-react', { runtime: 'automatic' }]
]
}
requireConfigFile: false
}
},
rules: {
...reactPlugin.configs.recommended.rules,
...reactHooksPlugin.configs.recommended.rules,
'react/jsx-uses-react': 0,
'react/jsx-sort-props': 2,
'react/react-in-jsx-scope': 0
Expand All @@ -44,5 +39,6 @@ export default [
}
}
}
}
},
prettierPlugin
];
75 changes: 38 additions & 37 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

7 changes: 4 additions & 3 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -40,14 +40,15 @@
"@babel/preset-env": "^7.25.4",
"@babel/preset-react": "^7.24.7",
"@babel/register": "^7.24.6",
"@eslint/js": "^9.11.0",
"autoprefixer": "^10.4.20",
"babel-loader": "^9.2.1",
"clean-webpack-plugin": "^4.0.0",
"cname-webpack-plugin": "^3.0.0",
"cross-env": "^7.0.3",
"css-loader": "^7.1.2",
"css-minimizer-webpack-plugin": "^7.0.0",
"eslint": "^9.10.0",
"eslint": "^9.11.0",
"eslint-config-prettier": "^9.1.0",
"eslint-import-resolver-node": "^0.3.9",
"eslint-plugin-import-x": "^4.2.1",
Expand All @@ -66,8 +67,8 @@
"postcss-loader": "^8.1.1",
"postcss-scss": "^4.0.9",
"prettier": "^3.3.3",
"sass": "^1.79.1",
"sass-loader": "^16.0.1",
"sass": "^1.79.3",
"sass-loader": "^16.0.2",
"style-loader": "^4.0.0",
"stylelint": "^16.9.0",
"stylelint-config-recommended": "^14.0.1",
Expand Down

0 comments on commit 1a7da16

Please sign in to comment.