-
-
Notifications
You must be signed in to change notification settings - Fork 15
/
.eslintrc.js
108 lines (108 loc) · 2.36 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
/** @type {import('eslint').Linter.Config} */
module.exports = {
env: {
commonjs: false,
es6: true,
node: true
},
extends: [
'tailored-tunes',
'plugin:json/recommended',
'plugin:security/recommended',
'plugin:@typescript-eslint/recommended',
'plugin:i18next/recommended',
'plugin:sonarjs/recommended'
],
overrides: [
{
files: [
'**/*.test.ts',
'**/*.test.tsx',
'test/**/*.ts',
'test/**/*.tsx'
],
rules: {
'@typescript-eslint/no-non-null-assertion': 'off',
'@typescript-eslint/no-empty-function': 'off',
'@typescript-eslint/ban-ts-comment': 'off',
'no-use-before-define': 'off',
'max-nested-callbacks': 'off',
'sonarjs/no-duplicate-string': 'off',
'sonarjs/no-identical-functions': 'off'
}
}
],
parser: '@typescript-eslint/parser',
parserOptions: {
sourceType: 'module',
ecmaVersion: 'latest',
ecmaFeatures: {
jsx: true
},
project: ['./tsconfig.json', './.storybook/tsconfig.json']
},
settings: {
jest: {
version: 28
}
},
plugins: [
'i18next',
'json',
'@typescript-eslint',
'sonarjs',
'import'
],
root: true,
rules: {
'import/order': [
2,
{
alphabetize: {
caseInsensitive: false,
order: 'asc'
},
groups: [
'builtin',
'external',
'internal',
'parent',
'sibling',
'index',
'type'
],
pathGroups: [
{
pattern: 'react',
group: 'external',
position: 'before'
}
],
pathGroupsExcludedImportTypes: ['type']
}
],
"import/first": 2,
"import/no-amd": 2,
"import/no-duplicates": 2,
"import/no-webpack-loader-syntax": 2,
'jsx-quotes': [ 'error', 'prefer-single' ],
'sonarjs/no-duplicate-string': 'off',
'no-continue': 'off',
'dot-notation': 'error',
'@typescript-eslint/dot-notation': 'error',
'no-console': 'off',
'no-warning-comments': 'warn',
'no-unused-vars': 'off',
'security/detect-object-injection': 0,
'security/detect-non-literal-fs-filename': 0,
'no-underscore-dangle': [
'error',
{
'allow': [
'__dirname',
'__filename'
]
}
]
}
};