eslint-plugin-react-x 4.2.0-beta.1 → 4.2.0-beta.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.js +4 -3
- package/package.json +6 -6
package/dist/index.js
CHANGED
|
@@ -147,7 +147,7 @@ const rules$7 = {
|
|
|
147
147
|
//#endregion
|
|
148
148
|
//#region package.json
|
|
149
149
|
var name$6 = "eslint-plugin-react-x";
|
|
150
|
-
var version = "4.2.0-beta.
|
|
150
|
+
var version = "4.2.0-beta.3";
|
|
151
151
|
|
|
152
152
|
//#endregion
|
|
153
153
|
//#region src/utils/create-rule.ts
|
|
@@ -4101,6 +4101,7 @@ function create$8(context) {
|
|
|
4101
4101
|
const expr = ast.getUnderlyingExpression(node.callee);
|
|
4102
4102
|
if (expr.type !== AST_NODE_TYPES.Identifier) return;
|
|
4103
4103
|
if (!IMPURE_CTORS.has(expr.name)) return;
|
|
4104
|
+
if (expr.name === "Date" && node.arguments.length > 0) return;
|
|
4104
4105
|
const func = ast.findParent(node, ast.isFunction);
|
|
4105
4106
|
if (func == null) return;
|
|
4106
4107
|
nEntries.push({
|
|
@@ -4165,8 +4166,8 @@ function create$7(context) {
|
|
|
4165
4166
|
/**
|
|
4166
4167
|
* Check if a test expression is a null check on `ref.current` for a given ref name.
|
|
4167
4168
|
* Matches forms like `ref.current === null`, `null === ref.current`, and their != variants.
|
|
4168
|
-
* @param test
|
|
4169
|
-
* @param refName
|
|
4169
|
+
* @param test The test expression to check.
|
|
4170
|
+
* @param refName The name of the ref variable.
|
|
4170
4171
|
*/
|
|
4171
4172
|
function isRefCurrentNullCheck(test, refName) {
|
|
4172
4173
|
if (test.type !== AST_NODE_TYPES.BinaryExpression) return false;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "eslint-plugin-react-x",
|
|
3
|
-
"version": "4.2.0-beta.
|
|
3
|
+
"version": "4.2.0-beta.3",
|
|
4
4
|
"description": "A set of composable ESLint rules for libraries and frameworks that use React as a UI runtime.",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"react",
|
|
@@ -45,11 +45,11 @@
|
|
|
45
45
|
"string-ts": "^2.3.1",
|
|
46
46
|
"ts-api-utils": "^2.5.0",
|
|
47
47
|
"ts-pattern": "^5.9.0",
|
|
48
|
-
"@eslint-react/ast": "4.2.0-beta.
|
|
49
|
-
"@eslint-react/
|
|
50
|
-
"@eslint-react/jsx": "4.2.0-beta.
|
|
51
|
-
"@eslint-react/
|
|
52
|
-
"@eslint-react/var": "4.2.0-beta.
|
|
48
|
+
"@eslint-react/ast": "4.2.0-beta.3",
|
|
49
|
+
"@eslint-react/shared": "4.2.0-beta.3",
|
|
50
|
+
"@eslint-react/jsx": "4.2.0-beta.3",
|
|
51
|
+
"@eslint-react/core": "4.2.0-beta.3",
|
|
52
|
+
"@eslint-react/var": "4.2.0-beta.3"
|
|
53
53
|
},
|
|
54
54
|
"devDependencies": {
|
|
55
55
|
"@types/react": "^19.2.14",
|