-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy path.eslintrc.cjs
66 lines (66 loc) · 1.71 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
56
57
58
59
60
61
62
63
64
65
66
module.exports = {
root: true,
env: {
browser: true,
es2021: true,
},
extends: [
'eslint:recommended',
'plugin:react/recommended',
'airbnb',
'airbnb-typescript',
'plugin:@typescript-eslint/recommended',
'plugin:import/recommended',
'plugin:jsx-a11y/recommended',
'plugin:promise/recommended',
'plugin:react-hooks/recommended',
'plugin:react/jsx-runtime',
'plugin:conarti-fsd/recommended',
'prettier',
],
parser: '@typescript-eslint/parser',
parserOptions: {
ecmaVersion: 'latest',
sourceType: 'module',
project: './tsconfig.json',
},
settings: {
'import/resolver': {
typescript: {
alwaysTryTypes: true,
},
},
},
plugins: ['react', '@typescript-eslint', 'conarti-fsd', 'import', "check-file", 'prettier'],
rules: {
'conarti-fsd/layers-slices': [
'error',
{
allowTypeImports: true,
},
],
'conarti-fsd/absolute-relative': 'error',
'conarti-fsd/public-api': 'error',
'react/react-in-jsx-scope': 'off',
'react/jsx-uses-react': 'off',
'react-hooks/exhaustive-deps': 'off',
'react/jsx-filename-extension': [
1,
{
extensions: ['.js', '.jsx', '.ts', '.tsx'],
},
],
'import/prefer-default-export': 'off',
'react/jsx-curly-brace-presence': [
'error',
{ props: 'always', children: 'never' },
],
"no-param-reassign": ["error", { "props": false }],
"react/function-component-definition": [2, {
"namedComponents": "arrow-function",
"unnamedComponents": "arrow-function"
}],
"react/require-default-props": "off",
'check-file/folder-naming-convention': ['error', { 'src/**/': 'KEBAB_CASE' }],
},
};