-
Notifications
You must be signed in to change notification settings - Fork 1
/
.eslintrc.js
105 lines (105 loc) · 2.61 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
module.exports = {
root: true,
parser: '@typescript-eslint/parser',
settings: {
'import/resolver': {
node: {
extensions: ['.js', '.ts'],
},
},
node: {
tryExtensions: ['.js', '.json', '.node', '.ts'],
},
},
extends: [
'airbnb-base',
'plugin:sonarjs/recommended',
'plugin:jest/all',
'eslint:recommended',
'plugin:@typescript-eslint/eslint-recommended',
'plugin:@typescript-eslint/recommended',
'plugin:prettier/recommended',
'prettier',
],
plugins: ['sonarjs', '@typescript-eslint', 'prettier'],
env: {
node: true,
},
ignorePatterns: ['expected'],
rules: {
'jest/valid-describe': 0, // This rule does not exist anymore. It has been replaced by jest/valid-describe-callback
'jest/require-hook': 0, // This rule does not seem to be functional at this time (eslint-plugin-jest-25.2.2)
'jest/no-disabled-tests': 0,
'implicit-arrow-linebreak': 0,
'no-underscore-dangle': 0,
'import/extensions': 0,
'import/no-extraneous-dependencies': [
'error',
{
devDependencies: ['.eslint-bin/*.js', 'test/**/*.js', 'test/**/*.ts'],
},
],
'no-multiple-empty-lines': [
'error',
{
max: 1,
maxBOF: 0,
maxEOF: 0,
},
],
'no-console': 0,
'no-param-reassign': 0,
'jest/expect-expect': 0,
'sonarjs/no-collapsible-if': 0,
'sonarjs/no-duplicate-string': 0,
'sonarjs/no-extra-arguments': 0,
'sonarjs/no-identical-expressions': 0,
'sonarjs/no-identical-functions': 0,
'sonarjs/no-same-line-conditional': 0,
'sonarjs/no-unused-collection': 0,
'sonarjs/prefer-immediate-return': 0,
'@typescript-eslint/consistent-type-imports': 'error',
},
overrides: [
{
files: ['*.js'],
rules: {
'@typescript-eslint/no-var-requires': 'off',
},
},
{
files: ['*.ts'],
rules: {
'import/order': [
'error',
{
groups: [
'type',
['builtin', 'external'],
['internal', 'sibling', 'parent', 'index', 'object'],
],
'newlines-between': 'always',
alphabetize: {
order: 'asc',
caseInsensitive: true,
},
},
],
'sort-imports': [
'error',
{
ignoreDeclarationSort: true,
},
],
'no-shadow': 'off',
'@typescript-eslint/no-shadow': ['error'],
},
},
{
files: ['test/**'],
rules: {
'@typescript-eslint/no-empty-function': 'off',
},
},
],
};