Skip to content

Commit 7fde792

Browse files
committed
Update for changes in [email protected]
1 parent 6381e62 commit 7fde792

File tree

7 files changed

+16
-12
lines changed

7 files changed

+16
-12
lines changed

doc/rules.md

+2
Original file line numberDiff line numberDiff line change
@@ -1171,6 +1171,8 @@ Options: `boolean`, default: `false`.
11711171

11721172
Warn when the horizontal rules violate a given or detected style.
11731173

1174+
Note that horizontal rules are also called “thematic break”.
1175+
11741176
Options: `string`, either a valid markdown rule, or `consistent`,
11751177
default: `'consistent'`.
11761178

lib/rules/no-literal-urls.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,7 @@ function noLiteralURLs(ast, file, preferred, done) {
6161
if (
6262
initial === head &&
6363
final === tail &&
64-
(value === node.href || value == MAILTO + node.href)
64+
(value === node.url || value == MAILTO + node.url)
6565
) {
6666
file.warn('Don’t use literal URLs without angle brackets', node);
6767
}

lib/rules/no-missing-blank-lines.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@ function isApplicable(node) {
4343
'html',
4444
'list',
4545
'table',
46-
'horizontalRule'
46+
'thematicBreak'
4747
].indexOf(node.type) !== -1;
4848
}
4949

lib/rules/rule-style.js

+4-2
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,8 @@
66
* @fileoverview
77
* Warn when the horizontal rules violate a given or detected style.
88
*
9+
* Note that horizontal rules are also called “thematic break”.
10+
*
911
* Options: `string`, either a valid markdown rule, or `consistent`,
1012
* default: `'consistent'`.
1113
* @example
@@ -71,7 +73,7 @@ function ruleStyle(ast, file, preferred, done) {
7173
return;
7274
}
7375

74-
visit(ast, 'horizontalRule', function (node) {
76+
visit(ast, 'thematicBreak', function (node) {
7577
var initial = start(node).offset;
7678
var final = end(node).offset;
7779
var hr;
@@ -84,7 +86,7 @@ function ruleStyle(ast, file, preferred, done) {
8486

8587
if (preferred) {
8688
if (hr !== preferred) {
87-
file.warn('Horizontal rules should use `' + preferred + '`', node);
89+
file.warn('Rules should use `' + preferred + '`', node);
8890
}
8991
} else {
9092
preferred = hr;

package.json

+4-4
Original file line numberDiff line numberDiff line change
@@ -39,10 +39,10 @@
3939
"istanbul": "^0.4.0",
4040
"jscs": "^2.0.0",
4141
"jscs-jsdoc": "^1.0.0",
42-
"remark": "^3.0.0",
43-
"remark-comment-config": "^2.0.0",
44-
"remark-github": "^4.0.0",
45-
"remark-toc": "^2.0.0",
42+
"remark": "^4.0.0-alpha.4",
43+
"remark-comment-config": "^3.0.0",
44+
"remark-github": "^4.0.1",
45+
"remark-toc": "^3.0.0",
4646
"remark-validate-links": "^2.0.0",
4747
"mocha": "^2.0.0",
4848
"vfile": "^1.0.0"

script/build-rule-documentation.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -89,7 +89,7 @@ children.push(
8989
},
9090
{
9191
'type': 'link',
92-
'href': 'https://github.com/wooorm/remark-lint#list-of-external-rules',
92+
'url': 'https://github.com/wooorm/remark-lint#list-of-external-rules',
9393
'children': [{
9494
'type': 'text',
9595
'value': 'list of external rules'

test/index.js

+3-3
Original file line numberDiff line numberDiff line change
@@ -1658,9 +1658,9 @@ describe('Rules', function () {
16581658

16591659
describeSetting(true, function () {
16601660
assertFile('rule-style-invalid.md', [
1661-
'rule-style-invalid.md:7:1-7:10: Horizontal rules should use `* * * *`',
1662-
'rule-style-invalid.md:11:1-11:6: Horizontal rules should use `* * * *`',
1663-
'rule-style-invalid.md:15:1-15:5: Horizontal rules should use `* * * *`'
1661+
'rule-style-invalid.md:7:1-7:10: Rules should use `* * * *`',
1662+
'rule-style-invalid.md:11:1-11:6: Rules should use `* * * *`',
1663+
'rule-style-invalid.md:15:1-15:5: Rules should use `* * * *`'
16641664
]);
16651665

16661666
assertFile('rule-style-valid.md', []);

0 commit comments

Comments
 (0)