-
Notifications
You must be signed in to change notification settings - Fork 49
/
.eslintrc.js
49 lines (49 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
44
45
46
47
48
49
module.exports = {
parser: '@typescript-eslint/parser',
extends: [
'eslint:recommended',
'plugin:import/errors',
'plugin:import/warnings',
'plugin:react/recommended',
'plugin:react-hooks/recommended',
'prettier',
'plugin:storybook/recommended',
],
plugins: ['react', 'prettier'],
rules: {
'react/prop-types': 'off', // we don't use propTypes.
'react/react-in-jsx-scope': 'off', // React import not needed in Next.js
'react-hooks/exhaustive-deps': 'error', // Require explicit ignore when we want to skip deps
'prettier/prettier': [
'error',
{
trailingComma: 'es5',
singleQuote: true,
},
],
'no-console': ['error', { allow: ['warn', 'error'] }], // no console.log, but can use .warn and .error.
},
env: {
browser: true,
mocha: false,
es6: true,
jest: true,
node: true,
},
settings: {
'import/resolver': {
'babel-module': {
// For JS files to include TS files also
extensions: ['.js', '.jsx', '.ts', '.tsx'],
},
},
react: { version: 'detect' },
},
overrides: [
{
files: ['**/*.ts', '**/*.tsx'],
extends: ['plugin:@typescript-eslint/recommended'],
plugins: ['@typescript-eslint'],
},
],
};