tldr-lint 0.0.18 → 0.0.20
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/lib/tldr-lint.js +1 -1
- package/lib/tldr-parser.js +6 -1
- package/package.json +7 -5
package/lib/tldr-lint.js
CHANGED
|
@@ -18,7 +18,7 @@ module.exports.ERRORS = parser.ERRORS = {
|
|
|
18
18
|
'TLDR010': 'Only Unix-style line endings allowed',
|
|
19
19
|
'TLDR011': 'Page never contains more than a single empty line',
|
|
20
20
|
'TLDR012': 'Page should contain no tabs',
|
|
21
|
-
'TLDR013': 'Title should be alphanumeric with dashes, underscores or
|
|
21
|
+
'TLDR013': 'Title should be alphanumeric with dashes, underscores, spaces or allowed characters',
|
|
22
22
|
'TLDR014': 'Page should contain no trailing whitespace',
|
|
23
23
|
'TLDR015': 'Example descriptions should start with a capital letter',
|
|
24
24
|
'TLDR016': 'Label for information link should be spelled exactly `More information: `',
|
package/lib/tldr-parser.js
CHANGED
|
@@ -700,7 +700,12 @@ break;
|
|
|
700
700
|
case 7:
|
|
701
701
|
if (this.topState() === "title") {
|
|
702
702
|
yy_.yytext = this.matches[1];
|
|
703
|
-
if (
|
|
703
|
+
if (
|
|
704
|
+
/[^\w+\[\]{}!%,^~$:><|?. -]/.test(yy_.yytext) ||
|
|
705
|
+
(yy_.yytext.endsWith('.') && yy_.yytext !== '.' && yy_.yytext !== ' .')
|
|
706
|
+
) {
|
|
707
|
+
yy.error(yy_.yylloc, 'TLDR013');
|
|
708
|
+
}
|
|
704
709
|
this.checkTrailingWhitespace(this.matches[2], yy_.yylloc);
|
|
705
710
|
this.checkNewline(this.matches[3], yy_.yylloc);
|
|
706
711
|
this.popState();
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "tldr-lint",
|
|
3
|
-
"version": "0.0.
|
|
3
|
+
"version": "0.0.20",
|
|
4
4
|
"description": "A linting tool to validate tldr pages",
|
|
5
5
|
"repository": {
|
|
6
6
|
"type": "git",
|
|
@@ -24,8 +24,10 @@
|
|
|
24
24
|
"pages",
|
|
25
25
|
"lint",
|
|
26
26
|
"validate",
|
|
27
|
-
"format"
|
|
27
|
+
"format",
|
|
28
|
+
"linter"
|
|
28
29
|
],
|
|
30
|
+
"homepage": "https://tldr.sh",
|
|
29
31
|
"author": {
|
|
30
32
|
"name": "Ruben Vereecken",
|
|
31
33
|
"email": "rubenvereecken@gmail.com"
|
|
@@ -36,7 +38,7 @@
|
|
|
36
38
|
}
|
|
37
39
|
],
|
|
38
40
|
"engines": {
|
|
39
|
-
"node": ">=
|
|
41
|
+
"node": ">=22"
|
|
40
42
|
},
|
|
41
43
|
"license": "MIT",
|
|
42
44
|
"dependencies": {
|
|
@@ -46,9 +48,9 @@
|
|
|
46
48
|
"concurrently": "^9.1.2",
|
|
47
49
|
"eslint": "^9.17.0",
|
|
48
50
|
"eslint-config-eslint": "^11.0.0",
|
|
49
|
-
"eslint-plugin-jest": "^
|
|
51
|
+
"eslint-plugin-jest": "^29.0.1",
|
|
50
52
|
"husky": "^9.1.7",
|
|
51
|
-
"jest": "^
|
|
53
|
+
"jest": "^30.0.0",
|
|
52
54
|
"jison": "^0.4.18",
|
|
53
55
|
"onchange": "^7.1.0"
|
|
54
56
|
},
|