-
-
Notifications
You must be signed in to change notification settings - Fork 1.2k
build: separate lint task package READMEs and /docs .md files
#11139
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Open
batpigandme
wants to merge
11
commits into
stdlib-js:develop
Choose a base branch
from
batpigandme:docs-remarkconfig
base: develop
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from all commits
Commits
Show all changes
11 commits
Select commit
Hold shift + click to select a range
543ae4b
build: separate lint task for non-package Markdown files
batpigandme 95e796a
Merge remote-tracking branch 'upstream/develop' into docs-remarkconfig
stdlib-bot ba691d0
build: add dedicated linting tasks for package readmes and docs
batpigandme 538ed29
fix: update copyright year
batpigandme 091beaf
Merge remote-tracking branch 'upstream/develop' into docs-remarkconfig
stdlib-bot cc6c59d
chore: rename linting flag variables
batpigandme 8a49ffd
fix: address reviewer feedback on Markdown linting setup
batpigandme cc65d98
fix: update stale `.remarkrc.pkg_readmes.js` reference in make config
batpigandme 07d6d5b
Apply suggestions from code review
kgryte efeed0e
build: partition Markdown lint by scope in CI workflows
batpigandme 9756916
refactor: restructure remark plugin bundles to be additive
batpigandme File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
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
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
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,30 @@ | ||
| /** | ||
| * @license Apache-2.0 | ||
| * | ||
| * Copyright (c) 2026 The Stdlib Authors. | ||
| * | ||
| * Licensed under the Apache License, Version 2.0 (the "License"); | ||
| * you may not use this file except in compliance with the License. | ||
| * You may obtain a copy of the License at | ||
| * | ||
| * http://www.apache.org/licenses/LICENSE-2.0 | ||
| * | ||
| * Unless required by applicable law or agreed to in writing, software | ||
| * distributed under the License is distributed on an "AS IS" BASIS, | ||
| * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
| * See the License for the specific language governing permissions and | ||
| * limitations under the License. | ||
| */ | ||
|
|
||
| 'use strict'; | ||
|
|
||
| // MAIN // | ||
|
|
||
| var config = { | ||
| 'plugins': require( './plugins/docs.js' ) | ||
| }; | ||
|
|
||
|
|
||
| // EXPORTS // | ||
|
|
||
| module.exports = config; |
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
|
batpigandme marked this conversation as resolved.
|
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,30 @@ | ||
| /** | ||
| * @license Apache-2.0 | ||
| * | ||
| * Copyright (c) 2026 The Stdlib Authors. | ||
| * | ||
| * Licensed under the Apache License, Version 2.0 (the "License"); | ||
| * you may not use this file except in compliance with the License. | ||
| * You may obtain a copy of the License at | ||
| * | ||
| * http://www.apache.org/licenses/LICENSE-2.0 | ||
| * | ||
| * Unless required by applicable law or agreed to in writing, software | ||
| * distributed under the License is distributed on an "AS IS" BASIS, | ||
| * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
| * See the License for the specific language governing permissions and | ||
| * limitations under the License. | ||
| */ | ||
|
|
||
| 'use strict'; | ||
|
|
||
| // MAIN // | ||
|
|
||
| var config = { | ||
| 'plugins': require( './plugins/pkg_readmes.js' ) | ||
| }; | ||
|
|
||
|
|
||
| // EXPORTS // | ||
|
|
||
| module.exports = config; |
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
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,28 @@ | ||
| /** | ||
| * @license Apache-2.0 | ||
| * | ||
| * Copyright (c) 2026 The Stdlib Authors. | ||
| * | ||
| * Licensed under the Apache License, Version 2.0 (the "License"); | ||
| * you may not use this file except in compliance with the License. | ||
| * You may obtain a copy of the License at | ||
| * | ||
| * http://www.apache.org/licenses/LICENSE-2.0 | ||
| * | ||
| * Unless required by applicable law or agreed to in writing, software | ||
| * distributed under the License is distributed on an "AS IS" BASIS, | ||
| * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
| * See the License for the specific language governing permissions and | ||
| * limitations under the License. | ||
| */ | ||
|
|
||
| 'use strict'; | ||
|
|
||
| // MAIN // | ||
|
|
||
| var plugins = require( './base.js' ); | ||
|
|
||
|
|
||
| // EXPORTS // | ||
|
|
||
| module.exports = plugins; |
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,32 @@ | ||
| /** | ||
| * @license Apache-2.0 | ||
| * | ||
| * Copyright (c) 2026 The Stdlib Authors. | ||
| * | ||
| * Licensed under the Apache License, Version 2.0 (the "License"); | ||
| * you may not use this file except in compliance with the License. | ||
| * You may obtain a copy of the License at | ||
| * | ||
| * http://www.apache.org/licenses/LICENSE-2.0 | ||
| * | ||
| * Unless required by applicable law or agreed to in writing, software | ||
| * distributed under the License is distributed on an "AS IS" BASIS, | ||
| * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
| * See the License for the specific language governing permissions and | ||
| * limitations under the License. | ||
| */ | ||
|
|
||
| 'use strict'; | ||
|
|
||
| // MAIN // | ||
|
|
||
| var plugins = []; | ||
|
|
||
| plugins = plugins.concat( require( './base.js' ) ); | ||
| plugins.push( require( './lint-expected-html-sections' ) ); | ||
| plugins.push( require( './lint-html-section-structure' ) ); | ||
|
|
||
|
|
||
| // EXPORTS // | ||
|
|
||
| module.exports = plugins; |
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
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
Oops, something went wrong.
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.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Just to clarify, this is intentional? Meaning, for other Markdown files, we want to use list of plugins used for
docs?That is possible, if we assume that the
docsconfig is effectively a subset of all the plugins we want to apply.Uh oh!
There was an error while loading. Please reload this page.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes. So this was a question I brought up in #11121 (comment).
By default, remark uses all of the plugins in the
pluginssubfolder (which includes linters and processors). Because these plugins were designed to work with the very structured package READMEs, this includes things like linting for the expected HTML sections.So, you're right, the
/docsconfig is just applying a subset. Right now we're basically saying "if it's not a package README, don't expect the HTML sections to be there" (we went even stricter than my original proposal where everything inlib/node_modules/@stdlibwould get the full processing).I definitely think it's weird (and unintuitive) to have the
/docssetup be, effectively, the default. But, we also don't expect those HTML sections in the root documentation.We could do a rename, or we could not use
/docsas the default.We already have them in three buckets (package READMEs, docs, and other), so it's easy enough to do (it's just that "other" currently gets the same treatment as docs).
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Dug into the transformer plugins (equations, namespace-toc, related, pkg-urls, stdlib-urls). None of them actually load via
.remarkrc.*— each recipe attaches them via--useflags. So, they only ever touch package READMEs (7,291 READMEs have<equation>tags; zero non-READMEs do; the other recipes scope explicitly to READMEs viafind ... -name 'README.md'orlist-pkgs-namespace-readmes).So
.remarkrc.js-as-docs-subset doesn't route through any transformer plugin. The design question is purely about lint ergonomics for non-README, non-/docsmarkdown.