-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy path.eslintrc.js
49 lines (49 loc) · 1.44 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',
parserOptions: {
ecmaVersion: 2021,
sourceType: 'module',
ecmaFeatures: {
jsx: true,
},
},
env: {
browser: true,
es2021: true,
node: true,
},
plugins: ['react', '@typescript-eslint'],
extends: [
'eslint:recommended',
'plugin:react/recommended',
'plugin:@typescript-eslint/recommended',
'plugin:prettier/recommended',
'plugin:react-hooks/recommended',
'plugin:react/jsx-runtime',
],
rules: {
'react/prop-types': 'off', // disable prop-types since we're using TypeScript
'@typescript-eslint/explicit-module-boundary-types': 'off', // allow implicit return types
'@typescript-eslint/no-empty-interface': 'off', // allow empty interfaces
'no-unused-vars': 'off', // disable no-unused-vars since @typescript-eslint/no-unused-vars does the same
'@typescript-eslint/no-unused-vars': ['error', { argsIgnorePattern: '^_' }], // enable @typescript-eslint/no-unused-vars
'@typescript-eslint/no-non-null-assertion': 'off',
'@typescript-eslint/consistent-type-imports': 'error',
'comma-dangle': [
'error',
{
arrays: 'always-multiline',
objects: 'always-multiline',
imports: 'always-multiline',
exports: 'always-multiline',
},
],
semi: ['error', 'always'],
'react/react-in-jsx-scope': 'off',
},
settings: {
react: {
version: 'detect',
},
},
};