Skip to content

Commit b1f830b

Browse files
authored
Merge pull request #75 from thomassth/eslint-audit
fix eslint & audit
2 parents 461ba21 + 16a5c24 commit b1f830b

3 files changed

Lines changed: 334 additions & 250 deletions

File tree

client/eslint.config.js

Lines changed: 16 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -5,24 +5,21 @@ import js from "@eslint/js";
55
import globals from "globals";
66
import reactHooks from "eslint-plugin-react-hooks";
77
import reactRefresh from "eslint-plugin-react-refresh";
8-
import tseslint from "typescript-eslint";
8+
import eslint from '@eslint/js';
9+
import tseslint from 'typescript-eslint';
910

10-
export default tseslint.config({ ignores: ["dist"] }, {
11-
extends: [js.configs.recommended, ...tseslint.configs.recommended],
12-
files: ["**/*.{ts,tsx}"],
13-
languageOptions: {
14-
ecmaVersion: 2020,
15-
globals: globals.browser,
11+
export default tseslint.config(
12+
{
13+
ignores: ["dist"],
14+
files: ["**/*.{ts,tsx}"],
15+
languageOptions: {
16+
ecmaVersion: 2020,
17+
globals: globals.browser,
18+
}
1619
},
17-
plugins: {
18-
"react-hooks": reactHooks,
19-
"react-refresh": reactRefresh,
20-
},
21-
rules: {
22-
...reactHooks.configs.recommended.rules,
23-
"react-refresh/only-export-components": [
24-
"warn",
25-
{ allowConstantExport: true },
26-
],
27-
},
28-
}, storybook.configs["flat/recommended"]);
20+
eslint.configs.recommended,
21+
tseslint.configs.recommended,
22+
reactHooks.configs['recommended-latest'],
23+
reactRefresh.configs.vite,
24+
storybook.configs["flat/recommended"]
25+
)

0 commit comments

Comments
 (0)