@docusaurus/eslint-plugin 3.10.1-canary-6610 → 3.10.1-canary-6612

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.
@@ -16,7 +16,7 @@ function isFullyResolvedUrl(urlString) {
16
16
  return true;
17
17
  }
18
18
  }
19
- catch (e) { }
19
+ catch { }
20
20
  return false;
21
21
  }
22
22
  exports.default = (0, util_1.createRule)({
@@ -32,12 +32,14 @@ exports.default = (0, util_1.createRule)({
32
32
  type: 'object',
33
33
  properties: {
34
34
  ignoreFullyResolved: {
35
+ description: 'Set to true will not report any <a> tags with absolute URLs including a protocol.',
35
36
  type: 'boolean',
36
37
  },
37
38
  },
38
39
  additionalProperties: false,
39
40
  },
40
41
  ],
42
+ defaultOptions: [{ ignoreFullyResolved: false }],
41
43
  messages: {
42
44
  link: `Do not use an \`<a>\` element to navigate. Use the \`<Link />\` component from \`@docusaurus/Link\` instead. See: ${docsUrl}`,
43
45
  },
@@ -24,11 +24,17 @@ exports.default = (0, util_1.createRule)({
24
24
  items: {
25
25
  type: 'string',
26
26
  },
27
+ description: 'Text labels that only contain strings in this list will not be reported.',
27
28
  },
28
29
  },
29
30
  additionalProperties: false,
30
31
  },
31
32
  ],
33
+ defaultOptions: [
34
+ {
35
+ ignoredStrings: [],
36
+ },
37
+ ],
32
38
  messages: {
33
39
  translateChildren: 'All text labels in JSX should be wrapped by translate calls',
34
40
  },
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@docusaurus/eslint-plugin",
3
- "version": "3.10.1-canary-6610",
3
+ "version": "3.10.1-canary-6612",
4
4
  "description": "ESLint plugin to enforce best Docusaurus practices.",
5
5
  "main": "lib/index.js",
6
6
  "keywords": [
@@ -27,8 +27,7 @@
27
27
  "tslib": "^2.6.0"
28
28
  },
29
29
  "devDependencies": {
30
- "@typescript-eslint/rule-tester": "^8.59.3",
31
- "eslint-plugin-eslint-plugin": "^6.5.0"
30
+ "@typescript-eslint/rule-tester": "^8.59.3"
32
31
  },
33
32
  "peerDependencies": {
34
33
  "eslint": ">=8.57.0"
@@ -36,5 +35,5 @@
36
35
  "engines": {
37
36
  "node": ">=24.14"
38
37
  },
39
- "gitHead": "0d5acb95facc8da12797122d99a202673d130b93"
38
+ "gitHead": "4d0d5252d3de5fa3ae601808796280171962535e"
40
39
  }
@@ -25,7 +25,7 @@ function isFullyResolvedUrl(urlString: string): boolean {
25
25
  if (url.protocol) {
26
26
  return true;
27
27
  }
28
- } catch (e) {}
28
+ } catch {}
29
29
  return false;
30
30
  }
31
31
 
@@ -42,12 +42,15 @@ export default createRule<Options, MessageIds>({
42
42
  type: 'object',
43
43
  properties: {
44
44
  ignoreFullyResolved: {
45
+ description:
46
+ 'Set to true will not report any <a> tags with absolute URLs including a protocol.',
45
47
  type: 'boolean',
46
48
  },
47
49
  },
48
50
  additionalProperties: false,
49
51
  },
50
52
  ],
53
+ defaultOptions: [{ignoreFullyResolved: false}],
51
54
  messages: {
52
55
  link: `Do not use an \`<a>\` element to navigate. Use the \`<Link />\` component from \`@docusaurus/Link\` instead. See: ${docsUrl}`,
53
56
  },
@@ -24,6 +24,7 @@ export default createRule<Options, MessageIds>({
24
24
  'enforce text labels in JSX to be wrapped by translate calls',
25
25
  recommended: false,
26
26
  },
27
+
27
28
  schema: [
28
29
  {
29
30
  type: 'object',
@@ -33,11 +34,18 @@ export default createRule<Options, MessageIds>({
33
34
  items: {
34
35
  type: 'string',
35
36
  },
37
+ description:
38
+ 'Text labels that only contain strings in this list will not be reported.',
36
39
  },
37
40
  },
38
41
  additionalProperties: false,
39
42
  },
40
43
  ],
44
+ defaultOptions: [
45
+ {
46
+ ignoredStrings: [],
47
+ },
48
+ ],
41
49
  messages: {
42
50
  translateChildren:
43
51
  'All text labels in JSX should be wrapped by translate calls',