-
Notifications
You must be signed in to change notification settings - Fork 126
/
.eslintrc.js
64 lines (61 loc) · 1.87 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
// Warnings are errors in CI
const OFF = 'off'
const ERROR = 'error'
// const WARNING = isTruthy(process.env.CI) ? ERROR : 'warn'
module.exports = {
root: true,
env: {
node: true,
browser: true
},
extends: [
// add more generic rulesets here, such as:
'eslint:recommended',
'standard',
'plugin:@typescript-eslint/recommended',
'plugin:vue/recommended',
],
// plugins: [
// '@typescript-eslint'
// // '@typescript-eslint/tslint'
// ],
parserOptions: {
parser: '@typescript-eslint/parser',
project: './tsconfig.json'
},
rules: {
// работает через @typescript-eslint/indent
'indent': OFF,
// не правильно работает для конструктора typescript: constructor (public text) {}
'no-useless-constructor': OFF,
'no-console': OFF,
'@typescript-eslint/explicit-member-accessibility': 'no-public',
'@typescript-eslint/no-use-before-define': OFF,
'@typescript-eslint/explicit-function-return-type': OFF,
'@typescript-eslint/indent': [ERROR, 2],
'@typescript-eslint/member-delimiter-style': [ERROR, {
"multiline": {
"delimiter": "none",
"requireLast": false
},
"singleline": {
"delimiter": "semi",
"requireLast": false
},
}],
'@typescript-eslint/no-parameter-properties': OFF,
// allows "require" from Node.js
'@typescript-eslint/no-var-requires': OFF,
// allows 'any' type
'@typescript-eslint/no-explicit-any': OFF,
// allows non null assertion
'@typescript-eslint/no-non-null-assertion': OFF,
// tslint config integration for eslint
// '@typescript-eslint/tslint/config': [WARNING, {
// 'lintFile': './tslint.json', // path to tslint.json of your project
// }]
}
}
// function isTruthy (value) {
// return value && ['1', 'true'].includes(value.toLowerCase())
// }