This repository has been archived by the owner on May 13, 2022. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 0
/
.eslintrc.cjs
110 lines (104 loc) · 2.67 KB
/
.eslintrc.cjs
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
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
module.exports = {
root: true,
parser: '@typescript-eslint/parser',
extends: [
'eslint:recommended',
'plugin:@typescript-eslint/recommended',
'prettier',
'plugin:import/typescript',
],
plugins: ['svelte3', 'import', '@typescript-eslint'],
ignorePatterns: [],
overrides: [{ files: ['*.svelte'], processor: 'svelte3/svelte3' }],
settings: {
'svelte3/typescript': () => require('typescript'),
},
parserOptions: {
sourceType: 'module',
ecmaVersion: 2020,
},
env: {
browser: true,
es2017: true,
node: true,
},
rules: {
// semi-colon override for typescript
semi: 'off',
'@typescript-eslint/semi': ['error'],
// https://eslint.org/docs/rules/no-unused-vars#options
'@typescript-eslint/no-unused-vars': [
'warn',
{
argsIgnorePattern: '^_',
},
],
// https://github.com/typescript-eslint/typescript-eslint/blob/main/packages/eslint-plugin/docs/rules/member-delimiter-style.md
'@typescript-eslint/member-delimiter-style': [
'error',
{
multiline: {
delimiter: 'semi',
},
singleline: {
delimiter: 'semi',
},
},
],
// https://eslint.org/docs/rules/object-curly-spacing
'object-curly-spacing': ['error', 'always'],
// https://eslint.org/docs/rules/object-curly-newline
'object-curly-newline': 'off',
// disable here due to conflict with prettier
// 'object-curly-newline': [
// 'error',
// {
// ObjectExpression: {
// minProperties: 3,
// consistent: true,
// },
// ObjectPattern: {
// minProperties: 3,
// consistent: true,
// },
// ImportDeclaration: {
// minProperties: 3,
// },
// ExportDeclaration: {
// minProperties: 3,
// },
// },
// ],
// https://github.com/import-js/eslint-plugin-import/blob/main/docs/rules/prefer-default-export.md
'import/prefer-default-export': 'off',
// https://github.com/import-js/eslint-plugin-import/blob/main/docs/rules/order.md
'import/order': [
'error',
{
groups: [
'builtin',
'external',
'internal',
'parent',
'sibling',
'index',
'object',
'unknown',
],
pathGroups: [
{
pattern: '$*/**',
group: 'internal',
},
],
'newlines-between': 'always',
pathGroupsExcludedImportTypes: [],
alphabetize: {
order: 'asc',
caseInsensitive: false,
},
warnOnUnassignedImports: true,
},
],
},
};