@docusaurus/eslint-plugin 3.10.1-canary-6655 → 3.10.1-canary-6803
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.
|
@@ -9,15 +9,8 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
9
9
|
const util_1 = require("../util");
|
|
10
10
|
const docsUrl = 'https://docusaurus.io/docs/docusaurus-core#link';
|
|
11
11
|
function isFullyResolvedUrl(urlString) {
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
const url = new URL(String(urlString));
|
|
15
|
-
if (url.protocol) {
|
|
16
|
-
return true;
|
|
17
|
-
}
|
|
18
|
-
}
|
|
19
|
-
catch { }
|
|
20
|
-
return false;
|
|
12
|
+
const url = URL.parse(String(urlString));
|
|
13
|
+
return !!(url && url.protocol);
|
|
21
14
|
}
|
|
22
15
|
exports.default = (0, util_1.createRule)({
|
|
23
16
|
name: 'no-html-links',
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@docusaurus/eslint-plugin",
|
|
3
|
-
"version": "3.10.1-canary-
|
|
3
|
+
"version": "3.10.1-canary-6803",
|
|
4
4
|
"description": "ESLint plugin to enforce best Docusaurus practices.",
|
|
5
5
|
"main": "lib/index.js",
|
|
6
6
|
"keywords": [
|
|
@@ -35,5 +35,5 @@
|
|
|
35
35
|
"engines": {
|
|
36
36
|
"node": ">=24.14"
|
|
37
37
|
},
|
|
38
|
-
"gitHead": "
|
|
38
|
+
"gitHead": "d2c7b381512bd4e7e90e33f56649e68d618eaa92"
|
|
39
39
|
}
|
|
@@ -19,14 +19,8 @@ type Options = [
|
|
|
19
19
|
type MessageIds = 'link';
|
|
20
20
|
|
|
21
21
|
function isFullyResolvedUrl(urlString: string): boolean {
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
const url = new URL(String(urlString));
|
|
25
|
-
if (url.protocol) {
|
|
26
|
-
return true;
|
|
27
|
-
}
|
|
28
|
-
} catch {}
|
|
29
|
-
return false;
|
|
22
|
+
const url = URL.parse(String(urlString));
|
|
23
|
+
return !!(url && url.protocol);
|
|
30
24
|
}
|
|
31
25
|
|
|
32
26
|
export default createRule<Options, MessageIds>({
|