@sarj/eslint-plugin 16.38.54 → 16.38.55
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.cjs +4 -5
- package/dist/index.js +4 -5
- package/package.json +1 -1
package/dist/index.cjs
CHANGED
|
@@ -3695,7 +3695,7 @@ function primitiveResult(value, proof, active) {
|
|
|
3695
3695
|
return initializer !== void 0 && initializer.getSourceFile() === value.getSourceFile() && primitiveValue(initializer, proof, active);
|
|
3696
3696
|
}
|
|
3697
3697
|
function primitiveMember(node, proof, active) {
|
|
3698
|
-
if (!
|
|
3698
|
+
if (!import_typescript10.default.isIdentifier(node.expression)) return false;
|
|
3699
3699
|
const key = import_typescript10.default.isPropertyAccessExpression(node) ? node.name.text : node.argumentExpression && (import_typescript10.default.isStringLiteralLike(node.argumentExpression) || import_typescript10.default.isNumericLiteral(node.argumentExpression)) ? node.argumentExpression.text : void 0;
|
|
3700
3700
|
const symbol = proof.checker.getSymbolAtLocation(node.expression);
|
|
3701
3701
|
if (!symbol || key === void 0 || (symbol.flags & import_typescript10.default.SymbolFlags.Alias) !== 0) return false;
|
|
@@ -3741,7 +3741,7 @@ function privateElementDeclaration(opening) {
|
|
|
3741
3741
|
return declaration.type === import_utils28.AST_NODE_TYPES.VariableDeclarator && declaration.init === value && declaration.id.type === import_utils28.AST_NODE_TYPES.Identifier && declaration.parent.kind === "const" && declaration.parent.parent.type !== import_utils28.AST_NODE_TYPES.ExportNamedDeclaration ? declaration : null;
|
|
3742
3742
|
}
|
|
3743
3743
|
function closedElementValue(opening, declaration, fields2, reads, proof) {
|
|
3744
|
-
if (!
|
|
3744
|
+
if (!closedInvocation(opening, proof) || !constInitializer(proof.services.esTreeNodeToTSNodeMap.get(declaration))) return false;
|
|
3745
3745
|
const binding3 = proof.sourceCode.getDeclaredVariables(declaration).find((variable) => variable.defs.some((definition) => definition.type === "Variable" && definition.node === declaration));
|
|
3746
3746
|
const symbol = proof.checker.getSymbolAtLocation(proof.services.esTreeNodeToTSNodeMap.get(declaration.id));
|
|
3747
3747
|
if (!symbol || proof.exports.has(symbol)) return false;
|
|
@@ -3832,7 +3832,6 @@ var no_excess_jsx_props_default = createRule({
|
|
|
3832
3832
|
checker,
|
|
3833
3833
|
services,
|
|
3834
3834
|
sourceCode: context.sourceCode,
|
|
3835
|
-
staticScope: !dynamic,
|
|
3836
3835
|
exports: exportedSymbols(services.esTreeNodeToTSNodeMap.get(context.sourceCode.ast), checker),
|
|
3837
3836
|
values: /* @__PURE__ */ new WeakSet(),
|
|
3838
3837
|
objects: /* @__PURE__ */ new WeakMap(),
|
|
@@ -3858,7 +3857,7 @@ var no_excess_jsx_props_default = createRule({
|
|
|
3858
3857
|
if (directEval(node)) dynamic = true;
|
|
3859
3858
|
},
|
|
3860
3859
|
"Program:exit"() {
|
|
3861
|
-
if (!candidates.length) return;
|
|
3860
|
+
if (!candidates.length || dynamic) return;
|
|
3862
3861
|
services = import_utils28.ESLintUtils.getParserServices(context);
|
|
3863
3862
|
if (!currentNativeSource(context.sourceCode, services)) return;
|
|
3864
3863
|
for (const { node, declaration, fields: fields2 } of candidates) evaluate(node, declaration, fields2);
|
|
@@ -4313,7 +4312,7 @@ function isSearchParamReceiver(call, services) {
|
|
|
4313
4312
|
// package.json
|
|
4314
4313
|
var package_default = {
|
|
4315
4314
|
name: "@sarj/eslint-plugin",
|
|
4316
|
-
version: "16.38.
|
|
4315
|
+
version: "16.38.55",
|
|
4317
4316
|
packageManager: "npm@12.2.1",
|
|
4318
4317
|
description: "Custom ESLint rules for hypermodern TypeScript / React / Next.js projects",
|
|
4319
4318
|
type: "module",
|
package/dist/index.js
CHANGED
|
@@ -3644,7 +3644,7 @@ function primitiveResult(value, proof, active) {
|
|
|
3644
3644
|
return initializer !== void 0 && initializer.getSourceFile() === value.getSourceFile() && primitiveValue(initializer, proof, active);
|
|
3645
3645
|
}
|
|
3646
3646
|
function primitiveMember(node, proof, active) {
|
|
3647
|
-
if (!
|
|
3647
|
+
if (!ts10.isIdentifier(node.expression)) return false;
|
|
3648
3648
|
const key = ts10.isPropertyAccessExpression(node) ? node.name.text : node.argumentExpression && (ts10.isStringLiteralLike(node.argumentExpression) || ts10.isNumericLiteral(node.argumentExpression)) ? node.argumentExpression.text : void 0;
|
|
3649
3649
|
const symbol = proof.checker.getSymbolAtLocation(node.expression);
|
|
3650
3650
|
if (!symbol || key === void 0 || (symbol.flags & ts10.SymbolFlags.Alias) !== 0) return false;
|
|
@@ -3690,7 +3690,7 @@ function privateElementDeclaration(opening) {
|
|
|
3690
3690
|
return declaration.type === AST_NODE_TYPES26.VariableDeclarator && declaration.init === value && declaration.id.type === AST_NODE_TYPES26.Identifier && declaration.parent.kind === "const" && declaration.parent.parent.type !== AST_NODE_TYPES26.ExportNamedDeclaration ? declaration : null;
|
|
3691
3691
|
}
|
|
3692
3692
|
function closedElementValue(opening, declaration, fields2, reads, proof) {
|
|
3693
|
-
if (!
|
|
3693
|
+
if (!closedInvocation(opening, proof) || !constInitializer(proof.services.esTreeNodeToTSNodeMap.get(declaration))) return false;
|
|
3694
3694
|
const binding3 = proof.sourceCode.getDeclaredVariables(declaration).find((variable) => variable.defs.some((definition) => definition.type === "Variable" && definition.node === declaration));
|
|
3695
3695
|
const symbol = proof.checker.getSymbolAtLocation(proof.services.esTreeNodeToTSNodeMap.get(declaration.id));
|
|
3696
3696
|
if (!symbol || proof.exports.has(symbol)) return false;
|
|
@@ -3781,7 +3781,6 @@ var no_excess_jsx_props_default = createRule({
|
|
|
3781
3781
|
checker,
|
|
3782
3782
|
services,
|
|
3783
3783
|
sourceCode: context.sourceCode,
|
|
3784
|
-
staticScope: !dynamic,
|
|
3785
3784
|
exports: exportedSymbols(services.esTreeNodeToTSNodeMap.get(context.sourceCode.ast), checker),
|
|
3786
3785
|
values: /* @__PURE__ */ new WeakSet(),
|
|
3787
3786
|
objects: /* @__PURE__ */ new WeakMap(),
|
|
@@ -3807,7 +3806,7 @@ var no_excess_jsx_props_default = createRule({
|
|
|
3807
3806
|
if (directEval(node)) dynamic = true;
|
|
3808
3807
|
},
|
|
3809
3808
|
"Program:exit"() {
|
|
3810
|
-
if (!candidates.length) return;
|
|
3809
|
+
if (!candidates.length || dynamic) return;
|
|
3811
3810
|
services = ESLintUtils4.getParserServices(context);
|
|
3812
3811
|
if (!currentNativeSource(context.sourceCode, services)) return;
|
|
3813
3812
|
for (const { node, declaration, fields: fields2 } of candidates) evaluate(node, declaration, fields2);
|
|
@@ -4266,7 +4265,7 @@ function isSearchParamReceiver(call, services) {
|
|
|
4266
4265
|
// package.json
|
|
4267
4266
|
var package_default = {
|
|
4268
4267
|
name: "@sarj/eslint-plugin",
|
|
4269
|
-
version: "16.38.
|
|
4268
|
+
version: "16.38.55",
|
|
4270
4269
|
packageManager: "npm@12.2.1",
|
|
4271
4270
|
description: "Custom ESLint rules for hypermodern TypeScript / React / Next.js projects",
|
|
4272
4271
|
type: "module",
|