-
-
Notifications
You must be signed in to change notification settings - Fork 6.4k
feat(remark-lint): add #8057
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
base: main
Are you sure you want to change the base?
feat(remark-lint): add #8057
Conversation
The latest updates on your projects. Learn more about Vercel for Git ↗︎
|
The only lint changes are escaping characters (i.e |
4ca85a5
to
a8a258b
Compare
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #8057 +/- ##
==========================================
+ Coverage 72.81% 75.26% +2.44%
==========================================
Files 96 112 +16
Lines 8328 9177 +849
Branches 214 286 +72
==========================================
+ Hits 6064 6907 +843
- Misses 2263 2269 +6
Partials 1 1 ☔ View full report in Codecov by Sentry. |
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.
Where's the llm_description lint rules?
🤦I'll add them today, whoops |
Is the idea that this is what will also be used to lint non-documentation .md files in the nodejs/node and nodejs/TSC repositories? Or will those continue to use remark-lint-preset-node and this is for website linting only? |
The idea is for this to be the linter associated with So, the web-infra and website teams will maintain a linter that complies with the generators we wrote (to ensure that they integrate well together). Yes, it'll work on the other repositories, but there's no obligation to use it there. |
It's going to have two presets.
|
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.
Am I missing a place or decision for us to have/not have READMEs in our packages? Seems like some of the context of this PR and the discussion already would be great to document as intents.
I noticed that the other packages don't have READMEs either. I don't intent to scope creep you but this seems like a good idea, no?
More review coming.
Issue on /admin repo? |
packages/remark-lint/src/index.mjs
Outdated
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.
In order to avoid self-referenciating rules, can you rename this to base.mjs, and then simply export it also on index.mjs? Then api.mjs imports base.mjs
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.
I don't think there is a difference, right? Am I missing something?
Yes, I'll open one, once this gets some approvals |
a8e566c
to
ce80c49
Compare
ce80c49
to
0e8aa1f
Compare
f0babe6
to
22bd281
Compare
Can someone tell me why Vercel failed? @nodejs/web-infra |
|
That's a warning disguised as an error, but has since been fixed.
🤔 I'm going to rebase with |
22bd281
to
f45b162
Compare
Fixes nodejs/doc-kit#350
This PR updates the monorepo to include a rewrite of
remark-preset-lint-node
. Now that we've migrated to the new generators, it makes sense to centralize our linting rules in one place, maintained by the same team. This ensures the generator syntax aligns exactly with the linting configuration.The updated preset includes all existing rules plus the custom ones currently defined in
doc-kit
. With a follow-up indoc-kit
, this will also address nodejs/doc-kit#328.Once the migration to
doc-kit
is finished, we can follow up in node core to replaceremark-preset-lint-node
with@nodejs/remark-lint/api
.Our current setup is fragmented:
remark-preset-lint-node
doc-kit
remark-preset-lint-node
between general and API-specific rulesBy consolidating everything into a single package, we’ll simplify future maintenance.
Tip
This package is versioned, and will only publish when the
version
package.json field is bumped (or viaworkflow_dispatch
).cc @nodejs/web-infra
cc @nodejs/linting
cc @Trott
Note: This PR is split into two commits. The first commit adds the package, and the second commit performs the linting adjustments (which is escaping).
Blocked:
NPM_TOKEN
secret needs to be updated to allow publishing@node-core/remark-lint