-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.eslintrc
82 lines (82 loc) · 2.22 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
{
"env": {
"node": true,
"jest": true,
"browser": true,
"commonjs": true,
"es6": true
},
"extends": [
"react-app",
"plugin:react/recommended",
"plugin:@typescript-eslint/recommended",
"plugin:import/errors",
"plugin:import/warnings",
"plugin:import/typescript"
],
"globals": {
"Atomics": "readonly",
"SharedArrayBuffer": "readonly"
},
"parser": "@typescript-eslint/parser",
"plugins": ["@typescript-eslint"],
"parserOptions": {
"ecmaVersion": 2020
},
"settings": {
"react": {
"version": "detect"
},
"import/extensions": [".js", ".jsx", ".ts", ".tsx"],
"import/resolver": {
"node": {
"extensions": [".js", ".jsx", ".ts", ".tsx", ".d.ts"],
"moduleDirectory": ["node_modules", "./src/"]
}
}
},
"ignorePatterns": ["*.stories.tsx", "*.stories.ts"],
"rules": {
"react/react-in-jsx-scope": "off",
"no-var": "warn",
"getter-return": "warn",
"no-extra-semi": "warn",
"no-empty": "warn",
"@typescript-eslint/no-empty-function": [
"warn",
{ "allow": ["arrowFunctions"] }
],
"@typescript-eslint/no-explicit-any": "warn",
"no-template-curly-in-string": "warn",
"array-callback-return": "warn",
"dot-notation": "warn",
"no-throw-literal": "warn",
"prefer-regex-literals": "warn",
"require-await": "warn",
"object-shorthand": "warn",
"no-unneeded-ternary": "warn",
"@typescript-eslint/ban-ts-comment": "warn",
"eqeqeq": ["warn", "smart"],
"prefer-const": ["warn", { "destructuring": "all" }],
"sort-imports": [
"warn",
{
"ignoreCase": true,
"ignoreDeclarationSort": true,
"ignoreMemberSort": false,
"memberSyntaxSortOrder": ["none", "all", "multiple", "single"], // ? basically meaningless. "import/order"
"allowSeparatedGroups": true
}
],
"import/order": [
"warn",
{
"newlines-between": "always",
"alphabetize": { "order": "asc" },
"groups": ["builtin", "external", "parent", "sibling", "index"]
}
],
"import/no-anonymous-default-export": ["warn", { "allowObject": true }],
"import/newline-after-import": ["warn", { "count": 1 }]
}
}