Markdown Lint optional core plugin and safe quick-fix actions #162
Labels
No labels
abandoned
active
audit
blocked
data-safety
difficulty:easy
difficulty:hard
difficulty:high
difficulty:medium
docs
done
duplicate
notebook-v0
open
priority:high
ready
release-critical
safe-mode
spec
spec-backlog
subsystem:api
subsystem:backlog
subsystem:bases
subsystem:ci
subsystem:command
subsystem:configuration
subsystem:consolidate
subsystem:dependencies
subsystem:desktop-electron
subsystem:diffmerge
subsystem:docker
subsystem:docs
subsystem:fuzzy
subsystem:graph
subsystem:hotkeys
subsystem:lapis
subsystem:maint
subsystem:maintenance
subsystem:markdown
subsystem:markdown-lint
subsystem:md018
subsystem:notebook
subsystem:notifications
subsystem:opfs
subsystem:package
subsystem:plugin-markdown
subsystem:plugin-tasks
subsystem:plugins
subsystem:registry
subsystem:release
subsystem:renovate
subsystem:restore
subsystem:scripts
subsystem:search
subsystem:settings
subsystem:spec
subsystem:tasks
subsystem:testing
subsystem:ui
subsystem:web
subsystem:workspace
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
lapis-notes/lapis#162
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Make the bundled Markdown Lint system extension optional in Core Plugins and harden markdownlint quick-fix/code-action generation so browser and Electron stay aligned and frontmatter-safe.
Problem
The markdown-lint system extension is still locked, so users cannot disable it from Core Plugins. Markdown quick-fix generation is also still duplicated between the browser worker and Electron sidecar, and both paths use
markdownlint.applyFix(...)withfixInfoonly. That can rewrite from the top of the file instead of the actual diagnostic line, which corrupts frontmatter-adjacent notes and makes the editor jump to the top during fix application.Goal
Make Markdown Lint toggleable under Core Plugins, unify markdownlint issue-to-code-action behavior across browser and Electron, and add file-local ignore actions that preserve frontmatter safety.
Scope
@lapis-notes/language-service/markdownlint/....applyFix(...)withapplyFixes(..., [issue])for markdown quick fixes.Ignore markdownlint <RULE> on next lineandIgnore markdownlint <RULE> for this filecode actions.MD018rule ids intact.Non-goals
disabledRulesarray.Acceptance Criteria
Fix,Ignore ... on next line, andIgnore ... for this fileactions, except that next-line ignore is omitted for diagnostics inside leading YAML frontmatter.MD018.Implementation Notes
packages/language-service/src/markdownlint/options.{ts,cjs}and add new shared runtime helpers beside it for issue mapping and code-action generation.@lapis-notes/language-serviceso Electron can import it without duplicating markdownlint logic in the sidecar child.markdownlint.applyFixes(document.text, [issue]), diffing before/after into a minimal text replacement, and returning that edit through the existing language-service code-action shape.markdown-lint.disabledRules.Suggested Files or Specs To Inspect
packages/plugins/plugin-markdown-lint/src/index.tspackages/language-service/src/workers/markdownlint.worker.tspackages/desktop-electron/src-electron/language-service-sidecar-child.tspackages/api/src/lib/plugin-manager.tspackages/api/src/lib/components/editor/language-service/index.tspackages/workspace/e2e/markdown-lint-tooltip.spec.tspackages/workspace/e2e/core-plugin-settings.spec.tsspec/src/20-packages/plugins/markdown-lint/index.mdspec/src/20-packages/language-service/index.mdspec/src/20-packages/workspace/index.mdValidation Commands
pnpm --filter @lapis-notes/language-service test -- markdownlint.test.tspnpm --filter @lapis-notes/api test -- plugin-manager.test.tspnpm --filter @lapis-notes/workspace test:e2e -- markdown-lint-tooltip.spec.ts core-plugin-settings.spec.tspnpm --filter @lapis-notes/desktop-electron test:e2e -- language-service-markdown.spec.tspnpm check:allmake spec-lintmdbook build specpnpm test:smokeRelated Issues
Follow-up Tasks
Implementation Summary
Made Markdown Lint optional in Core Plugins, unified browser/native markdownlint runtime helpers, added ignore-next-line and ignore-for-file actions, hardened frontmatter-safe apply-fix behavior, and added browser regression coverage for toggleability and fix/tooltip behavior.