-
Notifications
You must be signed in to change notification settings - Fork 2
/
.eslintrc.js
50 lines (50 loc) · 1.22 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
50
module.exports = {
env: {
es6: true,
node: true,
browser: true,
},
parser: '@typescript-eslint/parser',
parserOptions: {
ecmaVersion: 2022,
sourceType: 'module',
ecmaFeatures: {
jsx: true,
},
},
plugins: ['@typescript-eslint', 'react'],
extends: [
'eslint:recommended',
'prettier',
'plugin:@typescript-eslint/eslint-recommended',
'plugin:@typescript-eslint/recommended',
'plugin:react/recommended',
],
rules: {
'no-console': ['error', { allow: ['warn', 'error', 'time'] }],
'react/jsx-pascal-case': 2,
'react/no-multi-comp': 2,
'react/prefer-es6-class': 2,
'react/prefer-stateless-function': 2,
'@typescript-eslint/no-var-requires': 0,
'@typescript-eslint/no-unused-vars': [
'error',
{ argsIgnorePattern: '^_', varsIgnorePattern: '^_' },
],
'@typescript-eslint/no-empty-function': 0,
'@typescript-eslint/no-explicit-any': 0,
'@typescript-eslint/naming-convention': [
'error',
{
selector: 'variableLike',
format: ['camelCase', 'PascalCase'],
},
{
selector: 'variable',
modifiers: ['destructured'],
format: null,
},
],
'no-undef': 'error',
},
};