eslint-plugin-absolute 0.7.0 → 0.8.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.js +236 -89
- package/package.json +2 -2
package/dist/index.js
CHANGED
|
@@ -356,36 +356,29 @@ var hasDuplicateNames = (names) => {
|
|
|
356
356
|
}
|
|
357
357
|
return false;
|
|
358
358
|
};
|
|
359
|
+
var getStaticPropertyKeyName = (property) => {
|
|
360
|
+
if (property.key.type === "Identifier")
|
|
361
|
+
return property.key.name;
|
|
362
|
+
if (property.key.type === "Literal") {
|
|
363
|
+
const { value } = property.key;
|
|
364
|
+
return typeof value === "string" ? value : String(value);
|
|
365
|
+
}
|
|
366
|
+
return null;
|
|
367
|
+
};
|
|
368
|
+
var isAccessorPairOnly = (kinds) => kinds.length === 2 && kinds.includes("get") && kinds.includes("set");
|
|
359
369
|
var hasDuplicatePropertyNames = (properties) => {
|
|
360
370
|
const kindsByName = new Map;
|
|
361
|
-
|
|
362
|
-
if (property.type !== "Property")
|
|
363
|
-
|
|
364
|
-
|
|
365
|
-
|
|
366
|
-
|
|
367
|
-
keyName = property.key.name;
|
|
368
|
-
} else if (property.key.type === "Literal") {
|
|
369
|
-
const { value } = property.key;
|
|
370
|
-
keyName = typeof value === "string" ? value : String(value);
|
|
371
|
-
}
|
|
372
|
-
if (keyName === null) {
|
|
373
|
-
continue;
|
|
374
|
-
}
|
|
371
|
+
properties.forEach((property) => {
|
|
372
|
+
if (property.type !== "Property")
|
|
373
|
+
return;
|
|
374
|
+
const keyName = getStaticPropertyKeyName(property);
|
|
375
|
+
if (keyName === null)
|
|
376
|
+
return;
|
|
375
377
|
const kinds = kindsByName.get(keyName) ?? [];
|
|
376
378
|
kinds.push(property.kind);
|
|
377
379
|
kindsByName.set(keyName, kinds);
|
|
378
|
-
}
|
|
379
|
-
|
|
380
|
-
if (kinds.length === 1) {
|
|
381
|
-
continue;
|
|
382
|
-
}
|
|
383
|
-
if (kinds.length === 2 && kinds.includes("get") && kinds.includes("set")) {
|
|
384
|
-
continue;
|
|
385
|
-
}
|
|
386
|
-
return true;
|
|
387
|
-
}
|
|
388
|
-
return false;
|
|
380
|
+
});
|
|
381
|
+
return [...kindsByName.values()].some((kinds) => kinds.length > 1 && !isAccessorPairOnly(kinds));
|
|
389
382
|
};
|
|
390
383
|
var sortKeysFixable = {
|
|
391
384
|
create(context) {
|
|
@@ -547,13 +540,11 @@ var sortKeysFixable = {
|
|
|
547
540
|
const left = ancestor.type === "ForStatement" ? ancestor.init : ancestor.left;
|
|
548
541
|
if (!left)
|
|
549
542
|
return;
|
|
550
|
-
if (left.type
|
|
551
|
-
for (const declaration of left.declarations) {
|
|
552
|
-
addBoundIdentifiers(declaration.id, stableLocals);
|
|
553
|
-
}
|
|
554
|
-
} else {
|
|
543
|
+
if (left.type !== "VariableDeclaration") {
|
|
555
544
|
addBoundIdentifiers(left, stableLocals);
|
|
545
|
+
return;
|
|
556
546
|
}
|
|
547
|
+
left.declarations.forEach((declaration) => addBoundIdentifiers(declaration.id, stableLocals));
|
|
557
548
|
};
|
|
558
549
|
const addCatchClauseBindings = (ancestor, stableLocals) => {
|
|
559
550
|
if (ancestor.type !== "CatchClause" || !ancestor.param)
|
|
@@ -604,10 +595,8 @@ var sortKeysFixable = {
|
|
|
604
595
|
};
|
|
605
596
|
const isPureLocalVariableStatement = (statement, stableLocals) => {
|
|
606
597
|
for (const declaration of statement.declarations) {
|
|
607
|
-
if (declaration.init) {
|
|
608
|
-
|
|
609
|
-
return false;
|
|
610
|
-
}
|
|
598
|
+
if (declaration.init && !isPureRuntimeExpression(declaration.init, stableLocals)) {
|
|
599
|
+
return false;
|
|
611
600
|
}
|
|
612
601
|
addBoundIdentifiers(declaration.id, stableLocals);
|
|
613
602
|
}
|
|
@@ -708,9 +697,7 @@ var sortKeysFixable = {
|
|
|
708
697
|
return;
|
|
709
698
|
}
|
|
710
699
|
if (ts.isObjectBindingPattern(node) || ts.isArrayBindingPattern(node)) {
|
|
711
|
-
|
|
712
|
-
addTsBoundIdentifiers(element, stableLocals);
|
|
713
|
-
}
|
|
700
|
+
node.elements.forEach((element) => addTsBoundIdentifiers(element, stableLocals));
|
|
714
701
|
}
|
|
715
702
|
};
|
|
716
703
|
const getCalleeIdentifier = (callee) => {
|
|
@@ -789,20 +776,21 @@ var sortKeysFixable = {
|
|
|
789
776
|
return false;
|
|
790
777
|
return isPureTsExpression(expression.right, stableLocals);
|
|
791
778
|
};
|
|
779
|
+
const isPureTsVariableStatement = (statement, stableLocals) => {
|
|
780
|
+
for (const declaration of statement.declarationList.declarations) {
|
|
781
|
+
if (declaration.initializer && !isPureTsExpression(declaration.initializer, stableLocals)) {
|
|
782
|
+
return false;
|
|
783
|
+
}
|
|
784
|
+
addTsBoundIdentifiers(declaration.name, stableLocals);
|
|
785
|
+
}
|
|
786
|
+
return true;
|
|
787
|
+
};
|
|
792
788
|
const isPureTsStatement = (statement, stableLocals) => {
|
|
793
789
|
if (ts.isReturnStatement(statement)) {
|
|
794
790
|
return !statement.expression || isPureTsExpression(statement.expression, stableLocals);
|
|
795
791
|
}
|
|
796
792
|
if (ts.isVariableStatement(statement)) {
|
|
797
|
-
|
|
798
|
-
if (declaration.initializer) {
|
|
799
|
-
if (!isPureTsExpression(declaration.initializer, stableLocals)) {
|
|
800
|
-
return false;
|
|
801
|
-
}
|
|
802
|
-
}
|
|
803
|
-
addTsBoundIdentifiers(declaration.name, stableLocals);
|
|
804
|
-
}
|
|
805
|
-
return true;
|
|
793
|
+
return isPureTsVariableStatement(statement, stableLocals);
|
|
806
794
|
}
|
|
807
795
|
if (ts.isExpressionStatement(statement)) {
|
|
808
796
|
return isPureTsLocalAssignment(statement.expression, stableLocals);
|
|
@@ -1059,20 +1047,12 @@ var sortKeysFixable = {
|
|
|
1059
1047
|
}
|
|
1060
1048
|
return isPureImportedCallExpression(callExpression);
|
|
1061
1049
|
};
|
|
1062
|
-
const
|
|
1063
|
-
if (!tsChecker || !esTreeNodeToTSNodeMap)
|
|
1064
|
-
return;
|
|
1065
|
-
const tsNode = esTreeNodeToTSNodeMap.get(node);
|
|
1066
|
-
if (!tsNode)
|
|
1067
|
-
return;
|
|
1068
|
-
const type = tsChecker.getTypeAtLocation(tsNode);
|
|
1069
|
-
return type.symbol ?? type.aliasSymbol;
|
|
1070
|
-
};
|
|
1050
|
+
const isUnionType = (type) => Boolean(type.flags & ts.TypeFlags.Union);
|
|
1071
1051
|
const isObjectLikeType = (type) => {
|
|
1072
1052
|
if (type.flags & (ts.TypeFlags.Null | ts.TypeFlags.Undefined | ts.TypeFlags.Void)) {
|
|
1073
1053
|
return false;
|
|
1074
1054
|
}
|
|
1075
|
-
if (type
|
|
1055
|
+
if (isUnionType(type)) {
|
|
1076
1056
|
return type.types.every((member) => {
|
|
1077
1057
|
if (member.flags & (ts.TypeFlags.Null | ts.TypeFlags.Undefined | ts.TypeFlags.Void)) {
|
|
1078
1058
|
return true;
|
|
@@ -1208,10 +1188,7 @@ var sortKeysFixable = {
|
|
|
1208
1188
|
return true;
|
|
1209
1189
|
}
|
|
1210
1190
|
if (node.callee.type === "Identifier") {
|
|
1211
|
-
|
|
1212
|
-
return true;
|
|
1213
|
-
}
|
|
1214
|
-
return callReturnsNominalInstance(node);
|
|
1191
|
+
return isPureIdentifierCall(node) || callReturnsNominalInstance(node);
|
|
1215
1192
|
}
|
|
1216
1193
|
if (node.callee.type !== "MemberExpression") {
|
|
1217
1194
|
return false;
|
|
@@ -1395,9 +1372,7 @@ ${indent}`;
|
|
|
1395
1372
|
}
|
|
1396
1373
|
if (autoFixable) {
|
|
1397
1374
|
const impureCount = keys.filter((key) => key.node.type === "Property" && !isPureRuntimeExpression(key.node.value, getStableLocalsForNode(key.node))).length;
|
|
1398
|
-
|
|
1399
|
-
autoFixable = false;
|
|
1400
|
-
}
|
|
1375
|
+
autoFixable = impureCount <= 1;
|
|
1401
1376
|
}
|
|
1402
1377
|
let fixProvided = false;
|
|
1403
1378
|
const createReportWithFix = (curr, shouldFix) => {
|
|
@@ -3329,43 +3304,142 @@ var inlineStyleLimit = {
|
|
|
3329
3304
|
}
|
|
3330
3305
|
};
|
|
3331
3306
|
|
|
3332
|
-
// src/rules/no-inline-
|
|
3333
|
-
var
|
|
3307
|
+
// src/rules/no-inline-object-types.ts
|
|
3308
|
+
var DEFAULT_MIN_PROPERTIES = 2;
|
|
3309
|
+
var toPascalCase = (name) => {
|
|
3310
|
+
const parts = name.replace(/[_-]+/g, " ").split(/\s+/).filter(Boolean);
|
|
3311
|
+
if (parts.length === 0)
|
|
3312
|
+
return name;
|
|
3313
|
+
return parts.map((part) => part.charAt(0).toUpperCase() + part.slice(1)).join("");
|
|
3314
|
+
};
|
|
3315
|
+
var collectInlineObjectTypes = (node, found) => {
|
|
3316
|
+
if (node.type === "TSTypeLiteral") {
|
|
3317
|
+
found.push(node);
|
|
3318
|
+
return;
|
|
3319
|
+
}
|
|
3320
|
+
if (node.type === "TSArrayType") {
|
|
3321
|
+
collectInlineObjectTypes(node.elementType, found);
|
|
3322
|
+
return;
|
|
3323
|
+
}
|
|
3324
|
+
if (node.type === "TSUnionType" || node.type === "TSIntersectionType") {
|
|
3325
|
+
node.types.forEach((member) => collectInlineObjectTypes(member, found));
|
|
3326
|
+
return;
|
|
3327
|
+
}
|
|
3328
|
+
if (node.type === "TSTypeReference" && node.typeArguments) {
|
|
3329
|
+
node.typeArguments.params.forEach((arg) => collectInlineObjectTypes(arg, found));
|
|
3330
|
+
}
|
|
3331
|
+
};
|
|
3332
|
+
var unwrapParamTarget = (node) => {
|
|
3333
|
+
if (node.type === "TSParameterProperty") {
|
|
3334
|
+
return unwrapParamTarget(node.parameter);
|
|
3335
|
+
}
|
|
3336
|
+
if (node.type === "AssignmentPattern") {
|
|
3337
|
+
return unwrapParamTarget(node.left);
|
|
3338
|
+
}
|
|
3339
|
+
return node;
|
|
3340
|
+
};
|
|
3341
|
+
var SCOPE_BOUNDARY_TYPES = new Set([
|
|
3342
|
+
"ArrowFunctionExpression",
|
|
3343
|
+
"ClassDeclaration",
|
|
3344
|
+
"ClassExpression",
|
|
3345
|
+
"FunctionDeclaration",
|
|
3346
|
+
"FunctionExpression"
|
|
3347
|
+
]);
|
|
3348
|
+
var deriveNameFromAncestors = (node) => {
|
|
3349
|
+
let current = node.parent;
|
|
3350
|
+
while (current) {
|
|
3351
|
+
if (current.type === "VariableDeclarator" && current.id.type === "Identifier") {
|
|
3352
|
+
return toPascalCase(current.id.name);
|
|
3353
|
+
}
|
|
3354
|
+
if (current.type === "PropertyDefinition" && current.key.type === "Identifier") {
|
|
3355
|
+
return toPascalCase(current.key.name);
|
|
3356
|
+
}
|
|
3357
|
+
if (SCOPE_BOUNDARY_TYPES.has(current.type))
|
|
3358
|
+
return "T";
|
|
3359
|
+
current = current.parent;
|
|
3360
|
+
}
|
|
3361
|
+
return "T";
|
|
3362
|
+
};
|
|
3363
|
+
var noInlineObjectTypes = {
|
|
3334
3364
|
create(context) {
|
|
3335
|
-
const
|
|
3336
|
-
|
|
3337
|
-
|
|
3338
|
-
|
|
3339
|
-
|
|
3340
|
-
|
|
3365
|
+
const [options] = context.options;
|
|
3366
|
+
const minProperties = options?.minProperties ?? DEFAULT_MIN_PROPERTIES;
|
|
3367
|
+
const reportAnnotation = (typeNode, suggestedName) => {
|
|
3368
|
+
const literals = [];
|
|
3369
|
+
collectInlineObjectTypes(typeNode, literals);
|
|
3370
|
+
for (const literal of literals) {
|
|
3371
|
+
if (literal.members.length < minProperties)
|
|
3372
|
+
continue;
|
|
3373
|
+
const hasIndexSignature = literal.members.some((member) => member.type === "TSIndexSignature");
|
|
3374
|
+
if (hasIndexSignature)
|
|
3375
|
+
continue;
|
|
3341
3376
|
context.report({
|
|
3342
|
-
|
|
3343
|
-
|
|
3377
|
+
data: { suggestedName },
|
|
3378
|
+
messageId: "inlineObjectType",
|
|
3379
|
+
node: literal
|
|
3344
3380
|
});
|
|
3345
3381
|
}
|
|
3346
3382
|
};
|
|
3383
|
+
const handleFunctionParams = (params) => {
|
|
3384
|
+
for (const param of params) {
|
|
3385
|
+
const target = unwrapParamTarget(param);
|
|
3386
|
+
if (!("typeAnnotation" in target))
|
|
3387
|
+
continue;
|
|
3388
|
+
const annotation = target.typeAnnotation;
|
|
3389
|
+
if (!annotation || annotation.type !== "TSTypeAnnotation")
|
|
3390
|
+
continue;
|
|
3391
|
+
const name = target.type === "Identifier" ? toPascalCase(target.name) : "Params";
|
|
3392
|
+
reportAnnotation(annotation.typeAnnotation, name);
|
|
3393
|
+
}
|
|
3394
|
+
};
|
|
3347
3395
|
return {
|
|
3348
|
-
"
|
|
3349
|
-
if (node.
|
|
3396
|
+
"CallExpression, NewExpression"(node) {
|
|
3397
|
+
if (!node.typeArguments)
|
|
3350
3398
|
return;
|
|
3399
|
+
const name = deriveNameFromAncestors(node);
|
|
3400
|
+
for (const typeArg of node.typeArguments.params) {
|
|
3401
|
+
reportAnnotation(typeArg, name);
|
|
3351
3402
|
}
|
|
3352
|
-
|
|
3353
|
-
|
|
3403
|
+
},
|
|
3404
|
+
"FunctionDeclaration, FunctionExpression, ArrowFunctionExpression"(node) {
|
|
3405
|
+
handleFunctionParams(node.params);
|
|
3406
|
+
},
|
|
3407
|
+
PropertyDefinition(node) {
|
|
3408
|
+
if (!node.typeAnnotation || node.typeAnnotation.type !== "TSTypeAnnotation")
|
|
3354
3409
|
return;
|
|
3355
|
-
|
|
3356
|
-
|
|
3410
|
+
const name = node.key.type === "Identifier" ? toPascalCase(node.key.name) : "Field";
|
|
3411
|
+
reportAnnotation(node.typeAnnotation.typeAnnotation, name);
|
|
3412
|
+
},
|
|
3413
|
+
VariableDeclarator(node) {
|
|
3414
|
+
if (node.id.type !== "Identifier")
|
|
3415
|
+
return;
|
|
3416
|
+
const annotation = node.id.typeAnnotation;
|
|
3417
|
+
if (!annotation || annotation.type !== "TSTypeAnnotation")
|
|
3418
|
+
return;
|
|
3419
|
+
reportAnnotation(annotation.typeAnnotation, toPascalCase(node.id.name));
|
|
3357
3420
|
}
|
|
3358
3421
|
};
|
|
3359
3422
|
},
|
|
3360
|
-
defaultOptions: [],
|
|
3423
|
+
defaultOptions: [{ minProperties: DEFAULT_MIN_PROPERTIES }],
|
|
3361
3424
|
meta: {
|
|
3362
3425
|
docs: {
|
|
3363
|
-
description: "
|
|
3426
|
+
description: "Disallow inline object type literals on annotations (variables, class fields, function params, generic type arguments); prefer extracting them to a named type alias."
|
|
3364
3427
|
},
|
|
3365
3428
|
messages: {
|
|
3366
|
-
|
|
3429
|
+
inlineObjectType: "Inline object type should be extracted to a named type alias (e.g., `type {{suggestedName}} = { ... }`)."
|
|
3367
3430
|
},
|
|
3368
|
-
schema: [
|
|
3431
|
+
schema: [
|
|
3432
|
+
{
|
|
3433
|
+
additionalProperties: false,
|
|
3434
|
+
properties: {
|
|
3435
|
+
minProperties: {
|
|
3436
|
+
minimum: 1,
|
|
3437
|
+
type: "number"
|
|
3438
|
+
}
|
|
3439
|
+
},
|
|
3440
|
+
type: "object"
|
|
3441
|
+
}
|
|
3442
|
+
],
|
|
3369
3443
|
type: "suggestion"
|
|
3370
3444
|
}
|
|
3371
3445
|
};
|
|
@@ -3475,6 +3549,81 @@ var noNondeterministicRender = {
|
|
|
3475
3549
|
}
|
|
3476
3550
|
};
|
|
3477
3551
|
|
|
3552
|
+
// src/rules/no-redundant-type-annotation.ts
|
|
3553
|
+
import * as ts2 from "typescript";
|
|
3554
|
+
var ALLOWED_INIT_TYPES = new Set([
|
|
3555
|
+
"CallExpression",
|
|
3556
|
+
"Identifier",
|
|
3557
|
+
"MemberExpression",
|
|
3558
|
+
"NewExpression",
|
|
3559
|
+
"TSAsExpression"
|
|
3560
|
+
]);
|
|
3561
|
+
var noRedundantTypeAnnotation = {
|
|
3562
|
+
create(context) {
|
|
3563
|
+
const { sourceCode } = context;
|
|
3564
|
+
const parserServices = sourceCode.parserServices ?? null;
|
|
3565
|
+
const tsProgram = parserServices && "program" in parserServices ? parserServices.program : null;
|
|
3566
|
+
const tsChecker = tsProgram ? tsProgram.getTypeChecker() : null;
|
|
3567
|
+
const esTreeNodeToTSNodeMap = parserServices && "esTreeNodeToTSNodeMap" in parserServices ? parserServices.esTreeNodeToTSNodeMap : null;
|
|
3568
|
+
if (!tsChecker || !esTreeNodeToTSNodeMap) {
|
|
3569
|
+
return {};
|
|
3570
|
+
}
|
|
3571
|
+
const stringify = (type) => tsChecker.typeToString(type, undefined, ts2.TypeFormatFlags.NoTruncation | ts2.TypeFormatFlags.UseAliasDefinedOutsideCurrentScope);
|
|
3572
|
+
return {
|
|
3573
|
+
VariableDeclarator(node) {
|
|
3574
|
+
if (node.id.type !== "Identifier")
|
|
3575
|
+
return;
|
|
3576
|
+
if (!node.id.typeAnnotation)
|
|
3577
|
+
return;
|
|
3578
|
+
if (!node.init)
|
|
3579
|
+
return;
|
|
3580
|
+
if (!ALLOWED_INIT_TYPES.has(node.init.type))
|
|
3581
|
+
return;
|
|
3582
|
+
const annotationASTNode = node.id.typeAnnotation.typeAnnotation;
|
|
3583
|
+
const annotationTSNode = esTreeNodeToTSNodeMap.get(annotationASTNode);
|
|
3584
|
+
const initTSNode = esTreeNodeToTSNodeMap.get(node.init);
|
|
3585
|
+
if (!annotationTSNode || !initTSNode)
|
|
3586
|
+
return;
|
|
3587
|
+
if (!ts2.isTypeNode(annotationTSNode))
|
|
3588
|
+
return;
|
|
3589
|
+
const annotationType = tsChecker.getTypeFromTypeNode(annotationTSNode);
|
|
3590
|
+
const initType = tsChecker.getTypeAtLocation(initTSNode);
|
|
3591
|
+
const aliasSymbol = ts2.isTypeReferenceNode(annotationTSNode) ? tsChecker.getSymbolAtLocation(annotationTSNode.typeName) : undefined;
|
|
3592
|
+
if (aliasSymbol && aliasSymbol.flags & ts2.SymbolFlags.TypeAlias && initType.aliasSymbol !== aliasSymbol) {
|
|
3593
|
+
return;
|
|
3594
|
+
}
|
|
3595
|
+
const bothAny = (annotationType.flags & ts2.TypeFlags.Any) !== 0 && (initType.flags & ts2.TypeFlags.Any) !== 0;
|
|
3596
|
+
if (bothAny)
|
|
3597
|
+
return;
|
|
3598
|
+
if (annotationType.aliasSymbol !== initType.aliasSymbol)
|
|
3599
|
+
return;
|
|
3600
|
+
if (stringify(annotationType) !== stringify(initType))
|
|
3601
|
+
return;
|
|
3602
|
+
const annotationNode = node.id.typeAnnotation;
|
|
3603
|
+
context.report({
|
|
3604
|
+
fix(fixer) {
|
|
3605
|
+
return fixer.removeRange(annotationNode.range);
|
|
3606
|
+
},
|
|
3607
|
+
messageId: "redundantTypeAnnotation",
|
|
3608
|
+
node: annotationNode
|
|
3609
|
+
});
|
|
3610
|
+
}
|
|
3611
|
+
};
|
|
3612
|
+
},
|
|
3613
|
+
defaultOptions: [],
|
|
3614
|
+
meta: {
|
|
3615
|
+
docs: {
|
|
3616
|
+
description: "Disallow type annotations on variable declarations whose initializer already has the same inferred type."
|
|
3617
|
+
},
|
|
3618
|
+
fixable: "code",
|
|
3619
|
+
messages: {
|
|
3620
|
+
redundantTypeAnnotation: "Type annotation is redundant \u2014 the initializer already has this type. Remove the annotation and let TypeScript infer it."
|
|
3621
|
+
},
|
|
3622
|
+
schema: [],
|
|
3623
|
+
type: "suggestion"
|
|
3624
|
+
}
|
|
3625
|
+
};
|
|
3626
|
+
|
|
3478
3627
|
// src/rules/no-unnecessary-div.ts
|
|
3479
3628
|
import { AST_NODE_TYPES as AST_NODE_TYPES4 } from "@typescript-eslint/utils";
|
|
3480
3629
|
var noUnnecessaryDiv = {
|
|
@@ -3545,11 +3694,8 @@ var findOwnDeclaration = (program, name) => {
|
|
|
3545
3694
|
if (stmt.type === "ExportNamedDeclaration" && stmt.declaration && isLocalDeclaration(stmt.declaration) && declarationName(stmt.declaration) === name) {
|
|
3546
3695
|
return { alreadyExported: true, decl: stmt.declaration };
|
|
3547
3696
|
}
|
|
3548
|
-
if (stmt.type === "ExportDefaultDeclaration" &&
|
|
3549
|
-
return {
|
|
3550
|
-
alreadyExported: true,
|
|
3551
|
-
decl: stmt.declaration
|
|
3552
|
-
};
|
|
3697
|
+
if (stmt.type === "ExportDefaultDeclaration" && isLocalDeclaration(stmt.declaration) && declarationName(stmt.declaration) === name) {
|
|
3698
|
+
return { alreadyExported: true, decl: stmt.declaration };
|
|
3553
3699
|
}
|
|
3554
3700
|
if (isLocalDeclaration(stmt) && declarationName(stmt) === name) {
|
|
3555
3701
|
return { alreadyExported: false, decl: stmt };
|
|
@@ -3642,11 +3788,12 @@ var src_default = {
|
|
|
3642
3788
|
"min-var-length": minVarLength,
|
|
3643
3789
|
"no-button-navigation": noButtonNavigation,
|
|
3644
3790
|
"no-explicit-return-type": noExplicitReturnTypes,
|
|
3645
|
-
"no-inline-
|
|
3791
|
+
"no-inline-object-types": noInlineObjectTypes,
|
|
3646
3792
|
"no-multi-style-objects": noMultiStyleObjects,
|
|
3647
3793
|
"no-nested-jsx-return": noNestedJSXReturn,
|
|
3648
3794
|
"no-nondeterministic-render": noNondeterministicRender,
|
|
3649
3795
|
"no-or-none-component": noOrNoneComponent,
|
|
3796
|
+
"no-redundant-type-annotation": noRedundantTypeAnnotation,
|
|
3650
3797
|
"no-transition-cssproperties": noTransitionCSSProperties,
|
|
3651
3798
|
"no-unnecessary-div": noUnnecessaryDiv,
|
|
3652
3799
|
"no-unnecessary-key": noUnnecessaryKey,
|
package/package.json
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
"author": "Alex Kahn",
|
|
3
3
|
"description": "ESLint plugin for AbsoluteJS",
|
|
4
4
|
"devDependencies": {
|
|
5
|
-
"@absolutejs/absolute": "0.
|
|
5
|
+
"@absolutejs/absolute": "0.19.0-beta.838",
|
|
6
6
|
"@types/bun": "1.3.3",
|
|
7
7
|
"@types/react": "19.2.14",
|
|
8
8
|
"@typescript-eslint/rule-tester": "8.56.0",
|
|
@@ -40,5 +40,5 @@
|
|
|
40
40
|
"typecheck": "bun run tsc --noEmit"
|
|
41
41
|
},
|
|
42
42
|
"type": "module",
|
|
43
|
-
"version": "0.
|
|
43
|
+
"version": "0.8.0"
|
|
44
44
|
}
|