-
Notifications
You must be signed in to change notification settings - Fork 0
/
.eslintrc.cjs
50 lines (50 loc) · 1.75 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
module.exports = {
root: true,
extends: ['eslint:recommended', 'plugin:import/recommended'],
plugins: ['svelte3'],
overrides: [{ files: ['*.svelte'], processor: 'svelte3/svelte3' }],
parserOptions: {
sourceType: 'module',
ecmaVersion: 2021,
},
rules: {
'arrow-parens': ['warn', 'always'],
'comma-dangle': ['warn', 'always-multiline'],
'eol-last': ['warn', 'always'],
eqeqeq: ['warn', 'always'],
'import/newline-after-import': ['warn'],
'import/no-unresolved': ['warn', { ignore: ['^virtual', '^\\$lib', '^\\$app', '^\\/'] }],
'import/order': [
'warn',
{
alphabetize: { order: 'asc', caseInsensitive: true },
groups: ['index', 'sibling', 'parent', 'internal', 'external', 'builtin', 'object', 'type'],
'newlines-between': 'always',
},
],
indent: ['warn', 4, { SwitchCase: 1 }],
'no-console': ['warn', { 'allow': ['warn', 'error'] }],
'no-unused-expressions': ['warn', {
allowShortCircuit: true,
allowTernary: true,
allowTaggedTemplates: true,
}],
'no-multi-spaces': 'warn',
'no-multiple-empty-lines': 'warn',
'no-trailing-spaces': 'warn',
'no-unused-vars': 'warn',
'no-var': 'warn',
'object-curly-spacing': ['warn', 'always'],
'padded-blocks': ['warn', 'never'],
quotes: ['warn', 'single'],
semi: ['warn', 'always'],
'space-before-blocks': ['warn', 'always'],
'spaced-comment': ['warn', 'always'],
'template-curly-spacing': ['warn', 'always'],
},
env: {
browser: true,
es2017: true,
node: true,
},
};