Skip to content

Add linter#376

Merged
AlexAndBear merged 15 commits intomainfrom
add-linter
Jul 14, 2025
Merged

Add linter#376
AlexAndBear merged 15 commits intomainfrom
add-linter

Conversation

@AlexAndBear
Copy link
Member

@AlexAndBear AlexAndBear commented Jul 13, 2025

Added pnpm lint:md and pnpm lint:md:fix scripts to ensure consistent markdown formatting across the Docusaurus project.

When to use pnpm lint:md

Run this before committing or in CI to check for markdown style violations.
It ensures all markdown files follow the defined linting rules (e.g., consistent headings, spacing, or list styles) without modifying any files.

When to use pnpm lint:md:fix

Run this to automatically fix markdown formatting issues.
It rewrites your markdown files to match the project's linting configuration, saving time and reducing manual edits.


These scripts support clean and consistent documentation by enforcing markdown best practices across the codebase.

Copilot AI review requested due to automatic review settings July 13, 2025 15:00
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

Adds markdown linting support and Prettier configuration.

  • Introduces new npm scripts (lint:md and lint:md:fix) for markdown files
  • Adds markdownlint-cli2 and prettier as dependencies
  • Includes .markdownlint.json and .markdownlint-cli2.jsonc configs for lint rules and ignore patterns

Reviewed Changes

Copilot reviewed 3 out of 4 changed files in this pull request and generated 1 comment.

File Description
package.json Added markdown lint scripts and Prettier dependency
.markdownlint.json Enabled default rules and disabled MD013, MD033
.markdownlint-cli2.jsonc Configured CLI schema and ignore patterns for linting
Files not reviewed (1)
  • pnpm-lock.yaml: Language not supported
Comments suppressed due to low confidence (1)

package.json:40

  • [nitpick] Prettier is added as a dependency but there's no configuration file; consider adding a .prettierrc or documenting default formatting rules in the README to ensure consistent usage.
    "prettier": "^3.6.2",

"build-git-batch": "docker run --rm -w $(pwd) -v $(pwd):$(pwd) quay.io/thegeeklab/git-batch"
"build-git-batch": "docker run --rm -w $(pwd) -v $(pwd):$(pwd) quay.io/thegeeklab/git-batch",
"lint:md": "markdownlint-cli2 '**/*.{md,markdown}'",
"lint:md:fix": "markdownlint-cli2 --fix '**/*.{md,markdown}'"
Copy link

Copilot AI Jul 13, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

[nitpick] Consider adding a top-level "lint" script in package.json that runs both markdown and code lint checks, e.g., "lint": "npm run lint:md && npm run typecheck", to streamline linting workflows.

Suggested change
"lint:md:fix": "markdownlint-cli2 --fix '**/*.{md,markdown}'"
"lint:md:fix": "markdownlint-cli2 --fix '**/*.{md,markdown}'",
"lint": "npm run lint:md && npm run typecheck"

Copilot uses AI. Check for mistakes.
@AlexAndBear AlexAndBear force-pushed the add-linter branch 2 times, most recently from 2225a59 to 92bd844 Compare July 14, 2025 07:50
# Conflicts:
#	docs/dev/web/embed-mode.md
#	docs/dev/web/extension-system/extension-types/action-extensions.md
#	docs/dev/web/extension-system/extension-types/app-menu-item-extensions.md
#	docs/dev/web/extension-system/extension-types/custom-component-extensions.md
#	docs/dev/web/extension-system/extension-types/folder-view-extensions.md
#	docs/dev/web/extension-system/extension-types/right-sidebar-panel-extensions.md
#	docs/dev/web/extension-system/extension-types/search-extensions.md
#	docs/dev/web/extension-system/viewer-editor-apps.md
#	docs/dev/web/testing/e2e-testing-standards.md
#	prettier.config.js
# Conflicts:
#	package.json
#	pnpm-lock.yaml
@AlexAndBear
Copy link
Member Author

@JammingBen this is the first batch, disabled in the CI since we still got about 230 errors even after running the fix command

Copy link
Contributor

@Svanvith Svanvith left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@AlexAndBear AlexAndBear merged commit dbdf6e1 into main Jul 14, 2025
2 checks passed
@AlexAndBear AlexAndBear deleted the add-linter branch July 14, 2025 08:20
@openclouders openclouders mentioned this pull request Jul 14, 2025
1 task
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants