@@ -30708,72 +30708,99 @@ var remark = unified_1()
30708
30708
.use(remarkStringify)
30709
30709
.freeze();
30710
30710
30711
- const name = "remark";
30712
- const version$1 = "10.0.0";
30713
- const description = "Markdown processor powered by plugins";
30714
- const license = "MIT";
30715
- const keywords = ["markdown","abstract","syntax","tree","ast","parse","stringify","process"];
30716
- const homepage = "http://remark.js.org";
30717
- const repository = "https://github.com/remarkjs/remark/tree/master/packages/remark";
30718
- const bugs = "https://github.com/remarkjs/remark/issues";
30719
- const author = "Titus Wormer <
[email protected] > (http://wooorm.com)";
30720
- const contributors = ["Titus Wormer <
[email protected] > (http://wooorm.com)"];
30721
- const files = ["index.js"];
30711
+ const _args = [["
[email protected] ","/Users/daijiro/Developments/node/tools/node-lint-md-cli-rollup"]];
30712
+ const _from = "
[email protected] ";
30713
+
30714
+ const _inBundle = false;
30715
+ const _integrity = "sha512-0fZvVmd9CgDi1qHGsRTyhpJShw60r3/4OSdRpAx+I7CmE8/Jmt829T9KWHpw2Ygw3chRZ26sMorqb8aIolU9tQ==";
30716
+ const _location = "/remark";
30717
+ const _phantomChildren = {};
30718
+ const _requested = {"type":"version","registry":true,"raw":"
[email protected] ","name":"remark","escapedName":"remark","rawSpec":"10.0.0","saveSpec":null,"fetchSpec":"10.0.0"};
30719
+ const _requiredBy = ["/"];
30720
+ const _resolved = "https://registry.npmjs.org/remark/-/remark-10.0.0.tgz";
30721
+ const _spec = "10.0.0";
30722
+ const _where = "/Users/daijiro/Developments/node/tools/node-lint-md-cli-rollup";
30723
+ const author = {"name":"Titus Wormer","email":"
[email protected] ","url":"http://wooorm.com"};
30724
+ const bugs = {"url":"https://github.com/remarkjs/remark/issues"};
30725
+ const contributors = [{"name":"Titus Wormer","email":"
[email protected] ","url":"http://wooorm.com"}];
30722
30726
const dependencies = {"remark-parse":"^6.0.0","remark-stringify":"^6.0.0","unified":"^7.0.0"};
30727
+ const description = "Markdown processor powered by plugins";
30723
30728
const devDependencies = {"tape":"^4.9.1"};
30729
+ const files = ["index.js"];
30730
+ const homepage = "http://remark.js.org";
30731
+ const keywords = ["markdown","abstract","syntax","tree","ast","parse","stringify","process"];
30732
+ const license = "MIT";
30733
+ const name = "remark";
30734
+ const repository = {"type":"git","url":"https://github.com/remarkjs/remark/tree/master/packages/remark"};
30724
30735
const scripts = {"test":"tape test.js"};
30736
+ const version$1 = "10.0.0";
30725
30737
const xo = false;
30726
- const _resolved = "https://registry.npmjs.org/remark/-/remark-10.0.0.tgz";
30727
- const _integrity = "sha512-0fZvVmd9CgDi1qHGsRTyhpJShw60r3/4OSdRpAx+I7CmE8/Jmt829T9KWHpw2Ygw3chRZ26sMorqb8aIolU9tQ==";
30728
- const _from = "
[email protected] ";
30729
30738
var _package = {
30730
- name: name,
30731
- version: version$1,
30732
- description: description,
30733
- license: license,
30734
- keywords: keywords,
30735
- homepage: homepage,
30736
- repository: repository,
30737
- bugs: bugs,
30739
+ _args: _args,
30740
+ _from: _from,
30741
+ _id: _id,
30742
+ _inBundle: _inBundle,
30743
+ _integrity: _integrity,
30744
+ _location: _location,
30745
+ _phantomChildren: _phantomChildren,
30746
+ _requested: _requested,
30747
+ _requiredBy: _requiredBy,
30748
+ _resolved: _resolved,
30749
+ _spec: _spec,
30750
+ _where: _where,
30738
30751
author: author,
30752
+ bugs: bugs,
30739
30753
contributors: contributors,
30740
- files: files,
30741
30754
dependencies: dependencies,
30755
+ description: description,
30742
30756
devDependencies: devDependencies,
30757
+ files: files,
30758
+ homepage: homepage,
30759
+ keywords: keywords,
30760
+ license: license,
30761
+ name: name,
30762
+ repository: repository,
30743
30763
scripts: scripts,
30744
- xo: xo,
30745
- _resolved: _resolved,
30746
- _integrity: _integrity,
30747
- _from: _from
30764
+ version: version$1,
30765
+ xo: xo
30748
30766
};
30749
30767
30750
30768
var _package$1 = Object.freeze({
30751
- name: name,
30752
- version: version$1,
30753
- description: description,
30754
- license: license,
30755
- keywords: keywords,
30756
- homepage: homepage,
30757
- repository: repository,
30758
- bugs: bugs,
30769
+ _args: _args,
30770
+ _from: _from,
30771
+ _id: _id,
30772
+ _inBundle: _inBundle,
30773
+ _integrity: _integrity,
30774
+ _location: _location,
30775
+ _phantomChildren: _phantomChildren,
30776
+ _requested: _requested,
30777
+ _requiredBy: _requiredBy,
30778
+ _resolved: _resolved,
30779
+ _spec: _spec,
30780
+ _where: _where,
30759
30781
author: author,
30782
+ bugs: bugs,
30760
30783
contributors: contributors,
30761
- files: files,
30762
30784
dependencies: dependencies,
30785
+ description: description,
30763
30786
devDependencies: devDependencies,
30787
+ files: files,
30788
+ homepage: homepage,
30789
+ keywords: keywords,
30790
+ license: license,
30791
+ name: name,
30792
+ repository: repository,
30764
30793
scripts: scripts,
30794
+ version: version$1,
30765
30795
xo: xo,
30766
- _resolved: _resolved,
30767
- _integrity: _integrity,
30768
- _from: _from,
30769
30796
default: _package
30770
30797
});
30771
30798
30772
30799
const name$1 = "node-lint-md-cli-rollup";
30773
30800
const description$1 = "remark packaged for node markdown linting";
30774
30801
const version$2 = "1.0.0";
30775
30802
const devDependencies$1 = {"rollup":"^0.55.5","rollup-plugin-commonjs":"^8.0.2","rollup-plugin-json":"^2.3.1","rollup-plugin-node-resolve":"^3.4.0"};
30776
- const dependencies$1 = {"markdown-extensions":"^1.1.0","remark":"^10.0.0","remark-lint":"^6.0.3","remark-preset-lint-node":"^1.2.0 ","unified-args":"^6.0.0","unified-engine":"^5.1.0"};
30803
+ const dependencies$1 = {"markdown-extensions":"^1.1.0","remark":"^10.0.0","remark-lint":"^6.0.3","remark-preset-lint-node":"^1.3.1 ","unified-args":"^6.0.0","unified-engine":"^5.1.0"};
30777
30804
const scripts$1 = {"build":"rollup -c","build-node":"npm run build && cp dist/* .."};
30778
30805
var _package$2 = {
30779
30806
name: name$1,
@@ -32692,50 +32719,56 @@ function noAutoLinkWithoutProtocol(tree, file) {
32692
32719
}
32693
32720
}
32694
32721
32695
- var remarkLintNoBlockquoteWithoutCaret = unifiedLintRule('remark-lint:no-blockquote-without-caret', noBlockquoteWithoutCaret);
32722
+ var remarkLintNoBlockquoteWithoutMarker = unifiedLintRule(
32723
+ 'remark-lint:no-blockquote-without-marker',
32724
+ noBlockquoteWithoutMarker
32725
+ );
32726
+
32727
+ var reason$4 = 'Missing marker in blockquote';
32696
32728
32697
- function noBlockquoteWithoutCaret(ast , file) {
32698
- var contents = file.toString( );
32729
+ function noBlockquoteWithoutMarker(tree , file) {
32730
+ var contents = String(file );
32699
32731
var location = vfileLocation(file);
32700
32732
var last = contents.length;
32701
32733
32702
- unistUtilVisit(ast , 'blockquote', visitor);
32734
+ unistUtilVisit(tree , 'blockquote', visitor);
32703
32735
32704
32736
function visitor(node) {
32705
- var start = unistUtilPosition.start(node).line;
32706
32737
var indent = node.position && node.position.indent;
32738
+ var start;
32739
+ var length;
32740
+ var index;
32741
+ var line;
32742
+ var offset;
32743
+ var character;
32744
+ var pos;
32707
32745
32708
32746
if (unistUtilGenerated(node) || !indent || indent.length === 0) {
32709
- return;
32747
+ return
32710
32748
}
32711
32749
32712
- indent.forEach(eachLine);
32750
+ start = unistUtilPosition.start(node).line;
32751
+ length = indent.length;
32752
+ index = -1;
32713
32753
32714
- function eachLine(column, n) {
32715
- var character;
32716
- var line = start + n + 1;
32717
- var offset = location.toOffset({
32718
- line: line,
32719
- column: column
32720
- }) - 1;
32754
+ while (++index < length) {
32755
+ line = start + index + 1;
32756
+ pos = {line: line, column: indent[index]};
32757
+ offset = location.toOffset(pos) - 1;
32721
32758
32722
32759
while (++offset < last) {
32723
32760
character = contents.charAt(offset);
32724
32761
32725
32762
if (character === '>') {
32726
- return;
32763
+ break
32727
32764
}
32728
32765
32729
32766
/* istanbul ignore else - just for safety */
32730
32767
if (character !== ' ' && character !== '\t') {
32731
- break;
32768
+ file.message(reason$4, pos);
32769
+ break
32732
32770
}
32733
32771
}
32734
-
32735
- file.message('Missing caret in blockquote', {
32736
- line: line,
32737
- column: column
32738
- });
32739
32772
}
32740
32773
}
32741
32774
}
@@ -32745,7 +32778,7 @@ var remarkLintNoDuplicateDefinitions = unifiedLintRule(
32745
32778
noDuplicateDefinitions
32746
32779
);
32747
32780
32748
- var reason$4 = 'Do not use definitions with the same identifier';
32781
+ var reason$5 = 'Do not use definitions with the same identifier';
32749
32782
32750
32783
function noDuplicateDefinitions(tree, file) {
32751
32784
var map = {};
@@ -32762,7 +32795,7 @@ function noDuplicateDefinitions(tree, file) {
32762
32795
32763
32796
if (duplicate && duplicate.type) {
32764
32797
file.message(
32765
- reason$4 + ' (' + unistUtilStringifyPosition(unistUtilPosition.start(duplicate)) + ')',
32798
+ reason$5 + ' (' + unistUtilStringifyPosition(unistUtilPosition.start(duplicate)) + ')',
32766
32799
node
32767
32800
);
32768
32801
}
@@ -32787,11 +32820,11 @@ var remarkLintNoFileNameConsecutiveDashes = unifiedLintRule(
32787
32820
noFileNameConsecutiveDashes
32788
32821
);
32789
32822
32790
- var reason$5 = 'Do not use consecutive dashes in a file name';
32823
+ var reason$6 = 'Do not use consecutive dashes in a file name';
32791
32824
32792
32825
function noFileNameConsecutiveDashes(tree, file) {
32793
32826
if (file.stem && /-{2,}/.test(file.stem)) {
32794
- file.message(reason$5 );
32827
+ file.message(reason$6 );
32795
32828
}
32796
32829
}
32797
32830
@@ -32800,11 +32833,11 @@ var remarkLintNoFileNameOuterDashes = unifiedLintRule(
32800
32833
noFileNameOuterDashes
32801
32834
);
32802
32835
32803
- var reason$6 = 'Do not use initial or final dashes in a file name';
32836
+ var reason$7 = 'Do not use initial or final dashes in a file name';
32804
32837
32805
32838
function noFileNameOuterDashes(tree, file) {
32806
32839
if (file.stem && /^-|-$/.test(file.stem)) {
32807
- file.message(reason$6 );
32840
+ file.message(reason$7 );
32808
32841
}
32809
32842
}
32810
32843
@@ -33043,7 +33076,7 @@ function noMultipleToplevelHeadings(tree, file, pref) {
33043
33076
33044
33077
var remarkLintNoShellDollars = unifiedLintRule('remark-lint:no-shell-dollars', noShellDollars);
33045
33078
33046
- var reason$7 = 'Do not use dollar signs before shell-commands';
33079
+ var reason$8 = 'Do not use dollar signs before shell-commands';
33047
33080
33048
33081
/* List of shell script file extensions (also used as code
33049
33082
* flags for syntax highlighting on GitHub):
@@ -33089,7 +33122,7 @@ function noShellDollars(tree, file) {
33089
33122
}
33090
33123
}
33091
33124
33092
- file.message(reason$7 , node);
33125
+ file.message(reason$8 , node);
33093
33126
}
33094
33127
}
33095
33128
}
@@ -33099,21 +33132,21 @@ var remarkLintNoShortcutReferenceImage = unifiedLintRule(
33099
33132
noShortcutReferenceImage
33100
33133
);
33101
33134
33102
- var reason$8 = 'Use the trailing [] on reference images';
33135
+ var reason$9 = 'Use the trailing [] on reference images';
33103
33136
33104
33137
function noShortcutReferenceImage(tree, file) {
33105
33138
unistUtilVisit(tree, 'imageReference', visitor);
33106
33139
33107
33140
function visitor(node) {
33108
33141
if (!unistUtilGenerated(node) && node.referenceType === 'shortcut') {
33109
- file.message(reason$8 , node);
33142
+ file.message(reason$9 , node);
33110
33143
}
33111
33144
}
33112
33145
}
33113
33146
33114
33147
var remarkLintNoTableIndentation = unifiedLintRule('remark-lint:no-table-indentation', noTableIndentation);
33115
33148
33116
- var reason$9 = 'Do not indent table rows';
33149
+ var reason$10 = 'Do not indent table rows';
33117
33150
33118
33151
function noTableIndentation(tree, file) {
33119
33152
var contents = String(file);
@@ -33135,29 +33168,52 @@ function noTableIndentation(tree, file) {
33135
33168
);
33136
33169
33137
33170
if (fence.indexOf('|') > 1) {
33138
- file.message(reason$9 , row);
33171
+ file.message(reason$10 , row);
33139
33172
}
33140
33173
}
33141
33174
}
33142
33175
33143
33176
var remarkLintNoTabs = unifiedLintRule('remark-lint:no-tabs', noTabs);
33144
33177
33145
- var reason$10 = 'Use spaces instead of hard-tabs';
33178
+ var reason$11 = 'Use spaces instead of hard-tabs';
33146
33179
33147
33180
function noTabs(tree, file) {
33148
33181
var content = String(file);
33149
33182
var position = vfileLocation(file).toPosition;
33150
33183
var index = content.indexOf('\t');
33151
33184
33152
33185
while (index !== -1) {
33153
- file.message(reason$10 , position(index));
33186
+ file.message(reason$11 , position(index));
33154
33187
index = content.indexOf('\t', index + 1);
33155
33188
}
33156
33189
}
33157
33190
33191
+ var remarkLintNoTrailingSpaces = unifiedLintRule('remark-lint:no-trailing-spaces', noTrailingSpaces);
33192
+
33193
+ /**
33194
+ * Lines that are just space characters are not present in
33195
+ * the AST, which is why we loop through lines manually.
33196
+ */
33197
+
33198
+ function noTrailingSpaces(ast, file) {
33199
+ var lines = file.toString().split('\n');
33200
+ for (var i = 0; i < lines.length; i++) {
33201
+ var currentLine = lines[i];
33202
+ var lineIndex = i + 1;
33203
+ if (/\s$/.test(currentLine)) {
33204
+ file.message('Remove trailing whitespace', {
33205
+ position: {
33206
+ start: { line: lineIndex, column: currentLine.length + 1 },
33207
+ end: { line: lineIndex }
33208
+ }
33209
+ });
33210
+ }
33211
+ }
33212
+ }
33213
+
33158
33214
var remarkLintNoUnusedDefinitions = unifiedLintRule('remark-lint:no-unused-definitions', noUnusedDefinitions);
33159
33215
33160
- var reason$11 = 'Found unused definition';
33216
+ var reason$12 = 'Found unused definition';
33161
33217
33162
33218
function noUnusedDefinitions(tree, file) {
33163
33219
var map = {};
@@ -33171,7 +33227,7 @@ function noUnusedDefinitions(tree, file) {
33171
33227
entry = map[identifier];
33172
33228
33173
33229
if (!entry.used) {
33174
- file.message(reason$11 , entry.node);
33230
+ file.message(reason$12 , entry.node);
33175
33231
}
33176
33232
}
33177
33233
@@ -33789,7 +33845,7 @@ var plugins$1 = [
33789
33845
],
33790
33846
remarkLintMaximumLineLength,
33791
33847
remarkLintNoAutoLinkWithoutProtocol,
33792
- remarkLintNoBlockquoteWithoutCaret ,
33848
+ remarkLintNoBlockquoteWithoutMarker ,
33793
33849
remarkLintNoDuplicateDefinitions,
33794
33850
remarkLintNoFileNameArticles,
33795
33851
remarkLintNoFileNameConsecutiveDashes,
@@ -33802,6 +33858,7 @@ var plugins$1 = [
33802
33858
remarkLintNoShortcutReferenceImage,
33803
33859
remarkLintNoTableIndentation,
33804
33860
remarkLintNoTabs,
33861
+ remarkLintNoTrailingSpaces,
33805
33862
remarkLintNoUnusedDefinitions,
33806
33863
remarkLintRuleStyle,
33807
33864
remarkLintTablePipes,
0 commit comments