Repository navigation
fix: satisfy the obsidianmd console and settings-heading rules - #223
Merged
Merged
Conversation
Drop the load/unload console.log calls, route the logger's informational messages to console.debug, and remove the redundant 'MetaEdit Settings' heading at the top of the settings tab. Encode both checks in the local ESLint guideline rules so they cannot regress.
This was referenced Oct 24, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
eslint-plugin-obsidianmd@0.4.2(recommended config) reported four errors in the plugin source. This fixes them.src/main.tsloggedLoading MetaEdit/Unloading MetaEditon every load. Removed.ConsoleErrorLogger.logMessagewrote informational messages withconsole.log. It now usesconsole.debug, so they only show at the Verbose console level. Errors and warnings are unchanged.MetaEdit Settingsheading, which tripssettings-tab/no-problematic-settings-headingstwice (the word "settings" and the plugin name). Obsidian's guidelines say not to add a top-level heading, so it is removed rather than renamed.The repo mirrors obsidianmd rules with core ESLint rules in
eslint.config.mjs. Two more are added so these can't come back:no-console(allowingdebug,warn,error) and ano-restricted-syntaxselector for problematic headings inside aPluginSettingTab. Both were checked against the old files and fire as expected.Not in scope
Running the upstream plugin still reports sentence-case and
prefer-instanceofwarnings, plus 77 type-checkedtypescript-eslinterrors (no-unsafe-*,no-base-to-string, and so on) from its bundled recommended-type-checked config. None are obsidianmd rules.Verification
pnpm run lint,pnpm run build,pnpm run test(359 passed).eslint-plugin-obsidianmd@0.4.2recommended onsrc/**/*.ts: 0 obsidianmd errors (was 4).Release impact: none beyond the removed heading and quieter console.
Note
Low Risk
Lint and minor UX/logging tweaks only; no auth, data, or core behavior changes beyond quieter console and a removed settings heading.
Overview
Brings the plugin in line with obsidianmd console and settings-tab guidelines, and encodes those checks in the repo’s mirrored ESLint config so regressions are caught locally.
Runtime/logging: Removes load/unload
console.logcalls frommain.ts. Routes informational logger output throughconsole.debuginstead ofconsole.loginConsoleErrorLogger, so routine messages only appear at Verbose console level; errors and warnings are unchanged.Settings UI: Drops the top-level “MetaEdit Settings” heading from the settings tab, avoiding redundant “settings” / plugin-name headings per Obsidian’s settings-tab rules.
Lint guardrails: Adds
no-console(allowingdebug,warn,error) andno-restricted-syntaxselectors for problematicPluginSettingTabheadings (e.g. “settings”, “options”, or the plugin name), extending the existing obsidianmd-style rules ineslint.config.mjs.Reviewed by Cursor Bugbot for commit 53cd4ed. Bugbot is set up for automated code reviews on this repo. Configure here.
Note
Add ESLint rules for no-console and settings-tab headings in MetaEdit
Adds ESLint rules that flag console calls in production source (allowing
debug,warn, anderror) and settings-tab headings that include "settings", "options", or the plugin name. Updates the code to satisfy these rules:ConsoleErrorLogger.logMessagefromconsole.logtoconsole.debugMetaEdit.onloadandMetaEdit.onunloadin main.tsconsole.debug(hidden by default in DevTools), and the plugin no longer logs load/unload messages to the consoleMacroscope summarized 53cd4ed.