forked from brianblakely/nodep-date-input-polyfill
-
Notifications
You must be signed in to change notification settings - Fork 0
/
.eslintrc.js
76 lines (75 loc) · 2.3 KB
/
.eslintrc.js
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
module.exports = {
"parser": "@typescript-eslint/parser",
"env": {
"browser": true,
"es6": true
},
"plugins": [
"@typescript-eslint"
],
"extends": [
"eslint:recommended",
"plugin:@typescript-eslint/eslint-recommended",
"plugin:@typescript-eslint/recommended"
],
"globals": {
"Atomics": "readonly",
"SharedArrayBuffer": "readonly"
},
"parserOptions": {
"ecmaVersion": 2019,
"sourceType": "module",
"project": "./tsconfig.json",
"tsconfigRootDir": __dirname,
},
"rules": {
"indent": [
"error",
4
],
"linebreak-style": [
"error",
"windows"
],
"quotes": [
"error",
"single"
],
"semi": [
"error",
"always"
],
"@typescript-eslint/explicit-function-return-type": "off",
"@typescript-eslint/no-explicit-any": "off",
"@typescript-eslint/no-use-before-define": "off",
"@typescript-eslint/interface-name-prefix": "off", // note deprecated in favour of below, will have to be removed @ some point
"@typescript-eslint/naming-convention": [
"error",
{ // Use camelCase in general
"selector": "default",
"format": ["camelCase"]
},
{ // Class names in PascalCase
"selector": "typeLike",
"format": ["PascalCase"]
},
{ // Enforce that private members are prefixed with an underscore
"selector": "memberLike",
"modifiers": ["private"],
"format": ["camelCase"],
"leadingUnderscore": "require"
},
{ // Enforce that boolean variables are prefixed with an allowed verb
"selector": "variable",
"types": ["boolean"],
"format": ["PascalCase"],
"prefix": ["is", "should", "has", "can", "did", "will"]
},
{ // Enforce that type parameters (generics) are prefixed with T then PascalCase
"selector": "typeParameter",
"format": ["PascalCase"],
"prefix": ["T"]
},
]
}
};