-
Notifications
You must be signed in to change notification settings - Fork 4
/
Copy patheslint.config.js
42 lines (41 loc) · 1.1 KB
/
eslint.config.js
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
38
39
40
41
42
import pluginReact from "@eslint-react/eslint-plugin";
import pluginReactHooks from "eslint-plugin-react-hooks";
import tseslint from "typescript-eslint";
import importPlugin from "eslint-plugin-import";
export default tseslint.config({
files: ["**/*.tsx"],
extends: [importPlugin.flatConfigs.recommended, pluginReact.configs.recommended],
plugins: {
"@typescript-eslint": tseslint.plugin,
"react-hooks": pluginReactHooks,
},
languageOptions: {
parser: tseslint.parser,
parserOptions: {
projectService: true,
},
},
rules: {
"@eslint-react/no-clone-element": "off",
"react-hooks/exhaustive-deps": "error",
"react-hooks/rules-of-hooks": "error",
"@typescript-eslint/no-unused-vars": "error",
"@typescript-eslint/consistent-type-imports": "error",
"@eslint-react/no-children-only": "off",
"import/order": [
"error",
{
alphabetize: {
order: "asc",
caseInsensitive: true,
},
"newlines-between": "always",
},
],
},
settings: {
"import/resolver": {
typescript: {},
},
},
});