-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.eslintrc.cjs
55 lines (55 loc) · 1.44 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
49
50
51
52
53
54
55
module.exports = {
plugins: ['sonarjs'],
extends: [
'airbnb',
'airbnb-typescript',
'plugin:sonarjs/recommended',
'prettier',
],
parserOptions: {
project: './tsconfig.json',
tsconfigRootDir: __dirname,
},
rules: {
'react/require-default-props': 'off',
'react/jsx-props-no-spreading': 'off',
'react/jsx-no-useless-fragment': ['error', { allowExpressions: true }],
'prefer-arrow-callback': 'off',
'class-methods-use-this': 'off',
'semi': 'off',
'@typescript-eslint/semi': 'error',
'import/no-cycle': [2],
'quotes': [2, 'single', { avoidEscape: true, allowTemplateLiterals: true }],
'import/prefer-default-export': 'off',
'@typescript-eslint/explicit-function-return-type': ['error'],
'@typescript-eslint/no-floating-promises': ['error'],
'sonarjs/no-duplicate-string': ['error', 5],
'import/no-extraneous-dependencies': [
'error',
{
devDependencies: [
'**/*.test.ts',
'**/*.test.tsx',
'**/__tests__/__helpers__/**/*.*',
'jest.setup.after-env.ts',
],
},
],
'no-restricted-imports': ['error'],
'no-restricted-syntax': [
'error',
'ForInStatement',
'LabeledStatement',
'WithStatement',
],
'no-nested-ternary': 'off',
},
overrides: [
{
files: ['*.test.*', '*.stories.tsx'],
rules: {
'sonarjs/no-identical-functions': 'off',
},
},
],
};