build: separate lint task package READMEs and /docs .md files#11139
Open
batpigandme wants to merge 5 commits intostdlib-js:developfrom
Open
build: separate lint task package READMEs and /docs .md files#11139batpigandme wants to merge 5 commits intostdlib-js:developfrom
.md files#11139batpigandme wants to merge 5 commits intostdlib-js:developfrom
Conversation
Introduce a dedicated Remark configuration for Markdown files located outside of the package directory and update the pre-commit hook to run separate linting tasks for package and non-package files.
Assisted-by: Calude-Opus-4-6
---
type: pre_commit_static_analysis_report
description: Results of running static analysis checks when committing changes.
report:
- task: lint_filenames
status: passed
- task: lint_editorconfig
status: passed
- task: lint_markdown
status: na
- task: lint_package_json
status: na
- task: lint_repl_help
status: na
- task: lint_javascript_src
status: passed
- task: lint_javascript_cli
status: na
- task: lint_javascript_examples
status: na
- task: lint_javascript_tests
status: na
- task: lint_javascript_benchmarks
status: na
- task: lint_python
status: na
- task: lint_r
status: na
- task: lint_c_src
status: na
- task: lint_c_examples
status: na
- task: lint_c_benchmarks
status: na
- task: lint_c_tests_fixtures
status: na
- task: lint_shell
status: missing_dependencies
- task: lint_typescript_declarations
status: passed
- task: lint_typescript_tests
status: na
- task: lint_license_headers
status: passed
---
Member
Author
|
/stdlib merge |
Introduce specialized remark configurations and Makefile targets to provide granular linting for different classes of Markdown files (package readmes, and docs).
Update the pre-commit hook to run separate tasks for package READMEs, documentation files, and general Markdown files.
Assisted-by: Claude-Opus-4-6
---
type: pre_commit_static_analysis_report
description: Results of running static analysis checks when committing changes.
report:
- task: lint_filenames
status: passed
- task: lint_editorconfig
status: passed
- task: lint_markdown_pkg
status: na
- task: lint_markdown_docs
status: na
- task: lint_package_json
status: na
- task: lint_repl_help
status: na
- task: lint_javascript_src
status: na
- task: lint_javascript_cli
status: na
- task: lint_javascript_examples
status: na
- task: lint_javascript_tests
status: na
- task: lint_javascript_benchmarks
status: na
- task: lint_python
status: na
- task: lint_r
status: na
- task: lint_c_src
status: na
- task: lint_c_examples
status: na
- task: lint_c_benchmarks
status: na
- task: lint_c_tests_fixtures
status: na
- task: lint_shell
status: na
- task: lint_typescript_declarations
status: passed
- task: lint_typescript_tests
status: na
- task: lint_license_headers
status: passed
---
---
type: pre_commit_static_analysis_report
description: Results of running static analysis checks when committing changes.
report:
- task: lint_filenames
status: passed
- task: lint_editorconfig
status: passed
- task: lint_markdown_pkg
status: na
- task: lint_markdown_docs
status: na
- task: lint_package_json
status: na
- task: lint_repl_help
status: na
- task: lint_javascript_src
status: passed
- task: lint_javascript_cli
status: na
- task: lint_javascript_examples
status: na
- task: lint_javascript_tests
status: na
- task: lint_javascript_benchmarks
status: na
- task: lint_python
status: na
- task: lint_r
status: na
- task: lint_c_src
status: na
- task: lint_c_examples
status: na
- task: lint_c_benchmarks
status: na
- task: lint_c_tests_fixtures
status: na
- task: lint_shell
status: na
- task: lint_typescript_declarations
status: passed
- task: lint_typescript_tests
status: na
- task: lint_license_headers
status: passed
---
Member
Author
|
@kgryte Per our discussion yesterday, I've separated out package READMEs and docs (although docs rules apply to everything not in the package READMEs, it makes sense to have a separate config for future editing). I've updated the PR description above to reflect the changes. The find variables and list targets are now in
|
.md files
Member
Author
|
/stdlib merge |
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.
Dedicated Remark configuration for Markdown files in package directories and the docs directory and update the pre-commit hook to run separate linting tasks for package and non-package files.
Assisted-by: Calude-Opus-4-6
type: pre_commit_static_analysis_report
description: Results of running static analysis checks when committing changes. report:
Resolves #11121
Description
This pull request:
This PR adds separate remark lint configurations for package READMEs,
/docsMarkdown files, and general Markdown files. Previously, all Markdown files were linted with the same remark config, which meant rules specific to package READMEs (likeremark-lint-expected-html-sectionsandremark-lint-html-section-structure) were applied to files where they don't belong (e.g., files in/docs).Remark configurations:
.remarkrc.js— default config for general Markdown files (no HTML section rules).remarkrc.pkg-readmes.js— package READMEs (includes HTML section rules).remarkrc.docs.js— documentation files (no HTML section rules, separate for future customization)New Make targets:
Linting:
make lint-markdown-package-readmes— lint all package READMEsmake lint-markdown-package-readme-files FILES='...'— lint a specified list of package READMEsmake lint-markdown-docs— lint all documentation Markdown filesmake lint-markdown-docs-files FILES='...'— lint a specified list of documentation filesmake lint-markdown/make lint-markdown-files— lint general Markdown (unchanged targets, now uses default config)Listing:
make list-markdown-pkg-readmes— list all package README files (now defined inls/markdown/pkg_readmes.mkmake list-markdown-docs— list all documentation Markdown files (now defined inls/markdown/docs.mkAll targets support filter patterns, e.g.:
Pre-commit hook now splits changed Markdown files into three categories and lints each with the appropriate config.
Related Issues
This pull request has the following related issues:
/docs#11121 etc/remark/.remarkrc.jsQuestions
I realize it's a bit weird that we're loading the plugins list for docs for the general remarkrc. We don't need to do the HTML section linting for non-package-README files, though. The reason for having three targets is because we might want to do separate processing for
/docsfiles in the future. Currently it's the same config as "everything else".https://github.com/stdlib-js/stdlib/pull/11139/changes#diff-e7ff32f40f118b3274e48d9933d7c636c4d7cb9788b6d6dcf25a370631567b91
Other
No.
Checklist
AI Assistance
If you answered "yes" above, how did you use AI assistance?
Disclosure
Used for understanding the current remark build and for generating new make setup (all of which I read and reviewed).
@stdlib-js/reviewers