-
-
Notifications
You must be signed in to change notification settings - Fork 36
/
.eslintrc.js
65 lines (65 loc) · 1.98 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
// eslint-disable-next-line no-undef
module.exports = {
root: true,
parser: '@typescript-eslint/parser',
plugins: ['@typescript-eslint', 'import'],
extends: [
'eslint:recommended',
'plugin:import/recommended',
'plugin:@typescript-eslint/eslint-recommended',
'plugin:@typescript-eslint/recommended',
],
rules: {
// Basic
'quotes': ['error', 'single'],
'no-multiple-empty-lines': ['error', { max: 1, maxBOF: 0, maxEOF: 1 }],
'no-multi-spaces': 'error',
'object-curly-spacing': ['error', 'always'],
'array-bracket-spacing': ['error', 'never'],
'computed-property-spacing': ['error', 'never'],
'comma-dangle': ['error', 'always-multiline'],
'eol-last': ['error', 'always'],
'no-trailing-spaces': 'error',
'brace-style': ['error', '1tbs', { allowSingleLine: true }],
'indent': ['error', 2, { SwitchCase: 1 }],
'keyword-spacing': ['error', { before: true, after: true }],
'padded-blocks': ['error', 'never'],
'comma-spacing': ['error', { before: false, after: true }],
'space-in-parens': ['error', 'never'],
// TypeScript
'@typescript-eslint/semi': 'error',
'@typescript-eslint/consistent-type-imports': 'error',
'@typescript-eslint/no-unused-vars': 'error',
'@typescript-eslint/no-explicit-any': 'off',
'@typescript-eslint/ban-ts-comment': 'off',
// Import
'import/no-named-as-default-member': 'off',
'import/no-cycle': 'error',
'import/no-unresolved': 'off',
'import/order': [
'warn',
{
'newlines-between': 'always',
groups: [
['builtin', 'external'],
['parent', 'sibling'],
'index',
'object',
'type',
'unknown',
],
alphabetize: {
order: 'asc',
},
pathGroups: [
{
pattern: './styles',
group: 'unknown',
patternOptions: { matchBase: true },
position: 'after',
},
],
},
],
},
};