@eslint-react/kit 4.0.2-beta.2 → 4.0.2-beta.4
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/README.md +1 -1
- package/dist/index.d.ts +3 -3
- package/dist/index.js +4 -4
- package/package.json +5 -5
package/README.md
CHANGED
|
@@ -123,7 +123,7 @@ function forbidElements({ forbidden }: ForbidElementsOptions): RuleDefinition {
|
|
|
123
123
|
```ts
|
|
124
124
|
interface Builder {
|
|
125
125
|
use<F extends (...args: any[]) => RuleDefinition>(factory: F, ...args: Parameters<F>): Builder;
|
|
126
|
-
getConfig(
|
|
126
|
+
getConfig(options?: { files?: string[] }): Linter.Config;
|
|
127
127
|
getPlugin(): ESLint.Plugin;
|
|
128
128
|
}
|
|
129
129
|
```
|
package/dist/index.d.ts
CHANGED
|
@@ -48,7 +48,7 @@ interface RuleToolkit {
|
|
|
48
48
|
childrenToArrayCall: (node: null | TSESTree.Node) => node is TSESTree.CallExpression;
|
|
49
49
|
cloneElement: (node: null | TSESTree.Node) => boolean;
|
|
50
50
|
cloneElementCall: (node: null | TSESTree.Node) => node is TSESTree.CallExpression;
|
|
51
|
-
|
|
51
|
+
componentDecl: (node: TSESTreeFunction, hint: bigint) => boolean;
|
|
52
52
|
componentName: typeof core.isComponentName;
|
|
53
53
|
componentNameLoose: typeof core.isComponentNameLoose;
|
|
54
54
|
componentWrapperCall: (node: TSESTree.Node) => boolean;
|
|
@@ -62,8 +62,8 @@ interface RuleToolkit {
|
|
|
62
62
|
createRefCall: (node: null | TSESTree.Node) => node is TSESTree.CallExpression;
|
|
63
63
|
forwardRef: (node: null | TSESTree.Node) => boolean;
|
|
64
64
|
forwardRefCall: (node: null | TSESTree.Node) => node is TSESTree.CallExpression;
|
|
65
|
-
hook: typeof core.isHook;
|
|
66
65
|
hookCall: typeof core.isHookCall;
|
|
66
|
+
hookDecl: typeof core.isHookDefinition;
|
|
67
67
|
hookName: typeof core.isHookName;
|
|
68
68
|
initializedFromReact: typeof core.isInitializedFromReact;
|
|
69
69
|
initializedFromReactNative: typeof core.isInitializedFromReactNative;
|
|
@@ -101,7 +101,7 @@ interface RuleToolkit {
|
|
|
101
101
|
}
|
|
102
102
|
type RuleDefinition = (context: RuleContext, toolkit: RuleToolkit) => RuleListener;
|
|
103
103
|
interface Builder {
|
|
104
|
-
getConfig(
|
|
104
|
+
getConfig(options?: {
|
|
105
105
|
files?: string[];
|
|
106
106
|
}): Linter.Config;
|
|
107
107
|
getPlugin(): ESLint.Plugin;
|
package/dist/index.js
CHANGED
|
@@ -4,7 +4,7 @@ import { kebabCase } from "string-ts";
|
|
|
4
4
|
|
|
5
5
|
//#region package.json
|
|
6
6
|
var name = "@eslint-react/kit";
|
|
7
|
-
var version = "4.0.2-beta.
|
|
7
|
+
var version = "4.0.2-beta.4";
|
|
8
8
|
|
|
9
9
|
//#endregion
|
|
10
10
|
//#region src/index.ts
|
|
@@ -50,7 +50,7 @@ function makeRuleToolkit(context) {
|
|
|
50
50
|
childrenToArrayCall: core.isChildrenToArrayCall(context),
|
|
51
51
|
cloneElement: core.isCloneElement(context),
|
|
52
52
|
cloneElementCall: core.isCloneElementCall(context),
|
|
53
|
-
|
|
53
|
+
componentDecl: (node, hint) => core.isComponentDefinition(context, node, hint),
|
|
54
54
|
componentName: core.isComponentName,
|
|
55
55
|
componentNameLoose: core.isComponentNameLoose,
|
|
56
56
|
componentWrapperCall: (node) => core.isComponentWrapperCall(context, node),
|
|
@@ -64,8 +64,8 @@ function makeRuleToolkit(context) {
|
|
|
64
64
|
createRefCall: core.isCreateRefCall(context),
|
|
65
65
|
forwardRef: core.isForwardRef(context),
|
|
66
66
|
forwardRefCall: core.isForwardRefCall(context),
|
|
67
|
-
hook: core.isHook,
|
|
68
67
|
hookCall: core.isHookCall,
|
|
68
|
+
hookDecl: core.isHookDefinition,
|
|
69
69
|
hookName: core.isHookName,
|
|
70
70
|
initializedFromReact: core.isInitializedFromReact,
|
|
71
71
|
initializedFromReactNative: core.isInitializedFromReactNative,
|
|
@@ -106,7 +106,7 @@ function build() {
|
|
|
106
106
|
const idGen = new IdGenerator();
|
|
107
107
|
const rules = {};
|
|
108
108
|
const builder = {
|
|
109
|
-
getConfig({ files = ["**/*.ts
|
|
109
|
+
getConfig({ files = ["**/*.{js,mjs,cjs,jsx,mjsx,ts,mts,tsx,mtsx}"] } = {}) {
|
|
110
110
|
return {
|
|
111
111
|
files,
|
|
112
112
|
plugins: { [name]: builder.getPlugin() },
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@eslint-react/kit",
|
|
3
|
-
"version": "4.0.2-beta.
|
|
3
|
+
"version": "4.0.2-beta.4",
|
|
4
4
|
"description": "ESLint React's utility module for building custom React rules with JavasSript functions.",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"react",
|
|
@@ -38,13 +38,13 @@
|
|
|
38
38
|
"dependencies": {
|
|
39
39
|
"@typescript-eslint/utils": "^8.57.2",
|
|
40
40
|
"string-ts": "^2.3.1",
|
|
41
|
-
"@eslint-react/ast": "4.0.2-beta.
|
|
42
|
-
"@eslint-react/core": "4.0.2-beta.
|
|
43
|
-
"@eslint-react/shared": "4.0.2-beta.
|
|
41
|
+
"@eslint-react/ast": "4.0.2-beta.4",
|
|
42
|
+
"@eslint-react/core": "4.0.2-beta.4",
|
|
43
|
+
"@eslint-react/shared": "4.0.2-beta.4"
|
|
44
44
|
},
|
|
45
45
|
"devDependencies": {
|
|
46
46
|
"eslint": "^10.1.0",
|
|
47
|
-
"tsdown": "^0.21.
|
|
47
|
+
"tsdown": "^0.21.7",
|
|
48
48
|
"@local/configs": "0.0.0",
|
|
49
49
|
"@local/eff": "3.0.0-beta.72"
|
|
50
50
|
},
|