-
Notifications
You must be signed in to change notification settings - Fork 1
/
.eslintrc.js
90 lines (86 loc) · 2.72 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
const path = require('path');
module.exports = {
root: true,
parser: '@typescript-eslint/parser',
parserOptions: {
tsconfigRootDir: path.join(__dirname),
project: './tsconfig.eslint.json',
},
plugins: [
'import',
'@typescript-eslint',
],
extends: [
'airbnb-base',
'airbnb-typescript/base',
'plugin:jsdoc/recommended',
],
ignorePatterns: [
'dist',
'__tests__/smoke',
],
rules: {
indent: 'off',
'arrow-body-style': 'off',
'max-len': ['error', { code: 120, ignoreUrls: true }],
'no-new': 'off',
'no-continue': 'off',
'no-restricted-syntax': ['error', 'LabeledStatement', 'WithStatement'],
'no-constant-condition': ['error', { checkLoops: false }],
'no-param-reassign': 'off',
'import/prefer-default-export': 'off',
'import/no-extraneous-dependencies': ['error', { devDependencies: true }],
'import/no-cycle': 'off',
'import/export': 'off',
'@typescript-eslint/indent': ['error', 4, {
SwitchCase: 1,
ignoredNodes: ['TSTypeParameterInstantiation'],
}],
'@typescript-eslint/no-non-null-assertion': 'off',
'@typescript-eslint/interface-name-prefix': 'off',
'@typescript-eslint/explicit-function-return-type': 'error',
// types described in ts
'jsdoc/require-param-type': 'off',
'jsdoc/no-undefined-types': 'off',
'jsdoc/require-returns-type': 'off',
'jsdoc/tag-lines': 'off',
'jsdoc/require-throws': 'error',
'jsdoc/check-tag-names': ['error', { definedTags: ['jest-environment'] }],
'jsdoc/require-jsdoc': [
'error',
{
contexts: [
'ClassDeclaration',
'ClassProperty',
'FunctionDeclaration',
'MethodDefinition',
],
},
],
'jsdoc/require-description': [
'error',
{
contexts: [
'ClassDeclaration',
'ClassProperty',
'FunctionDeclaration',
'MethodDefinition',
],
},
],
'jsdoc/require-description-complete-sentence': ['error'],
'jsdoc/require-returns': ['error'],
'@typescript-eslint/consistent-type-imports': [
'error',
{
fixStyle: 'inline-type-imports',
},
],
'@typescript-eslint/consistent-type-exports': [
'error',
{
fixMixedExportsWithInlineTypeSpecifier: true,
},
],
},
};