-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy patheslint.config.mts
More file actions
67 lines (61 loc) · 2.05 KB
/
Copy patheslint.config.mts
File metadata and controls
67 lines (61 loc) · 2.05 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
import tseslint from 'typescript-eslint';
import obsidianmd from "eslint-plugin-obsidianmd";
import globals from "globals";
import { globalIgnores } from "eslint/config";
export default tseslint.config(
{
languageOptions: {
globals: {
...globals.browser,
},
parserOptions: {
projectService: {
allowDefaultProject: [
'eslint.config.js',
'manifest.json'
]
},
tsconfigRootDir: import.meta.dirname,
extraFileExtensions: ['.json']
},
},
},
...obsidianmd.configs.recommended,
{
rules: {
// The plugin has Chinese UI strings, so the English sentence-case rule produces false positives.
'obsidianmd/ui/sentence-case': 'off',
// Streaming chat providers need fetch() so we can consume ReadableStream/SSE responses.
'no-restricted-globals': 'off',
// Current UI code predates the Obsidian lint preset. Keep these as review concerns, not CI blockers.
'obsidianmd/no-static-styles-assignment': 'off',
'@microsoft/sdl/no-inner-html': 'off',
'obsidianmd/detach-leaves': 'off',
'no-alert': 'off',
// Provider responses and pg rows are validated at runtime in the surrounding code paths.
'@typescript-eslint/no-unsafe-assignment': 'off',
'@typescript-eslint/no-unsafe-member-access': 'off',
'@typescript-eslint/no-unsafe-argument': 'off',
'@typescript-eslint/restrict-template-expressions': 'off',
'@typescript-eslint/no-base-to-string': 'off',
// Obsidian lifecycle and UI callbacks commonly call async helpers from void-returning hooks.
'@typescript-eslint/no-misused-promises': 'off',
'@typescript-eslint/no-floating-promises': 'off',
'@typescript-eslint/no-deprecated': 'off',
'no-console': ['error', { allow: ['warn', 'error', 'debug', 'info'] }],
},
},
globalIgnores([
"node_modules",
"dist",
"esbuild.config.mjs",
"eslint.config.js",
"version-bump.mjs",
"versions.json",
"main.js",
// Tests run under vitest (esbuild transpile), outside the src tsconfig
// project, so they're excluded from the typed lint pass.
"tests",
"vitest.config.mts",
]),
);