Skip to content

Commit 63de601

Browse files
committed
Clean up the client ESLint config
Some more things have been properly flattened since I last looked at this, and tseslint.config is deprecated for an upstream solution.
1 parent 1f1ac4a commit 63de601

File tree

1 file changed

+3
-6
lines changed

1 file changed

+3
-6
lines changed

client/eslint.config.js

Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@ import { fileURLToPath } from "node:url";
55

66
import confusingBrowserGlobals from "confusing-browser-globals";
77

8+
import { defineConfig } from "eslint/config";
89
import js from "@eslint/js";
910
import { fixupConfigRules, fixupPluginRules } from "@eslint/compat";
1011
import { FlatCompat } from "@eslint/eslintrc";
@@ -18,21 +19,17 @@ const compat = new FlatCompat({
1819
baseDirectory: path.dirname(fileURLToPath(import.meta.url)),
1920
});
2021

21-
export default tseslint.config(
22+
export default defineConfig(
2223
{
2324
ignores: ["dist/**/*"],
2425
},
2526

2627
js.configs.recommended,
2728

28-
// @ts-expect-error
2929
react.configs.flat.recommended,
3030
{ settings: { react: { version: "detect" } } },
3131

32-
{
33-
plugins: { "react-hooks": reactHooks },
34-
rules: reactHooks.configs.recommended.rules,
35-
},
32+
reactHooks.configs.flat.recommended,
3633

3734
...tseslint.configs.recommended.map((config) => ({
3835
files: ["**/*.ts?(x)"],

0 commit comments

Comments
 (0)