-
Notifications
You must be signed in to change notification settings - Fork 2
/
.eslintrc.json
96 lines (96 loc) · 2.44 KB
/
.eslintrc.json
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
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
{
"root": true,
"env": {
"browser": true,
"es2020": true
},
"parser": "@typescript-eslint/parser",
"parserOptions": {
"ecmaVersion": 2020,
"sourceType": "module",
"project": ["./tsconfig.app.json", "./tsconfig.node.json"]
},
"extends": [
"eslint:recommended",
"plugin:react/recommended",
"airbnb",
"airbnb-typescript",
"plugin:react-hooks/recommended",
"prettier"
],
"plugins": ["react", "react-hooks", "@typescript-eslint"],
"rules": {
"react/function-component-definition": [
"error",
{
"namedComponents": "arrow-function",
"unnamedComponents": "arrow-function"
}
],
"react/no-unknown-property": ["error", { "ignore": ["css"] }],
"react/require-default-props": "off",
"react/react-in-jsx-scope": "off",
"react/jsx-filename-extension": ["warn", { "extensions": [".tsx"] }],
"react/prop-types": "off",
"no-use-before-define": ["error", { "functions": true, "classes": true, "variables": false }],
"no-unused-vars": "off",
"@typescript-eslint/no-unused-vars": "error",
"react/jsx-pascal-case": "warn",
"import/extensions": [
"error",
"ignorePackages",
{
"js": "never",
"jsx": "never",
"ts": "never",
"tsx": "never"
}
],
"no-console": ["warn", { "allow": ["warn", "error"] }],
"func-style": ["error", "expression"],
"camelcase": ["error", { "properties": "always" }],
"space-infix-ops": ["warn"],
"@typescript-eslint/no-explicit-any": "error",
"import/order": [
"warn",
{
"groups": ["builtin", "external", "internal", "parent", "sibling", "index"],
"newlines-between": "always",
"alphabetize": {
"order": "asc",
"caseInsensitive": true
}
}
]
},
"overrides": [
{
"files": ["**/*.ts", "**/*.tsx"],
"extends": ["plugin:@typescript-eslint/recommended"],
"plugins": ["@typescript-eslint"]
},
{
"files": ["**/__tests__/**/*", "**/*.spec.*", "**/*.test.*"],
"env": {
"jest/globals": true
},
"extends": [
"plugin:jest/recommended",
"plugin:jest-dom/recommended",
"plugin:testing-library/react"
],
"plugins": ["jest", "jest-dom", "testing-library"]
}
],
"settings": {
"react": {
"version": "detect"
},
"import/resolver": {
"node": {
"extensions": [".js", ".jsx", ".ts", ".tsx"]
},
"typescript": {}
}
}
}