0
0
mirror of https://github.com/nodejs/node.git synced 2024-11-30 07:27:22 +01:00
Commit Graph

28 Commits

Author SHA1 Message Date
Derek Lewis
80fb15353a tools: enable Markdown linter's usage information
Prior to this commit, running `node tools/lint-md --help` and
`node tools/lint-md --version` resulted in an error.

* Use `unified-args` to start processor
* Use `unified-args`'s error handler

Fixes: https://github.com/nodejs/node/issues/30156
PR-URL: https://github.com/nodejs/node/pull/30216
Reviewed-By: Rich Trott <rtrott@gmail.com>
2019-12-14 21:44:42 -08:00
Rich Trott
09ea00b0c1 tools: update remark-preset-lint-node to 1.11.0
PR-URL: https://github.com/nodejs/node/pull/30789
Reviewed-By: Richard Lau <riclau@uk.ibm.com>
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de>
Reviewed-By: Michaël Zasso <targos@protonmail.com>
Reviewed-By: Trivikram Kamat <trivikr.dev@gmail.com>
Reviewed-By: Anto Aravinth <anto.aravinth.cse@gmail.com>
2019-12-06 07:11:04 -08:00
Rich Trott
90b5f1b107 tools: update remark-preset-lint-node to 1.10.1
This includes better link linting, improved prohibited string linting,
and a more maintainable code base by using remark-preset-int-recommended
(thanks nschonni!).

Update other dependencies while at it.

PR-URL: https://github.com/nodejs/node/pull/29982
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Richard Lau <riclau@uk.ibm.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
2019-10-15 13:25:26 -07:00
Rich Trott
a0c6cf8eb1 tools: update remark-preset-lint-node to 1.10.0
A new version of remark-preset-lint-node adds linting for unordered list
style.

PR-URL: https://github.com/nodejs/node/pull/29594
Reviewed-By: Richard Lau <riclau@uk.ibm.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
2019-09-17 21:30:44 -07:00
Rich Trott
1e01f3f022 tools: apply more stringent blank-line linting for markdown files
Update remark-preset-lint-node to 1.9.0, which adds linting for
multiple consecutive blank lines.

PR-URL: https://github.com/nodejs/node/pull/29447
Reviewed-By: Michaël Zasso <targos@protonmail.com>
Reviewed-By: Richard Lau <riclau@uk.ibm.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Trivikram Kamat <trivikr.dev@gmail.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
2019-09-07 07:07:26 -07:00
Rich Trott
4276066395 tools: add markdown lint rule for 'Unix'
A recent PR standardized on 'Unix' rather than 'UNIX' or 'unix'. This
change adds a markdown linting rule to enforce it going forward.

PR-URL: https://github.com/nodejs/node/pull/28619
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Richard Lau <riclau@uk.ibm.com>
Reviewed-By: Tobias Nießen <tniessen@tnie.de>
Reviewed-By: Trivikram Kamat <trivikr.dev@gmail.com>
Reviewed-By: Jiawen Geng <technicalcute@gmail.com>
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de>
2019-07-11 22:42:21 -07:00
Rich Trott
c9c8408f81 tools: update unified-args to 7.0.0 for md-lint CLI
Update unified-args from 6.0.0 to 7.0.0 for
tools/node-lint-md-cli-rollup. This removes a vulnerable package
(set-value@0.4.3) from the dependencies.

Refs: https://app.snyk.io/vuln/SNYK-JS-SETVALUE-450213

PR-URL: https://github.com/nodejs/node/pull/28434
Reviewed-By: Michaël Zasso <targos@protonmail.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de>
Reviewed-By: Trivikram Kamat <trivikr.dev@gmail.com>
Reviewed-By: Jiawen Geng <technicalcute@gmail.com>
2019-07-01 21:34:11 -07:00
Rich Trott
cf9a7f2dce tools: update remark-preset-lint-node to 1.7.0
This update enables linting for "note that" in our docs. That phrase is
almost always superfluous. Sentences are almost always clearer and
stronger without it.

PR-URL: https://github.com/nodejs/node/pull/28393
Reviewed-By: Richard Lau <riclau@uk.ibm.com>
Reviewed-By: Trivikram Kamat <trivikr.dev@gmail.com>
Reviewed-By: Daijiro Wachi <daijiro.wachi@gmail.com>
2019-06-26 21:19:48 -07:00
Rich Trott
cc7e15f850 tools: update markdown linter for Windows line endings
Update the markdown linter to work with Windows line endings.
Previously, Windows line endings would break the trailing-spaces plugin.

PR-URL: https://github.com/nodejs/node/pull/27756
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Сковорода Никита Андреевич <chalkerx@gmail.com>
2019-05-19 23:08:53 -07:00
Rich Trott
d4e743169e tools: update js-yaml to 3.13.1 for lint-md.js
Update js-yaml from 3.13.0 to 3.13.1 in the lint-md.js tool. Version
3.13.0 is the subject of a security problem. It is almost certainly not
anything that is reasonable exploitable in our code base (as it's
internal tooling) but good to update anyway just in case...

Refs: https://app.snyk.io/vuln/SNYK-JS-JSYAML-174129

PR-URL: https://github.com/nodejs/node/pull/27195
Reviewed-By: Richard Lau <riclau@uk.ibm.com>
Reviewed-By: Yongsheng Zhang <zyszys98@gmail.com>
2019-04-13 23:42:42 -07:00
Daijiro Wachi
ef0701d31f
tools: update dependencies in lint-md-cli-rollup
Summary
+ Update `@zeit/ncc` to `^0.16.1` from `^0.15.2`
+ Update `unified-engine` to `^6.0.1` from `^5.1.0`
+ Run `npm audit fix`
+ Run `npm run build-node`

Refs:
+ https://github.com/unifiedjs/unified-engine/releases/tag/6.0.0
+ https://github.com/unifiedjs/unified-engine/releases/tag/6.0.1
+ https://github.com/zeit/ncc/releases/tag/0.16.0
+ https://github.com/zeit/ncc/releases/tag/0.16.1

PR-URL: https://github.com/nodejs/node/pull/26889
Refs: https://github.com/unifiedjs/unified-engine/releases/tag/6.0.0
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de>
Reviewed-By: Rich Trott <rtrott@gmail.com>
Reviewed-By: Yuta Hiroto <hello@hiroppy.me>
2019-03-30 13:22:03 +01:00
Rich Trott
72f578327a tools: update lint-md.js to lint rfc name format
Update lint-md.js to lint for "RFC1234" and similar variants that should
be written as "RFC 1234".

PR-URL: https://github.com/nodejs/node/pull/26727
Reviewed-By: Richard Lau <riclau@uk.ibm.com>
Reviewed-By: Vse Mozhet Byt <vsemozhetbyt@gmail.com>
2019-03-17 23:14:22 -07:00
Refael Ackermann
8da6cec203 tools: update node-lint-md-cli-rollup version 2
PR-URL: https://github.com/nodejs/node/pull/26441
Reviewed-By: Richard Lau <riclau@uk.ibm.com>
Reviewed-By: Rich Trott <rtrott@gmail.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Daijiro Wachi <daijiro.wachi@gmail.com>
2019-03-08 19:02:41 -05:00
Rich Trott
9f2bde5da5 tools: update remark-preset-lint-node to 1.5.0
This update includes an additional check for `End-of-life`. For
consistency, we use `End-of-Life` everywhere.

PR-URL: https://github.com/nodejs/node/pull/26442
Reviewed-By: Richard Lau <riclau@uk.ibm.com>
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de>
Reviewed-By: Anto Aravinth <anto.aravinth.cse@gmail.com>
2019-03-06 15:50:46 -08:00
Rich Trott
5fa642a917 tools: refactor tools JS code
* standardize on arrow functions for callbacks
* standaradize on trailing commas for multiline arrays

PR-URL: https://github.com/nodejs/node/pull/26394
Reviewed-By: Richard Lau <riclau@uk.ibm.com>
Reviewed-By: Anto Aravinth <anto.aravinth.cse@gmail.com>
Reviewed-By: Masashi Hirano <shisama07@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de>
2019-03-04 11:06:23 -08:00
Rich Trott
d9536f73e5 tools: update node-lint-md-cli-rollup lockfile
This includes an update for chownr from 1.0.1 to 1.1.1, which means a
fix for the issue described in
https://github.com/isaacs/chownr/issues/14. While not a
user-facing issue, it seems like a good idea to patch promptly anyway.

PR-URL: https://github.com/nodejs/node/pull/26393
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de>
Reviewed-By: Refael Ackermann <refack@gmail.com>
2019-03-03 22:27:13 -08:00
Rich Trott
ccd6b12fec tools: update markdown linter
Update remark-preset-lint-node to 1.4.0. This adds `End-Of-Life` as a
prohibited string, favoring `End-of-Life` for consistency.

Refs: https://github.com/nodejs/node/pull/26251

PR-URL: https://github.com/nodejs/node/pull/26281
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Refael Ackermann <refack@gmail.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: Richard Lau <riclau@uk.ibm.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
2019-02-25 19:37:38 -08:00
Rich Trott
630fed8f07 tools: replace rollup with ncc
Replace rollup + plugins + config file with zeit/ncc package designed to
do the particular task that we're leveraging rollup for but with
zero-ish configuration. (rollup can do a whole lot more, but we're using
a tiny portion of its functionality.)

PR-URL: https://github.com/nodejs/node/pull/24813
Reviewed-By: Guy Bedford <guybedford@gmail.com>
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de>
2018-12-05 14:02:17 -08:00
Daijiro Wachi
8ce0d4fdf1 tools: update remark-preset-lint-node to v1.3.1
PR-URL: https://github.com/nodejs/node/pull/24642
Reviewed-By: Refael Ackermann <refack@gmail.com>
Reviewed-By: Franziska Hinkelmann <franziska.hinkelmann@gmail.com>
Reviewed-By: Rich Trott <rtrott@gmail.com>
2018-11-28 06:53:32 -08:00
Rich Trott
3cac82f55e tools: update to remark-lint-preset-node@1.2.0
Adds linting for number of spaces after a list indicator. (Expects
exactly 1 space.)

PR-URL: https://github.com/nodejs/node/pull/24391
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Daijiro Wachi <daijiro.wachi@gmail.com>
2018-11-18 23:50:08 -08:00
Daijiro Wachi
195b7c2880 tools: update remark-lint to v6.0.3 from v6.0.2
PR-URL: https://github.com/nodejs/node/pull/24333
Refs: https://github.com/remarkjs/remark-lint/releases/tag/6.0.3
Reviewed-By: Refael Ackermann <refack@gmail.com>
Reviewed-By: Daniel Bevenius <daniel.bevenius@gmail.com>
2018-11-16 04:20:27 +01:00
Daijiro Wachi
eeed6d9858 tools: update remark version to v10 from v8
Including the below two updates:
+ https://github.com/remarkjs/remark/releases/tag/9.0.0
+ https://github.com/remarkjs/remark/releases/tag/10.0.0

PR-URL: https://github.com/nodejs/node/pull/24333
Reviewed-By: Refael Ackermann <refack@gmail.com>
Reviewed-By: Daniel Bevenius <daniel.bevenius@gmail.com>
2018-11-16 04:20:13 +01:00
Rich Trott
c3809ffc24 tools: enable 80-char line length markdown linting
PR-URL: https://github.com/nodejs/node/pull/24094
Reviewed-By: Richard Lau <riclau@uk.ibm.com>
Reviewed-By: Refael Ackermann <refack@gmail.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
2018-11-07 09:27:33 -08:00
Rich Trott
54ce229d30 tools: update node-lint-md-cli-rollup
Update node-lint-md-cli-rollup. This silences some minor warnings that
appear with `npm audit`. It also updates remark-preset-lint-node to
1.0.3 (from 1.0.2).

PR-URL: https://github.com/nodejs/node/pull/23358
Reviewed-By: Refael Ackermann <refack@gmail.com>
Reviewed-By: Michaël Zasso <targos@protonmail.com>
2018-10-11 16:58:33 -07:00
Refael Ackermann
fe6c74c2a5 tools: make lint-md-rollup & checkin lint-md.js
PR-URL: https://github.com/nodejs/node/pull/20109
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Gus Caplan <me@gus.host>
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de>
2018-09-11 14:12:23 -04:00
Refael Ackermann
7fcc178be1 tools: relocate remark-preset-lint-node
PR-URL: https://github.com/nodejs/node/pull/20109
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Gus Caplan <me@gus.host>
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de>
2018-09-11 14:12:18 -04:00
Refael Ackermann
2120dac8ab tools: update node-lint-md-cli-rollup
PR-URL: https://github.com/nodejs/node/pull/20109
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Gus Caplan <me@gus.host>
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de>
2018-09-11 14:12:12 -04:00
Refael Ackermann
d3442f261a tools: vendor in node-lint-md-cli-rollup
PR-URL: https://github.com/nodejs/node/pull/20109
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Gus Caplan <me@gus.host>
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de>
2018-09-11 14:12:07 -04:00