-
Notifications
You must be signed in to change notification settings - Fork 0
/
.eslintrc.cjs
57 lines (57 loc) · 1.33 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
module.exports = {
extends: [
'airbnb',
'prettier',
'eslint:recommended',
'plugin:react/recommended',
'plugin:import/recommended',
'plugin:jsx-a11y/recommended',
'eslint-config-prettier',
],
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-hooks/exhaustive-deps': 'off',
'react/jsx-filename-extension': [1, { extensions: ['.js', '.jsx'] }],
// allow short circuiting
'no-unused-expressions': [
'error',
{ allowShortCircuit: true, allowTernary: true },
],
'import/no-extraneous-dependencies': [
'error',
{
devDependencies: true,
},
],
},
};