-
Notifications
You must be signed in to change notification settings - Fork 13
/
Copy path.eslintrc
executable file
·120 lines (120 loc) · 3.84 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
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
{
"env": {
"browser": true,
"es6": true,
"node": true
},
"globals": {
"document": false,
"escape": false,
"navigator": false,
"unescape": false,
"window": false
},
"parser": "@typescript-eslint/parser",
"parserOptions": {
"ecmaVersion": 6,
"sourceType": "module",
"ecmaFeatures": {
"modules": true
}
},
"plugins": ["prettier"],
"extends": [
"eslint:recommended",
"plugin:import/recommended",
"plugin:import/typescript",
"plugin:eslint-comments/recommended",
"prettier"
],
"rules": {
"arrow-body-style": "error",
"array-callback-return": "error",
"default-case": "error",
"dot-notation": "error",
"eslint-comments/disable-enable-pair": "off",
"eslint-comments/no-unused-disable": "error",
"eqeqeq": "error",
"func-names": "error",
"func-style": "error",
"import/no-named-as-default": "off",
"import/order": ["error", {
"groups": [
"builtin",
"external",
"internal",
"parent",
"sibling",
"index"
],
"newlines-between": "always",
"alphabetize": {"order": "asc", "caseInsensitive": true}
}],
"lines-between-class-members": ["error", "always", { "exceptAfterSingleLine": true }],
"no-await-in-loop": "error",
"no-console": "off",
"no-constructor-return": "error",
"no-continue": "error",
"no-negated-condition": "error",
"no-param-reassign": "error",
"no-return-await": "error",
"no-prototype-builtins": "off",
"no-shadow": "error",
"no-unmodified-loop-condition": "error",
"no-warning-comments": "error",
"object-shorthand": "error",
"one-var": ["error", "never"],
"operator-assignment": "error",
"prefer-arrow-callback": "error",
"prefer-const": "error",
"prefer-destructuring": "error",
"prefer-promise-reject-errors": "error",
"prettier/prettier": "error",
"require-atomic-updates": "error",
"require-await": "error",
"require-unicode-regexp": "error",
"sort-imports": "off"
},
"overrides": [
{
"files": ["*.ts"],
"parserOptions": {
"project": "./tsconfig.eslint.json"
},
"plugins": ["@typescript-eslint"],
"extends": [
"plugin:@typescript-eslint/recommended",
"plugin:@typescript-eslint/recommended-requiring-type-checking",
"plugin:@typescript-eslint/strict",
"prettier"
],
"rules": {
"no-shadow": "off",
"no-use-before-define": "off",
"@typescript-eslint/consistent-type-definitions": ["error", "type"],
"@typescript-eslint/consistent-type-imports": "error",
"@typescript-eslint/lines-between-class-members": ["error", "always", { "exceptAfterSingleLine": true }],
"@typescript-eslint/no-non-null-assertion": "off",
"@typescript-eslint/member-ordering": "error",
"@typescript-eslint/no-confusing-void-expression": "error",
"@typescript-eslint/no-require-imports": "error",
"@typescript-eslint/no-unused-vars": "off",
"@typescript-eslint/no-use-before-define": "error",
"@typescript-eslint/prefer-readonly": "error",
"@typescript-eslint/promise-function-async": "error",
/**
* Temporary. The below rules should ideally be enabled, but will require more effort.
*/
"@typescript-eslint/no-explicit-any": "off",
"@typescript-eslint/no-misused-promises": "off",
"@typescript-eslint/no-unnecessary-condition": "off",
"@typescript-eslint/no-unsafe-argument": "off",
"@typescript-eslint/no-unsafe-assignment": "off",
"@typescript-eslint/no-unsafe-call": "off",
"@typescript-eslint/no-unsafe-member-access": "off",
"@typescript-eslint/no-unsafe-return": "off",
"@typescript-eslint/restrict-template-expressions": "off"
}
}
]
}