Skip to content

Commit 01b7d43

Browse files
Update to latest eslint 9 with neostandard and eslint-plugin-react-hooks (#842)
* Update to latest eslint 9 with neostandard and eslint-plugin-react-hooks * reformat file * update vulnerable packages * update to neostandard 0.13.0
1 parent e212c66 commit 01b7d43

File tree

11 files changed

+1089
-758
lines changed

11 files changed

+1089
-758
lines changed

.eslintignore

Lines changed: 0 additions & 2 deletions
This file was deleted.

.eslintrc

Lines changed: 0 additions & 41 deletions
This file was deleted.

eslint.config.mjs

Lines changed: 46 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,46 @@
1+
import neostandard from 'neostandard';
2+
import reactPlugin from 'eslint-plugin-react';
3+
import reactHooks from 'eslint-plugin-react-hooks';
4+
5+
export default [
6+
// Global ignores
7+
{
8+
ignores: ['src/components/__tests__/**']
9+
},
10+
11+
// neostandard base config, no style rules, browser globals
12+
...neostandard({ noStyle: true, env: ['browser'] }),
13+
14+
// React recommended rules
15+
reactPlugin.configs.flat.recommended,
16+
reactPlugin.configs.flat['jsx-runtime'],
17+
18+
// React hooks recommended rules
19+
reactHooks.configs.flat.recommended,
20+
21+
// Project config
22+
{
23+
files: ['src/**/*.js'],
24+
languageOptions: {
25+
parserOptions: {
26+
ecmaFeatures: { jsx: true }
27+
},
28+
globals: {
29+
AFRAME: 'readonly',
30+
THREE: 'readonly'
31+
}
32+
},
33+
plugins: {
34+
react: reactPlugin
35+
},
36+
settings: {
37+
react: { version: 'detect' }
38+
},
39+
rules: {
40+
'no-useless-return': 'off',
41+
'no-var': 'off',
42+
'object-shorthand': 'off',
43+
'prefer-const': 'off'
44+
}
45+
}
46+
];

0 commit comments

Comments
 (0)