-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.eslintrc.cjs
77 lines (77 loc) · 2.54 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
67
68
69
70
71
72
73
74
75
76
77
module.exports = {
root: true,
env: { browser: true, es2020: true },
extends: [
'eslint:recommended',
'plugin:@typescript-eslint/recommended',
'plugin:react-hooks/recommended',
'airbnb',
'airbnb/hooks',
'airbnb-typescript',
'plugin:eslint-comments/recommended',
'plugin:prettier/recommended',
],
ignorePatterns: ['dist', 'node_modules/', '.eslintrc.cjs'],
parser: '@typescript-eslint/parser',
plugins: ['react-refresh', 'prefer-arrow-functions', 'jest'],
parserOptions: {
tsconfigRootDir: __dirname,
project: "./tsconfig.json",
sourceType: "module"
},
rules: {
'prettier/prettier': ['off', { singleQuote: true }],
"react/no-unknown-property": ["error", { "ignore": ["css"] }],
'react-refresh/only-export-components': [
'warn',
{ allowConstantExport: true },
],
"import/no-extraneous-dependencies": "off",
'import/extensions': "off",
"no-await-in-loop": "off",
"import/no-cycle": "off",
"@typescript-eslint/no-throw-literal": "off",
"import/extensions": "off",
"no-plusplus": "off",
"no-param-reassign": "off",
"prefer-template": "off",
'@typescript-eslint/no-explicit-any': 0,
'react/react-in-jsx-scope': 'off',
'no-console': 'off',
'import/prefer-default-export': 'off',
'global-require': 'off',
'@typescript-eslint/no-shadow': 'off',
'react/require-default-props': 'off',
'react/jsx-props-no-spreading': 'off',
'jsx-a11y/label-has-associated-control': 'off',
'react/no-unescaped-entities': 'off',
'jsx-a11y/control-has-associated-label': 'off',
'react/function-component-definition': 'off',
'react/prop-types': 'off',
'eslint-comments/no-unused-disable': 'warn',
'max-len': 'off',
"consistent-return": "off",
"react/no-array-index-key": "off",
"no-restricted-syntax" : "off",
// -- see: https://github.com/prettier/eslint-plugin-prettier -- //
"arrow-body-style": "off",
"prefer-arrow-callback": "off",
// ------------------------------------------------------------- //
'prefer-arrow-functions/prefer-arrow-functions': [
'warn',
{
'allowNamedFunctions': false,
'classPropertiesAllowed': false,
'disallowPrototype': false,
'returnStyle': 'unchanged',
'singleReturnOnly': false,
},
],
// ------------ jest ------------ //
"jest/no-disabled-tests": "warn",
"jest/no-focused-tests": "error",
"jest/no-identical-title": "error",
"jest/prefer-to-have-length": "warn",
"jest/valid-expect": "error"
}
}