Skip to content

Commit 68c2c22

Browse files
committed
Update to latest eslint 9 with neostandard and eslint-plugin-react-hooks
1 parent e212c66 commit 68c2c22

11 files changed

Lines changed: 1592 additions & 698 deletions

File tree

.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: 43 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,43 @@
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 hooks recommended rules
15+
reactHooks.configs.flat.recommended,
16+
17+
// Project config
18+
{
19+
files: ["src/**/*.js"],
20+
languageOptions: {
21+
parserOptions: {
22+
ecmaFeatures: { jsx: true },
23+
},
24+
globals: {
25+
AFRAME: "readonly",
26+
THREE: "readonly",
27+
},
28+
},
29+
plugins: {
30+
react: reactPlugin,
31+
},
32+
settings: {
33+
react: { version: "detect" },
34+
},
35+
rules: {
36+
"no-var": "off",
37+
"no-useless-return": "off",
38+
"object-shorthand": "off",
39+
"prefer-const": "off",
40+
"react/jsx-uses-vars": "error",
41+
},
42+
},
43+
];

0 commit comments

Comments
 (0)