-
Notifications
You must be signed in to change notification settings - Fork 1
/
.eslintrc.js
79 lines (79 loc) · 2.49 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
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
module.exports = {
parser: '@typescript-eslint/parser',
plugins: ['@typescript-eslint/eslint-plugin', 'prettier', 'simple-import-sort', 'react'],
extends: ['plugin:@typescript-eslint/recommended', 'plugin:react/recommended', 'eslint:recommended'],
root: true,
env: {
node: true,
jest: true,
browser: true,
},
settings: {
react: {
version: 'detect',
},
},
ignorePatterns: ['.eslintrc.js', '.prettierrc.js', 'dist', 'vite.config.ts'],
rules: {
'@typescript-eslint/interface-name-prefix': 'off',
'@typescript-eslint/explicit-function-return-type': 'off',
'@typescript-eslint/explicit-module-boundary-types': 'off',
'@typescript-eslint/no-explicit-any': 'off',
'prettier/prettier': 'error',
'simple-import-sort/imports': 'error',
'simple-import-sort/exports': 'error',
camelcase: [
'error',
{
properties: 'never',
},
],
eqeqeq: 'error',
'max-depth': 'error',
'max-lines': 'error',
'no-alert': 'error',
'no-array-constructor': 'error',
'no-console': [
'error',
{
allow: ['warn', 'error'],
},
],
'no-eval': 'error',
'no-implicit-coercion': 'error',
'no-lonely-if': 'error',
'no-nested-ternary': 'error',
'no-negated-condition': 'error',
'no-unneeded-ternary': 'error',
'no-undef-init': 'error',
'no-useless-concat': 'error',
'no-void': 'error',
'no-var': 'error',
'prefer-const': 'error',
'prefer-promise-reject-errors': 'error',
'prefer-template': 'error',
yoda: 'error',
'react/react-in-jsx-scope': 'off',
'react/hook-use-state': 'error',
'react/jsx-boolean-value': 'error',
'react/jsx-curly-brace-presence': 'error',
'react/jsx-no-useless-fragment': 'error',
'react/jsx-pascal-case': 'error',
'react/no-access-state-in-setstate': 'error',
'react/no-array-index-key': 'error',
'react/no-children-prop': 'error',
'react/no-danger': 'error',
'react/no-invalid-html-attribute': 'error',
'react/no-object-type-as-default-prop': 'error',
'react/no-this-in-sfc': 'error',
'react/no-unstable-nested-components': 'error',
'react/prefer-stateless-function': 'error',
'react/self-closing-comp': 'error',
'react/style-prop-object': 'error',
'react/void-dom-elements-no-children': 'error',
'no-unused-vars': 'off',
'@typescript-eslint/no-empty-function': 'off',
'@typescript-eslint/no-extra-semi': 'off',
'@typescript-eslint/no-unused-vars': 'error',
},
};