-
Notifications
You must be signed in to change notification settings - Fork 7
/
.eslintrc.cjs
48 lines (48 loc) · 1.19 KB
/
.eslintrc.cjs
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
module.exports = {
plugins: [
'@typescript-eslint',
'import',
],
parser: '@typescript-eslint/parser',
parserOptions: {
sourceType: 'module',
},
extends: [
'@geo1088/ts',
'plugin:import/recommended',
'plugin:import/typescript',
],
env: {
node: true,
},
rules: {
'func-style': ['error', 'declaration', {allowArrowFunctions: true}],
'no-use-before-define': ['error', {functions: false}],
'prefer-promise-reject-errors': ['error', {allowEmptyReject: true}],
// References to the config file will be undefined in CI
'import/no-unresolved': ['error', {ignore: ['(\\.?\\.\\/)+config$']}],
'@typescript-eslint/no-empty-function': ['warn', {allow: ['arrowFunctions']}],
'@typescript-eslint/no-unused-vars': ['error', {
varsIgnorePattern: '^_',
argsIgnorePattern: '^_',
caughtErrorsIgnorePattern: '^_',
}],
},
overrides: [
{
// disable certain rules for Javascript files
files: ['*.js'],
rules: {
// Javascript file exports are allowed to not be typed
'@typescript-eslint/explicit-module-boundary-types': ['off'],
},
},
{
// disable other certain rules for TS files
files: ['*.ts'],
rules: {
'valid-jsdoc': ['off'],
},
},
],
};