-
Notifications
You must be signed in to change notification settings - Fork 84
/
.eslintrc.js
117 lines (117 loc) · 3.12 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
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
/** @type {import('eslint').Linter.Config} */
module.exports = {
env: {
browser: true,
node: true
},
extends: [
'prettier'
],
parser: '@typescript-eslint/parser',
ignorePatterns: [
'**/{node_modules,lib}',
'**/sprotty-local-template/**/*',
'**/lib/**/src/**/*'
],
parserOptions: {
tsconfigRootDir: __dirname,
project: './tsconfig.json'
},
plugins: [
'eslint-plugin-no-null',
'@typescript-eslint',
'header'
],
rules: {
'@typescript-eslint/indent': 'off',
'@typescript-eslint/naming-convention': 'off',
'@typescript-eslint/no-dynamic-delete': 'error',
'@typescript-eslint/no-explicit-any': 'off',
'@typescript-eslint/no-misused-new': 'error',
'@typescript-eslint/no-shadow': [
'warn',
{
'hoist': 'all'
}
],
'@typescript-eslint/no-unused-expressions': 'off',
'@typescript-eslint/semi': [
'error',
'always'
],
'@typescript-eslint/type-annotation-spacing': 'warn',
'header/header': ['error', 'block', [{'pattern': '[\n\r]+ \\* Copyright \\([cC]\\) \\d{4}(-\\d{4})? .*[\n\r]+'}]],
'brace-style': [
'warn',
'1tbs',
{ 'allowSingleLine': true }
],
'comma-dangle': ['warn', {
'arrays': 'only-multiline',
'objects': 'only-multiline',
}],
'constructor-super': 'error',
'curly': 'off',
'eol-last': 'warn',
'eqeqeq': [
'warn',
'smart'
],
'guard-for-in': 'warn',
'id-blacklist': 'off',
'id-match': 'off',
'keyword-spacing': ['warn', { 'before': true }],
'max-len': [
'warn',
{
'code': 180
}
],
'no-prototype-builtins': 'error',
'no-caller': 'error',
'no-console': 'off',
'no-debugger': 'warn',
'no-eval': 'error',
'no-fallthrough': 'warn',
'no-invalid-this': 'warn',
'no-new-wrappers': 'warn',
'no-null/no-null': 'off',
'no-redeclare': 'off',
'no-restricted-imports': [
'error',
'..',
'../index',
'../..',
'../../index'
],
'no-return-await': 'warn',
'no-sequences': 'error',
'no-throw-literal': 'error',
'no-trailing-spaces': 'warn',
'no-underscore-dangle': 'off',
'no-unsafe-finally': 'error',
'no-var': 'error',
'prefer-const': [
'warn',
{
'destructuring': 'all'
}
],
'prefer-object-spread': 'warn',
'radix': 'warn',
'spaced-comment': [
'warn',
'always',
{
'markers': [
'/'
],
'exceptions': [
'*'
]
}
],
'space-infix-ops': 'warn',
'use-isnan': 'warn'
}
};