eslint-plugin-react-hooks 7.0.0-canary-2bcbf254-20251020 → 7.0.0-canary-6160773f-20251023
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.
|
@@ -24145,7 +24145,7 @@ function lowerObjectMethod(builder, property) {
|
|
|
24145
24145
|
};
|
|
24146
24146
|
}
|
|
24147
24147
|
function lowerObjectPropertyKey(builder, property) {
|
|
24148
|
-
var _a
|
|
24148
|
+
var _a;
|
|
24149
24149
|
const key = property.get('key');
|
|
24150
24150
|
if (key.isStringLiteral()) {
|
|
24151
24151
|
return {
|
|
@@ -24154,15 +24154,6 @@ function lowerObjectPropertyKey(builder, property) {
|
|
|
24154
24154
|
};
|
|
24155
24155
|
}
|
|
24156
24156
|
else if (property.node.computed && key.isExpression()) {
|
|
24157
|
-
if (!key.isIdentifier() && !key.isMemberExpression()) {
|
|
24158
|
-
builder.errors.push({
|
|
24159
|
-
reason: `(BuildHIR::lowerExpression) Expected Identifier, got ${key.type} key in ObjectExpression`,
|
|
24160
|
-
category: ErrorCategory.Todo,
|
|
24161
|
-
loc: (_a = key.node.loc) !== null && _a !== void 0 ? _a : null,
|
|
24162
|
-
suggestions: null,
|
|
24163
|
-
});
|
|
24164
|
-
return null;
|
|
24165
|
-
}
|
|
24166
24157
|
const place = lowerExpressionToTemporary(builder, key);
|
|
24167
24158
|
return {
|
|
24168
24159
|
kind: 'computed',
|
|
@@ -24184,7 +24175,7 @@ function lowerObjectPropertyKey(builder, property) {
|
|
|
24184
24175
|
builder.errors.push({
|
|
24185
24176
|
reason: `(BuildHIR::lowerExpression) Expected Identifier, got ${key.type} key in ObjectExpression`,
|
|
24186
24177
|
category: ErrorCategory.Todo,
|
|
24187
|
-
loc: (
|
|
24178
|
+
loc: (_a = key.node.loc) !== null && _a !== void 0 ? _a : null,
|
|
24188
24179
|
suggestions: null,
|
|
24189
24180
|
});
|
|
24190
24181
|
return null;
|
|
@@ -24136,7 +24136,7 @@ function lowerObjectMethod(builder, property) {
|
|
|
24136
24136
|
};
|
|
24137
24137
|
}
|
|
24138
24138
|
function lowerObjectPropertyKey(builder, property) {
|
|
24139
|
-
var _a
|
|
24139
|
+
var _a;
|
|
24140
24140
|
const key = property.get('key');
|
|
24141
24141
|
if (key.isStringLiteral()) {
|
|
24142
24142
|
return {
|
|
@@ -24145,15 +24145,6 @@ function lowerObjectPropertyKey(builder, property) {
|
|
|
24145
24145
|
};
|
|
24146
24146
|
}
|
|
24147
24147
|
else if (property.node.computed && key.isExpression()) {
|
|
24148
|
-
if (!key.isIdentifier() && !key.isMemberExpression()) {
|
|
24149
|
-
builder.errors.push({
|
|
24150
|
-
reason: `(BuildHIR::lowerExpression) Expected Identifier, got ${key.type} key in ObjectExpression`,
|
|
24151
|
-
category: ErrorCategory.Todo,
|
|
24152
|
-
loc: (_a = key.node.loc) !== null && _a !== void 0 ? _a : null,
|
|
24153
|
-
suggestions: null,
|
|
24154
|
-
});
|
|
24155
|
-
return null;
|
|
24156
|
-
}
|
|
24157
24148
|
const place = lowerExpressionToTemporary(builder, key);
|
|
24158
24149
|
return {
|
|
24159
24150
|
kind: 'computed',
|
|
@@ -24175,7 +24166,7 @@ function lowerObjectPropertyKey(builder, property) {
|
|
|
24175
24166
|
builder.errors.push({
|
|
24176
24167
|
reason: `(BuildHIR::lowerExpression) Expected Identifier, got ${key.type} key in ObjectExpression`,
|
|
24177
24168
|
category: ErrorCategory.Todo,
|
|
24178
|
-
loc: (
|
|
24169
|
+
loc: (_a = key.node.loc) !== null && _a !== void 0 ? _a : null,
|
|
24179
24170
|
suggestions: null,
|
|
24180
24171
|
});
|
|
24181
24172
|
return null;
|
package/index.d.ts
CHANGED
package/index.js
CHANGED
|
@@ -14,3 +14,13 @@ if (process.env.NODE_ENV === 'production') {
|
|
|
14
14
|
} else {
|
|
15
15
|
module.exports = require('./cjs/eslint-plugin-react-hooks.development.js');
|
|
16
16
|
}
|
|
17
|
+
|
|
18
|
+
// Hint to Node’s cjs-module-lexer to make named imports work
|
|
19
|
+
// https://github.com/facebook/react/issues/34801#issuecomment-3433478810
|
|
20
|
+
// eslint-disable-next-line ft-flow/no-unused-expressions
|
|
21
|
+
0 &&
|
|
22
|
+
(module.exports = {
|
|
23
|
+
meta: true,
|
|
24
|
+
rules: true,
|
|
25
|
+
configs: true,
|
|
26
|
+
});
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "eslint-plugin-react-hooks",
|
|
3
3
|
"description": "ESLint rules for React Hooks",
|
|
4
|
-
"version": "7.0.0-canary-
|
|
4
|
+
"version": "7.0.0-canary-6160773f-20251023",
|
|
5
5
|
"repository": {
|
|
6
6
|
"type": "git",
|
|
7
7
|
"url": "https://github.com/facebook/react.git",
|