-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy path.eslintrc
102 lines (102 loc) · 2.73 KB
/
.eslintrc
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
97
98
99
100
101
102
{
"plugins": [
"import",
"unused-imports"
],
"extends": [
"airbnb",
"plugin:prettier/recommended",
"prettier",
"plugin:react-hooks/recommended",
"plugin:react/jsx-runtime"
],
"parser": "@typescript-eslint/parser",
"rules": {
"no-shadow": "off",
"react/require-default-props": "off",
"no-use-before-define": ["error", {"functions": false, "classes": false, "variables": false}],
"react/no-unescaped-entities": "warn",
"import/order": ["error", {
"groups": ["builtin", "external", ["internal", "parent", "sibling"], "index", "object", "type"]
}],
"unused-imports/no-unused-imports": "error",
"unused-imports/no-unused-vars": [
"warn",
{ "vars": "all", "varsIgnorePattern": "^_", "args": "after-used", "argsIgnorePattern": "^_" }
],
"import/named": "error",
"import/extensions": [
"error",
"ignorePackages",
{
"js": "never",
"jsx": "never",
"ts": "never",
"tsx": "never"
}
],
"react/jsx-filename-extension": [2, { "extensions": [
".js", ".jsx", ".ts", ".tsx"
] }],
"react/jsx-props-no-spreading": "off",
"react/jsx-fragments": 0,
"jsx-a11y/anchor-is-valid": [
"error",
{
"components": ["Link"],
"specialLink": ["to", "hrefLeft", "hrefRight"],
"aspects": ["noHref", "invalidHref", "preferButton"]
}
],
"no-param-reassign": [
2,
{
"props": false
}
],
"no-underscore-dangle": 0,
"no-unused-vars": [
"error",
{
"vars": "all",
"args": "after-used",
"ignoreRestSiblings": true,
"argsIgnorePattern": "^_"
}
],
"prettier/prettier": ["error", {
"singleQuote": true,
"useTabs": true,
"tabWidth": 4,
"semi": true,
"jsxSingleQuote": true,
"trailingComma": "all",
"arrowParens": "avoid",
"endOfLine": "auto",
"printWidth": 90
}],
"react-app/jsx-a11y/href-no-hash": "off", // This rule is dropped but create-react-app uses old rules
"jsx-a11y/label-has-for": "off", // This rule will be dropped soon anyway
"react/destructuring-assignment": "off", // Seems to be way too restrictive
"import/no-cycle": 1, // Should be addressed eventually but does not break
"import/prefer-default-export": "off",
"jsx-a11y/media-has-caption": "off" // Pretty hard to do for every video
},
"env": {
"jest": true,
"browser": true
},
"globals": {
"FileReader": true,
"window": true
},
"settings": {
"import/resolver": {
"typescript": {},
"node": {
"moduleDirectory": ["node_modules", "src/"],
"extensions": [".js", ".jsx", ".ts", ".tsx"]
}
}
}
}