-
Notifications
You must be signed in to change notification settings - Fork 19
/
.eslintrc.js
44 lines (44 loc) · 1.14 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
module.exports = {
root: true,
parser: '@typescript-eslint/parser',
parserOptions: {
ecmaVersion: 2020,
sourceType: 'module',
},
extends: [
'eslint:recommended',
'plugin:prettier/recommended',
'plugin:react/recommended',
'plugin:@typescript-eslint/recommended',
],
plugins: ['simple-import-sort', '@typescript-eslint', 'react-hooks'],
rules: {
'@typescript-eslint/camelcase': 'off',
'@typescript-eslint/no-empty-function': ['error', { allow: ['arrowFunctions'] }],
'@typescript-eslint/no-use-before-define': 'warn',
curly: 'warn',
camelcase: 'off',
'linebreak-style': ['error', 'unix'],
'newline-before-return': 'error',
// FIXME: revert
'no-console': 'warn',
'react/prop-types': 'off',
'simple-import-sort/imports': 'error',
'sort-imports': 'off',
strict: ['error', 'global'],
'@typescript-eslint/no-unused-vars': 'off',
},
settings: {
'import/parsers': {
'@typescript-eslint/parser': ['.ts', '.tsx'],
},
'import/resolver': {
node: {
extensions: ['.ts', '.tsx'],
},
},
react: {
version: 'detect',
},
},
};