-
Notifications
You must be signed in to change notification settings - Fork 0
/
.eslintrc.js
48 lines (46 loc) · 1.51 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
module.exports = {
env: { browser: true, es6: true },
settings: { react: { version: 'detect' } },
globals: { Atomics: 'readonly', SharedArrayBuffer: 'readonly' },
parser: '@typescript-eslint/parser',
parserOptions: { ecmaFeatures: { jsx: true }, ecmaVersion: 2018, sourceType: 'module' },
extends: [
'eslint:recommended',
'plugin:@typescript-eslint/eslint-recommended',
'plugin:react/recommended',
],
plugins: ['react', '@typescript-eslint', 'import', 'react-hooks'],
rules: {
'no-extra-semi': ['off'],
'react/jsx-curly-brace-presence': ['warn', 'never'],
'eol-last': ['error', 'always'],
'react-hooks/rules-of-hooks': 'error',
'react/jsx-uses-react': 'off',
'react/react-in-jsx-scope': 'off',
'react-hooks/exhaustive-deps': 'warn',
'arrow-body-style': ['warn', 'as-needed'],
'no-unused-vars': ['off'],
'no-empty-pattern': ['warn'],
'import/order': [
'warn',
{ groups: ['external', 'builtin', 'sibling', 'index'], 'newlines-between': 'never' },
],
'import/newline-after-import': ['warn'],
'no-console': ['warn', { allow: ['error'] }],
'react/self-closing-comp': ['warn'],
'newline-before-return': ['warn'],
'react/prop-types': ['off'],
'react/display-name': ['off'],
'no-case-declarations': ['off'],
'prefer-template': ['warn'],
'object-shorthand': ['warn', 'always'],
},
overrides: [
{
files: ['**/*.ts?(x)'],
rules: {
'@typescript-eslint/no-unused-vars': ['warn'],
},
},
],
}