forked from Siedlerchr/types-ol-ext
-
Notifications
You must be signed in to change notification settings - Fork 0
/
.eslintrc.js
90 lines (73 loc) · 2.35 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
module.exports = {
root: true,
parserOptions: {
parser: require.resolve('@typescript-eslint/parser'),
},
env: {
browser: true,
es2021: true,
node: true,
},
// Rules order is important, please avoid shuffling them
extends: [
'plugin:@typescript-eslint/recommended',
'airbnb-base',
],
plugins: [
'@typescript-eslint',
'jsdoc',
],
settings: {
jsdoc: {
mode: 'typescript',
},
},
// add your custom rules here
rules: {
'no-plusplus': 'off',
'max-len': 'off',
camelcase: 'off',
'no-use-before-define': 'off',
'no-param-reassign': 'off',
'no-void': 'off',
'no-nested-ternary': 'off',
'max-classes-per-file': 'off',
'no-shadow': 'off',
'@typescript-eslint/no-shadow': 'error',
'import/first': 'off',
'import/named': 'error',
'import/namespace': 'error',
'import/default': 'error',
'import/export': 'error',
'import/extensions': 'off',
'import/no-unresolved': 'off',
'import/no-extraneous-dependencies': 'off',
'import/prefer-default-export': 'off',
'prefer-promise-reject-errors': 'off',
quotes: ['error', 'single', { avoidEscape: true }],
// this rule, if on, would require explicit return type on the `render` function
'@typescript-eslint/explicit-function-return-type': 'off',
// in plain CommonJS modules, you can't use `import foo = require('foo')` to pass this rule, so it has to be disabled
'@typescript-eslint/no-var-requires': 'off',
// The core 'no-unused-vars' rules (in the eslint:recommended ruleset)
// does not work with type definitions
'no-unused-vars': 'off',
// allow debugger during development only
'no-debugger': process.env.NODE_ENV === 'production' ? 'error' : 'off',
'@typescript-eslint/ban-ts-comment': 'off',
semi: ['error', 'never'],
'arrow-body-style': 'off',
'func-call-spacing': 'off',
'no-spaced-func': 'off',
'arrow-parens': ['error', 'as-needed'],
'no-console': 'off',
'no-alert': 'off',
'no-underscore-dangle': 'off',
'linebreak-style': ['error', (process.platform === 'win32' ? 'windows' : 'unix')],
'@typescript-eslint/consistent-type-imports': 'error',
'class-methods-use-this': 'off',
'no-undef': 'off',
'@typescript-eslint/no-explicit-any': 'off',
'@typescript-eslint/no-empty-interface': 'off',
},
}