-
Notifications
You must be signed in to change notification settings - Fork 0
/
.eslintrc
107 lines (98 loc) · 3.2 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
{
"parser": "@typescript-eslint/parser",
"extends": [
"airbnb",
"plugin:@typescript-eslint/recommended",
"plugin:prettier/recommended"
],
"plugins": [
"header",
"jsdoc",
"simple-import-sort"
],
"parserOptions": {
"ecmaVersion": 2018,
"sourceType": "module"
},
"env": {
"browser": true,
"es6": true,
"node": true,
"jest": true
},
"rules": {
"prettier/prettier": ["error"],
"no-console": 0,
"no-plusplus": 0,
"no-underscore-dangle": 0,
"no-shadow": 0,
"no-param-reassign": "off",
"class-methods-use-this": "off",
"max-nested-callbacks": [2, 5],
"max-classes-per-file": "off",
"indent": 0,
// JSDoc plugin rules
"jsdoc/check-alignment": 1,
"jsdoc/check-indentation": 1,
"jsdoc/check-param-names": 1,
"jsdoc/check-syntax": 1,
"jsdoc/check-tag-names": 1,
"jsdoc/check-types": 1,
"jsdoc/newline-after-description": 1,
// This rule would be nice to have but it basically doesn't work properly and has too many false positives.
"jsdoc/require-description-complete-sentence": 0,
"jsdoc/require-param-description": 1,
"jsdoc/require-param-name": 1,
"jsdoc/require-returns-check": 1,
"jsdoc/require-returns-description": 1,
"jsdoc/valid-types": 1,
// Git handles this for us when working on Mac or Windows.
"linebreak-style": 0,
// Copyright
"header/header": [2, "block", [
"*",
{"pattern": " * \\(C\\) Copyright IBM Corp\\. \\d{4}.*"},
" *",
" * Licensed under the MIT License (the \"License\"); you may not use this file except in compliance with",
" * the License. You may obtain a copy of the License at",
" *",
" * https://opensource.org/licenses/MIT",
" *",
" * Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on",
" * an \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the",
" * specific language governing permissions and limitations under the License.",
" *",
" "
]
],
// TypeScript Rules
"@typescript-eslint/no-empty-function": "off",
"@typescript-eslint/no-unused-vars": "off",
"@typescript-eslint/camelcase": "off",
"@typescript-eslint/no-explicit-any": "off",
"@typescript-eslint/explicit-function-return-type": "off",
"@typescript-eslint/no-use-before-define": "off",
"@typescript-eslint/no-inferrable-types": "off",
"@typescript-eslint/indent": "off",
"@typescript-eslint/explicit-member-accessibility": "off",
// This rule fails to detect TypeScript types.
"no-undef": "off",
"no-use-before-define": "off",
"lines-between-class-members": "off",
"import/prefer-default-export": "off",
"import/extensions": "off",
// This rule fails on the use of .d.ts files.
"import/no-unresolved": "off",
// Dumb rule. Fires on interfaces that start with "IBM".
"@typescript-eslint/interface-name-prefix": "off",
// Extra plugin rules.
"simple-import-sort/sort": "error"
},
"settings": {
"import/resolver": {
"node": {
"extensions": [".js", ".ts"]
}
}
}
}