-
Notifications
You must be signed in to change notification settings - Fork 1
/
.eslintrc.cjs
67 lines (67 loc) · 1.86 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
module.exports = {
extends: ['airbnb', 'prettier', 'eslint:recommended', 'plugin:react/recommended', 'plugin:import/recommended', 'plugin:jsx-a11y/recommended', 'eslint-config-prettier', 'plugin:storybook/recommended'],
plugins: ['react', 'react-hooks', 'prettier', 'jsx-a11y', 'import'],
settings: {
react: {
// Tells eslint-plugin-react to automatically detect the version of React to use.
version: 'detect',
},
// Tells eslint how to resolve imports
'import/resolver': {
node: {
paths: ['src'],
extensions: ['.js', '.jsx', '.ts', '.tsx'],
},
},
},
env: {
browser: true,
es2021: true,
jest: true,
},
parserOptions: {
ecmaVersion: 'latest',
sourceType: 'module',
ecmaFeatures: {
jsx: true,
},
},
rules: {
'import/extensions': 'off',
'import/no-unresolved': 'off',
'react/prop-types': 'off',
'prettier/prettier': 'error',
'jsx-a11y/anchor-is-valid': 'off',
'react/react-in-jsx-scope': 'off',
'react/jsx-filename-extension': [1, { extensions: ['.js', '.jsx'] }],
'no-unused-expressions': [
'error',
{ allowShortCircuit: true, allowTernary: true },
],
'import/no-extraneous-dependencies': [
'error',
{
devDependencies: true,
},
],
'react-hooks/rules-of-hooks': 'error',
'react-hooks/exhaustive-deps': [
'warn',
{
additionalHooks: '(useRecoilCallback|useRecoilTransaction_UNSTABLE)',
},
],
'linebreak-style': 'off',
'implicit-arrow-linebreak': 'off',
indent: 'off',
'object-curly-newline': 'off',
'operator-linebreak': 'off',
'no-confusing-arrow': 'off',
'function-paren-newline': 'off',
'no-mixed-operators': 'off',
'no-underscore-dangle': 'off',
'no-plusplus': 'off',
'no-param-reassign': 'off',
'no-unused-vars': 'off',
},
};