-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.eslintrc
100 lines (100 loc) · 2.58 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
{
"env": {
"browser": true,
"commonjs": true,
"es6": true,
"jest": true,
"node": true
},
"extends": ["plugin:@typescript-eslint/recommended", "plugin:prettier/recommended"],
"plugins": ["react", "@typescript-eslint", "import"],
"parser": "@typescript-eslint/parser",
"rules": {
"no-restricted-imports": [
"error",
{
"patterns": ["../*"],
"paths": [
{
"name": "react",
"importNames": ["default"],
"message": "Please don't use the default import from 'react'. Read more: https://bit.ly/3wTRLZT"
}
]
}
],
"prettier/prettier": ["error", { "singleQuote": true }],
"import/order": [
"error",
{
"groups": [
"external",
"internal",
"builtin",
"parent",
"sibling",
"index",
"object",
"type"
],
"alphabetize": { "order": "asc", "caseInsensitive": true },
"pathGroups": [
{
"pattern": "**/*.scss",
"group": "object",
"position": "before"
},
{
"pattern": "**/*.css",
"group": "object"
},
{
"pattern": "src/**",
"group": "internal",
"position": "before"
}
],
"newlines-between": "always",
"pathGroupsExcludedImportTypes": ["type"],
"warnOnUnassignedImports": true
}
],
"@typescript-eslint/no-duplicate-imports": ["error"],
"@typescript-eslint/consistent-type-imports": "error",
"@typescript-eslint/no-explicit-any": "off",
"@typescript-eslint/class-name-casing": "off",
"@typescript-eslint/camelcase": "off",
"@typescript-eslint/no-var-requires": "off",
"no-console": 0,
"linebreak-style": ["error","unix"],
"jsx-quotes": ["error", "prefer-double"],
"react/jsx-uses-react": "error",
"react/jsx-uses-vars": "error",
"react/jsx-key": 2,
"eqeqeq": 2,
"object-curly-spacing": ["error", "always"],
"prefer-destructuring": ["error", {
"object": true
}, {
"enforceForRenamedProperties": false
}],
"no-eval": 2,
"no-multi-str": 2,
"prefer-const": ["error", {
"destructuring": "any",
"ignoreReadBeforeAssign": false
}],
"max-len": ["error", { "code": 120, "ignorePattern": "^import .*" }]
},
"parserOptions": {
"sourceType": "module"
},
"overrides": [
{
"files": ["*/config/**/*.*"],
"rules": {
"no-restricted-imports": "off"
}
}
]
}