-
Notifications
You must be signed in to change notification settings - Fork 4
/
eslint.config.mjs
43 lines (41 loc) · 1.02 KB
/
eslint.config.mjs
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
import eslintPluginSvelte from "eslint-plugin-svelte";
import globals from "globals";
import js from "@eslint/js";
import svelteParser from "svelte-eslint-parser";
import tsEslint from "typescript-eslint";
import tsParser from "@typescript-eslint/parser";
export default [
js.configs.recommended,
...tsEslint.configs.strict,
...eslintPluginSvelte.configs["flat/recommended"],
{
languageOptions: {
ecmaVersion: 2020,
sourceType: "module",
},
rules: {
"linebreak-style": ["error", "unix"],
"semi": ["error", "always"],
"comma-dangle": ["error", {
arrays: "always-multiline",
objects: "always-multiline",
imports: "always-multiline",
functions: "only-multiline",
}],
"indent": ["error", "tab"],
"quotes": ["warn", "double"],
"@typescript-eslint/no-non-null-assertion": "off",
"@typescript-eslint/ban-ts-comment": "off",
},
},
{
files: ["**/*.svelte"],
languageOptions: {
parser: svelteParser,
globals: globals.browser,
parserOptions: {
parser: tsParser,
},
},
},
];