-
Notifications
You must be signed in to change notification settings - Fork 0
/
eslint.config.mjs
37 lines (34 loc) · 1.01 KB
/
eslint.config.mjs
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
// @ts-check
import typescriptEslint from "@typescript-eslint/eslint-plugin";
import typescriptEslintParser from "@typescript-eslint/parser";
import react from "eslint-plugin-react";
import reactCompiler from "eslint-plugin-react-compiler";
import hooksPlugin from "eslint-plugin-react-hooks";
import sortKeysFix from "eslint-plugin-sort-keys-fix";
import globals from "globals";
const config = [
{
files: ["**/*.{js,jsx,ts,tsx}"],
plugins: {
...react.configs.flat["jsx-runtime"].plugins,
"@typescript-eslint": typescriptEslint,
"react-compiler": reactCompiler,
"react-hooks": hooksPlugin,
"sort-keys-fix": sortKeysFix,
},
languageOptions: {
parser: typescriptEslintParser,
...react.configs.flat["jsx-runtime"].languageOptions,
globals: {
...globals.node,
},
},
rules: {
...react.configs.flat["jsx-runtime"].rules,
...hooksPlugin.configs.recommended.rules,
"react-compiler/react-compiler": "error",
"sort-keys-fix/sort-keys-fix": "warn",
},
},
];
export default config;