-
Notifications
You must be signed in to change notification settings - Fork 2
/
.eslintrc.js
50 lines (50 loc) · 1.65 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
module.exports = {
extends: [
'airbnb-base',
'eslint:recommended',
'next/core-web-vitals',
'plugin:sonarjs/recommended',
'plugin:react/recommended',
'plugin:react-hooks/recommended',
'plugin:@tanstack/eslint-plugin-query/recommended',
'plugin:import/recommended',
'prettier',
],
rules: {
'import/namespace': 'off',
'max-len': ['error', { code: 120, ignoreStrings: true }],
'react/react-in-jsx-scope': 0,
'react/jsx-filename-extension': [1, { extensions: ['.js', '.jsx'] }],
'react/jsx-curly-brace-presence': [2, { props: 'never', children: 'never' }],
'react/function-component-definition': [2, { namedComponents: ['arrow-function', 'function-declaration'] }],
'no-console': ['error', { allow: ['info', 'warn', 'error'] }],
'no-return-await': 'off',
indent: ['error', 2, { SwitchCase: 1 }],
'no-multiple-empty-lines': ['error', { max: 3, maxBOF: 0, maxEOF: 0 }],
'no-underscore-dangle': 0,
'arrow-parens': ['error', 'as-needed', { requireForBlockBody: false }],
'import/no-extraneous-dependencies': ['error', { devDependencies: true }],
'import/extensions': 0,
'import/prefer-default-export': 0,
'import/no-unresolved': 'off',
'no-restricted-exports': 0,
'no-unused-vars': ['error'],
'import/order': [
'error',
{
pathGroups: [
{ pattern: '@/**', group: 'internal' },
{ pattern: '@*', group: 'internal' },
],
groups: ['builtin', 'external', 'internal', 'parent', 'sibling'],
},
],
'react/self-closing-comp': [
'error',
{
component: true,
html: true,
},
],
},
};