mirror of
https://github.com/nodejs/node.git
synced 2026-11-27 17:52:27 -05:00
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>
This commit is contained in:
1 parent
f663e74d0b
commit
a8a11862e0
3 files changed
+12
-12
No files matched your search
+1
-1
@@ -1 +1 @@
|
||||
module.exports=function(e,r){"use strict";var t={};function __webpack_require__(r){if(t[r]){return t[r].exports}var i=t[r]={i:r,l:false,exports:{}};e[r].call(i.exports,i,i.exports,__webpack_require__);i.l=true;return i.exports}function startup(){return __webpack_require__(294)}r(__webpack_require__);return startup()}([,function(e){"use strict";e.exports=indentation;var r="\t";var t=" ";var i=1;var n=4;function indentation(e){var a=0;var u=0;var s=e.charAt(a);var o={};var f;while(s===r||s===t){f=s===r?n:i;u+=f;if(f>1){u=Math.floor(u/f)*f}o[u]=a;s=e.charAt(++a)}return{indent:u,stops:o}}},function(e){"use strict";e.exports=locate;function locate(e,r){return e.indexOf("`",r)}},,,,,function(e){"use strict";e.exports=factory;function factory(e){var r=indices(String(e));return{toPosition:offsetToPositionFactory(r),toOffset:positionToOffsetFactory(r)}}function offsetToPositionFactory(e){return offsetToPosition;function offsetToPosition(r){var t=-1;var i=e.length;if(r<0){return{}}while(++t<i){if(e[t]>r){return{line:t+1,column:r-(e[t-1]||0)+1,offset:r}}}return{}}}function positionToOffsetFactory(e){return positionToOffset;function positionToOffset(r){var t=r&&r.line;var i=r&&r.column;if(!isNaN(t)&&!isNaN(i)&&t-1 in e){return(e[t-2]||0)+i-1||0}return-1}}function indices(e){var r=[];var t=e.indexOf("\n");while(t!==-1){r.push(t+1);t=e.indexOf("\n",t+1)}r.push(e.length+1);return r}},,function(e,r,t){"use strict";var i=t(495);var n=t(682);var a=t(526);var u=t(10);e.exports=i("remark-lint:no-inline-padding",noInlinePadding);function noInlinePadding(e,r){n(e,["emphasis","strong","delete","image","link"],visitor);function visitor(e){var t;if(!a(e)){t=u(e);if(t.charAt(0)===" "||t.charAt(t.length-1)===" "){r.message("Don’t pad `"+e.type+"` with inner spaces",e)}}}}},function(e){"use strict";e.exports=toString;function toString(e){return valueOf(e)||e.children&&e.children.map(toString).join("")||""}function valueOf(e){return(e&&e.value?e.value:e.alt?e.alt:e.title)||""}},,function(e){"use strict";if(!process.version||process.version.indexOf("v0.")===0||process.version.indexOf("v1.")===0&&process.version.indexOf("v1.8.")!==0){e.exports={nextTick:nextTick}}else{e.exports=process}function nextTick(e,r,t,i){if(typeof e!=="function"){throw new TypeError('"callback" argument must be a function')}var n=arguments.length;var a,u;switch(n){case 0:case 1:return process.nextTick(e);case 2:return process.nextTick(function afterTickOne(){e.call(null,r)});case 3:return process.nextTick(function afterTickTwo(){e.call(null,r,t)});case 4:return process.nextTick(function afterTickThree(){e.call(null,r,t,i)});default:a=new Array(n-1);u=0;while(u<a.length){a[u++]=arguments[u]}return process.nextTick(function afterTick(){e.apply(null,a)})}}},,,,function(e){e.exports=wrappy;function wrappy(e,r){if(e&&r)return wrappy(e)(r);if(typeof e!=="function")throw new TypeError("need wrapper function");Object.keys(e).forEach(function(r){wrapper[r]=e[r]});return wrapper;function wrapper(){var r=new Array(arguments.length);for(var t=0;t<r.length;t++){r[t]=arguments[t]}var i=e.apply(this,r);var n=r[r.length-1];if(typeof i==="function"&&i!==n){Object.keys(n).forEach(function(e){i[e]=n[e]})}return i}}},,,,function(e){e.exports=function(e,t){var i=[];for(var n=0;n<e.length;n++){var a=t(e[n],n);if(r(a))i.push.apply(i,a);else i.push(a)}return i};var r=Array.isArray||function(e){return Object.prototype.toString.call(e)==="[object Array]"}},,,,,function(e){"use strict";e.exports=hexadecimal;function hexadecimal(e){var r=typeof e==="string"?e.charCodeAt(0):e;return r>=97&&r<=102||r>=65&&r<=70||r>=48&&r<=57}},,function(e,r,t){"use strict";var i=t(431);function homedir(){var e=process.env;var r=e.HOME;var t=e.LOGNAME||e.USER||e.LNAME||e.USERNAME;if(process.platform==="win32"){return e.USERPROFILE||e.HOMEDRIVE+e.HOMEPATH||r||null}if(process.platform==="darwin"){return r||(t?"/Users/"+t:null)}if(process.platform==="linux"){return r||(process.getuid()===0?"/root":t?"/home/"+t:null)}return r||null}e.exports=typeof i.homedir==="function"?i.homedir:homedir},,,,,,function(e,r,t){"use strict";var i=t(495);var n=t(682);var a=t(270);var u=t(704);var s=t(839);var o=t(526);e.exports=i("remark-lint:no-heading-content-indent",noHeadingContentIndent);var f=s.start;var l=s.end;function noHeadingContentIndent(e,r){var t=String(r);n(e,"heading",visitor);function visitor(e){var i;var n;var s;var c;var h;var p;var v;var d;var D;var m;if(o(e)){return}i=e.depth;n=e.children;s=a(e,"atx");if(s==="atx"||s==="atx-closed"){h=f(e);d=h.offset;D=t.charAt(d);while(D&&D!=="#"){D=t.charAt(++d)}if(!D){return}d=i+(d-h.offset);c=f(n[0]).column;if(!c){return}v=c-h.column-1-d;if(v){m=(v>0?"Remove":"Add")+" "+Math.abs(v)+" "+u("space",v)+" before this heading’s content";r.message(m,f(n[0]))}}if(s==="atx-closed"){p=l(n[n.length-1]);v=l(e).column-p.column-1-i;if(v){m="Remove "+v+" "+u("space",v)+" after this heading’s content";r.message(m,p)}}}}},function(e,r,t){"use strict";var i=t(336);var n=t(440);var a=t(Line truncated
|
||||
module.exports=function(e,r){"use strict";var t={};function __webpack_require__(r){if(t[r]){return t[r].exports}var i=t[r]={i:r,l:false,exports:{}};e[r].call(i.exports,i,i.exports,__webpack_require__);i.l=true;return i.exports}function startup(){return __webpack_require__(294)}r(__webpack_require__);return startup()}([,function(e){"use strict";e.exports=indentation;var r="\t";var t=" ";var i=1;var n=4;function indentation(e){var a=0;var u=0;var s=e.charAt(a);var o={};var f;while(s===r||s===t){f=s===r?n:i;u+=f;if(f>1){u=Math.floor(u/f)*f}o[u]=a;s=e.charAt(++a)}return{indent:u,stops:o}}},function(e){"use strict";e.exports=locate;function locate(e,r){return e.indexOf("`",r)}},,,,,function(e){"use strict";e.exports=factory;function factory(e){var r=indices(String(e));return{toPosition:offsetToPositionFactory(r),toOffset:positionToOffsetFactory(r)}}function offsetToPositionFactory(e){return offsetToPosition;function offsetToPosition(r){var t=-1;var i=e.length;if(r<0){return{}}while(++t<i){if(e[t]>r){return{line:t+1,column:r-(e[t-1]||0)+1,offset:r}}}return{}}}function positionToOffsetFactory(e){return positionToOffset;function positionToOffset(r){var t=r&&r.line;var i=r&&r.column;if(!isNaN(t)&&!isNaN(i)&&t-1 in e){return(e[t-2]||0)+i-1||0}return-1}}function indices(e){var r=[];var t=e.indexOf("\n");while(t!==-1){r.push(t+1);t=e.indexOf("\n",t+1)}r.push(e.length+1);return r}},,function(e,r,t){"use strict";var i=t(495);var n=t(682);var a=t(526);var u=t(10);e.exports=i("remark-lint:no-inline-padding",noInlinePadding);function noInlinePadding(e,r){n(e,["emphasis","strong","delete","image","link"],visitor);function visitor(e){var t;if(!a(e)){t=u(e);if(t.charAt(0)===" "||t.charAt(t.length-1)===" "){r.message("Don’t pad `"+e.type+"` with inner spaces",e)}}}}},function(e){"use strict";e.exports=toString;function toString(e){return valueOf(e)||e.children&&e.children.map(toString).join("")||""}function valueOf(e){return(e&&e.value?e.value:e.alt?e.alt:e.title)||""}},,function(e){"use strict";if(!process.version||process.version.indexOf("v0.")===0||process.version.indexOf("v1.")===0&&process.version.indexOf("v1.8.")!==0){e.exports={nextTick:nextTick}}else{e.exports=process}function nextTick(e,r,t,i){if(typeof e!=="function"){throw new TypeError('"callback" argument must be a function')}var n=arguments.length;var a,u;switch(n){case 0:case 1:return process.nextTick(e);case 2:return process.nextTick(function afterTickOne(){e.call(null,r)});case 3:return process.nextTick(function afterTickTwo(){e.call(null,r,t)});case 4:return process.nextTick(function afterTickThree(){e.call(null,r,t,i)});default:a=new Array(n-1);u=0;while(u<a.length){a[u++]=arguments[u]}return process.nextTick(function afterTick(){e.apply(null,a)})}}},,,,function(e){e.exports=wrappy;function wrappy(e,r){if(e&&r)return wrappy(e)(r);if(typeof e!=="function")throw new TypeError("need wrapper function");Object.keys(e).forEach(function(r){wrapper[r]=e[r]});return wrapper;function wrapper(){var r=new Array(arguments.length);for(var t=0;t<r.length;t++){r[t]=arguments[t]}var i=e.apply(this,r);var n=r[r.length-1];if(typeof i==="function"&&i!==n){Object.keys(n).forEach(function(e){i[e]=n[e]})}return i}}},,,,function(e){e.exports=function(e,t){var i=[];for(var n=0;n<e.length;n++){var a=t(e[n],n);if(r(a))i.push.apply(i,a);else i.push(a)}return i};var r=Array.isArray||function(e){return Object.prototype.toString.call(e)==="[object Array]"}},,,,,function(e){"use strict";e.exports=hexadecimal;function hexadecimal(e){var r=typeof e==="string"?e.charCodeAt(0):e;return r>=97&&r<=102||r>=65&&r<=70||r>=48&&r<=57}},,function(e,r,t){"use strict";var i=t(431);function homedir(){var e=process.env;var r=e.HOME;var t=e.LOGNAME||e.USER||e.LNAME||e.USERNAME;if(process.platform==="win32"){return e.USERPROFILE||e.HOMEDRIVE+e.HOMEPATH||r||null}if(process.platform==="darwin"){return r||(t?"/Users/"+t:null)}if(process.platform==="linux"){return r||(process.getuid()===0?"/root":t?"/home/"+t:null)}return r||null}e.exports=typeof i.homedir==="function"?i.homedir:homedir},,,,,,function(e,r,t){"use strict";var i=t(495);var n=t(682);var a=t(270);var u=t(704);var s=t(839);var o=t(526);e.exports=i("remark-lint:no-heading-content-indent",noHeadingContentIndent);var f=s.start;var l=s.end;function noHeadingContentIndent(e,r){var t=String(r);n(e,"heading",visitor);function visitor(e){var i;var n;var s;var c;var h;var p;var v;var d;var D;var m;if(o(e)){return}i=e.depth;n=e.children;s=a(e,"atx");if(s==="atx"||s==="atx-closed"){h=f(e);d=h.offset;D=t.charAt(d);while(D&&D!=="#"){D=t.charAt(++d)}if(!D){return}d=i+(d-h.offset);c=f(n[0]).column;if(!c){return}v=c-h.column-1-d;if(v){m=(v>0?"Remove":"Add")+" "+Math.abs(v)+" "+u("space",v)+" before this heading’s content";r.message(m,f(n[0]))}}if(s==="atx-closed"){p=l(n[n.length-1]);v=l(e).column-p.column-1-i;if(v){m="Remove "+v+" "+u("space",v)+" after this heading’s content";r.message(m,p)}}}}},function(e,r,t){"use strict";var i=t(336);var n=t(440);var a=t(Line truncated
|
||||
+10
-10
@@ -1712,9 +1712,9 @@
|
||||
"integrity": "sha1-F0uSaHNVNP+8es5r9TpanhtcX18="
|
||||
},
|
||||
"plur": {
|
||||
"version": "3.0.1",
|
||||
"resolved": "https://registry.npmjs.org/plur/-/plur-3.0.1.tgz",
|
||||
"integrity": "sha512-lJl0ojUynAM1BZn58Pas2WT/TXeC1+bS+UqShl0x9+49AtOn7DixRXVzaC8qrDOIxNDmepKnLuMTH7NQmkX0PA==",
|
||||
"version": "3.1.1",
|
||||
"resolved": "https://registry.npmjs.org/plur/-/plur-3.1.1.tgz",
|
||||
"integrity": "sha512-t1Ax8KUvV3FFII8ltczPn2tJdjqbd1sIzu6t4JL7nQ3EyeL/lTrj5PWKb06ic5/6XYDr65rQ4uzQEGN70/6X5w==",
|
||||
"requires": {
|
||||
"irregular-plurals": "^2.0.0"
|
||||
}
|
||||
@@ -2103,9 +2103,9 @@
|
||||
}
|
||||
},
|
||||
"remark-lint-no-trailing-spaces": {
|
||||
"version": "2.0.0",
|
||||
"resolved": "https://registry.npmjs.org/remark-lint-no-trailing-spaces/-/remark-lint-no-trailing-spaces-2.0.0.tgz",
|
||||
"integrity": "sha512-UVb0xAFO5lsa/kRNC/qHOz7GuF91TjW7hk+m8hUircj1Nh53BP9rH24DJ/NVPF1Ve+u5k+pfOTJPqJcvD0zgUw==",
|
||||
"version": "2.0.1",
|
||||
"resolved": "https://registry.npmjs.org/remark-lint-no-trailing-spaces/-/remark-lint-no-trailing-spaces-2.0.1.tgz",
|
||||
"integrity": "sha512-cj8t+nvtO6eAY2lJC7o5du8VeOCK13XiDUHL4U6k5aw6ZLr3EYWbQ/rNc6cr60eHkh5Ldm09KiZjV3CWpxqJ0g==",
|
||||
"requires": {
|
||||
"unified-lint-rule": "^1.0.2"
|
||||
}
|
||||
@@ -2206,9 +2206,9 @@
|
||||
}
|
||||
},
|
||||
"remark-preset-lint-node": {
|
||||
"version": "1.6.0",
|
||||
"resolved": "https://registry.npmjs.org/remark-preset-lint-node/-/remark-preset-lint-node-1.6.0.tgz",
|
||||
"integrity": "sha512-2aMruLIudApA+WMWkFHFaYog2KTvLj1abSI1ulhAug6ibsjUg7AcHtipjdx9jzfSHVGYCmAINujFme50P0bOVw==",
|
||||
"version": "1.6.1",
|
||||
"resolved": "https://registry.npmjs.org/remark-preset-lint-node/-/remark-preset-lint-node-1.6.1.tgz",
|
||||
"integrity": "sha512-IPI6twjHjGwiqPU8CS2MybL/kXwhmtfS42Ovrp6bw9w3nZg6y0EbsrvpBOBNiJpWMG9NP0sKpRCzkfqx39Jyxw==",
|
||||
"requires": {
|
||||
"remark-lint": "^6.0.0",
|
||||
"remark-lint-blockquote-indentation": "^1.0.0",
|
||||
@@ -2240,7 +2240,7 @@
|
||||
"remark-lint-no-shortcut-reference-image": "^1.0.0",
|
||||
"remark-lint-no-table-indentation": "^1.0.0",
|
||||
"remark-lint-no-tabs": "^1.0.0",
|
||||
"remark-lint-no-trailing-spaces": "^2.0.0",
|
||||
"remark-lint-no-trailing-spaces": "^2.0.1",
|
||||
"remark-lint-no-unused-definitions": "^1.0.0",
|
||||
"remark-lint-prohibited-strings": "^1.1.0",
|
||||
"remark-lint-rule-style": "^1.0.0",
|
||||
|
||||
@@ -9,7 +9,7 @@
|
||||
"markdown-extensions": "^1.1.1",
|
||||
"remark": "^10.0.1",
|
||||
"remark-lint": "^6.0.4",
|
||||
"remark-preset-lint-node": "^1.6.0",
|
||||
"remark-preset-lint-node": "^1.6.1",
|
||||
"unified-args": "^6.0.0",
|
||||
"unified-engine": "^6.0.1"
|
||||
},
|
||||
|
||||
Reference in new issue
Block a user