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>
This commit is contained in:
Rich Trott 2019-03-04 15:34:18 -08:00
parent 7ffbb4606f
commit 9f2bde5da5
2 changed files with 24 additions and 19 deletions

View File

@ -8785,7 +8785,7 @@ const args = {
description: cli.description, description: cli.description,
version: [ version: [
proc.name + ': ' + proc.version, proc.name + ': ' + proc.version,
cli.name + ': ' + cli.version cli.name + ': ' + cli.version,
].join(', '), ].join(', '),
ignoreName: '.' + proc.name + 'ignore', ignoreName: '.' + proc.name + 'ignore',
extensions: extensions extensions: extensions
@ -8794,7 +8794,7 @@ const config = options(process.argv.slice(2), args);
config.detectConfig = false; config.detectConfig = false;
config.plugins = plugins; config.plugins = plugins;
engine(config, function done(err, code) { engine(config, (err, code) => {
if (err) console.error(err); if (err) console.error(err);
process.exit(code); process.exit(code);
}); });
@ -26711,36 +26711,40 @@ function map (xs, f) {
"use strict"; "use strict";
const preserveCamelCase = input => { const preserveCamelCase = string => {
let isLastCharLower = false; let isLastCharLower = false;
let isLastCharUpper = false; let isLastCharUpper = false;
let isLastLastCharUpper = false; let isLastLastCharUpper = false;
for (let i = 0; i < input.length; i++) { for (let i = 0; i < string.length; i++) {
const c = input[i]; const character = string[i];
if (isLastCharLower && /[a-zA-Z]/.test(c) && c.toUpperCase() === c) { if (isLastCharLower && /[a-zA-Z]/.test(character) && character.toUpperCase() === character) {
input = input.slice(0, i) + '-' + input.slice(i); string = string.slice(0, i) + '-' + string.slice(i);
isLastCharLower = false; isLastCharLower = false;
isLastLastCharUpper = isLastCharUpper; isLastLastCharUpper = isLastCharUpper;
isLastCharUpper = true; isLastCharUpper = true;
i++; i++;
} else if (isLastCharUpper && isLastLastCharUpper && /[a-zA-Z]/.test(c) && c.toLowerCase() === c) { } else if (isLastCharUpper && isLastLastCharUpper && /[a-zA-Z]/.test(character) && character.toLowerCase() === character) {
input = input.slice(0, i - 1) + '-' + input.slice(i - 1); string = string.slice(0, i - 1) + '-' + string.slice(i - 1);
isLastLastCharUpper = isLastCharUpper; isLastLastCharUpper = isLastCharUpper;
isLastCharUpper = false; isLastCharUpper = false;
isLastCharLower = true; isLastCharLower = true;
} else { } else {
isLastCharLower = c.toLowerCase() === c; isLastCharLower = character.toLowerCase() === character;
isLastLastCharUpper = isLastCharUpper; isLastLastCharUpper = isLastCharUpper;
isLastCharUpper = c.toUpperCase() === c; isLastCharUpper = character.toUpperCase() === character;
} }
} }
return input; return string;
}; };
module.exports = (input, options) => { module.exports = (input, options) => {
if (!(typeof input === 'string' || Array.isArray(input))) {
throw new TypeError('Expected the input to be `string | string[]`');
}
options = Object.assign({ options = Object.assign({
pascalCase: false pascalCase: false
}, options); }, options);
@ -35198,7 +35202,7 @@ function tableCell(node) {
/* 302 */ /* 302 */
/***/ (function(module) { /***/ (function(module) {
module.exports = {"name":"remark","version":"10.0.1","description":"Markdown processor powered by plugins","license":"MIT","keywords":["markdown","abstract","syntax","tree","ast","parse","stringify","process"],"homepage":"https://remark.js.org","repository":"https://github.com/remarkjs/remark/tree/master/packages/remark","bugs":"https://github.com/remarkjs/remark/issues","author":"Titus Wormer <tituswormer@gmail.com> (https://wooorm.com)","contributors":["Titus Wormer <tituswormer@gmail.com> (https://wooorm.com)"],"files":["index.js"],"dependencies":{"remark-parse":"^6.0.0","remark-stringify":"^6.0.0","unified":"^7.0.0"},"devDependencies":{"tape":"^4.9.1"},"scripts":{"test":"tape test.js"},"xo":false,"_resolved":"https://registry.npmjs.org/remark/-/remark-10.0.1.tgz","_integrity":"sha512-E6lMuoLIy2TyiokHprMjcWNJ5UxfGQjaMSMhV+f4idM625UjjK4j798+gPs5mfjzDE6vL0oFKVeZM6gZVSVrzQ==","_from":"remark@10.0.1"}; module.exports = {"_from":"remark@^10.0.0","_id":"remark@10.0.1","_inBundle":false,"_integrity":"sha512-E6lMuoLIy2TyiokHprMjcWNJ5UxfGQjaMSMhV+f4idM625UjjK4j798+gPs5mfjzDE6vL0oFKVeZM6gZVSVrzQ==","_location":"/remark","_phantomChildren":{},"_requested":{"type":"range","registry":true,"raw":"remark@^10.0.0","name":"remark","escapedName":"remark","rawSpec":"^10.0.0","saveSpec":null,"fetchSpec":"^10.0.0"},"_requiredBy":["/"],"_resolved":"https://registry.npmjs.org/remark/-/remark-10.0.1.tgz","_shasum":"3058076dc41781bf505d8978c291485fe47667df","_spec":"remark@^10.0.0","_where":"/Users/trott/io.js/tools/node-lint-md-cli-rollup","author":{"name":"Titus Wormer","email":"tituswormer@gmail.com","url":"https://wooorm.com"},"bugs":{"url":"https://github.com/remarkjs/remark/issues"},"bundleDependencies":false,"contributors":[{"name":"Titus Wormer","email":"tituswormer@gmail.com","url":"https://wooorm.com"}],"dependencies":{"remark-parse":"^6.0.0","remark-stringify":"^6.0.0","unified":"^7.0.0"},"deprecated":false,"description":"Markdown processor powered by plugins","devDependencies":{"tape":"^4.9.1"},"files":["index.js"],"homepage":"https://remark.js.org","keywords":["markdown","abstract","syntax","tree","ast","parse","stringify","process"],"license":"MIT","name":"remark","repository":{"type":"git","url":"https://github.com/remarkjs/remark/tree/master/packages/remark"},"scripts":{"test":"tape test.js"},"version":"10.0.1","xo":false};
/***/ }), /***/ }),
/* 303 */ /* 303 */
@ -35261,6 +35265,7 @@ module.exports.plugins = [
__webpack_require__(346), __webpack_require__(346),
[ [
{ no: "End-Of-Life", yes: "End-of-Life" }, { no: "End-Of-Life", yes: "End-of-Life" },
{ no: "End-of-life", yes: "End-of-Life" },
{ no: "Github", yes: "GitHub" }, { no: "Github", yes: "GitHub" },
{ no: "Javascript", yes: "JavaScript" }, { no: "Javascript", yes: "JavaScript" },
{ no: "Node.JS", yes: "Node.js" }, { no: "Node.JS", yes: "Node.js" },

View File

@ -237,9 +237,9 @@
} }
}, },
"camelcase": { "camelcase": {
"version": "5.0.0", "version": "5.1.0",
"resolved": "https://registry.npmjs.org/camelcase/-/camelcase-5.0.0.tgz", "resolved": "https://registry.npmjs.org/camelcase/-/camelcase-5.1.0.tgz",
"integrity": "sha512-faqwZqnWxbxn+F1d399ygeamQNy3lPp/H9H6rNrqYh4FSVCtcY+3cub1MxA8o9mDd55mM8Aghuu/kuyYA6VTsA==" "integrity": "sha512-WP9f9OBL/TAbwOFBJL79FoS9UKUmnp82RWnhlwTgrAJeMq7lytHhe0Jzc6/P7Zq0+2oviXJuPlvkZalWUug9gg=="
}, },
"ccount": { "ccount": {
"version": "1.0.3", "version": "1.0.3",
@ -2216,9 +2216,9 @@
} }
}, },
"remark-preset-lint-node": { "remark-preset-lint-node": {
"version": "1.4.0", "version": "1.5.0",
"resolved": "https://registry.npmjs.org/remark-preset-lint-node/-/remark-preset-lint-node-1.4.0.tgz", "resolved": "https://registry.npmjs.org/remark-preset-lint-node/-/remark-preset-lint-node-1.5.0.tgz",
"integrity": "sha512-opl2LaTkuSK8DWZXurjl4k9i891rwN/o6IvrZmzyIrWj7p8oL1JrdUo6NBxAr5cKmWokFhEBex5U2DIsQBsiAQ==", "integrity": "sha512-jTcLB5icGf2X4vvkoECIBQydzg1pe3BfG77AA5dta9AFBPuvJhPlh2oPnCdi7DZeEuU7xz2kO9HYedv5wa55xQ==",
"requires": { "requires": {
"remark-lint": "^6.0.0", "remark-lint": "^6.0.0",
"remark-lint-blockquote-indentation": "^1.0.0", "remark-lint-blockquote-indentation": "^1.0.0",