-
-
Notifications
You must be signed in to change notification settings - Fork 3
Expand file tree
/
Copy patheslint.config.mts
More file actions
117 lines (116 loc) · 3.56 KB
/
Copy patheslint.config.mts
File metadata and controls
117 lines (116 loc) · 3.56 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
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
import obsidianmd from 'eslint-plugin-obsidianmd';
import globals from 'globals';
import { globalIgnores, defineConfig } from 'eslint/config';
export default defineConfig(
globalIgnores([
'node_modules',
'dist',
'.obsidian-cache',
'esbuild.config.mjs',
'version-bump.mjs',
'versions.json',
'main.js',
'package.json',
'package-lock.json',
'tsconfig.json',
'wdio.conf.mts',
'test',
'test-vault',
]),
{
languageOptions: {
globals: {
...globals.browser,
__DEV__: 'readonly',
},
parserOptions: {
projectService: {
allowDefaultProject: [
'eslint.config.mts',
'manifest.json',
'vitest.config.ts',
],
},
tsconfigRootDir: import.meta.dirname,
extraFileExtensions: ['.json'],
},
},
},
...obsidianmd.configs.recommended,
{
linterOptions: {
reportUnusedDisableDirectives: 'off',
},
rules: {
'import/no-nodejs-modules': [
'error',
{
allow: [
'@codemirror/autocomplete',
'@codemirror/collab',
'@codemirror/commands',
'@codemirror/language',
'@codemirror/lint',
'@codemirror/search',
'@codemirror/state',
'@codemirror/view',
'@lezer/common',
'@lezer/highlight',
'@lezer/lr',
],
},
],
'import/no-extraneous-dependencies': [
'error',
{
peerDependencies: true,
optionalDependencies: false,
bundledDependencies: false,
},
],
'obsidianmd/ui/sentence-case': [
'error',
{
acronyms: ['API', 'ID', 'IM', 'JS', 'JSON'],
brands: [
'EasyMotion',
'Dataview',
'GNU/BSD',
'Live Preview',
'Markdown',
'Neovim',
'Obsidian',
'Obsidian Tasks',
'Omnisearch',
'Powerline',
'Vim',
'Vim Motions',
'C:\\im-select\\im-select.exe',
'fcitx5-remote',
'f/F/t/T',
'im-select',
'macism',
'o/O',
'uFuzzy',
'--json',
],
},
],
},
settings: {
'import/core-modules': [
'@codemirror/autocomplete',
'@codemirror/collab',
'@codemirror/commands',
'@codemirror/language',
'@codemirror/lint',
'@codemirror/search',
'@codemirror/state',
'@codemirror/view',
'@lezer/common',
'@lezer/highlight',
'@lezer/lr',
],
},
},
);