This repository has been archived by the owner on Aug 31, 2022. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 3
/
.eslintrc
94 lines (94 loc) · 2.53 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
{
"root": true,
"parser": "@typescript-eslint/parser",
"parserOptions": {
"ecmaVersion": 2020,
"sourceType": "module",
"ecmaFeatures": {
"jsx": true
}
},
"settings": {
"react": {
"version": "detect"
}
},
"env": {
"amd": true,
"jest": true,
"node": true,
"browser": true
},
"plugins": ["simple-import-sort"],
"extends": [
"eslint:recommended",
"plugin:@typescript-eslint/eslint-recommended",
"plugin:@typescript-eslint/recommended",
"plugin:react/recommended",
"plugin:jsx-a11y/recommended",
"plugin:react-hooks/recommended",
"plugin:prettier/recommended"
],
"overrides": [
{
"files": ["**/*.stories.*"],
"rules": {
"import/no-anonymous-default-export": "off"
}
}
],
"rules": {
"prettier/prettier": ["error", {}, { "usePrettierrc": true }],
// https://github.com/lydell/eslint-plugin-simple-import-sort
"simple-import-sort/imports": "error",
"simple-import-sort/exports": "error",
// https://eslint.org/docs/rules/
"no-var": "error",
"no-console": "warn",
"prefer-const": "error",
"no-else-return": "error",
"no-floating-decimal": "error",
"eqeqeq": ["error", "smart"],
"comma-dangle": ["error", "never"],
"curly": ["error", "multi-or-nest", "consistent"],
"no-empty": [
"error",
{
"allowEmptyCatch": true
}
],
// https://github.com/yannickcr/eslint-plugin-react
"react/prop-types": "off",
"react/display-name": "off",
"react/jsx-pascal-case": "error",
"react/react-in-jsx-scope": "off",
"react/self-closing-comp": "error",
"react/jsx-no-useless-fragment": "error",
"react/void-dom-elements-no-children": "error",
"react/jsx-fragments": ["error", "syntax"],
"react/jsx-boolean-value": ["error", "never"],
"react/jsx-curly-brace-presence": ["error", "never"],
"react/jsx-sort-props": [
"error",
{
"callbacksLast": true,
"shorthandFirst": true,
"shorthandLast": false,
"ignoreCase": true,
"noSortAlphabetically": false,
"reservedFirst": true
}
],
// https://github.com/typescript-eslint/typescript-eslint
"@typescript-eslint/explicit-module-boundary-types": "off",
// https://github.com/jsx-eslint/eslint-plugin-jsx-a11y
"jsx-a11y/anchor-is-valid": [
"error",
{
"components": ["Link"],
"specialLink": ["hrefLeft", "hrefRight"],
"aspects": ["invalidHref", "preferButton"]
}
]
}
}