summaryrefslogtreecommitdiff
path: root/tools
diff options
context:
space:
mode:
authorestrada9166 <estrada9166@hotmail.com>2018-02-12 02:31:55 -0500
committerRuben Bridgewater <ruben@bridgewater.de>2018-02-23 16:26:29 +0000
commita29089d7c866955616c0e363843017e9b9b2a736 (patch)
tree28bb543eea1a6bd814da31d854daa8680fdc5a90 /tools
parent3a191229418dcc0e21956847993b1702c88a923b (diff)
downloadandroid-node-v8-a29089d7c866955616c0e363843017e9b9b2a736.tar.gz
android-node-v8-a29089d7c866955616c0e363843017e9b9b2a736.tar.bz2
android-node-v8-a29089d7c866955616c0e363843017e9b9b2a736.zip
doc: add new documentation lint rule
Add 80 characters limit to docs. Change docs to fit 80 characters per row. PR-URL: https://github.com/nodejs/node/pull/18726 Fixes: https://github.com/nodejs/node/issues/18703 Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de> Reviewed-By: Matteo Collina <matteo.collina@gmail.com> Reviewed-By: Gibson Fahnestock <gibfahn@gmail.com> Reviewed-By: Anatoli Papirovski <apapirovski@mac.com>
Diffstat (limited to 'tools')
-rw-r--r--tools/icu/README.md39
-rw-r--r--tools/remark-preset-lint-node/index.js3
-rw-r--r--tools/remark-preset-lint-node/package-lock.json11
-rw-r--r--tools/remark-preset-lint-node/package.json1
4 files changed, 41 insertions, 13 deletions
diff --git a/tools/icu/README.md b/tools/icu/README.md
index e1c753ebf3..9b7f72128f 100644
--- a/tools/icu/README.md
+++ b/tools/icu/README.md
@@ -1,20 +1,29 @@
# Notes about the `tools/icu` subdirectory
-This directory contains tools, data, and information about the [http://icu-project.org](ICU) (International Components for Unicode) integration. ICU is used to provide internationalization functionality.
-
-- `patches/` are one-off patches, actually entire source file replacements, organized by ICU version number.
-- `icu_small.json` controls the "small" (English only) ICU. It is input to `icutrim.py`
-- `icu-generic.gyp` is the build file used for most ICU builds within ICU. <!-- have fun -->
-- `icu-system.gyp` is an alternate build file used when `--with-intl=system-icu` is invoked. It builds against the `pkg-config` located ICU.
-- `iculslocs.cc` is source for the `iculslocs` utility, invoked by `icutrim.py` as part of repackaging. Not used separately. See source for more details.
+This directory contains tools, data, and information about the [http://icu-project.org](ICU)
+(International Components for Unicode) integration. ICU is used to provide
+internationalization functionality.
+
+- `patches/` are one-off patches, actually entire source file replacements,
+ organized by ICU version number.
+- `icu_small.json` controls the "small" (English only) ICU. It is input to
+ `icutrim.py`
+- `icu-generic.gyp` is the build file used for most ICU builds within ICU.
+ <!-- have fun -->
+- `icu-system.gyp` is an alternate build file used when `--with-intl=system-icu`
+ is invoked. It builds against the `pkg-config` located ICU.
+- `iculslocs.cc` is source for the `iculslocs` utility, invoked by `icutrim.py`
+ as part of repackaging. Not used separately. See source for more details.
- `no-op.cc` — empty function to convince gyp to use a C++ compiler.
- `README.md` — you are here
- `shrink-icu-src.py` — this is used during upgrade (see guide below)
## How to upgrade ICU
-- Make sure your node workspace is clean (clean `git status`) should be sufficient.
-- Configure Node with the specific [ICU version](http://icu-project.org/download) you want to upgrade to, for example:
+- Make sure your node workspace is clean (clean `git status`) should be
+ sufficient.
+- Configure Node with the specific [ICU version](http://icu-project.org/download)
+ you want to upgrade to, for example:
```shell
./configure \
@@ -26,8 +35,10 @@ make
> _Note_ in theory, the equivalent `vcbuild.bat` commands should work also,
> but the commands below are makefile-centric.
-- If there are ICU version-specific changes needed, you may need to make changes in `icu-generic.gyp` or add patch files to `tools/icu/patches`.
- - Specifically, look for the lists in `sources!` in the `icu-generic.gyp` for files to exclude.
+- If there are ICU version-specific changes needed, you may need to make changes
+ in `icu-generic.gyp` or add patch files to `tools/icu/patches`.
+ - Specifically, look for the lists in `sources!` in the `icu-generic.gyp` for
+ files to exclude.
- Verify the node build works:
@@ -95,7 +106,11 @@ make test-ci
- commit the change to `configure` along with the updated `LICENSE` file.
- - Note: To simplify review, I often will “pre-land” this patch, meaning that I run the patch through `curl -L https://github.com/nodejs/node/pull/xxx.patch | git am -3 --whitespace=fix` per the collaborator’s guide… and then push that patched branch into my PR's branch. This reduces the whitespace changes that show up in the PR, since the final land will eliminate those anyway.
+ - Note: To simplify review, I often will “pre-land” this patch, meaning that
+ I run the patch through `curl -L https://github.com/nodejs/node/pull/xxx.patch
+ | git am -3 --whitespace=fix` per the collaborator’s guide… and then push that
+ patched branch into my PR's branch. This reduces the whitespace changes that
+ show up in the PR, since the final land will eliminate those anyway.
-----
diff --git a/tools/remark-preset-lint-node/index.js b/tools/remark-preset-lint-node/index.js
index a59d5d78d8..d50b30f83d 100644
--- a/tools/remark-preset-lint-node/index.js
+++ b/tools/remark-preset-lint-node/index.js
@@ -49,5 +49,6 @@ module.exports.plugins = [
]
],
[require('remark-lint-strong-marker'), '*'],
- [require('remark-lint-table-cell-padding'), 'padded']
+ [require('remark-lint-table-cell-padding'), 'padded'],
+ [require('remark-lint-maximum-line-length'), 80]
];
diff --git a/tools/remark-preset-lint-node/package-lock.json b/tools/remark-preset-lint-node/package-lock.json
index 8c84d7f782..55f29b9aba 100644
--- a/tools/remark-preset-lint-node/package-lock.json
+++ b/tools/remark-preset-lint-node/package-lock.json
@@ -185,6 +185,17 @@
"unist-util-visit": "1.2.0"
}
},
+ "remark-lint-maximum-line-length": {
+ "version": "1.0.2",
+ "resolved": "https://registry.npmjs.org/remark-lint-maximum-line-length/-/remark-lint-maximum-line-length-1.0.2.tgz",
+ "integrity": "sha512-M4UIXAAbtLgoQbTDVwdKOEFbTKtJSZ+pCW7ZqMFs+cbIN0Svm32LM9+xpVfVU0hLYt3Ypl++EAPfguBNe1PZEw==",
+ "requires": {
+ "unified-lint-rule": "1.0.2",
+ "unist-util-generated": "1.1.1",
+ "unist-util-position": "3.0.0",
+ "unist-util-visit": "1.2.0"
+ }
+ },
"remark-lint-no-auto-link-without-protocol": {
"version": "1.0.1",
"resolved": "https://registry.npmjs.org/remark-lint-no-auto-link-without-protocol/-/remark-lint-no-auto-link-without-protocol-1.0.1.tgz",
diff --git a/tools/remark-preset-lint-node/package.json b/tools/remark-preset-lint-node/package.json
index beabb75cdb..285ba74d5f 100644
--- a/tools/remark-preset-lint-node/package.json
+++ b/tools/remark-preset-lint-node/package.json
@@ -32,6 +32,7 @@
"remark-lint-first-heading-level": "^1.0.0",
"remark-lint-hard-break-spaces": "^1.0.1",
"remark-lint-heading-style": "^1.0.0",
+ "remark-lint-maximum-line-length": "^1.0.2",
"remark-lint-no-auto-link-without-protocol": "^1.0.0",
"remark-lint-no-blockquote-without-caret": "^1.0.0",
"remark-lint-no-duplicate-definitions": "^1.0.0",