dotwee_obsidian-raindropio-.../eslint.config.mts
Lukas Wolfsteiner 0a6af4ed0f build: update dependencies and eslint configuration
Move obsidian to devDependencies and remove tslib, which is unneeded without importHelpers.
Pin eslint and @eslint/js to version 9 to stay compatible with eslint-plugin-obsidianmd peer requirements.
Switch the flat config to defineConfig from eslint/config and apply ignore patterns before rulesets.
Matches the current obsidian-sample-plugin setup and removes a type-cast workaround in the config.

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-07-06 11:21:06 +02:00

44 lines
863 B
TypeScript

import obsidianmd from "eslint-plugin-obsidianmd";
import globals from "globals";
import { globalIgnores, defineConfig } from "eslint/config";
export default defineConfig(
globalIgnores([
"node_modules",
"dist",
"esbuild.config.mjs",
"eslint.config.js",
"eslint.config.mts",
"jest.config.cjs",
"package.json",
"package-lock.json",
"pnpm-lock.yaml",
"version-bump.mjs",
"versions.json",
"tsconfig.json",
"main.js",
]),
{
languageOptions: {
globals: {
...globals.browser,
},
parserOptions: {
projectService: {
allowDefaultProject: ['eslint.config.mts', 'manifest.json'],
},
tsconfigRootDir: import.meta.dirname,
extraFileExtensions: ['.json']
},
},
},
{
files: ["tests/**/*.ts"],
languageOptions: {
globals: {
...globals.jest,
},
},
},
...obsidianmd.configs.recommended,
);