-
Notifications
You must be signed in to change notification settings - Fork 2
/
.eslintrc.js
66 lines (66 loc) · 1.67 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
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
module.exports = {
env: { browser: true },
extends: [
'plugin:react/recommended',
'plugin:tailwindcss/recommended',
'prettier',
],
parser: '@typescript-eslint/parser',
plugins: ['react', '@typescript-eslint', 'simple-import-sort', 'import'],
settings: {
'import/parsers': {
'@typescript-eslint/parser': ['.ts', '.tsx'],
},
'import/resolver': {
typescript: {
project: './tsconfig.json',
},
},
react: { version: 'detect' },
},
rules: {
'simple-import-sort/imports': 'error',
'simple-import-sort/exports': 'error',
'import/first': 'error',
'import/newline-after-import': 'error',
'import/no-duplicates': 'error',
'no-invalid-this': 'off',
'require-jsdoc': 'off',
'react/prop-types': 'off',
'react/display-name': 'off',
'react/react-in-jsx-scope': 0,
'react/jsx-indent': ['warn', 2],
'react/jsx-indent-props': ['warn', 2],
'@typescript-eslint/no-unused-vars': 'warn',
'@typescript-eslint/naming-convention': [
'warn',
{
selector: 'memberLike',
modifiers: ['private'],
format: ['camelCase'],
leadingUnderscore: 'require',
},
],
'no-multi-spaces': ['warn'],
'no-multiple-empty-lines': [
'warn',
{
max: 1,
maxEOF: 1,
maxBOF: 0,
},
],
'eol-last': 1,
'react/jsx-first-prop-new-line': ['warn', 'multiline'],
'react/jsx-max-props-per-line': [
'warn',
{
maximum: 1,
when: 'multiline',
},
],
'jsx-quotes': ['warn', 'prefer-double'],
'no-trailing-spaces': 'warn',
'tailwindcss/migration-from-tailwind-2': 'off',
},
};