forked from handsontable/hyperformula
-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy path.eslintrc.js
81 lines (78 loc) · 2.97 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
module.exports = {
root: true,
parser: '@typescript-eslint/parser',
plugins: [
'@typescript-eslint',
'license-header',
],
parserOptions: {
tsconfigRootDir: __dirname,
project: './tsconfig.test.json',
createDefaultProgram: true,
},
extends: [
'eslint:recommended',
'plugin:@typescript-eslint/eslint-recommended',
'plugin:@typescript-eslint/recommended',
'plugin:@typescript-eslint/recommended-requiring-type-checking',
],
rules: {
// Automatic fixers
'@typescript-eslint/member-delimiter-style': ['error', {
multiline: {
delimiter: 'comma',
},
singleline: {
delimiter: 'comma',
},
}],
'@typescript-eslint/camelcase': 'error',
'@typescript-eslint/semi': ['error', 'never'],
'@typescript-eslint/brace-style': 'error', // wtf
'@typescript-eslint/no-unnecessary-boolean-literal-compare': ['error'],
'@typescript-eslint/no-extra-non-null-assertion': ['error'],
'@typescript-eslint/array-type': ['error'],
'@typescript-eslint/space-before-function-paren': ['error', 'never'],
'@typescript-eslint/quotes': ['error', 'single', { avoidEscape: true }],
'@typescript-eslint/no-extra-semi': ['error'],
'@typescript-eslint/comma-spacing': ['error'],
'@typescript-eslint/func-call-spacing': ['error'],
// Extensions (superseded by other rules)
'semi': 'off', // superseded by @typescript-eslint/semi
'semi-style': 'off', // superseded by @typescript-eslint/semi
'brace-style': 'off', // superseded by @typescript-eslint/brace-style
'indent': 'off', // superseded by @typescript-eslint/indent
'comma-spacing': 'off', // superseded by @typescript-eslint/comma-spacing
'func-call-spacing': 'off', // superseded by @typescript-eslint/func-call-spacing
'no-extra-semi': 'off', // superseded by @typescript-eslint/no-extra-semi
'quotes': 'off', // superseded by @typescript-eslint/quotes
'space-before-function-paren': 'off', // superseded by @typescript-eslint/space-before-function-paren
'@typescript-eslint/no-inferrable-types': 'off',
'@typescript-eslint/ban-types': 'off',
'@typescript-eslint/no-use-before-define': 'off',
'@typescript-eslint/explicit-function-return-type': 'off',
'@typescript-eslint/no-empty-function': 'off',
'@typescript-eslint/no-namespace': 'off',
'no-useless-escape': 'off',
'no-inner-declarations': 'off',
'@typescript-eslint/no-non-null-assertion': 'warn',
'@typescript-eslint/prefer-regexp-exec': 'warn',
'@typescript-eslint/no-unused-vars': ['warn', { 'argsIgnorePattern': '^_' }],
'@typescript-eslint/no-explicit-any': 'warn',
'@typescript-eslint/interface-name-prefix': 'warn',
},
overrides: [
{
files: ['**/src/**/*.ts'],
rules: {
'license-header/header': [ 'error', './.config/source-license-header.js' ],
}
},
{
files: ['**/src/i18n/languages/**/*.ts'],
rules: {
'sort-keys': ['error', 'asc'],
}
},
],
};