The "open-commander-settings" command id predates this lint rule.
Renaming it would silently break any existing user's saved hotkey
binding for opening Commander's settings, so we keep the id and
scope the rule off for src/main.ts instead of renaming or disabling
inline (obsidianmd disallows inline-disabling this rule).
- leftRibbonManager was comparing i.name === i.name (always true)
instead of i.name === pair.name when locating a ribbon item to
recolor/remove, so items sharing an icon with a different-named
command could be matched incorrectly. Now compares against pair.name.
- Replace two stray references to the global `app` with the plugin's
own `app` reference (this.plugin.app / plugin.app), consistent with
the rest of the codebase.
- Use Object.prototype.hasOwnProperty.call() instead of calling
hasOwnProperty directly on values that may not inherit from
Object.prototype.
- Import Command/PluginManifest in types.ts so the Obsidian module
augmentation resolves them instead of relying on ambient globals.
- Drop a leftover console.log of an expected/benign cancellation
error in the "Add command" menu action.
- Add explicit `(): void` return types to several useEffect cleanup
callbacks (settingTabComponent, ColorPicker, AdvancedToolbarSettings,
mobileModifyComponent).
- Widen Mode's literal union with `(string & {})` instead of a bare
string constituent, preserving autocomplete without the redundant
type warning.
- Drop an unnecessary `as ItemView` cast in pageHeaderManager now that
the preceding instanceof guard already narrows the type.
- Switch eslint.config.mts from the deprecated tseslint.config() to
eslint's own defineConfig().
Type-level only, no runtime behavior change.
Adds public/return type annotations and a type-only declare
property (to keep FuzzySuggestModal/SuggestModal's generic
parameter meaningfully typed) so the mock classes satisfy
explicit-member-accessibility, explicit-function-return-type, and
no-unused-vars. No behavior change to the mocks.
Removes eslint-disable comments left over from the pre-flat-config
setup that no longer suppress anything (mostly no-unused-vars on
unused function params, which typescript-eslint doesn't flag by
default) and adds required descriptions to the handful that are
still load-bearing. Also replaces an `as any` cast for the
text-formatting-toolbar third-party API with a locally-typed cast,
since disabling no-explicit-any isn't allowed by the obsidianmd
config. Comment/typing only, no behavior change.
Adds coverage for executeMacro, injectIcons, isModeActive, updateStyles/
removeStyles, and locale completeness, plus the Obsidian API mocks and
setup needed to run them under jsdom. Updates a stale fr.json key to
match the current English source string.
Replaces the legacy .eslintrc/.eslintignore (typescript-eslint 5.x) with a
flat eslint.config.mts on typescript-eslint 8.x, preserving the existing
return-type/accessibility rules and adding the obsidianmd recommended rules.
Also bumps the minimatch override, which was pinned to an old major that's
incompatible with the new ESLint 9 toolchain.
Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
- shell-quote: critical — quote() failed to escape newlines in .op values
- esbuild: high — missing binary integrity verification (bumped to 0.28.1)
- Fix two return type errors in MacroBuilder.tsx exposed by stricter tsc
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
- Remove unused imports (getIconIds, setIcon, exp, arrayMoveMutable, etc.)
- Add missing explicit return types on functions and arrow functions
- Add public accessibility modifier to PageHeaderManager.buttons
- Fix mixed spaces/tabs in constants.ts and commandComponent.tsx
- Wrap case block declaration in MacroBuilder.tsx to fix no-case-declarations
- Add eslint-disable comments for false-positive no-unused-vars on
function type annotation parameter names and TypeScript enum members
- Remove dead forceUpdate reference in MacroBuilder.tsx (was referencing
this in a function component)
Reduces from 64 errors + 2 warnings to 0 errors + 2 warnings (the remaining
warnings are intentional non-null assertions).
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Commander now detects the standalone Text Toolbar plugin at load time and:
- Pushes saved commands into the toolbar via its public API (setCommands)
- Shows a "Text Toolbar" tab in Commander settings when the plugin is installed,
using the existing CommandViewer UI for add/remove/reorder
The tab is hidden when the Text Toolbar plugin is not installed.
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
The text toolbar feature has been moved to the standalone obsidian-text-toolbar
plugin at plugins/text-toolbar. This commit removes leftover staging artifacts.
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Set icon directly on addCommand so it appears in the command palette,
status bar, and mobile toolbar. Also fixes removeCommand referencing
bare `app` instead of `plugin.app`, and replaces Array.remove() during
forEach iteration (mutation hazard) with a filter in injectIcons.
Fixes#149 (cherry-picked from PR by Anton/Lyqed)
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Fixed bug where status bar commands would be deleted from the list when
the command stopped being available (e.g. from other plugins that hadn't
loaded yet at onLayoutReady time).
Co-authored-by: davidvkimball <davidvkimball@users.noreply.github.com>
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
esbuild-sass-plugin@^3.3.1 resolved to 3.7.0 in CI, which requires
esbuild>=0.27.3. Our esbuild is ^0.25.0, causing ERESOLVE. Pinning
to exactly 3.3.1 keeps compatibility with esbuild 0.25.x.
Fixes moderate severity Dependabot alert:
- esbuild <=0.24.2: dev server could be queried by any website
(GHSA-67mh-4wv8-2f99)
Changes:
- esbuild: ^0.15.16 → ^0.25.0
- esbuild-sass-plugin: ^2.4.2 → ^3.3.1 (required for esbuild compat)
- sass-embedded: ^1.71.1 added (peer dep for esbuild-sass-plugin 3.x)
- scripts/esbuild.config.mjs: replaced removed watch:boolean option with
esbuild.context() + ctx.watch() API (changed in esbuild 0.17)
All changes are dev/build toolchain only and do not affect the
compiled main.js shipped to users.