-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy patheslint.config.mts
More file actions
54 lines (52 loc) · 1.22 KB
/
Copy patheslint.config.mts
File metadata and controls
54 lines (52 loc) · 1.22 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
import { fileURLToPath } from 'node:url';
import tseslint from 'typescript-eslint';
import obsidianmd from 'eslint-plugin-obsidianmd';
import globals from 'globals';
import { globalIgnores } from 'eslint/config';
const tsconfigRootDir = fileURLToPath(new URL('.', import.meta.url));
export default tseslint.config(
{
languageOptions: {
globals: {
...globals.browser,
activeDocument: 'readonly',
activeWindow: 'readonly',
},
parserOptions: {
projectService: {
maximumDefaultProjectFileMatchCount_THIS_WILL_SLOW_DOWN_LINTING: 32,
allowDefaultProject: [
'eslint.config.mts',
'manifest.json',
'tests/*.ts',
'tests/helpers/*.ts',
'tsconfig.test.json',
],
},
tsconfigRootDir,
extraFileExtensions: ['.json'],
},
},
},
...obsidianmd.configs.recommended,
{
files: ['tests/**/*.ts'],
rules: {
'import/no-nodejs-modules': 'off',
'obsidianmd/no-nodejs-modules': 'off',
'obsidianmd/prefer-active-doc': 'off',
'@typescript-eslint/no-floating-promises': 'off',
},
},
globalIgnores([
'node_modules',
'dist',
'build-tests',
'demo-vault',
'esbuild.config.mjs',
'eslint.config.js',
'version-bump.mjs',
'versions.json',
'main.js',
]),
);