@shuvi/eslint-plugin-shuvi 1.0.23 → 1.0.24
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.
|
@@ -1,12 +1,15 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.url = void 0;
|
|
3
4
|
const define_rule_1 = require("../utils/define-rule");
|
|
5
|
+
exports.url = 'https://shuvijs.github.io/shuvijs.org/docs/guides/rules/no-html-link-for-pages';
|
|
4
6
|
exports.default = (0, define_rule_1.defineRule)({
|
|
5
7
|
meta: {
|
|
6
8
|
docs: {
|
|
7
9
|
description: 'Prevent usage of `<head>` element.',
|
|
8
10
|
category: 'HTML',
|
|
9
|
-
recommended: true
|
|
11
|
+
recommended: true,
|
|
12
|
+
url: exports.url
|
|
10
13
|
},
|
|
11
14
|
type: 'problem',
|
|
12
15
|
schema: []
|
|
@@ -24,7 +27,7 @@ exports.default = (0, define_rule_1.defineRule)({
|
|
|
24
27
|
}
|
|
25
28
|
context.report({
|
|
26
29
|
node,
|
|
27
|
-
message: `Do not use \`<head>\` element. Use \`<Head />\` from \`shuvi/runtime\` instead
|
|
30
|
+
message: `Do not use \`<head>\` element. Use \`<Head />\` from \`shuvi/runtime\` instead. See: ${exports.url}`
|
|
28
31
|
});
|
|
29
32
|
}
|
|
30
33
|
};
|
|
@@ -23,6 +23,7 @@ var __importStar = (this && this.__importStar) || function (mod) {
|
|
|
23
23
|
return result;
|
|
24
24
|
};
|
|
25
25
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
26
|
+
exports.url = void 0;
|
|
26
27
|
const define_rule_1 = require("../utils/define-rule");
|
|
27
28
|
const path = __importStar(require("path"));
|
|
28
29
|
const fs = __importStar(require("fs"));
|
|
@@ -35,12 +36,14 @@ const pagesDirWarning = (0, url_1.execOnce)(pagesDirs => {
|
|
|
35
36
|
// Cache for fs.existsSync lookup.
|
|
36
37
|
// Prevent multiple blocking IO requests that have already been calculated.
|
|
37
38
|
const fsExistsSyncCache = {};
|
|
39
|
+
exports.url = 'https://shuvijs.github.io/shuvijs.org/docs/guides/rules/no-html-link-for-pages';
|
|
38
40
|
exports.default = (0, define_rule_1.defineRule)({
|
|
39
41
|
meta: {
|
|
40
42
|
docs: {
|
|
41
43
|
description: 'Prevent usage of `<a>` elements to navigate to internal Shuvi.js pages.',
|
|
42
44
|
category: 'HTML',
|
|
43
|
-
recommended: true
|
|
45
|
+
recommended: true,
|
|
46
|
+
url: exports.url
|
|
44
47
|
},
|
|
45
48
|
type: 'problem',
|
|
46
49
|
schema: [
|
|
@@ -115,7 +118,7 @@ exports.default = (0, define_rule_1.defineRule)({
|
|
|
115
118
|
if (match) {
|
|
116
119
|
context.report({
|
|
117
120
|
node,
|
|
118
|
-
message: `Do not use an \`<a>\` element to navigate to \`${hrefPath}\`. Use \`<Link />\` from \`shuvi/runtime\` instead
|
|
121
|
+
message: `Do not use an \`<a>\` element to navigate to \`${hrefPath}\`. Use \`<Link />\` from \`shuvi/runtime\` instead. See: ${exports.url}`
|
|
119
122
|
});
|
|
120
123
|
}
|
|
121
124
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@shuvi/eslint-plugin-shuvi",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.24",
|
|
4
4
|
"description": "ESLint plugin for Shuvi.",
|
|
5
5
|
"main": "lib/index.js",
|
|
6
6
|
"license": "MIT",
|
|
@@ -18,8 +18,8 @@
|
|
|
18
18
|
"build": "tsc -p tsconfig.json"
|
|
19
19
|
},
|
|
20
20
|
"dependencies": {
|
|
21
|
-
"@shuvi/router": "1.0.
|
|
22
|
-
"@shuvi/platform-shared": "1.0.
|
|
21
|
+
"@shuvi/router": "1.0.24",
|
|
22
|
+
"@shuvi/platform-shared": "1.0.24"
|
|
23
23
|
},
|
|
24
24
|
"devDependencies": {
|
|
25
25
|
"@types/eslint": "7.28.0",
|