-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy patheslint.config.js
52 lines (46 loc) · 1.93 KB
/
eslint.config.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
import globals from 'globals';
import js from '@eslint/js';
import svelte from 'eslint-plugin-svelte';
/** @type {import('eslint').Linter.Config[]} */
export default [
// Global Ignore
{ ignores: [`node_modules/`, `build/`, `.svelte-kit/`, `dist/`], },
// Base Config
js.configs.recommended,
...svelte.configs[`flat/recommended`],
// Overrides
{
languageOptions: {
ecmaVersion: 2024,
globals: {
...globals.browser,
...globals.node
}
},
rules: {
"brace-style": [`error`, `stroustrup`],
"comma-spacing": [`error`, { "before": false, "after": true }],
"indent": [`error`, 4, { "SwitchCase": 1 }],
"max-len": [`warn`, { code: 480 }],
"no-var": `error`,
"no-unused-vars": `warn`,
"object-curly-newline": [`error`, {
"ObjectExpression": { "multiline": true, "minProperties": 4 },
"ObjectPattern": { "multiline": true, "minProperties": 4 },
"ImportDeclaration": { "multiline": true, "minProperties": 4 },
"ExportDeclaration": { "multiline": false, "minProperties": 4 }
}],
"object-curly-spacing": [`error`, `always`],
"space-infix-ops": [`error`, { "int32Hint": false }],
"quotes": [`warn`, `backtick`],
"semi": [`error`, `always`],
// Svelte Overrides
"svelte/indent": [ `error`, { "indent": 4, "switchCase": 1 }],
"svelte/mustache-spacing": `error`,
"svelte/no-spaces-around-equal-signs-in-attribute": `error`,
"svelte/no-trailing-spaces": [ `error`, { "skipBlankLines": false, "ignoreComments": true } ],
"svelte/spaced-html-comment": [`warn`, `always`],
"svelte/sort-attributes": `warn`,
}
}
];