-
Notifications
You must be signed in to change notification settings - Fork 1
/
.eslintrc.js
43 lines (43 loc) · 1.25 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
module.exports = {
parser: 'babel-eslint',
extends: [
'plugin:react/recommended',
'plugin:react-hooks/recommended',
'plugin:import/errors',
'plugin:import/warnings',
'plugin:@next/next/recommended',
'plugin:prettier/recommended',
],
parserOptions: {
ecmaFeatures: {
jsx: true,
},
ecmaVersion: 11,
sourceType: 'module',
},
rules: {
'import/newline-after-import': 'warn',
'import/no-unresolved': 0,
'import/named': 'warn',
'import/order': ['warn'],
'react/prop-types': process.env.NODE_ENV === 'production' ? 'off' : 'warn', // for now, it should not prevent from building the app
'react/sort-prop-types': 'off',
'react/jsx-no-bind': 'off',
'no-unused-vars': 'warn',
'no-console': process.env.NODE_ENV === 'production' ? 'error' : 'warn',
'no-debugger': process.env.NODE_ENV === 'production' ? 'error' : 'warn',
'no-anonymous-default-export': 0,
'react-hooks/rules-of-hooks': 'error', // Checks rules of Hooks
'react-hooks/exhaustive-deps': 'warn', // Checks effect dependencies,
'react/react-in-jsx-scope': 'off',
'@next/next/no-img-element': 'off',
},
globals: {
React: 'writable',
},
settings: {
react: {
version: 'detect',
},
},
};