-
Notifications
You must be signed in to change notification settings - Fork 0
/
index.js
87 lines (83 loc) · 2.21 KB
/
index.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
module.exports = {
env: {
browser: true,
node: true,
es2022: true,
},
parser: '@typescript-eslint/parser',
parserOptions: {
ecmaVersion: 2022,
sourceType: 'module',
project: './tsconfig.json',
ecmaFeatures: {
jsx: true,
},
},
extends: [
'prettier',
'plugin:@typescript-eslint/recommended',
'plugin:@typescript-eslint/recommended-requiring-type-checking',
'plugin:react/recommended',
'plugin:react-hooks/recommended',
'plugin:jsx-a11y/recommended',
'plugin:xss/recommended',
'plugin:sonarjs/recommended-legacy',
'plugin:storybook/recommended',
'plugin:unicorn/recommended',
'plugin:compat/recommended',
require.resolve('./rules/best-practice'),
require.resolve('./rules/react'),
require.resolve('./rules/import'),
require.resolve('./rules/unicorn'),
],
plugins: [
'@typescript-eslint',
'react',
'react-hooks',
'prettier',
'jsx-a11y',
'import',
'simple-import-sort',
'unused-imports',
'xss',
'no-secrets',
'sonarjs',
'compat',
'unicorn',
],
rules: {
'prettier/prettier': 'error',
'@typescript-eslint/no-use-before-define': 'error',
'@typescript-eslint/explicit-module-boundary-types': 'off',
'@typescript-eslint/unbound-method': ['error', { ignoreStatic: true }],
'@typescript-eslint/no-unused-vars': 'error',
'sonarjs/sonar-prefer-read-only-props': 'off',
'xss/no-mixed-html': [
2,
{
functions: {
sanitize: {
htmlOutput: true,
},
},
},
],
'no-secrets/no-secrets': 'error',
},
settings: {
'import/parsers': {
'@typescript-eslint/parser': ['.ts', '.tsx'],
},
'import/resolver': {
typescript: {
project: './',
},
},
react: {
version: 'detect',
},
},
globals: {
window: true,
},
};