@eslint-react/eslint 5.2.1-next.1 → 5.2.1-next.3
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/dist/index.d.ts +9 -1
- package/dist/index.js +7 -1
- package/package.json +1 -1
package/dist/index.d.ts
CHANGED
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { ESLintUtils } from "@typescript-eslint/utils";
|
|
1
2
|
import * as tseslint from "@typescript-eslint/utils/ts-eslint";
|
|
2
3
|
import { ReportFixFunction, RuleFix, RuleFixer, RuleListener, RuleListener as RuleListener$1 } from "@typescript-eslint/utils/ts-eslint";
|
|
3
4
|
|
|
@@ -14,6 +15,13 @@ type RuleContext<MessageIds extends string = string, Options extends readonly un
|
|
|
14
15
|
type RuleFeature = "CFG" | "DBG" | "FIX" | "MOD" | "TSC" | "EXP";
|
|
15
16
|
//#endregion
|
|
16
17
|
//#region src/utils.d.ts
|
|
18
|
+
declare const createRule: <Options extends readonly unknown[], MessageIds extends string>({
|
|
19
|
+
meta,
|
|
20
|
+
name,
|
|
21
|
+
...rule
|
|
22
|
+
}: Readonly<ESLintUtils.RuleWithMetaAndName<Options, MessageIds, unknown>>) => ESLintUtils.RuleModule<MessageIds, Options, unknown, ESLintUtils.RuleListener> & {
|
|
23
|
+
name: string;
|
|
24
|
+
};
|
|
17
25
|
/**
|
|
18
26
|
* Merges multiple visitor objects into a single visitor object.
|
|
19
27
|
*
|
|
@@ -31,4 +39,4 @@ type RuleFeature = "CFG" | "DBG" | "FIX" | "MOD" | "TSC" | "EXP";
|
|
|
31
39
|
*/
|
|
32
40
|
declare function merge(base: RuleListener$1, ...rest: RuleListener$1[]): RuleListener$1;
|
|
33
41
|
//#endregion
|
|
34
|
-
export { type ReportFixFunction, RuleContext, RuleFeature, type RuleFix, type RuleFixer, type RuleListener, merge };
|
|
42
|
+
export { type ReportFixFunction, RuleContext, RuleFeature, type RuleFix, type RuleFixer, type RuleListener, createRule, merge };
|
package/dist/index.js
CHANGED
|
@@ -1,4 +1,10 @@
|
|
|
1
|
+
import { ESLintUtils } from "@typescript-eslint/utils";
|
|
2
|
+
|
|
1
3
|
//#region src/utils.ts
|
|
4
|
+
function getDocsUrl(ruleName) {
|
|
5
|
+
return `https://eslint-react.xyz/docs/rules/${ruleName}`;
|
|
6
|
+
}
|
|
7
|
+
const createRule = ESLintUtils.RuleCreator(getDocsUrl);
|
|
2
8
|
/**
|
|
3
9
|
* Merges multiple visitor objects into a single visitor object.
|
|
4
10
|
*
|
|
@@ -26,4 +32,4 @@ function merge(base, ...rest) {
|
|
|
26
32
|
}
|
|
27
33
|
|
|
28
34
|
//#endregion
|
|
29
|
-
export { merge };
|
|
35
|
+
export { createRule, merge };
|