Skip to content

fix(lint): reset inline styles without static style assignments - #668

Merged
Quorafind merged 1 commit into
masterfrom
fix/review-static-style-resets
Nov 28, 2026
Merged

Quorafind merged 1 commit into
masterfrom
fix/review-static-style-resets

Conversation

@Quorafind

Copy link
Copy Markdown
Member

Description

The Obsidian review action (obsidianmd/obsidian-workflows@v1, #626) raises obsidianmd/no-static-styles-assignment to an error. Assigning a string literal to element.style.* triggers it, and that includes the empty string used to clear a value. Two sites on master still did this.

In advisory mode these errors are downgraded to warnings. GitHub shows at most 10 warning annotations per step, so they were hidden. They are among the errors that fail strict mode (#667).

Changes

  • SettingsModal.ts: settings search hides sidebar groups with group.toggle(). Clearing the search now restores them with group.show() instead of group.style.display = "".
  • InlineEditor.ts: autoResizeTextarea clears the inline height with style.removeProperty("height") before it measures scrollHeight, instead of style.height = "".

Both are behaviour-preserving: show() and removeProperty() clear the same inline declaration.

Verification

Type of Change

  • Bug fix
  • New feature
  • Documentation update
  • Code refactoring

Checklist

  • I have read and agree to the CLA
  • My code follows the project's style guidelines
  • I have tested my changes
  • I have updated the documentation (not applicable)

The Obsidian review action raises obsidianmd/no-static-styles-assignment
to an error, and it flags assigning a string literal to element.style.*,
including the empty string used to clear a value.

- SettingsModal: settings search hides sidebar groups with
  group.toggle(); restore them with group.show() instead of writing
  style.display = "".
- InlineEditor: clear the textarea's inline height with
  style.removeProperty("height") before measuring scrollHeight.
@Quorafind
Quorafind merged commit be51440 into master Nov 28, 2026
3 checks passed
@github-actions github-actions Bot locked and limited conversation to collaborators Nov 28, 2026
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant