-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.eslintrc.json
120 lines (120 loc) · 3.18 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
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
{
"root": true,
"env": {
"browser": true,
"es2020": true
},
"parser": "@typescript-eslint/parser",
"parserOptions": {
"project": "./tsconfig.json"
},
"ignorePatterns": ["node_modules", "dist", "*.config.js", "*.config.cjs"],
"plugins": ["@typescript-eslint", "prettier", "import"],
"extends": [
"airbnb",
"airbnb-typescript",
"eslint:recommended",
"plugin:@typescript-eslint/recommended",
"plugin:prettier/recommended",
"plugin:import/recommended",
"plugin:import/typescript"
],
"settings": {
"import/resolver": {
"typescript": {
"project": "./tsconfig.json"
}
}
},
"rules": {
"max-len": [
"warn",
{
"code": 120
}
],
"no-unused-vars": "off",
"@typescript-eslint/no-empty-interface": "off",
"@typescript-eslint/no-non-null-assertion": "off",
"@typescript-eslint/no-unused-vars": [
"warn",
{
"argsIgnorePattern": "^_",
"varsIgnorePattern": "^_",
"caughtErrorsIgnorePattern": "^_"
}
],
"prettier/prettier": [
"warn",
{
"printWidth": 120,
"tabWidth": 2
},
{
"usePrettierrc": false
}
],
"sort-imports": [
"warn",
{
"ignoreCase": false,
"ignoreDeclarationSort": true,
"ignoreMemberSort": false,
"memberSyntaxSortOrder": ["none", "all", "multiple", "single"],
"allowSeparatedGroups": true
}
],
"import/no-unresolved": "error",
"import/order": [
"warn",
{
"groups": [
"builtin",
"external",
"internal",
["sibling", "parent"],
"index",
"unknown"
],
"pathGroups": [
{
"pattern": "utils/**",
"group": "internal"
}
],
"distinctGroup": false,
"pathGroupsExcludedImportTypes": ["builtin"],
"newlines-between": "always",
"alphabetize": {
"order": "asc",
"caseInsensitive": true
}
}
],
"import/default": "off",
"react/jsx-filename-extension": [2, { "extensions": [".js", ".jsx", ".ts", ".tsx"] }],
"react/react-in-jsx-scope": "off",
"react/function-component-definition": "off",
"import/prefer-default-export": "off",
"no-restricted-syntax": [
"error",
{
"selector": "ForInStatement",
"message": "for..in loops iterate over the entire prototype chain, which is virtually never what you want. Use Object.{keys,values,entries}, and iterate over the resulting array."
},
{
"selector": "LabeledStatement",
"message": "Labels are a form of GOTO; using them makes code confusing and hard to maintain and understand."
},
{
"selector": "WithStatement",
"message": "`with` is disallowed in strict mode because it makes code impossible to predict and optimize."
}
],
"react/no-array-index-key": "off",
"react/jsx-props-no-spreading": "off",
"react/prop-types": [2, { "ignore": ["className"] }],
"import/no-extraneous-dependencies": ["error", { "devDependencies": true }],
"import/export": 0
}
}