From 4b592f6782e5d79546c77680c84b23bb9544c322 Mon Sep 17 00:00:00 2001 From: Zero Liu Date: Wed, 13 May 2026 22:01:00 -0700 Subject: [PATCH] chore(eslint): remove redundant non-TS rule overrides (#2433) The four obsidianmd typed rules (no-view-references-in-plugin, no-unsupported-api, prefer-file-manager-trash-file, prefer-instanceof) are already gated to **/*.ts(x) by the plugin's hybridRecommendedConfig, so disabling them on non-TS files is a no-op. Only no-plugin-as-component and @typescript-eslint/no-deprecated actually leak onto non-TS files. Co-authored-by: Claude Opus 4.7 (1M context) --- eslint.config.mjs | 11 ++++------- 1 file changed, 4 insertions(+), 7 deletions(-) diff --git a/eslint.config.mjs b/eslint.config.mjs index d8aa4a91..0105367f 100644 --- a/eslint.config.mjs +++ b/eslint.config.mjs @@ -180,18 +180,15 @@ export default [ }, // Non-TS files aren't in tsconfig.json — disable type-aware rules that - // obsidianmd's recommended config enables globally. (The plugin lists some - // typed rules in its general rule bundle, not just the TS-only bundle, so - // they cascade to .js / package.json without parser services.) + // obsidianmd's recommended config enables globally. Most typed obsidianmd + // rules are already gated to **/*.ts(x); only no-plugin-as-component leaks + // out via recommendedPluginRulesConfig, and @typescript-eslint/no-deprecated + // is enabled globally. { files: ["**/*.js", "**/*.mjs", "**/*.cjs", "**/*.jsx", "**/package.json"], rules: { "@typescript-eslint/no-deprecated": "off", "obsidianmd/no-plugin-as-component": "off", - "obsidianmd/no-view-references-in-plugin": "off", - "obsidianmd/no-unsupported-api": "off", - "obsidianmd/prefer-file-manager-trash-file": "off", - "obsidianmd/prefer-instanceof": "off", }, },