-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy path.eslintrc.json
132 lines (127 loc) · 4.8 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
121
122
123
124
125
126
127
128
129
130
131
132
{
"env": {
"es6": true,
"jest": true
},
"extends": [
"eslint:recommended",
"plugin:@typescript-eslint/eslint-recommended",
"plugin:@typescript-eslint/recommended",
"plugin:import/typescript"
],
"globals": {
"Atomics": "readonly",
"SharedArrayBuffer": "readonly"
},
"parser": "@typescript-eslint/parser",
"parserOptions": {
"ecmaVersion": 2018,
"sourceType": "module"
},
"plugins": [
"@typescript-eslint",
"unused-imports",
"import"
],
"settings": {
"import/external-module-folders": [ "libs" ]
},
"overrides": [
{
"files": [ "**/spec/*.ts", "**/spec/**/*.ts" ],
"rules": {
"import/no-extraneous-dependencies": ["off"] // mocha and chai are hoisted and provide false positives
}
}
],
"rules": {
"@typescript-eslint/no-namespace": "off",
"no-inner-declarations": "off",
"prefer-const": "error",
"@typescript-eslint/no-unused-vars": ["warn", { "argsIgnorePattern": "^_", "varsIgnorePattern": "^_" }],
// "@typescript-eslint/no-submodule-imports": "error",
"@typescript-eslint/no-explicit-any": "warn",
// TODO remove
"@typescript-eslint/explicit-module-boundary-types": "warn",
"@typescript-eslint/ban-ts-comment": "warn",
"no-empty": "warn",
"no-empty-function": "warn",
"@typescript-eslint/no-empty-function": "warn",
"@typescript-eslint/ban-types": "warn",
"prefer-rest-params": "warn",
"no-fallthrough": "warn",
"array-bracket-spacing": ["error", "always", { "objectsInArrays": false, "arraysInArrays": false }],
"block-spacing": "error",
"brace-style": "error",
"camelcase": "error",
// "capitalized-comments": "error",
"comma-dangle": ["error", "always-multiline"],
"comma-spacing": "error",
"comma-style": "error",
"computed-property-spacing": "error",
"curly": "error",
"eol-last": "error",
"func-call-spacing": "error",
"implicit-arrow-linebreak": "error",
"indent": "error",
"key-spacing": "error",
"keyword-spacing": ["error", { "overrides": {
"if": { "after": false },
"for": { "after": false },
"while": { "after": false }
}}],
"linebreak-style": "error",
"lines-between-class-members": "error",
"multiline-comment-style": "error",
"new-parens": "error",
"newline-per-chained-call": "error",
"no-multiple-empty-lines": "error",
"no-unneeded-ternary": "error",
"no-whitespace-before-property": "error",
"object-curly-newline": ["error", { "consistent": true }],
"object-curly-spacing": ["error", "always", { "objectsInObjects": false }],
"operator-assignment": "error",
"operator-linebreak": ["error", "before"],
"prefer-object-spread": "error",
"quote-props": ["error", "as-needed"],
"quotes": ["error", "single"],
"semi": ["error", "always"],
"semi-spacing": "error",
"semi-style": "error",
"space-before-blocks": "error",
"space-before-function-paren": ["error", {"anonymous": "never", "named": "never", "asyncArrow": "always"}],
"space-in-parens": ["error", "never"],
"space-infix-ops": "error",
"space-unary-ops": ["error", {"words": true, "nonwords": false}],
"spaced-comment": "error",
"switch-colon-spacing": "error",
"arrow-spacing": "error",
"generator-star-spacing": ["error", {"before": true, "after": true}],
"prefer-numeric-literals": "error",
// "sort-imports": "error", - replace with fixable version
"yield-star-spacing": ["error", "both"],
"dot-location": ["error", "property"],
"dot-notation": "error",
"eqeqeq": "error",
"no-else-return": "error",
"no-multi-spaces": "error",
"yoda": "error",
// imports
"unused-imports/no-unused-imports": "error",
"import/no-cycle": "error",
"import/no-absolute-path": "error",
"import/no-useless-path-segments": "error",
"import/no-extraneous-dependencies": "error",
"import/no-mutable-exports": "error",
"import/no-unused-modules": "error",
"import/first": "error",
"import/order": "error",
"import/newline-after-import": "error",
"import/no-relative-packages": "error"
// TODO disable importing from inside of package src
// "import/no-restricted-paths": ["error", { "zones": [{
// "target": "*",
// "from": "@cards-ts/*/src/*"
// }]}]
}
}