-
Notifications
You must be signed in to change notification settings - Fork 2
/
.eslintrc.json
88 lines (86 loc) · 2.7 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
{
"extends": [
"plugin:@typescript-eslint/recommended",
"plugin:jest/recommended",
"prettier",
"prettier/react",
"prettier/@typescript-eslint",
"plugin:prettier/recommended"
],
"ignorePatterns": [".eslintrc.json"],
"plugins": [
"react",
"@typescript-eslint",
"jest",
"simple-import-sort",
"prefer-arrow",
"sort-destructure-keys",
"sort-keys-fix"
],
"env": {
"browser": true,
"es6": true,
"jest": true
},
"globals": {
"Atomics": "readonly",
"SharedArrayBuffer": "readonly"
},
"parser": "@typescript-eslint/parser",
"parserOptions": {
"ecmaFeatures": {
"jsx": true
},
"ecmaVersion": 2018,
"sourceType": "module",
"project": "./tsconfig.json"
},
"rules": {
"linebreak-style": "off",
"simple-import-sort/imports": ["error", {
"groups": [
// Side effect imports.
["^\\u0000"],
// Packages. `react` related packages come first.
["^react", "^@?\\w"],
// Internal packages.
["^(@|@company|@ui|components|utils|config|vendored-lib|layouts|pages|providers|routes|assets|locales|services|store|style|types)(/.*|$)"],
// Parent imports. Put `..` last.
["^\\.\\.(?!/?$)", "^\\.\\./?$"],
// Other relative imports. Put same-folder imports and `.` last.
["^\\./(?=.*/)(?!/?$)", "^\\.(?!/?$)", "^\\./?$"],
// Style imports.
["^.+\\.s?css$"]
]
}],
"simple-import-sort/exports": "error",
"sort-keys-fix/sort-keys-fix": ["error", "asc", {
"caseSensitive": false,
"natural": true
}],
"sort-destructure-keys/sort-destructure-keys": ["error", {
"caseSensitive": false
}],
"sort-vars": "error",
"no-nested-ternary": 0,
"prefer-arrow/prefer-arrow-functions": [
"error",
{
"disallowPrototype": true,
"singleReturnOnly": true,
"classPropertiesAllowed": false
}
],
"arrow-body-style": ["error", "as-needed"],
"react/jsx-sort-default-props": "error",
"react/jsx-sort-props": "error",
"react/jsx-props-no-spreading": "off",
"prefer-destructuring": ["error", {
"array": false,
"object": true
}],
"no-console": "warn",
"@typescript-eslint/no-explicit-any": "off",
"@typescript-eslint/no-non-null-assertion": "off"
}
}