-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy patheslint.config.js
62 lines (59 loc) · 1.8 KB
/
eslint.config.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
const { node } = require('globals')
/** @type {import("@types/eslint").Linter.FlatConfig[]} */
module.exports = [
...require('@abinnovision/eslint-config-base').default,
...require('@abinnovision/eslint-config-typescript').default,
...require('@abinnovision/eslint-config-react').default,
{ files: ['**/*.js'], languageOptions: { globals: node } },
{
ignores: ['src/libs/*'],
},
{
rules: {
indent: [
'error',
2,
{
SwitchCase: 1,
VariableDeclarator: { var: 2, let: 2, const: 3 },
outerIIFEBody: 1,
FunctionDeclaration: {
parameters: 1,
body: 1,
},
FunctionExpression: {
parameters: 1,
body: 1,
},
CallExpression: {
arguments: 1,
},
ArrayExpression: 1,
ObjectExpression: 1,
ImportDeclaration: 1,
flatTernaryExpressions: false,
ignoredNodes: ['TemplateLiteral *', 'JSXElement', 'JSXElement > *'],
},
],
quotes: ['error', 'single'],
semi: ['error', 'never'],
'@typescript-eslint/no-unused-vars': 'warn',
'react/no-unknown-property': 'warn',
'@typescript-eslint/consistent-type-assertions': 'warn',
'max-nested-callbacks': 'warn',
'react-hooks/rules-of-hooks': 'warn',
'react/jsx-pascal-case': 'warn',
'max-params': 'off',
complexity: 'off',
'no-void': 'off',
'react/no-unescaped-entities': 'off',
'react/no-unstable-nested-components': 'off',
'@typescript-eslint/explicit-member-accessibility': 'off',
'import/exports-last': 'off',
'no-template-curly-in-string': 'off',
'guard-for-in': 'off',
'no-case-declarations': 'off',
'no-param-reassign': 'off',
},
},
]