@docusaurus/eslint-plugin 3.10.1-canary-6608 → 3.10.1-canary-6610
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/index.d.ts +96 -12
- package/lib/index.js +35 -11
- package/lib/rules/index.d.ts +14 -6
- package/lib/rules/no-html-links.d.ts +3 -1
- package/lib/rules/no-untranslated-text.d.ts +3 -1
- package/lib/rules/prefer-docusaurus-heading.d.ts +3 -1
- package/lib/rules/string-literal-i18n-messages.d.ts +3 -1
- package/lib/util.d.ts +7 -3
- package/package.json +9 -6
- package/src/index.ts +41 -12
- package/src/rules/no-html-links.ts +1 -1
- package/src/rules/no-untranslated-text.ts +1 -1
- package/src/rules/prefer-docusaurus-heading.ts +1 -1
- package/src/rules/string-literal-i18n-messages.ts +1 -1
- package/src/util.ts +9 -3
package/lib/index.d.ts
CHANGED
|
@@ -4,17 +4,7 @@
|
|
|
4
4
|
* This source code is licensed under the MIT license found in the
|
|
5
5
|
* LICENSE file in the root directory of this source tree.
|
|
6
6
|
*/
|
|
7
|
-
declare const
|
|
8
|
-
rules: {
|
|
9
|
-
'no-untranslated-text': import("@typescript-eslint/utils/dist/ts-eslint").RuleModule<"translateChildren", [{
|
|
10
|
-
ignoredStrings: string[];
|
|
11
|
-
}], import("@typescript-eslint/utils/dist/ts-eslint").RuleListener>;
|
|
12
|
-
'string-literal-i18n-messages': import("@typescript-eslint/utils/dist/ts-eslint").RuleModule<"translateChildren" | "translateArg", [], import("@typescript-eslint/utils/dist/ts-eslint").RuleListener>;
|
|
13
|
-
'no-html-links': import("@typescript-eslint/utils/dist/ts-eslint").RuleModule<"link", [{
|
|
14
|
-
ignoreFullyResolved: boolean;
|
|
15
|
-
}], import("@typescript-eslint/utils/dist/ts-eslint").RuleListener>;
|
|
16
|
-
'prefer-docusaurus-heading': import("@typescript-eslint/utils/dist/ts-eslint").RuleModule<"headings", [], import("@typescript-eslint/utils/dist/ts-eslint").RuleListener>;
|
|
17
|
-
};
|
|
7
|
+
declare const compatPlugin: {
|
|
18
8
|
configs: {
|
|
19
9
|
recommended: {
|
|
20
10
|
plugins: string[];
|
|
@@ -33,6 +23,100 @@ declare const _default: {
|
|
|
33
23
|
'@docusaurus/prefer-docusaurus-heading': string;
|
|
34
24
|
};
|
|
35
25
|
};
|
|
26
|
+
flat: {
|
|
27
|
+
recommended: {
|
|
28
|
+
plugins: {
|
|
29
|
+
'@docusaurus': {
|
|
30
|
+
meta: {
|
|
31
|
+
name: string;
|
|
32
|
+
version: string;
|
|
33
|
+
namespace: string;
|
|
34
|
+
};
|
|
35
|
+
rules: {
|
|
36
|
+
'no-untranslated-text': import("@typescript-eslint/utils/ts-eslint").RuleModule<"translateChildren", [{
|
|
37
|
+
ignoredStrings: string[];
|
|
38
|
+
}], import("./util").PluginDocs, import("@typescript-eslint/utils/ts-eslint").RuleListener> & {
|
|
39
|
+
name: string;
|
|
40
|
+
};
|
|
41
|
+
'string-literal-i18n-messages': import("@typescript-eslint/utils/ts-eslint").RuleModule<"translateChildren" | "translateArg", [], import("./util").PluginDocs, import("@typescript-eslint/utils/ts-eslint").RuleListener> & {
|
|
42
|
+
name: string;
|
|
43
|
+
};
|
|
44
|
+
'no-html-links': import("@typescript-eslint/utils/ts-eslint").RuleModule<"link", [{
|
|
45
|
+
ignoreFullyResolved: boolean;
|
|
46
|
+
}], import("./util").PluginDocs, import("@typescript-eslint/utils/ts-eslint").RuleListener> & {
|
|
47
|
+
name: string;
|
|
48
|
+
};
|
|
49
|
+
'prefer-docusaurus-heading': import("@typescript-eslint/utils/ts-eslint").RuleModule<"headings", [], import("./util").PluginDocs, import("@typescript-eslint/utils/ts-eslint").RuleListener> & {
|
|
50
|
+
name: string;
|
|
51
|
+
};
|
|
52
|
+
};
|
|
53
|
+
};
|
|
54
|
+
};
|
|
55
|
+
rules: {
|
|
56
|
+
'@docusaurus/string-literal-i18n-messages': string;
|
|
57
|
+
'@docusaurus/no-html-links': string;
|
|
58
|
+
'@docusaurus/prefer-docusaurus-heading': string;
|
|
59
|
+
};
|
|
60
|
+
};
|
|
61
|
+
all: {
|
|
62
|
+
plugins: {
|
|
63
|
+
'@docusaurus': {
|
|
64
|
+
meta: {
|
|
65
|
+
name: string;
|
|
66
|
+
version: string;
|
|
67
|
+
namespace: string;
|
|
68
|
+
};
|
|
69
|
+
rules: {
|
|
70
|
+
'no-untranslated-text': import("@typescript-eslint/utils/ts-eslint").RuleModule<"translateChildren", [{
|
|
71
|
+
ignoredStrings: string[];
|
|
72
|
+
}], import("./util").PluginDocs, import("@typescript-eslint/utils/ts-eslint").RuleListener> & {
|
|
73
|
+
name: string;
|
|
74
|
+
};
|
|
75
|
+
'string-literal-i18n-messages': import("@typescript-eslint/utils/ts-eslint").RuleModule<"translateChildren" | "translateArg", [], import("./util").PluginDocs, import("@typescript-eslint/utils/ts-eslint").RuleListener> & {
|
|
76
|
+
name: string;
|
|
77
|
+
};
|
|
78
|
+
'no-html-links': import("@typescript-eslint/utils/ts-eslint").RuleModule<"link", [{
|
|
79
|
+
ignoreFullyResolved: boolean;
|
|
80
|
+
}], import("./util").PluginDocs, import("@typescript-eslint/utils/ts-eslint").RuleListener> & {
|
|
81
|
+
name: string;
|
|
82
|
+
};
|
|
83
|
+
'prefer-docusaurus-heading': import("@typescript-eslint/utils/ts-eslint").RuleModule<"headings", [], import("./util").PluginDocs, import("@typescript-eslint/utils/ts-eslint").RuleListener> & {
|
|
84
|
+
name: string;
|
|
85
|
+
};
|
|
86
|
+
};
|
|
87
|
+
};
|
|
88
|
+
};
|
|
89
|
+
rules: {
|
|
90
|
+
'@docusaurus/string-literal-i18n-messages': string;
|
|
91
|
+
'@docusaurus/no-untranslated-text': string;
|
|
92
|
+
'@docusaurus/no-html-links': string;
|
|
93
|
+
'@docusaurus/prefer-docusaurus-heading': string;
|
|
94
|
+
};
|
|
95
|
+
};
|
|
96
|
+
};
|
|
97
|
+
};
|
|
98
|
+
meta: {
|
|
99
|
+
name: string;
|
|
100
|
+
version: string;
|
|
101
|
+
namespace: string;
|
|
102
|
+
};
|
|
103
|
+
rules: {
|
|
104
|
+
'no-untranslated-text': import("@typescript-eslint/utils/ts-eslint").RuleModule<"translateChildren", [{
|
|
105
|
+
ignoredStrings: string[];
|
|
106
|
+
}], import("./util").PluginDocs, import("@typescript-eslint/utils/ts-eslint").RuleListener> & {
|
|
107
|
+
name: string;
|
|
108
|
+
};
|
|
109
|
+
'string-literal-i18n-messages': import("@typescript-eslint/utils/ts-eslint").RuleModule<"translateChildren" | "translateArg", [], import("./util").PluginDocs, import("@typescript-eslint/utils/ts-eslint").RuleListener> & {
|
|
110
|
+
name: string;
|
|
111
|
+
};
|
|
112
|
+
'no-html-links': import("@typescript-eslint/utils/ts-eslint").RuleModule<"link", [{
|
|
113
|
+
ignoreFullyResolved: boolean;
|
|
114
|
+
}], import("./util").PluginDocs, import("@typescript-eslint/utils/ts-eslint").RuleListener> & {
|
|
115
|
+
name: string;
|
|
116
|
+
};
|
|
117
|
+
'prefer-docusaurus-heading': import("@typescript-eslint/utils/ts-eslint").RuleModule<"headings", [], import("./util").PluginDocs, import("@typescript-eslint/utils/ts-eslint").RuleListener> & {
|
|
118
|
+
name: string;
|
|
119
|
+
};
|
|
36
120
|
};
|
|
37
121
|
};
|
|
38
|
-
export =
|
|
122
|
+
export = compatPlugin;
|
package/lib/index.js
CHANGED
|
@@ -6,26 +6,50 @@
|
|
|
6
6
|
* LICENSE file in the root directory of this source tree.
|
|
7
7
|
*/
|
|
8
8
|
const tslib_1 = require("tslib");
|
|
9
|
+
const package_json_1 = require("../package.json");
|
|
9
10
|
const rules_1 = tslib_1.__importDefault(require("./rules"));
|
|
10
|
-
|
|
11
|
+
const plugin = {
|
|
12
|
+
meta: { name: package_json_1.name, version: package_json_1.version, namespace: '@docusaurus' },
|
|
11
13
|
rules: rules_1.default,
|
|
14
|
+
};
|
|
15
|
+
const rulesRecommended = {
|
|
16
|
+
'@docusaurus/string-literal-i18n-messages': 'error',
|
|
17
|
+
'@docusaurus/no-html-links': 'warn',
|
|
18
|
+
'@docusaurus/prefer-docusaurus-heading': 'warn',
|
|
19
|
+
};
|
|
20
|
+
const rulesAll = {
|
|
21
|
+
'@docusaurus/string-literal-i18n-messages': 'error',
|
|
22
|
+
'@docusaurus/no-untranslated-text': 'warn',
|
|
23
|
+
'@docusaurus/no-html-links': 'warn',
|
|
24
|
+
'@docusaurus/prefer-docusaurus-heading': 'warn',
|
|
25
|
+
};
|
|
26
|
+
// Supports both legacy/flat configs:
|
|
27
|
+
// https://eslint.org/docs/latest/extend/plugins#backwards-compatibility-for-legacy-configs
|
|
28
|
+
const compatPlugin = {
|
|
29
|
+
...plugin,
|
|
12
30
|
configs: {
|
|
13
31
|
recommended: {
|
|
14
32
|
plugins: ['@docusaurus'],
|
|
15
|
-
rules:
|
|
16
|
-
'@docusaurus/string-literal-i18n-messages': 'error',
|
|
17
|
-
'@docusaurus/no-html-links': 'warn',
|
|
18
|
-
'@docusaurus/prefer-docusaurus-heading': 'warn',
|
|
19
|
-
},
|
|
33
|
+
rules: rulesRecommended,
|
|
20
34
|
},
|
|
21
35
|
all: {
|
|
22
36
|
plugins: ['@docusaurus'],
|
|
23
|
-
rules:
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
37
|
+
rules: rulesAll,
|
|
38
|
+
},
|
|
39
|
+
flat: {
|
|
40
|
+
recommended: {
|
|
41
|
+
plugins: {
|
|
42
|
+
'@docusaurus': plugin,
|
|
43
|
+
},
|
|
44
|
+
rules: rulesRecommended,
|
|
45
|
+
},
|
|
46
|
+
all: {
|
|
47
|
+
plugins: {
|
|
48
|
+
'@docusaurus': plugin,
|
|
49
|
+
},
|
|
50
|
+
rules: rulesAll,
|
|
28
51
|
},
|
|
29
52
|
},
|
|
30
53
|
},
|
|
31
54
|
};
|
|
55
|
+
module.exports = compatPlugin;
|
package/lib/rules/index.d.ts
CHANGED
|
@@ -5,13 +5,21 @@
|
|
|
5
5
|
* LICENSE file in the root directory of this source tree.
|
|
6
6
|
*/
|
|
7
7
|
declare const _default: {
|
|
8
|
-
'no-untranslated-text': import("@typescript-eslint/utils/
|
|
8
|
+
'no-untranslated-text': import("@typescript-eslint/utils/ts-eslint").RuleModule<"translateChildren", [{
|
|
9
9
|
ignoredStrings: string[];
|
|
10
|
-
}], import("@typescript-eslint/utils/
|
|
11
|
-
|
|
12
|
-
|
|
10
|
+
}], import("../util").PluginDocs, import("@typescript-eslint/utils/ts-eslint").RuleListener> & {
|
|
11
|
+
name: string;
|
|
12
|
+
};
|
|
13
|
+
'string-literal-i18n-messages': import("@typescript-eslint/utils/ts-eslint").RuleModule<"translateChildren" | "translateArg", [], import("../util").PluginDocs, import("@typescript-eslint/utils/ts-eslint").RuleListener> & {
|
|
14
|
+
name: string;
|
|
15
|
+
};
|
|
16
|
+
'no-html-links': import("@typescript-eslint/utils/ts-eslint").RuleModule<"link", [{
|
|
13
17
|
ignoreFullyResolved: boolean;
|
|
14
|
-
}], import("@typescript-eslint/utils/
|
|
15
|
-
|
|
18
|
+
}], import("../util").PluginDocs, import("@typescript-eslint/utils/ts-eslint").RuleListener> & {
|
|
19
|
+
name: string;
|
|
20
|
+
};
|
|
21
|
+
'prefer-docusaurus-heading': import("@typescript-eslint/utils/ts-eslint").RuleModule<"headings", [], import("../util").PluginDocs, import("@typescript-eslint/utils/ts-eslint").RuleListener> & {
|
|
22
|
+
name: string;
|
|
23
|
+
};
|
|
16
24
|
};
|
|
17
25
|
export default _default;
|
|
@@ -9,5 +9,7 @@ type Options = [
|
|
|
9
9
|
ignoreFullyResolved: boolean;
|
|
10
10
|
}
|
|
11
11
|
];
|
|
12
|
-
declare const _default: import("@typescript-eslint/utils/
|
|
12
|
+
declare const _default: import("@typescript-eslint/utils/ts-eslint").RuleModule<"link", Options, import("../util").PluginDocs, import("@typescript-eslint/utils/ts-eslint").RuleListener> & {
|
|
13
|
+
name: string;
|
|
14
|
+
};
|
|
13
15
|
export default _default;
|
|
@@ -9,5 +9,7 @@ type Options = [
|
|
|
9
9
|
ignoredStrings: string[];
|
|
10
10
|
}
|
|
11
11
|
];
|
|
12
|
-
declare const _default: import("@typescript-eslint/utils/
|
|
12
|
+
declare const _default: import("@typescript-eslint/utils/ts-eslint").RuleModule<"translateChildren", Options, import("../util").PluginDocs, import("@typescript-eslint/utils/ts-eslint").RuleListener> & {
|
|
13
|
+
name: string;
|
|
14
|
+
};
|
|
13
15
|
export default _default;
|
|
@@ -4,5 +4,7 @@
|
|
|
4
4
|
* This source code is licensed under the MIT license found in the
|
|
5
5
|
* LICENSE file in the root directory of this source tree.
|
|
6
6
|
*/
|
|
7
|
-
declare const _default: import("@typescript-eslint/utils/
|
|
7
|
+
declare const _default: import("@typescript-eslint/utils/ts-eslint").RuleModule<"headings", [], import("../util").PluginDocs, import("@typescript-eslint/utils/ts-eslint").RuleListener> & {
|
|
8
|
+
name: string;
|
|
9
|
+
};
|
|
8
10
|
export default _default;
|
|
@@ -5,5 +5,7 @@
|
|
|
5
5
|
* LICENSE file in the root directory of this source tree.
|
|
6
6
|
*/
|
|
7
7
|
type MessageIds = 'translateChildren' | 'translateArg';
|
|
8
|
-
declare const _default: import("@typescript-eslint/utils/
|
|
8
|
+
declare const _default: import("@typescript-eslint/utils/ts-eslint").RuleModule<MessageIds, [], import("../util").PluginDocs, import("@typescript-eslint/utils/ts-eslint").RuleListener> & {
|
|
9
|
+
name: string;
|
|
10
|
+
};
|
|
9
11
|
export default _default;
|
package/lib/util.d.ts
CHANGED
|
@@ -4,12 +4,16 @@
|
|
|
4
4
|
* This source code is licensed under the MIT license found in the
|
|
5
5
|
* LICENSE file in the root directory of this source tree.
|
|
6
6
|
*/
|
|
7
|
-
import { ESLintUtils } from '@typescript-eslint/utils';
|
|
8
|
-
import type { TSESTree } from '@typescript-eslint/types/dist/ts-estree';
|
|
7
|
+
import { ESLintUtils, type TSESTree } from '@typescript-eslint/utils';
|
|
9
8
|
type CheckTranslateChildOptions = {
|
|
10
9
|
ignoredStrings?: string[];
|
|
11
10
|
};
|
|
12
11
|
export declare function isStringWithoutExpressions(text: TSESTree.Node, options?: CheckTranslateChildOptions): boolean;
|
|
13
12
|
export declare function isTextLabelChild(child: TSESTree.JSXChild, options?: CheckTranslateChildOptions): boolean;
|
|
14
|
-
export
|
|
13
|
+
export interface PluginDocs {
|
|
14
|
+
recommended: boolean | 'error';
|
|
15
|
+
}
|
|
16
|
+
export declare const createRule: <Options extends readonly unknown[], MessageIds extends string>({ meta, name, ...rule }: Readonly<ESLintUtils.RuleWithMetaAndName<Options, MessageIds, PluginDocs>>) => ESLintUtils.RuleModule<MessageIds, Options, PluginDocs, ESLintUtils.RuleListener> & {
|
|
17
|
+
name: string;
|
|
18
|
+
};
|
|
15
19
|
export {};
|
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-6610",
|
|
4
4
|
"description": "ESLint plugin to enforce best Docusaurus practices.",
|
|
5
5
|
"main": "lib/index.js",
|
|
6
6
|
"keywords": [
|
|
@@ -18,20 +18,23 @@
|
|
|
18
18
|
},
|
|
19
19
|
"license": "MIT",
|
|
20
20
|
"scripts": {
|
|
21
|
-
"build": "tsc"
|
|
21
|
+
"build": "tsc",
|
|
22
|
+
"watch": "tsc --watch"
|
|
22
23
|
},
|
|
23
24
|
"dependencies": {
|
|
24
|
-
"@typescript-eslint/
|
|
25
|
+
"@typescript-eslint/types": "^8.59.3",
|
|
26
|
+
"@typescript-eslint/utils": "^8.59.3",
|
|
25
27
|
"tslib": "^2.6.0"
|
|
26
28
|
},
|
|
27
29
|
"devDependencies": {
|
|
28
|
-
"
|
|
30
|
+
"@typescript-eslint/rule-tester": "^8.59.3",
|
|
31
|
+
"eslint-plugin-eslint-plugin": "^6.5.0"
|
|
29
32
|
},
|
|
30
33
|
"peerDependencies": {
|
|
31
|
-
"eslint": ">=
|
|
34
|
+
"eslint": ">=8.57.0"
|
|
32
35
|
},
|
|
33
36
|
"engines": {
|
|
34
37
|
"node": ">=24.14"
|
|
35
38
|
},
|
|
36
|
-
"gitHead": "
|
|
39
|
+
"gitHead": "0d5acb95facc8da12797122d99a202673d130b93"
|
|
37
40
|
}
|
package/src/index.ts
CHANGED
|
@@ -5,28 +5,57 @@
|
|
|
5
5
|
* LICENSE file in the root directory of this source tree.
|
|
6
6
|
*/
|
|
7
7
|
|
|
8
|
+
import {name, version} from '../package.json';
|
|
9
|
+
|
|
8
10
|
import rules from './rules';
|
|
9
11
|
|
|
10
|
-
|
|
11
|
-
|
|
12
|
+
const plugin = {
|
|
13
|
+
meta: {name, version, namespace: '@docusaurus'},
|
|
12
14
|
rules,
|
|
15
|
+
};
|
|
16
|
+
|
|
17
|
+
const rulesRecommended = {
|
|
18
|
+
'@docusaurus/string-literal-i18n-messages': 'error',
|
|
19
|
+
'@docusaurus/no-html-links': 'warn',
|
|
20
|
+
'@docusaurus/prefer-docusaurus-heading': 'warn',
|
|
21
|
+
};
|
|
22
|
+
|
|
23
|
+
const rulesAll = {
|
|
24
|
+
'@docusaurus/string-literal-i18n-messages': 'error',
|
|
25
|
+
'@docusaurus/no-untranslated-text': 'warn',
|
|
26
|
+
'@docusaurus/no-html-links': 'warn',
|
|
27
|
+
'@docusaurus/prefer-docusaurus-heading': 'warn',
|
|
28
|
+
};
|
|
29
|
+
|
|
30
|
+
// Supports both legacy/flat configs:
|
|
31
|
+
// https://eslint.org/docs/latest/extend/plugins#backwards-compatibility-for-legacy-configs
|
|
32
|
+
const compatPlugin = {
|
|
33
|
+
...plugin,
|
|
13
34
|
configs: {
|
|
14
35
|
recommended: {
|
|
15
36
|
plugins: ['@docusaurus'],
|
|
16
|
-
rules:
|
|
17
|
-
'@docusaurus/string-literal-i18n-messages': 'error',
|
|
18
|
-
'@docusaurus/no-html-links': 'warn',
|
|
19
|
-
'@docusaurus/prefer-docusaurus-heading': 'warn',
|
|
20
|
-
},
|
|
37
|
+
rules: rulesRecommended,
|
|
21
38
|
},
|
|
22
39
|
all: {
|
|
23
40
|
plugins: ['@docusaurus'],
|
|
24
|
-
rules:
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
41
|
+
rules: rulesAll,
|
|
42
|
+
},
|
|
43
|
+
flat: {
|
|
44
|
+
recommended: {
|
|
45
|
+
plugins: {
|
|
46
|
+
'@docusaurus': plugin,
|
|
47
|
+
},
|
|
48
|
+
rules: rulesRecommended,
|
|
49
|
+
},
|
|
50
|
+
all: {
|
|
51
|
+
plugins: {
|
|
52
|
+
'@docusaurus': plugin,
|
|
53
|
+
},
|
|
54
|
+
rules: rulesAll,
|
|
29
55
|
},
|
|
30
56
|
},
|
|
31
57
|
},
|
|
32
58
|
};
|
|
59
|
+
|
|
60
|
+
// @ts-expect-error: TODO try to remove later
|
|
61
|
+
export = compatPlugin;
|
|
@@ -10,7 +10,7 @@ import {
|
|
|
10
10
|
isStringWithoutExpressions,
|
|
11
11
|
createRule,
|
|
12
12
|
} from '../util';
|
|
13
|
-
import type {TSESTree} from '@typescript-eslint/types
|
|
13
|
+
import type {TSESTree} from '@typescript-eslint/types';
|
|
14
14
|
|
|
15
15
|
type Options = [];
|
|
16
16
|
type MessageIds = 'translateChildren' | 'translateArg';
|
package/src/util.ts
CHANGED
|
@@ -5,8 +5,7 @@
|
|
|
5
5
|
* LICENSE file in the root directory of this source tree.
|
|
6
6
|
*/
|
|
7
7
|
|
|
8
|
-
import {ESLintUtils} from '@typescript-eslint/utils';
|
|
9
|
-
import type {TSESTree} from '@typescript-eslint/types/dist/ts-estree';
|
|
8
|
+
import {ESLintUtils, type TSESTree} from '@typescript-eslint/utils';
|
|
10
9
|
|
|
11
10
|
type CheckTranslateChildOptions = {
|
|
12
11
|
ignoredStrings?: string[];
|
|
@@ -61,7 +60,14 @@ export function isTextLabelChild(
|
|
|
61
60
|
}
|
|
62
61
|
}
|
|
63
62
|
|
|
64
|
-
|
|
63
|
+
// Not sure if we really need this
|
|
64
|
+
// See https://typescript-eslint.io/blog/announcing-typescript-eslint-v8/#custom-rule-metadocs-types
|
|
65
|
+
// See https://github.com/typescript-eslint/typescript-eslint/pull/9025
|
|
66
|
+
export interface PluginDocs {
|
|
67
|
+
recommended: boolean | 'error';
|
|
68
|
+
}
|
|
69
|
+
|
|
70
|
+
export const createRule = ESLintUtils.RuleCreator<PluginDocs>(
|
|
65
71
|
(name) =>
|
|
66
72
|
`https://docusaurus.io/docs/api/misc/@docusaurus/eslint-plugin/${name}`,
|
|
67
73
|
);
|