-
Notifications
You must be signed in to change notification settings - Fork 2
/
.eslintrc.ci.js
79 lines (78 loc) · 2.74 KB
/
.eslintrc.ci.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
77
78
79
module.exports = {
env: {
browser: true,
es2021: true,
},
parser: '@typescript-eslint/parser',
parserOptions: {
ecmaVersion: 12,
sourceType: 'module',
// project: 'tsconfig.json',
},
plugins: [
'@typescript-eslint',
],
extends: ['eslint:recommended', 'google', 'plugin:@typescript-eslint/recommended'],
rules: {
'complexity': ['error', 20],
'@typescript-eslint/typedef': [
'warn',
{
'arrowParameter': true,
'memberVariableDeclaration': true,
'propertyDeclaration': true,
'variableDeclaration': true,
'parameter': true,
},
],
// '@typescript-eslint/strict-boolean-expressions': ['error'],
'@typescript-eslint/no-empty-function': ['off'],
'@typescript-eslint/no-namespace': ['off'],
'@typescript-eslint/ban-types': [
'error',
{ 'types': { 'String': { 'message': 'Use string instead', 'fixWith': 'string' } } },
],
'@typescript-eslint/no-this-alias': ['warn'],
'@typescript-eslint/no-inferrable-types': ['off'],
'@typescript-eslint/no-redeclare': [
'error',
{ 'ignoreDeclarationMerge': true },
],
'max-len': ['warn', { 'code': 120, 'ignoreStrings': true, 'ignoreTemplateLiterals': true }],
'require-jsdoc': ['warn', { 'require': {
'FunctionDeclaration': false,
'MethodDefinition': false,
'ClassDeclaration': false,
'ArrowFunctionExpression': false,
'FunctionExpression': false,
} }],
'new-cap': ['off'], // Because there are false positives
'no-undef': ['off'], // Because there are false positives
'valid-jsdoc': ['off'], // Because we do not use jsdoc
'@typescript-eslint/no-unused-vars': ['error', { 'args': 'none' }],
'no-invalid-this': ['warn'],
'indent': [
'error', 4,
{
'SwitchCase': 1,
'CallExpression': { 'arguments': 'first' },
'FunctionDeclaration': { 'parameters': 'first' },
'FunctionExpression': { 'parameters': 'first' },
},
],
'object-curly-spacing': ['warn', 'always'],
'no-redeclare': ['error'],
'camelcase': ['warn'],
'no-case-declarations': ['off'],
'padded-blocks': ['off'],
'space-before-function-paren': ['error', {
'anonymous': 'never',
'named': 'never',
'asyncArrow': 'never',
}],
'brace-style': ['off'],
'eqeqeq': ['error', 'always', {
'null': 'ignore',
}],
},
};