This repository has been archived by the owner on Nov 22, 2023. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 0
/
.eslintrc.cjs
64 lines (64 loc) · 2.5 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
module.exports = {
root: true,
env: {
browser: true,
node: true,
},
parserOptions: {
parser: '@typescript-eslint/parser',
},
extends: [
'eslint:recommended',
'plugin:react/recommended',
'plugin:react-hooks/recommended',
'plugin:react/jsx-runtime',
'plugin:json/recommended',
'plugin:@typescript-eslint/eslint-recommended',
'plugin:@typescript-eslint/recommended',
'plugin:@tanstack/eslint-plugin-query/recommended',
],
plugins: [
'react',
],
rules: {
'arrow-parens': 'off',
'class-methods-use-this': 'off',
'comma-dangle': ['error', 'always-multiline'],
'eol-last': ['error', 'always'],
'import/extensions': 'off',
'import/no-extraneous-dependencies': 'off',
'import/no-named-as-default': 'off',
'import/no-unresolved': 'off',
'indent': ['error', 4],
'jsx-a11y/label-has-associated-control': 'off',
'key-spacing': ['error'],
'linebreak-style': ['error', process.platform === 'win32' ? 'windows' : 'unix'],
'lines-between-class-members': ['error', 'always', { exceptAfterSingleLine: true }],
'max-len': ['error', { code: 256 }],
'newline-before-return': 'off',
'no-console': process.env.NODE_ENV === 'production' ? ['error', { allow: ['warn', 'error'] }] : 'off',
'no-debugger': process.env.NODE_ENV === 'production' ? 'error' : 'off',
'no-multiple-empty-lines': 'off',
'no-prototype-builtins': 'off',
'no-trailing-spaces': ['error', { ignoreComments: true, skipBlankLines: true }],
'no-underscore-dangle': 'off',
'padded-blocks': ['error', 'never'],
'quotes': ['error', 'single'],
'react/boolean-prop-naming': ['error', { rule: '^(is|has|should)_[a-z]+(_[a-z]+)*$' }],
'react/jsx-closing-bracket-location': 'error',
'react/jsx-curly-newline': 'error',
'react/jsx-first-prop-new-line': ['error', 'multiline'],
'react/jsx-max-props-per-line': ['error', { 'maximum': 1, 'when': 'always' }],
'react/jsx-props-no-multi-spaces': 'error',
'react/jsx-sort-props': ['error', { callbacksLast: true, shorthandFirst: true, reservedFirst: true, multiline: 'first' }],
'react/jsx-tag-spacing': ['error'],
'require-jsdoc': 'off',
'semi': 'error',
'space-in-parens': 'off',
},
settings: {
react: {
version: 'detect',
},
},
};