Repository navigation
Expand file tree
/
Copy patheslint.config.mjs
More file actions
70 lines (69 loc) · 2.04 KB
/
Copy patheslint.config.mjs
File metadata and controls
70 lines (69 loc) · 2.04 KB
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
import tsParser from "@typescript-eslint/parser";
import obsidianmd from "eslint-plugin-obsidianmd";
import globals from "globals";
import { defineConfig, globalIgnores } from "eslint/config";
import * as sveltePlugin from "eslint-plugin-svelte";
import svelteParser from "svelte-eslint-parser";
import { baseRules, obsidianRules } from "./eslint.config.common.mjs";
export default defineConfig([
globalIgnores([
"node_modules",
"data.json",
"dist",
"esbuild.config.mjs",
"eslint.config.js",
"version-bump.mjs",
"versions.json",
"main.js",
"**/*.test.ts",
]),
{
linterOptions: {
reportUnusedDisableDirectives: "off",
},
},
...sveltePlugin.configs["flat/base"],
...obsidianmd.configs.recommended,
{
files: ["**/*.ts"],
languageOptions: {
globals: {
...globals.browser,
},
parser: tsParser,
parserOptions: {
project: "./tsconfig.json",
tsconfigRootDir: import.meta.dirname,
extraFileExtensions: [".json"],
},
},
rules: {
...baseRules,
...obsidianRules,
// Custom rules overrides or adjustments for diffzip:
"obsidianmd/no-plugin-as-component": "off",
"obsidianmd/rule-custom-message": "off",
"obsidianmd/ui/sentence-case": "off",
"obsidianmd/no-static-styles-assignment": "off",
},
},
{
files: ["**/*.svelte"],
languageOptions: {
globals: {
...globals.browser,
},
parser: svelteParser,
parserOptions: {
parser: tsParser,
extraFileExtensions: [".svelte"],
},
},
rules: {
"no-unused-vars": "off",
...obsidianRules,
"obsidianmd/no-plugin-as-component": "off",
"obsidianmd/no-unsupported-api": "off",
},
},
]);