eslint-plugin-react-x 2.4.1-next.12 → 2.4.1-next.13
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.js +16 -2
- package/package.json +7 -7
package/dist/index.js
CHANGED
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
import { DEFAULT_ESLINT_REACT_SETTINGS, WEBSITE_URL, coerceSettings, getConfigAdapters, 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
|
-
import { isFalseLiteralType, isPropertyReadonlyInType, isTrueLiteralType, isTypeFlagSet, unionConstituents } from "ts-api-utils";
|
|
5
4
|
import { P, isMatching, match } from "ts-pattern";
|
|
6
5
|
import ts from "typescript";
|
|
7
6
|
import * as AST from "@eslint-react/ast";
|
|
@@ -11,6 +10,7 @@ import { constFalse, constTrue, flow, getOrElseUpdate, identity, unit } from "@e
|
|
|
11
10
|
import { compare } from "compare-versions";
|
|
12
11
|
import { getConstrainedTypeAtLocation, isTypeReadonly } from "@typescript-eslint/type-utils";
|
|
13
12
|
import { getStaticValue, isIdentifier, isVariableDeclarator } from "@typescript-eslint/utils/ast-utils";
|
|
13
|
+
import { isPropertyReadonlyInType, unionConstituents } from "ts-api-utils";
|
|
14
14
|
import "@typescript-eslint/utils/ts-eslint";
|
|
15
15
|
import { getTypeImmutability, isImmutable, isReadonlyDeep, isReadonlyShallow, isUnknown } from "is-immutable-type";
|
|
16
16
|
import { camelCase } from "string-ts";
|
|
@@ -34,7 +34,7 @@ var __exportAll = (all, symbols) => {
|
|
|
34
34
|
//#endregion
|
|
35
35
|
//#region package.json
|
|
36
36
|
var name$6 = "eslint-plugin-react-x";
|
|
37
|
-
var version = "2.4.1-next.
|
|
37
|
+
var version = "2.4.1-next.13";
|
|
38
38
|
|
|
39
39
|
//#endregion
|
|
40
40
|
//#region src/utils/create-rule.ts
|
|
@@ -45,6 +45,20 @@ const createRule = ESLintUtils.RuleCreator(getDocsUrl);
|
|
|
45
45
|
|
|
46
46
|
//#endregion
|
|
47
47
|
//#region src/utils/type-is.ts
|
|
48
|
+
function isFlagSet(allFlags, flag) {
|
|
49
|
+
return (allFlags & flag) !== 0;
|
|
50
|
+
}
|
|
51
|
+
function isFlagSetOnObject(obj, flag) {
|
|
52
|
+
return isFlagSet(obj.flags, flag);
|
|
53
|
+
}
|
|
54
|
+
const isTypeFlagSet = isFlagSetOnObject;
|
|
55
|
+
function isBooleanLiteralType(type) {
|
|
56
|
+
return isTypeFlagSet(type, ts.TypeFlags.BooleanLiteral);
|
|
57
|
+
}
|
|
58
|
+
/** @internal */
|
|
59
|
+
const isFalseLiteralType = (type) => isBooleanLiteralType(type) && type.intrinsicName === "false";
|
|
60
|
+
/** @internal */
|
|
61
|
+
const isTrueLiteralType = (type) => isBooleanLiteralType(type) && type.intrinsicName === "true";
|
|
48
62
|
/** @internal */
|
|
49
63
|
const isAnyType = (type) => isTypeFlagSet(type, ts.TypeFlags.TypeParameter | ts.TypeFlags.Any);
|
|
50
64
|
/** @internal */
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "eslint-plugin-react-x",
|
|
3
|
-
"version": "2.4.1-next.
|
|
3
|
+
"version": "2.4.1-next.13",
|
|
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",
|
|
@@ -46,16 +46,16 @@
|
|
|
46
46
|
"string-ts": "^2.3.1",
|
|
47
47
|
"ts-api-utils": "^2.3.0",
|
|
48
48
|
"ts-pattern": "^5.9.0",
|
|
49
|
-
"@eslint-react/ast": "2.4.1-next.
|
|
50
|
-
"@eslint-react/core": "2.4.1-next.
|
|
51
|
-
"@eslint-react/eff": "2.4.1-next.
|
|
52
|
-
"@eslint-react/shared": "2.4.1-next.
|
|
53
|
-
"@eslint-react/var": "2.4.1-next.
|
|
49
|
+
"@eslint-react/ast": "2.4.1-next.13",
|
|
50
|
+
"@eslint-react/core": "2.4.1-next.13",
|
|
51
|
+
"@eslint-react/eff": "2.4.1-next.13",
|
|
52
|
+
"@eslint-react/shared": "2.4.1-next.13",
|
|
53
|
+
"@eslint-react/var": "2.4.1-next.13"
|
|
54
54
|
},
|
|
55
55
|
"devDependencies": {
|
|
56
56
|
"@types/react": "^19.2.7",
|
|
57
57
|
"@types/react-dom": "^19.2.3",
|
|
58
|
-
"tsdown": "^0.18.
|
|
58
|
+
"tsdown": "^0.18.4",
|
|
59
59
|
"@local/configs": "0.0.0"
|
|
60
60
|
},
|
|
61
61
|
"peerDependencies": {
|