-
Notifications
You must be signed in to change notification settings - Fork 0
/
.eslintrc.js
43 lines (43 loc) · 1.3 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 = {
env: {
browser: true,
jest: true,
},
extends: [
'plugin:@typescript-eslint/recommended',
'plugin:react/recommended',
'plugin:prettier/recommended',
'plugin:import/errors',
'plugin:import/warnings',
'plugin:import/typescript',
'prettier/@typescript-eslint',
'prettier/react',
],
parser: '@typescript-eslint/parser',
plugins: ['import', '@typescript-eslint', 'react-hooks'],
rules: {
'@typescript-eslint/camelcase': 'off',
'@typescript-eslint/explicit-function-return-type': 'off',
'@typescript-eslint/explicit-module-boundary-types': 'off',
'@typescript-eslint/prefer-interface': 'off',
'@typescript-eslint/no-unused-vars': 'error',
'no-return-assign': 0,
'no-console': 2,
'import/order': ['error', {
'groups': ['builtin', 'external', 'internal', 'index', 'sibling', 'parent'],
'newlines-between': 'always',
}],
'import/no-named-export': 0,
'import/newline-after-import': 2,
'import/named': 0, // ref: https://github.com/benmosher/eslint-plugin-import/issues/1282
'react-hooks/rules-of-hooks': 'error',
'react/display-name': 0,
'react/jsx-filename-extension': [1, { extensions: ['.tsx'] }],
'react/prop-types': 0,
},
settings: {
react: {
version: 'detect',
},
},
}