-
Notifications
You must be signed in to change notification settings - Fork 21
Expand file tree
/
Copy patheslint.config.mjs
More file actions
32 lines (28 loc) · 1.06 KB
/
Copy patheslint.config.mjs
File metadata and controls
32 lines (28 loc) · 1.06 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
// eslint.config.mjs
import tsparser from "@typescript-eslint/parser";
import { defineConfig } from "eslint/config";
import obsidianmd from "eslint-plugin-obsidianmd";
export default defineConfig([
// Ignore non-source files
{ ignores: ["__mocks__/**", "tests/**", "scripts/**", "src/**/*.test.ts"] },
...obsidianmd.configs.recommended,
{
files: ["src/**/*.ts"],
languageOptions: {
parser: tsparser,
parserOptions: { project: "./tsconfig.json" },
},
rules: {
// TypeScript compiler handles undefined variable checking; the obsidianmd
// recommended config re-enables this but it doesn't understand TS globals.
"no-undef": "off",
// @codemirror/* are provided by obsidian at runtime, obsidian-dataview
// is an optional peer dep. This rule doesn't understand bundled plugins.
"import/no-extraneous-dependencies": "off",
// Project-specific overrides
"@typescript-eslint/ban-ts-comment": "off",
"no-prototype-builtins": "off",
"@typescript-eslint/no-empty-function": "off",
},
},
]);