-
Notifications
You must be signed in to change notification settings - Fork 1
/
.eslintrc.json
96 lines (96 loc) · 2.53 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
{
"env": {
"browser": true,
"es6": true,
"node": true,
"jest": true
},
"extends": ["plugin:react/recommended", "plugin:tailwind/recommended"],
"globals": {
"Atomics": "readonly",
"SharedArrayBuffer": "readonly",
"React": "writable"
},
"plugins": ["react", "@typescript-eslint", "react-hooks"],
"rules": {
"max-len": [
"error",
{
"code": 120,
"ignoreUrls": true
}
],
"import/extensions": ["error", "never"],
"react/jsx-filename-extension": [
"error",
{
"extensions": [".jsx", ".tsx"]
}
],
"jsx-a11y/anchor-is-valid": "off",
// Form elements by default in jsx-a11y need both nesting and a _for_ attr. IRL only one of the two is needed.
"jsx-a11y/label-has-associated-control": [
"error",
{
"assert": "either"
}
],
"react/require-default-props": "off",
"react-hooks/exhaustive-deps": "off", // Checks effect dependencies
"no-use-before-define": "off", // Picks up React usage in multiple places where it probably shouldn't
"no-shadow": "off",
"@typescript-eslint/no-shadow": "warn",
"react/react-in-jsx-scope": "off"
},
"overrides": [
{
"files": ["*.ts", "*.tsx"],
"extends": [
"plugin:@typescript-eslint/eslint-recommended",
"plugin:@typescript-eslint/recommended",
"airbnb-typescript",
"airbnb/hooks",
// Prettier config turns off eslint formatting rules
"prettier/@typescript-eslint",
"prettier/react",
"prettier"
],
"parser": "@typescript-eslint/parser",
"parserOptions": {
"ecmaFeatures": {
"jsx": true
},
"ecmaVersion": 2018,
"sourceType": "module",
"project": "./tsconfig.json"
},
"rules": {
"camelcase": "off",
"import/no-cycle": "off",
"import/prefer-default-export": "off",
"@typescript-eslint/no-explicit-any": "off",
"@typescript-eslint/explicit-module-boundary-types": "off",
"jsx-a11y/click-events-have-key-events": "off",
"jsx-a11y/no-static-element-interactions": "off"
},
"plugins": ["react", "@typescript-eslint"],
"settings": {
"import/resolver": {
"node": {
"extensions": [".js", ".jsx", ".ts", ".tsx"]
}
}
}
}
],
"settings": {
"import/resolver": {
"node": {
"extensions": [".js", ".jsx", ".ts", ".tsx"]
}
},
"react": {
"version": "detect"
}
}
}