forked from handsontable/hyperformula
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.eslintrc.js
119 lines (115 loc) · 4.23 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
118
119
module.exports = {
root: true,
parser: '@typescript-eslint/parser',
plugins: [
'@typescript-eslint',
'license-header',
'jsdoc',
],
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", {
"anonymous": "never",
"named": "never",
"asyncArrow": "always"
}],
'@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',
"jsdoc/check-access": 'warn',
"jsdoc/check-alignment": 'warn',
"jsdoc/check-param-names": 'warn',
"jsdoc/check-property-names": 'warn',
"jsdoc/check-tag-names": ['warn', {definedTags: ['category']}],
"jsdoc/check-types": 'warn',
"jsdoc/empty-tags": 'warn',
"jsdoc/implements-on-classes": 'warn',
"jsdoc/multiline-blocks": 'warn',
"jsdoc/newline-after-description": 'warn',
"jsdoc/no-multi-asterisks": 'warn',
"jsdoc/require-param-description": 'warn',
"jsdoc/require-param-name": 'warn',
"jsdoc/require-param-type": 'warn',
"jsdoc/require-property-description": 'warn',
"jsdoc/require-property-name": 'warn',
"jsdoc/require-property-type": 'warn',
"jsdoc/require-returns-check": 'warn',
"jsdoc/require-returns-description": 'warn',
"jsdoc/require-returns-type": 'warn',
"jsdoc/require-yields-check": 'warn',
"jsdoc/valid-types": 'warn',
"jsdoc/require-jsdoc": ['warn', {
require: {
ArrowFunctionExpression: true,
ClassDeclaration: true,
ClassExpression: true,
FunctionDeclaration: true,
FunctionExpression: true,
MethodDefinition: true,
}
}],
},
overrides: [
{
files: ['**/src/**/*.ts'],
rules: {
'license-header/header': [ 'error', './.config/source-license-header.js' ],
}
},
{
files: ['**/src/i18n/languages/**/*.ts'],
rules: {
'sort-keys': ['error', 'asc'],
}
},
],
};