eslint-plugin-react-x 2.1.2-next.2 → 2.2.0-beta.0
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 +14 -14
- package/dist/index.js +2 -3
- package/package.json +6 -7
package/dist/index.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import * as
|
|
1
|
+
import * as _eslint_react_shared0 from "@eslint-react/shared";
|
|
2
2
|
|
|
3
3
|
//#region src/index.d.ts
|
|
4
4
|
declare const _default: {
|
|
@@ -9,8 +9,8 @@ declare const _default: {
|
|
|
9
9
|
recommended: {
|
|
10
10
|
plugins: {};
|
|
11
11
|
name?: string;
|
|
12
|
-
rules?: Record<string,
|
|
13
|
-
settings?:
|
|
12
|
+
rules?: Record<string, _eslint_react_shared0.RuleConfig>;
|
|
13
|
+
settings?: _eslint_react_shared0.SettingsConfig;
|
|
14
14
|
};
|
|
15
15
|
/**
|
|
16
16
|
* Same as the `recommended` preset but disables rules that can be enforced by TypeScript
|
|
@@ -18,8 +18,8 @@ declare const _default: {
|
|
|
18
18
|
"recommended-typescript": {
|
|
19
19
|
plugins: {};
|
|
20
20
|
name?: string;
|
|
21
|
-
rules?: Record<string,
|
|
22
|
-
settings?:
|
|
21
|
+
rules?: Record<string, _eslint_react_shared0.RuleConfig>;
|
|
22
|
+
settings?: _eslint_react_shared0.SettingsConfig;
|
|
23
23
|
};
|
|
24
24
|
/**
|
|
25
25
|
* Same as the `recommended-typescript` preset but enables additional rules that require type information
|
|
@@ -27,8 +27,8 @@ declare const _default: {
|
|
|
27
27
|
"recommended-type-checked": {
|
|
28
28
|
plugins: {};
|
|
29
29
|
name?: string;
|
|
30
|
-
rules?: Record<string,
|
|
31
|
-
settings?:
|
|
30
|
+
rules?: Record<string, _eslint_react_shared0.RuleConfig>;
|
|
31
|
+
settings?: _eslint_react_shared0.SettingsConfig;
|
|
32
32
|
};
|
|
33
33
|
/**
|
|
34
34
|
* More strict version of the `recommended` preset
|
|
@@ -36,8 +36,8 @@ declare const _default: {
|
|
|
36
36
|
strict: {
|
|
37
37
|
plugins: {};
|
|
38
38
|
name?: string;
|
|
39
|
-
rules?: Record<string,
|
|
40
|
-
settings?:
|
|
39
|
+
rules?: Record<string, _eslint_react_shared0.RuleConfig>;
|
|
40
|
+
settings?: _eslint_react_shared0.SettingsConfig;
|
|
41
41
|
};
|
|
42
42
|
/**
|
|
43
43
|
* Same as the `strict` preset but enables additional rules that require type information
|
|
@@ -45,8 +45,8 @@ declare const _default: {
|
|
|
45
45
|
"strict-typescript": {
|
|
46
46
|
plugins: {};
|
|
47
47
|
name?: string;
|
|
48
|
-
rules?: Record<string,
|
|
49
|
-
settings?:
|
|
48
|
+
rules?: Record<string, _eslint_react_shared0.RuleConfig>;
|
|
49
|
+
settings?: _eslint_react_shared0.SettingsConfig;
|
|
50
50
|
};
|
|
51
51
|
/**
|
|
52
52
|
* Same as the `strict-typescript` preset but enables additional rules that require type information
|
|
@@ -54,15 +54,15 @@ declare const _default: {
|
|
|
54
54
|
"strict-type-checked": {
|
|
55
55
|
plugins: {};
|
|
56
56
|
name?: string;
|
|
57
|
-
rules?: Record<string,
|
|
58
|
-
settings?:
|
|
57
|
+
rules?: Record<string, _eslint_react_shared0.RuleConfig>;
|
|
58
|
+
settings?: _eslint_react_shared0.SettingsConfig;
|
|
59
59
|
};
|
|
60
60
|
};
|
|
61
61
|
meta: {
|
|
62
62
|
name: string;
|
|
63
63
|
version: string;
|
|
64
64
|
};
|
|
65
|
-
rules: Record<string,
|
|
65
|
+
rules: Record<string, _eslint_react_shared0.CompatibleRule>;
|
|
66
66
|
};
|
|
67
67
|
//#endregion
|
|
68
68
|
export { _default as default };
|
package/dist/index.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { DEFAULT_ESLINT_REACT_SETTINGS, coerceSettings, getConfigAdapters, getDocsUrl, getSettingsFromContext } from "@eslint-react/shared";
|
|
1
|
+
import { DEFAULT_ESLINT_REACT_SETTINGS, coerceSettings, getConfigAdapters, getDocsUrl, getSettingsFromContext, report, toRegExp } from "@eslint-react/shared";
|
|
2
2
|
import { AST_NODE_TYPES } from "@typescript-eslint/types";
|
|
3
3
|
import { ESLintUtils } from "@typescript-eslint/utils";
|
|
4
4
|
import { isFalseLiteralType, isTrueLiteralType, isTypeFlagSet, unionConstituents } from "ts-api-utils";
|
|
@@ -7,7 +7,6 @@ import ts from "typescript";
|
|
|
7
7
|
import * as AST from "@eslint-react/ast";
|
|
8
8
|
import { ConstructionDetectionHint, findVariable, getChildScopes, getConstruction, getVariableDefinitionNode } from "@eslint-react/var";
|
|
9
9
|
import { ComponentDetectionHint, ComponentFlag, DEFAULT_COMPONENT_DETECTION_HINT, JsxEmit, findParentJsxAttribute, getInstanceId, getJsxAttribute, getJsxAttributeName, getJsxConfigFromAnnotation, getJsxConfigFromContext, getJsxElementType, isAssignmentToThisState, isCaptureOwnerStackCall, isChildrenCount, isChildrenForEach, isChildrenMap, isChildrenOnly, isChildrenToArray, isChildrenToArrayCall, isClassComponent, isCloneElementCall, isComponentDidCatch, isComponentDidMount, isComponentDidUpdate, isComponentNameLoose, isComponentWillMount, isComponentWillReceiveProps, isComponentWillUpdate, isCreateContextCall, isCreateElementCall, isCreateRefCall, isDeclaredInRenderPropLoose, isDirectValueOfRenderPropertyLoose, isForwardRefCall, isGetDerivedStateFromError, isGetDerivedStateFromProps, isInitializedFromReact, isInstanceIdEqual, isJsxFragmentElement, isJsxHostElement, isJsxText, isLazyCall, isReactHookCall, isReactHookName, isRenderMethodLike, isThisSetState, isUnsafeComponentWillMount, isUnsafeComponentWillReceiveProps, isUnsafeComponentWillUpdate, isUseCall, isUseCallbackCall, isUseContextCall, isUseMemoCall, isUseStateCall, useComponentCollector, useComponentCollectorLegacy, useHookCollector } from "@eslint-react/core";
|
|
10
|
-
import { report, toRegExp } from "@eslint-react/kit";
|
|
11
10
|
import { constFalse, constTrue, flow, getOrElseUpdate, identity, unit } from "@eslint-react/eff";
|
|
12
11
|
import { compare } from "compare-versions";
|
|
13
12
|
import { camelCase } from "string-ts";
|
|
@@ -29,7 +28,7 @@ var __export = (all) => {
|
|
|
29
28
|
//#endregion
|
|
30
29
|
//#region package.json
|
|
31
30
|
var name$6 = "eslint-plugin-react-x";
|
|
32
|
-
var version = "2.
|
|
31
|
+
var version = "2.2.0-beta.0";
|
|
33
32
|
|
|
34
33
|
//#endregion
|
|
35
34
|
//#region src/utils/create-rule.ts
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "eslint-plugin-react-x",
|
|
3
|
-
"version": "2.
|
|
3
|
+
"version": "2.2.0-beta.0",
|
|
4
4
|
"description": "A set of composable ESLint rules for for libraries and frameworks that use React as a UI runtime.",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"react",
|
|
@@ -43,12 +43,11 @@
|
|
|
43
43
|
"string-ts": "^2.2.1",
|
|
44
44
|
"ts-api-utils": "^2.1.0",
|
|
45
45
|
"ts-pattern": "^5.8.0",
|
|
46
|
-
"@eslint-react/ast": "2.
|
|
47
|
-
"@eslint-react/core": "2.
|
|
48
|
-
"@eslint-react/eff": "2.
|
|
49
|
-
"@eslint-react/shared": "2.
|
|
50
|
-
"@eslint-react/var": "2.
|
|
51
|
-
"@eslint-react/kit": "2.1.2-next.2"
|
|
46
|
+
"@eslint-react/ast": "2.2.0-beta.0",
|
|
47
|
+
"@eslint-react/core": "2.2.0-beta.0",
|
|
48
|
+
"@eslint-react/eff": "2.2.0-beta.0",
|
|
49
|
+
"@eslint-react/shared": "2.2.0-beta.0",
|
|
50
|
+
"@eslint-react/var": "2.2.0-beta.0"
|
|
52
51
|
},
|
|
53
52
|
"devDependencies": {
|
|
54
53
|
"@types/react": "^19.2.2",
|