@taiga-ui/eslint-plugin-experience-next 0.506.0 → 0.507.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/README.md +37 -0
- package/index.d.ts +3 -0
- package/index.esm.js +488 -435
- package/package.json +1 -1
- package/rules/recommended/prefer-conditional-return.d.ts +5 -0
package/index.esm.js
CHANGED
|
@@ -1213,6 +1213,7 @@ var recommended = defineConfig([
|
|
|
1213
1213
|
'@taiga-ui/experience-next/no-useless-untracked': 'error',
|
|
1214
1214
|
'@taiga-ui/experience-next/object-single-line': ['error', { printWidth: 90 }],
|
|
1215
1215
|
'@taiga-ui/experience-next/prefer-combined-if-control-flow': 'error',
|
|
1216
|
+
'@taiga-ui/experience-next/prefer-conditional-return': 'error',
|
|
1216
1217
|
'@taiga-ui/experience-next/prefer-loose-null-check': 'error',
|
|
1217
1218
|
'@taiga-ui/experience-next/prefer-multi-arg-push': 'error',
|
|
1218
1219
|
'@taiga-ui/experience-next/prefer-namespace-keyword': 'error',
|
|
@@ -33201,10 +33202,7 @@ var VERSION = new Version("20.3.12");
|
|
|
33201
33202
|
publishFacade(_global);
|
|
33202
33203
|
|
|
33203
33204
|
function getAttributeValueSpan(attr) {
|
|
33204
|
-
|
|
33205
|
-
return attr.handlerSpan;
|
|
33206
|
-
}
|
|
33207
|
-
return attr.valueSpan;
|
|
33205
|
+
return attr instanceof dist$4.TmplAstBoundEvent ? attr.handlerSpan : attr.valueSpan;
|
|
33208
33206
|
}
|
|
33209
33207
|
function getElementAttributeLikes(element) {
|
|
33210
33208
|
const seen = new Set();
|
|
@@ -46224,7 +46222,7 @@ function buildMultilineStartTag(node, sourceText) {
|
|
|
46224
46222
|
closing,
|
|
46225
46223
|
].join('\n');
|
|
46226
46224
|
}
|
|
46227
|
-
const rule$
|
|
46225
|
+
const rule$R = createRule({
|
|
46228
46226
|
name: 'attrs-newline',
|
|
46229
46227
|
rule: {
|
|
46230
46228
|
create(context) {
|
|
@@ -46371,7 +46369,7 @@ const config$5 = {
|
|
|
46371
46369
|
function getCorrectOrderRelative(correct, current) {
|
|
46372
46370
|
return correct.filter((item) => current.includes(item));
|
|
46373
46371
|
}
|
|
46374
|
-
const rule$
|
|
46372
|
+
const rule$Q = createRule({
|
|
46375
46373
|
name: 'decorator-key-sort',
|
|
46376
46374
|
rule: config$5,
|
|
46377
46375
|
});
|
|
@@ -46430,12 +46428,9 @@ function getNodeLabel(node) {
|
|
|
46430
46428
|
if (node instanceof dist$4.TmplAstElement) {
|
|
46431
46429
|
return `<${node.name}>`;
|
|
46432
46430
|
}
|
|
46433
|
-
|
|
46434
|
-
return 'binding';
|
|
46435
|
-
}
|
|
46436
|
-
return 'text';
|
|
46431
|
+
return node instanceof dist$4.TmplAstBoundText ? 'binding' : 'text';
|
|
46437
46432
|
}
|
|
46438
|
-
const rule$
|
|
46433
|
+
const rule$P = createRule({
|
|
46439
46434
|
name: 'element-newline',
|
|
46440
46435
|
rule: {
|
|
46441
46436
|
create(context) {
|
|
@@ -46564,10 +46559,9 @@ function getStaticStringValue(node) {
|
|
|
46564
46559
|
if (isStringLiteral(node)) {
|
|
46565
46560
|
return node.value;
|
|
46566
46561
|
}
|
|
46567
|
-
|
|
46568
|
-
|
|
46569
|
-
|
|
46570
|
-
return node.quasis[0]?.value.cooked ?? node.quasis[0]?.value.raw ?? '';
|
|
46562
|
+
return isStaticTemplateLiteral(node)
|
|
46563
|
+
? (node.quasis[0]?.value.cooked ?? node.quasis[0]?.value.raw ?? '')
|
|
46564
|
+
: null;
|
|
46571
46565
|
}
|
|
46572
46566
|
function isEmptyStaticString(node) {
|
|
46573
46567
|
return getStaticStringValue(node) === '';
|
|
@@ -46577,17 +46571,13 @@ function getStaticPropertyName(key) {
|
|
|
46577
46571
|
if (key.type === dist$3.AST_NODE_TYPES.Identifier) {
|
|
46578
46572
|
return key.name;
|
|
46579
46573
|
}
|
|
46580
|
-
|
|
46581
|
-
(typeof key.value === 'string' || typeof key.value === 'number')
|
|
46582
|
-
|
|
46583
|
-
|
|
46584
|
-
return getStaticStringValue(key);
|
|
46574
|
+
return key.type === dist$3.AST_NODE_TYPES.Literal &&
|
|
46575
|
+
(typeof key.value === 'string' || typeof key.value === 'number')
|
|
46576
|
+
? String(key.value)
|
|
46577
|
+
: getStaticStringValue(key);
|
|
46585
46578
|
}
|
|
46586
46579
|
function getObjectPropertyName(node) {
|
|
46587
|
-
|
|
46588
|
-
return null;
|
|
46589
|
-
}
|
|
46590
|
-
return getStaticPropertyName(node.key);
|
|
46580
|
+
return node.computed ? null : getStaticPropertyName(node.key);
|
|
46591
46581
|
}
|
|
46592
46582
|
function getMemberExpressionPropertyName(node) {
|
|
46593
46583
|
if (!node.computed && node.property.type === dist$3.AST_NODE_TYPES.Identifier) {
|
|
@@ -46666,7 +46656,7 @@ const PRESETS = {
|
|
|
46666
46656
|
$VUE: ['$CLASS', '$ID', '$VUE_ATTRIBUTE'],
|
|
46667
46657
|
$VUE_ATTRIBUTE: /^v-/,
|
|
46668
46658
|
};
|
|
46669
|
-
const rule$
|
|
46659
|
+
const rule$O = createRule({
|
|
46670
46660
|
create(context, [options]) {
|
|
46671
46661
|
const sourceCode = context.sourceCode;
|
|
46672
46662
|
const settings = {
|
|
@@ -46821,10 +46811,9 @@ function getGroup(query, ignoreCase) {
|
|
|
46821
46811
|
},
|
|
46822
46812
|
];
|
|
46823
46813
|
}
|
|
46824
|
-
|
|
46825
|
-
|
|
46826
|
-
|
|
46827
|
-
return [{ query, regexp: preset, values: [] }];
|
|
46814
|
+
return Array.isArray(preset)
|
|
46815
|
+
? preset.flatMap((item) => getGroup(item, ignoreCase))
|
|
46816
|
+
: [{ query, regexp: preset, values: [] }];
|
|
46828
46817
|
}
|
|
46829
46818
|
function ensureDefaultGroup(groups) {
|
|
46830
46819
|
const existing = groups.find(({ unknown }) => unknown);
|
|
@@ -46850,10 +46839,9 @@ function getFixText(hostObject, properties, sortedProperties, sourceCode) {
|
|
|
46850
46839
|
.join(', ')}}`;
|
|
46851
46840
|
}
|
|
46852
46841
|
const attachedComments = getAttachedComments(hostObject, properties, sourceCode, comments);
|
|
46853
|
-
|
|
46854
|
-
|
|
46855
|
-
|
|
46856
|
-
return renderFixWithComments(hostObject, sortedProperties, sourceCode, attachedComments);
|
|
46842
|
+
return attachedComments
|
|
46843
|
+
? renderFixWithComments(hostObject, sortedProperties, sourceCode, attachedComments)
|
|
46844
|
+
: null;
|
|
46857
46845
|
}
|
|
46858
46846
|
function getAttachedComments(hostObject, properties, sourceCode, comments) {
|
|
46859
46847
|
const attached = new Map();
|
|
@@ -46999,7 +46987,7 @@ const config$4 = {
|
|
|
46999
46987
|
type: 'suggestion',
|
|
47000
46988
|
},
|
|
47001
46989
|
};
|
|
47002
|
-
const rule$
|
|
46990
|
+
const rule$N = createRule({
|
|
47003
46991
|
name: 'html-logical-properties',
|
|
47004
46992
|
rule: config$4,
|
|
47005
46993
|
});
|
|
@@ -247715,12 +247703,11 @@ function getProgramResolutionCache(program) {
|
|
|
247715
247703
|
return null;
|
|
247716
247704
|
}
|
|
247717
247705
|
const cache = getCache.call(program);
|
|
247718
|
-
|
|
247706
|
+
return cache === null ||
|
|
247719
247707
|
typeof cache !== 'object' ||
|
|
247720
|
-
!('getOrCreateCacheForDirectory' in cache)
|
|
247721
|
-
|
|
247722
|
-
|
|
247723
|
-
return cache;
|
|
247708
|
+
!('getOrCreateCacheForDirectory' in cache)
|
|
247709
|
+
? null
|
|
247710
|
+
: cache;
|
|
247724
247711
|
}
|
|
247725
247712
|
function getFallbackResolution(program) {
|
|
247726
247713
|
const cached = fallbackResolutionByProgram.get(program);
|
|
@@ -247751,10 +247738,9 @@ function resolveModule(program, containingFile, moduleSpecifier) {
|
|
|
247751
247738
|
}
|
|
247752
247739
|
function resolveModuleFileName(program, containingFile, moduleSpecifier) {
|
|
247753
247740
|
const resolved = resolveModule(program, containingFile, moduleSpecifier);
|
|
247754
|
-
|
|
247755
|
-
|
|
247756
|
-
|
|
247757
|
-
return resolved.resolvedFileName;
|
|
247741
|
+
return !resolved || resolved.isExternalLibraryImport
|
|
247742
|
+
? null
|
|
247743
|
+
: resolved.resolvedFileName;
|
|
247758
247744
|
}
|
|
247759
247745
|
function splitModuleSpecifierQuery(moduleSpecifier) {
|
|
247760
247746
|
const queryIndex = moduleSpecifier.indexOf('?');
|
|
@@ -247849,22 +247835,20 @@ function importDeclarationHasRuntimeEdge(node) {
|
|
|
247849
247835
|
if (!namedBindings) {
|
|
247850
247836
|
return false;
|
|
247851
247837
|
}
|
|
247852
|
-
|
|
247853
|
-
|
|
247854
|
-
|
|
247855
|
-
|
|
247856
|
-
namedBindings.elements.some((specifier) => !specifier.isTypeOnly));
|
|
247838
|
+
return ts.isNamespaceImport(namedBindings)
|
|
247839
|
+
? true
|
|
247840
|
+
: namedBindings.elements.length === 0 ||
|
|
247841
|
+
namedBindings.elements.some((specifier) => !specifier.isTypeOnly);
|
|
247857
247842
|
}
|
|
247858
247843
|
function exportDeclarationHasRuntimeEdge(node) {
|
|
247859
247844
|
if (node.isTypeOnly) {
|
|
247860
247845
|
return false;
|
|
247861
247846
|
}
|
|
247862
247847
|
const exportClause = node.exportClause;
|
|
247863
|
-
|
|
247864
|
-
|
|
247865
|
-
|
|
247866
|
-
|
|
247867
|
-
exportClause.elements.some((specifier) => !specifier.isTypeOnly));
|
|
247848
|
+
return !exportClause || ts.isNamespaceExport(exportClause)
|
|
247849
|
+
? true
|
|
247850
|
+
: exportClause.elements.length === 0 ||
|
|
247851
|
+
exportClause.elements.some((specifier) => !specifier.isTypeOnly);
|
|
247868
247852
|
}
|
|
247869
247853
|
function getRuntimeModuleSpecifier(statement) {
|
|
247870
247854
|
if (ts.isImportDeclaration(statement)) {
|
|
@@ -247927,10 +247911,9 @@ function hasRuntimeDefaultModifier(statement) {
|
|
|
247927
247911
|
!ts.isTypeAliasDeclaration(statement));
|
|
247928
247912
|
}
|
|
247929
247913
|
function exportsDefaultSpecifier(node) {
|
|
247930
|
-
|
|
247931
|
-
|
|
247932
|
-
|
|
247933
|
-
return node.exportClause.elements.some((specifier) => !specifier.isTypeOnly && specifier.name.text === 'default');
|
|
247914
|
+
return node.isTypeOnly || !node.exportClause || !ts.isNamedExports(node.exportClause)
|
|
247915
|
+
? false
|
|
247916
|
+
: node.exportClause.elements.some((specifier) => !specifier.isTypeOnly && specifier.name.text === 'default');
|
|
247934
247917
|
}
|
|
247935
247918
|
function sourceFileHasDefaultExport(sourceFile) {
|
|
247936
247919
|
return sourceFile.statements.some((statement) => (ts.isExportAssignment(statement) && !statement.isExportEquals) ||
|
|
@@ -247958,25 +247941,20 @@ function hasRuntimeEstreeImport(node) {
|
|
|
247958
247941
|
if (node.importKind === 'type') {
|
|
247959
247942
|
return false;
|
|
247960
247943
|
}
|
|
247961
|
-
|
|
247962
|
-
|
|
247963
|
-
|
|
247964
|
-
|
|
247965
|
-
|
|
247966
|
-
return true;
|
|
247967
|
-
}
|
|
247968
|
-
return specifier.importKind !== 'type';
|
|
247969
|
-
});
|
|
247944
|
+
return node.specifiers.length === 0
|
|
247945
|
+
? true
|
|
247946
|
+
: node.specifiers.some((specifier) => specifier.type === dist$3.AST_NODE_TYPES.ImportSpecifier
|
|
247947
|
+
? specifier.importKind !== 'type'
|
|
247948
|
+
: true);
|
|
247970
247949
|
}
|
|
247971
247950
|
function hasRuntimeEstreeReExport(node) {
|
|
247972
247951
|
if (node.exportKind === 'type') {
|
|
247973
247952
|
return false;
|
|
247974
247953
|
}
|
|
247975
|
-
|
|
247976
|
-
|
|
247977
|
-
|
|
247978
|
-
|
|
247979
|
-
node.specifiers.some((specifier) => specifier.exportKind !== 'type'));
|
|
247954
|
+
return node.type === dist$3.AST_NODE_TYPES.ExportAllDeclaration
|
|
247955
|
+
? true
|
|
247956
|
+
: node.specifiers.length === 0 ||
|
|
247957
|
+
node.specifiers.some((specifier) => specifier.exportKind !== 'type');
|
|
247980
247958
|
}
|
|
247981
247959
|
function getImportOrReExportModuleSpecifier(node) {
|
|
247982
247960
|
if (node.type === dist$3.AST_NODE_TYPES.ImportDeclaration) {
|
|
@@ -248199,13 +248177,10 @@ function isInAngularSafeContext(identifier) {
|
|
|
248199
248177
|
return false;
|
|
248200
248178
|
}
|
|
248201
248179
|
function isImportUsedOnlyAsAngularDiFirstArg(node, sourceCode) {
|
|
248202
|
-
const valueSpecifiers = node.specifiers.filter((specifier) =>
|
|
248203
|
-
|
|
248204
|
-
|
|
248205
|
-
|
|
248206
|
-
}
|
|
248207
|
-
return specifier.importKind !== 'type';
|
|
248208
|
-
});
|
|
248180
|
+
const valueSpecifiers = node.specifiers.filter((specifier) => specifier.type === dist$3.AST_NODE_TYPES.ImportDefaultSpecifier ||
|
|
248181
|
+
specifier.type === dist$3.AST_NODE_TYPES.ImportNamespaceSpecifier
|
|
248182
|
+
? true
|
|
248183
|
+
: specifier.importKind !== 'type');
|
|
248209
248184
|
if (valueSpecifiers.length === 0) {
|
|
248210
248185
|
return false;
|
|
248211
248186
|
}
|
|
@@ -248251,7 +248226,7 @@ function isImportUsedOnlyAsAngularDiFirstArg(node, sourceCode) {
|
|
|
248251
248226
|
}
|
|
248252
248227
|
return hasSafeRuntimeUsage;
|
|
248253
248228
|
}
|
|
248254
|
-
const rule$
|
|
248229
|
+
const rule$M = createRule({
|
|
248255
248230
|
create(context) {
|
|
248256
248231
|
const { checker, esTreeNodeToTSNodeMap, sourceCode, tsProgram } = getTypeAwareRuleContext(context);
|
|
248257
248232
|
const checkCycles = context.options[0]?.checkCycles ?? true;
|
|
@@ -248426,11 +248401,10 @@ const rule$L = createRule({
|
|
|
248426
248401
|
const importSegments = moduleSpecifierPath.replace(/^\.\//, '').split('/');
|
|
248427
248402
|
const importParentCount = countRelativeParents(importSegments);
|
|
248428
248403
|
const expectedParentCount = countRelativeParents(expectedPath.split('/'));
|
|
248429
|
-
|
|
248430
|
-
expectedPath === moduleSpecifierPath
|
|
248431
|
-
|
|
248432
|
-
|
|
248433
|
-
return expectedPath;
|
|
248404
|
+
return importParentCount <= expectedParentCount ||
|
|
248405
|
+
expectedPath === moduleSpecifierPath
|
|
248406
|
+
? null
|
|
248407
|
+
: expectedPath;
|
|
248434
248408
|
}
|
|
248435
248409
|
function getUselessPathSegmentsReplacement(moduleSpecifierPath) {
|
|
248436
248410
|
const resolved = resolveModule(tsProgram, context.filename, moduleSpecifierPath);
|
|
@@ -248921,10 +248895,7 @@ function isStringLike(node) {
|
|
|
248921
248895
|
return isStringLiteral(node) || node.type === dist$2.AST_NODE_TYPES.TemplateLiteral;
|
|
248922
248896
|
}
|
|
248923
248897
|
function getStringValue(node) {
|
|
248924
|
-
|
|
248925
|
-
return node.value;
|
|
248926
|
-
}
|
|
248927
|
-
return node.quasis[0]?.value.raw || '';
|
|
248898
|
+
return isStringLiteral(node) ? node.value : node.quasis[0]?.value.raw || '';
|
|
248928
248899
|
}
|
|
248929
248900
|
function isEmptyString(node) {
|
|
248930
248901
|
return (isEmptyStaticString(node) &&
|
|
@@ -248942,10 +248913,7 @@ function getDescriptionValue(node) {
|
|
|
248942
248913
|
if (isStringLike(node)) {
|
|
248943
248914
|
return getStringValue(node);
|
|
248944
248915
|
}
|
|
248945
|
-
|
|
248946
|
-
return getStringValue(node.consequent);
|
|
248947
|
-
}
|
|
248948
|
-
return undefined;
|
|
248916
|
+
return isNgDevModeConditional(node) ? getStringValue(node.consequent) : undefined;
|
|
248949
248917
|
}
|
|
248950
248918
|
function getDescriptionNode(node) {
|
|
248951
248919
|
if (isStringLike(node)) {
|
|
@@ -248972,12 +248940,11 @@ function getNgDevModeDeclarationFix(program, fixer) {
|
|
|
248972
248940
|
return fixer.insertTextAfter(lastImport, '\n\ndeclare const ngDevMode: boolean;');
|
|
248973
248941
|
}
|
|
248974
248942
|
const [firstStatement] = program.body;
|
|
248975
|
-
|
|
248976
|
-
|
|
248977
|
-
|
|
248978
|
-
return fixer.insertTextBeforeRange([0, 0], 'declare const ngDevMode: boolean;\n');
|
|
248943
|
+
return firstStatement
|
|
248944
|
+
? fixer.insertTextBefore(firstStatement, 'declare const ngDevMode: boolean;\n\n')
|
|
248945
|
+
: fixer.insertTextBeforeRange([0, 0], 'declare const ngDevMode: boolean;\n');
|
|
248979
248946
|
}
|
|
248980
|
-
const rule$
|
|
248947
|
+
const rule$L = createRule({
|
|
248981
248948
|
create(context) {
|
|
248982
248949
|
const { sourceCode } = context;
|
|
248983
248950
|
const program = sourceCode.ast;
|
|
@@ -249026,7 +248993,7 @@ const rule$K = createRule({
|
|
|
249026
248993
|
name: 'injection-token-description',
|
|
249027
248994
|
});
|
|
249028
248995
|
|
|
249029
|
-
const rule$
|
|
248996
|
+
const rule$K = createRule({
|
|
249030
248997
|
create(context) {
|
|
249031
248998
|
const { sourceCode } = context;
|
|
249032
248999
|
const namespaceImports = new Map();
|
|
@@ -249121,7 +249088,7 @@ const DEFAULT_OPTIONS = {
|
|
|
249121
249088
|
importDeclaration: '^@taiga-ui*',
|
|
249122
249089
|
projectName: String.raw `(?<=^@taiga-ui/)([-\w]+)`,
|
|
249123
249090
|
};
|
|
249124
|
-
const rule$
|
|
249091
|
+
const rule$J = createRule({
|
|
249125
249092
|
create(context) {
|
|
249126
249093
|
const { currentProject, deepImport, ignoreImports, importDeclaration, projectName, } = { ...DEFAULT_OPTIONS, ...context.options[0] };
|
|
249127
249094
|
const hasNonCodeExtension = (source) => {
|
|
@@ -249213,7 +249180,7 @@ const nearestFileUpCache = new Map();
|
|
|
249213
249180
|
const markerCache = new Map();
|
|
249214
249181
|
const indexFileCache = new Map();
|
|
249215
249182
|
const indexExportsCache = new Map();
|
|
249216
|
-
const rule$
|
|
249183
|
+
const rule$I = createRule({
|
|
249217
249184
|
create(context) {
|
|
249218
249185
|
const parserServices = dist$3.ESLintUtils.getParserServices(context);
|
|
249219
249186
|
const program = parserServices.program;
|
|
@@ -249374,10 +249341,9 @@ const rule$H = createRule({
|
|
|
249374
249341
|
name: 'no-deep-imports-to-indexed-packages',
|
|
249375
249342
|
});
|
|
249376
249343
|
function isExternalModuleSpecifier(moduleSpecifier) {
|
|
249377
|
-
|
|
249378
|
-
|
|
249379
|
-
|
|
249380
|
-
return !path.isAbsolute(moduleSpecifier);
|
|
249344
|
+
return !moduleSpecifier || moduleSpecifier.startsWith('.')
|
|
249345
|
+
? false
|
|
249346
|
+
: !path.isAbsolute(moduleSpecifier);
|
|
249381
249347
|
}
|
|
249382
249348
|
function isScopedPackage(importSpecifier) {
|
|
249383
249349
|
return importSpecifier.startsWith('@');
|
|
@@ -249385,19 +249351,17 @@ function isScopedPackage(importSpecifier) {
|
|
|
249385
249351
|
function getPackageRootSpecifier(importSpecifier) {
|
|
249386
249352
|
const pathParts = importSpecifier.split('/');
|
|
249387
249353
|
if (isScopedPackage(importSpecifier)) {
|
|
249388
|
-
|
|
249389
|
-
|
|
249390
|
-
|
|
249391
|
-
return importSpecifier;
|
|
249354
|
+
return pathParts.length >= 2
|
|
249355
|
+
? `${pathParts[0]}/${pathParts[1]}`
|
|
249356
|
+
: importSpecifier;
|
|
249392
249357
|
}
|
|
249393
249358
|
return pathParts[0] ?? importSpecifier;
|
|
249394
249359
|
}
|
|
249395
249360
|
function getSubpath(importSpecifier, packageRootSpecifier) {
|
|
249396
|
-
|
|
249397
|
-
!importSpecifier.startsWith(`${packageRootSpecifier}/`)
|
|
249398
|
-
|
|
249399
|
-
|
|
249400
|
-
return importSpecifier.slice(packageRootSpecifier.length + 1);
|
|
249361
|
+
return importSpecifier === packageRootSpecifier ||
|
|
249362
|
+
!importSpecifier.startsWith(`${packageRootSpecifier}/`)
|
|
249363
|
+
? null
|
|
249364
|
+
: importSpecifier.slice(packageRootSpecifier.length + 1);
|
|
249401
249365
|
}
|
|
249402
249366
|
function normalizeModuleSpecifier(moduleSpecifier) {
|
|
249403
249367
|
return moduleSpecifier.replaceAll('\\', '/');
|
|
@@ -249410,13 +249374,13 @@ const noDuplicateAttributesRule = angular.templatePlugin.rules?.['no-duplicate-a
|
|
|
249410
249374
|
if (!noDuplicateAttributesRule) {
|
|
249411
249375
|
throw new Error('angular-eslint template rule "no-duplicate-attributes" is not available');
|
|
249412
249376
|
}
|
|
249413
|
-
const rule$
|
|
249377
|
+
const rule$H = createRule({
|
|
249414
249378
|
name: 'no-duplicate-attrs',
|
|
249415
249379
|
rule: noDuplicateAttributesRule,
|
|
249416
249380
|
});
|
|
249417
249381
|
|
|
249418
249382
|
const MESSAGE_ID$c = 'duplicateId';
|
|
249419
|
-
const rule$
|
|
249383
|
+
const rule$G = createRule({
|
|
249420
249384
|
name: 'no-duplicate-id',
|
|
249421
249385
|
rule: {
|
|
249422
249386
|
create(context) {
|
|
@@ -249471,14 +249435,13 @@ function getTrackingKey(node) {
|
|
|
249471
249435
|
return 'meta[name=viewport]';
|
|
249472
249436
|
}
|
|
249473
249437
|
}
|
|
249474
|
-
|
|
249438
|
+
return node.name === 'link' &&
|
|
249475
249439
|
findAttr(node, 'rel')?.value === 'canonical' &&
|
|
249476
|
-
findAttr(node, 'href')
|
|
249477
|
-
|
|
249478
|
-
|
|
249479
|
-
return null;
|
|
249440
|
+
findAttr(node, 'href')
|
|
249441
|
+
? 'link[rel=canonical]'
|
|
249442
|
+
: null;
|
|
249480
249443
|
}
|
|
249481
|
-
const rule$
|
|
249444
|
+
const rule$F = createRule({
|
|
249482
249445
|
name: 'no-duplicate-in-head',
|
|
249483
249446
|
rule: {
|
|
249484
249447
|
create(context) {
|
|
@@ -249777,12 +249740,11 @@ function getPropertyName(property) {
|
|
|
249777
249740
|
}
|
|
249778
249741
|
function isAngularCoreCall(node, program, exportedName) {
|
|
249779
249742
|
const localName = getLocalNameForImport(program, ANGULAR_CORE, exportedName);
|
|
249780
|
-
|
|
249781
|
-
|
|
249782
|
-
|
|
249783
|
-
|
|
249784
|
-
|
|
249785
|
-
node.arguments.length >= 1);
|
|
249743
|
+
return localName
|
|
249744
|
+
? node.callee.type === dist$3.AST_NODE_TYPES.Identifier &&
|
|
249745
|
+
node.callee.name === localName &&
|
|
249746
|
+
node.arguments.length >= 1
|
|
249747
|
+
: false;
|
|
249786
249748
|
}
|
|
249787
249749
|
function appendFirstArgReactiveScope(scopes, call, kind) {
|
|
249788
249750
|
const callback = getReactiveCallbackArgument(call);
|
|
@@ -249921,13 +249883,12 @@ function isSignalType(node, checker, esTreeNodeToTSNodeMap) {
|
|
|
249921
249883
|
}
|
|
249922
249884
|
const typeSymbol = type.getSymbol();
|
|
249923
249885
|
const aliasSymbol = type.aliasSymbol;
|
|
249924
|
-
|
|
249925
|
-
aliasSymbol?.getName().includes('Signal')
|
|
249926
|
-
|
|
249927
|
-
|
|
249928
|
-
|
|
249929
|
-
|
|
249930
|
-
.some((p) => p.name.startsWith('ɵ') || p.name === '__SIGNAL');
|
|
249886
|
+
return typeSymbol?.getName().includes('Signal') ||
|
|
249887
|
+
aliasSymbol?.getName().includes('Signal')
|
|
249888
|
+
? true
|
|
249889
|
+
: type
|
|
249890
|
+
.getProperties()
|
|
249891
|
+
.some((p) => p.name.startsWith('ɵ') || p.name === '__SIGNAL');
|
|
249931
249892
|
}
|
|
249932
249893
|
catch {
|
|
249933
249894
|
return false;
|
|
@@ -249935,22 +249896,20 @@ function isSignalType(node, checker, esTreeNodeToTSNodeMap) {
|
|
|
249935
249896
|
}
|
|
249936
249897
|
function isSignalReadCall(node, checker, esTreeNodeToTSNodeMap) {
|
|
249937
249898
|
const { callee } = node;
|
|
249938
|
-
|
|
249939
|
-
callee.type !== dist$3.AST_NODE_TYPES.MemberExpression
|
|
249940
|
-
|
|
249941
|
-
|
|
249942
|
-
return isSignalType(callee, checker, esTreeNodeToTSNodeMap);
|
|
249899
|
+
return callee.type !== dist$3.AST_NODE_TYPES.Identifier &&
|
|
249900
|
+
callee.type !== dist$3.AST_NODE_TYPES.MemberExpression
|
|
249901
|
+
? false
|
|
249902
|
+
: isSignalType(callee, checker, esTreeNodeToTSNodeMap);
|
|
249943
249903
|
}
|
|
249944
249904
|
function isWritableSignalWrite(node, checker, esTreeNodeToTSNodeMap) {
|
|
249945
249905
|
if (node.callee.type !== dist$3.AST_NODE_TYPES.MemberExpression) {
|
|
249946
249906
|
return false;
|
|
249947
249907
|
}
|
|
249948
249908
|
const { object, property } = node.callee;
|
|
249949
|
-
|
|
249950
|
-
!SIGNAL_WRITE_METHODS.has(property.name)
|
|
249951
|
-
|
|
249952
|
-
|
|
249953
|
-
return isSignalType(object, checker, esTreeNodeToTSNodeMap);
|
|
249909
|
+
return property.type !== dist$3.AST_NODE_TYPES.Identifier ||
|
|
249910
|
+
!SIGNAL_WRITE_METHODS.has(property.name)
|
|
249911
|
+
? false
|
|
249912
|
+
: isSignalType(object, checker, esTreeNodeToTSNodeMap);
|
|
249954
249913
|
}
|
|
249955
249914
|
/**
|
|
249956
249915
|
* Returns true when `node` is a member expression `foo.bar` where `bar` is a
|
|
@@ -249964,10 +249923,7 @@ function isGetterMemberAccess(node, checker, esTreeNodeToTSNodeMap) {
|
|
|
249964
249923
|
return false;
|
|
249965
249924
|
}
|
|
249966
249925
|
const symbol = checker.getSymbolAtLocation(tsNode);
|
|
249967
|
-
|
|
249968
|
-
return false;
|
|
249969
|
-
}
|
|
249970
|
-
return !!(symbol.flags & ts.SymbolFlags.GetAccessor);
|
|
249926
|
+
return symbol ? !!(symbol.flags & ts.SymbolFlags.GetAccessor) : false;
|
|
249971
249927
|
}
|
|
249972
249928
|
catch {
|
|
249973
249929
|
return false;
|
|
@@ -250051,19 +250007,18 @@ function getReturnedReactiveOwnerCall(node, program) {
|
|
|
250051
250007
|
isReactiveOwnerCall(statement.argument, program)) {
|
|
250052
250008
|
return statement.argument;
|
|
250053
250009
|
}
|
|
250054
|
-
|
|
250010
|
+
return node.parent.type === dist$3.AST_NODE_TYPES.ExpressionStatement &&
|
|
250055
250011
|
statement?.type === dist$3.AST_NODE_TYPES.ExpressionStatement &&
|
|
250056
|
-
isReactiveOwnerCall(statement.expression, program)
|
|
250057
|
-
|
|
250058
|
-
|
|
250059
|
-
return null;
|
|
250012
|
+
isReactiveOwnerCall(statement.expression, program)
|
|
250013
|
+
? statement.expression
|
|
250014
|
+
: null;
|
|
250060
250015
|
}
|
|
250061
250016
|
|
|
250062
250017
|
const ANGULAR_SIGNALS_UNTRACKED_GUIDE_URL = 'https://angular.dev/guide/signals#reading-without-tracking-dependencies';
|
|
250063
250018
|
const ANGULAR_SIGNALS_ASYNC_GUIDE_URL = 'https://angular.dev/guide/signals#reactive-context-and-async-operations';
|
|
250064
250019
|
const createUntrackedRule = createRule;
|
|
250065
250020
|
|
|
250066
|
-
const rule$
|
|
250021
|
+
const rule$E = createUntrackedRule({
|
|
250067
250022
|
create(context) {
|
|
250068
250023
|
const { checker, esTreeNodeToTSNodeMap, program } = getTypeAwareRuleContext(context);
|
|
250069
250024
|
const signalNodeMap = esTreeNodeToTSNodeMap;
|
|
@@ -250136,7 +250091,7 @@ const config$3 = {
|
|
|
250136
250091
|
type: 'problem',
|
|
250137
250092
|
},
|
|
250138
250093
|
};
|
|
250139
|
-
const rule$
|
|
250094
|
+
const rule$D = createRule({
|
|
250140
250095
|
name: 'no-href-with-router-link',
|
|
250141
250096
|
rule: config$3,
|
|
250142
250097
|
});
|
|
@@ -250197,7 +250152,7 @@ function getScopeRoot(node) {
|
|
|
250197
250152
|
return (findAncestor(node, (ancestor) => ancestor.type === dist$3.AST_NODE_TYPES.Program || isFunctionLike(ancestor)) ?? node);
|
|
250198
250153
|
}
|
|
250199
250154
|
|
|
250200
|
-
const rule$
|
|
250155
|
+
const rule$C = createRule({
|
|
250201
250156
|
create(context) {
|
|
250202
250157
|
const checkImplicitPublic = (node) => {
|
|
250203
250158
|
const classRef = getEnclosingClass(node);
|
|
@@ -250259,7 +250214,7 @@ const rule$B = createRule({
|
|
|
250259
250214
|
name: 'no-implicit-public',
|
|
250260
250215
|
});
|
|
250261
250216
|
|
|
250262
|
-
const rule$
|
|
250217
|
+
const rule$B = createRule({
|
|
250263
250218
|
create(context) {
|
|
250264
250219
|
const { sourceCode } = context;
|
|
250265
250220
|
return {
|
|
@@ -250292,10 +250247,9 @@ const rule$A = createRule({
|
|
|
250292
250247
|
|
|
250293
250248
|
function getParenthesizedInner(node) {
|
|
250294
250249
|
const maybeNode = node;
|
|
250295
|
-
|
|
250296
|
-
|
|
250297
|
-
|
|
250298
|
-
return null;
|
|
250250
|
+
return maybeNode.type === 'ParenthesizedExpression'
|
|
250251
|
+
? (maybeNode.expression ?? null)
|
|
250252
|
+
: null;
|
|
250299
250253
|
}
|
|
250300
250254
|
function unwrapParenthesized(node) {
|
|
250301
250255
|
let current = node;
|
|
@@ -250309,15 +250263,14 @@ function unwrapParenthesized(node) {
|
|
|
250309
250263
|
|
|
250310
250264
|
function isInfiniteLoopLiteral(node) {
|
|
250311
250265
|
const unwrapped = unwrapParenthesized(node);
|
|
250312
|
-
|
|
250313
|
-
|
|
250314
|
-
|
|
250315
|
-
return unwrapped.value === true || unwrapped.value === 1;
|
|
250266
|
+
return unwrapped.type === dist$3.AST_NODE_TYPES.Literal
|
|
250267
|
+
? unwrapped.value === true || unwrapped.value === 1
|
|
250268
|
+
: false;
|
|
250316
250269
|
}
|
|
250317
250270
|
function isInfiniteLoopTest(test) {
|
|
250318
250271
|
return test == null || isInfiniteLoopLiteral(test);
|
|
250319
250272
|
}
|
|
250320
|
-
const rule$
|
|
250273
|
+
const rule$A = createRule({
|
|
250321
250274
|
create(context) {
|
|
250322
250275
|
return {
|
|
250323
250276
|
DoWhileStatement(node) {
|
|
@@ -250362,7 +250315,7 @@ const rule$z = createRule({
|
|
|
250362
250315
|
});
|
|
250363
250316
|
|
|
250364
250317
|
const LEGACY_PEER_DEPS_PATTERN = /^legacy-peer-deps\s*=\s*true$/i;
|
|
250365
|
-
const rule$
|
|
250318
|
+
const rule$z = createRule({
|
|
250366
250319
|
create(context) {
|
|
250367
250320
|
return {
|
|
250368
250321
|
Program(node) {
|
|
@@ -250822,7 +250775,7 @@ const OBSOLETE_HTML_ATTRS = {
|
|
|
250822
250775
|
};
|
|
250823
250776
|
|
|
250824
250777
|
const MESSAGE_ID$9 = 'obsolete';
|
|
250825
|
-
const rule$
|
|
250778
|
+
const rule$y = createRule({
|
|
250826
250779
|
name: 'no-obsolete-attrs',
|
|
250827
250780
|
rule: {
|
|
250828
250781
|
create(context) {
|
|
@@ -250900,7 +250853,7 @@ const OBSOLETE_HTML_TAGS = new Set([
|
|
|
250900
250853
|
]);
|
|
250901
250854
|
|
|
250902
250855
|
const MESSAGE_ID$8 = 'unexpected';
|
|
250903
|
-
const rule$
|
|
250856
|
+
const rule$x = createRule({
|
|
250904
250857
|
name: 'no-obsolete-tags',
|
|
250905
250858
|
rule: {
|
|
250906
250859
|
create(context) {
|
|
@@ -250927,7 +250880,7 @@ const rule$w = createRule({
|
|
|
250927
250880
|
},
|
|
250928
250881
|
});
|
|
250929
250882
|
|
|
250930
|
-
const rule$
|
|
250883
|
+
const rule$w = createRule({
|
|
250931
250884
|
create(context) {
|
|
250932
250885
|
const { checker, esTreeNodeToTSNodeMap, sourceCode } = getTypeAwareRuleContext(context);
|
|
250933
250886
|
return {
|
|
@@ -251071,7 +251024,7 @@ const config$2 = {
|
|
|
251071
251024
|
type: 'problem',
|
|
251072
251025
|
},
|
|
251073
251026
|
};
|
|
251074
|
-
const rule$
|
|
251027
|
+
const rule$v = createRule({
|
|
251075
251028
|
name: 'no-project-as-in-ng-template',
|
|
251076
251029
|
rule: config$2,
|
|
251077
251030
|
});
|
|
@@ -251108,7 +251061,7 @@ function collectArrayExpressions(node) {
|
|
|
251108
251061
|
}
|
|
251109
251062
|
return result;
|
|
251110
251063
|
}
|
|
251111
|
-
const rule$
|
|
251064
|
+
const rule$u = createRule({
|
|
251112
251065
|
create(context) {
|
|
251113
251066
|
const { checker: typeChecker, esTreeNodeToTSNodeMap } = getTypeAwareRuleContext(context);
|
|
251114
251067
|
const ignoreTupleContextualTyping = context.options[0]?.ignoreTupleContextualTyping ?? true;
|
|
@@ -251210,10 +251163,9 @@ function isNullableCallType(call, checker, nodeMap) {
|
|
|
251210
251163
|
return false;
|
|
251211
251164
|
}
|
|
251212
251165
|
const type = checker.getTypeAtLocation(tsNode);
|
|
251213
|
-
|
|
251214
|
-
|
|
251215
|
-
|
|
251216
|
-
return type.types.some((t) => !!(t.flags & (ts.TypeFlags.Null | ts.TypeFlags.Undefined)));
|
|
251166
|
+
return type.flags & ts.TypeFlags.Union
|
|
251167
|
+
? type.types.some((t) => !!(t.flags & (ts.TypeFlags.Null | ts.TypeFlags.Undefined)))
|
|
251168
|
+
: false;
|
|
251217
251169
|
}
|
|
251218
251170
|
catch {
|
|
251219
251171
|
return false;
|
|
@@ -251224,13 +251176,12 @@ function getTargetNode(call) {
|
|
|
251224
251176
|
if (parent.type === dist$3.AST_NODE_TYPES.TSAsExpression) {
|
|
251225
251177
|
return parent;
|
|
251226
251178
|
}
|
|
251227
|
-
|
|
251179
|
+
return parent.type === dist$3.AST_NODE_TYPES.UnaryExpression &&
|
|
251228
251180
|
parent.operator === '!' &&
|
|
251229
251181
|
parent.parent.type === dist$3.AST_NODE_TYPES.UnaryExpression &&
|
|
251230
|
-
parent.parent.operator === '!'
|
|
251231
|
-
|
|
251232
|
-
|
|
251233
|
-
return call;
|
|
251182
|
+
parent.parent.operator === '!'
|
|
251183
|
+
? parent.parent
|
|
251184
|
+
: call;
|
|
251234
251185
|
}
|
|
251235
251186
|
function getCalleeName(node) {
|
|
251236
251187
|
const { callee } = node;
|
|
@@ -251240,10 +251191,7 @@ function getCalleeName(node) {
|
|
|
251240
251191
|
return callee.property.name;
|
|
251241
251192
|
}
|
|
251242
251193
|
// Append 'Val' to avoid shadowing the signal variable itself (e.g. const xVal = x())
|
|
251243
|
-
|
|
251244
|
-
return `${callee.name}Val`;
|
|
251245
|
-
}
|
|
251246
|
-
return 'value';
|
|
251194
|
+
return callee.type === dist$3.AST_NODE_TYPES.Identifier ? `${callee.name}Val` : 'value';
|
|
251247
251195
|
}
|
|
251248
251196
|
function findParentStatement(node) {
|
|
251249
251197
|
for (let current = node; current.parent; current = current.parent) {
|
|
@@ -251277,13 +251225,13 @@ function getArrowBodyIndent(arrowFn, sourceText) {
|
|
|
251277
251225
|
const outerIndent = /^(\s*)/.exec(textBeforeArrow)?.[1] ?? '';
|
|
251278
251226
|
return { innerIndent: `${outerIndent} `, outerIndent };
|
|
251279
251227
|
}
|
|
251280
|
-
function getStatementIndent(statement, sourceText) {
|
|
251228
|
+
function getStatementIndent$1(statement, sourceText) {
|
|
251281
251229
|
const start = statement.range[0];
|
|
251282
251230
|
const lineStart = sourceText.lastIndexOf('\n', start - 1) + 1;
|
|
251283
251231
|
const before = sourceText.slice(lineStart, start);
|
|
251284
251232
|
return /^\s*$/.test(before) ? before : '';
|
|
251285
251233
|
}
|
|
251286
|
-
const rule$
|
|
251234
|
+
const rule$t = createRule({
|
|
251287
251235
|
create(context) {
|
|
251288
251236
|
const { checker, esTreeNodeToTSNodeMap, sourceCode } = getTypeAwareRuleContext(context);
|
|
251289
251237
|
const signalNodeMap = esTreeNodeToTSNodeMap;
|
|
@@ -251322,7 +251270,7 @@ const rule$s = createRule({
|
|
|
251322
251270
|
const varName = getCalleeName(firstCall);
|
|
251323
251271
|
const parentStatement = findParentStatement(node);
|
|
251324
251272
|
if (parentStatement) {
|
|
251325
|
-
const indent = getStatementIndent(parentStatement, sourceCode.text);
|
|
251273
|
+
const indent = getStatementIndent$1(parentStatement, sourceCode.text);
|
|
251326
251274
|
const fixes = [
|
|
251327
251275
|
fixer.insertTextBefore(parentStatement, `const ${varName} = ${callText};\n\n${indent}`),
|
|
251328
251276
|
];
|
|
@@ -251437,12 +251385,9 @@ function collectMutationTargets(node) {
|
|
|
251437
251385
|
case dist$3.AST_NODE_TYPES.MemberExpression:
|
|
251438
251386
|
return [current];
|
|
251439
251387
|
case dist$3.AST_NODE_TYPES.ObjectPattern:
|
|
251440
|
-
return current.properties.flatMap((property) =>
|
|
251441
|
-
|
|
251442
|
-
|
|
251443
|
-
}
|
|
251444
|
-
return collectMutationTargets(property.value);
|
|
251445
|
-
});
|
|
251388
|
+
return current.properties.flatMap((property) => property.type === dist$3.AST_NODE_TYPES.RestElement
|
|
251389
|
+
? collectMutationTargets(property.argument)
|
|
251390
|
+
: collectMutationTargets(property.value));
|
|
251446
251391
|
case dist$3.AST_NODE_TYPES.RestElement:
|
|
251447
251392
|
return collectMutationTargets(current.argument);
|
|
251448
251393
|
default:
|
|
@@ -251452,10 +251397,7 @@ function collectMutationTargets(node) {
|
|
|
251452
251397
|
|
|
251453
251398
|
function getSymbolAtNode(node, checker, esTreeNodeToTSNodeMap) {
|
|
251454
251399
|
const tsNode = esTreeNodeToTSNodeMap.get(node);
|
|
251455
|
-
|
|
251456
|
-
return null;
|
|
251457
|
-
}
|
|
251458
|
-
return checker.getSymbolAtLocation(tsNode) ?? null;
|
|
251400
|
+
return tsNode ? (checker.getSymbolAtLocation(tsNode) ?? null) : null;
|
|
251459
251401
|
}
|
|
251460
251402
|
|
|
251461
251403
|
function isFunctionLikeScope(node) {
|
|
@@ -251463,14 +251405,13 @@ function isFunctionLikeScope(node) {
|
|
|
251463
251405
|
}
|
|
251464
251406
|
function isLocalIdentifier(node, context, localScopes) {
|
|
251465
251407
|
const symbol = getSymbolAtNode(node, context.checker, context.esTreeNodeToTSNodeMap);
|
|
251466
|
-
|
|
251467
|
-
|
|
251468
|
-
|
|
251469
|
-
|
|
251470
|
-
|
|
251471
|
-
|
|
251472
|
-
|
|
251473
|
-
});
|
|
251408
|
+
return symbol
|
|
251409
|
+
? (symbol.declarations ?? []).some((declaration) => {
|
|
251410
|
+
const estreeDeclaration = context.tsNodeToESTreeNodeMap.get(declaration);
|
|
251411
|
+
return (!!estreeDeclaration &&
|
|
251412
|
+
isDeclaredInsideLocalScope(estreeDeclaration, localScopes));
|
|
251413
|
+
})
|
|
251414
|
+
: false;
|
|
251474
251415
|
}
|
|
251475
251416
|
function isDeclaredInsideLocalScope(node, localScopes) {
|
|
251476
251417
|
return localScopes.some((scope) => isNodeInsideFunctionScope(node, scope));
|
|
@@ -251502,12 +251443,9 @@ function isLocallyCreatedExpression(node, context, localScopes) {
|
|
|
251502
251443
|
}
|
|
251503
251444
|
}
|
|
251504
251445
|
function hasObservableMutationTarget(node, context, localScopes) {
|
|
251505
|
-
return collectMutationTargets(node).some((target) =>
|
|
251506
|
-
|
|
251507
|
-
|
|
251508
|
-
}
|
|
251509
|
-
return !isLocallyCreatedExpression(target.object, context, localScopes);
|
|
251510
|
-
});
|
|
251446
|
+
return collectMutationTargets(node).some((target) => target.type === dist$3.AST_NODE_TYPES.Identifier
|
|
251447
|
+
? !isLocalIdentifier(target, context, localScopes)
|
|
251448
|
+
: !isLocallyCreatedExpression(target.object, context, localScopes));
|
|
251511
251449
|
}
|
|
251512
251450
|
function reportSideEffect(node, context, report) {
|
|
251513
251451
|
const key = String(node.range);
|
|
@@ -251575,10 +251513,9 @@ function resolveFunctionLikeFromIdentifier(node, context, seenSymbols = new Set(
|
|
|
251575
251513
|
seenSymbols.add(symbolId);
|
|
251576
251514
|
return (symbol.declarations ?? []).flatMap((declaration) => {
|
|
251577
251515
|
const estreeDeclaration = context.tsNodeToESTreeNodeMap.get(declaration);
|
|
251578
|
-
|
|
251579
|
-
|
|
251580
|
-
|
|
251581
|
-
return resolveFunctionLikeFromContainer(estreeDeclaration, context, seenSymbols);
|
|
251516
|
+
return !estreeDeclaration || !isInspectableFunctionContainer(estreeDeclaration)
|
|
251517
|
+
? []
|
|
251518
|
+
: resolveFunctionLikeFromContainer(estreeDeclaration, context, seenSymbols);
|
|
251582
251519
|
});
|
|
251583
251520
|
}
|
|
251584
251521
|
function resolveCalledFunctions(node, context) {
|
|
@@ -251714,7 +251651,7 @@ function inspectComputedBody(root, context, localScopes, visitedFunctions, repor
|
|
|
251714
251651
|
return;
|
|
251715
251652
|
});
|
|
251716
251653
|
}
|
|
251717
|
-
const rule$
|
|
251654
|
+
const rule$s = createRule({
|
|
251718
251655
|
create(context) {
|
|
251719
251656
|
const { checker, esTreeNodeToTSNodeMap, program, sourceCode, tsNodeToESTreeNodeMap, } = getTypeAwareRuleContext(context);
|
|
251720
251657
|
const signalNodeMap = esTreeNodeToTSNodeMap;
|
|
@@ -251757,7 +251694,7 @@ const rule$r = createRule({
|
|
|
251757
251694
|
name: 'no-side-effects-in-computed',
|
|
251758
251695
|
});
|
|
251759
251696
|
|
|
251760
|
-
const rule$
|
|
251697
|
+
const rule$r = createUntrackedRule({
|
|
251761
251698
|
create(context) {
|
|
251762
251699
|
const { checker, esTreeNodeToTSNodeMap, program, sourceCode } = getTypeAwareRuleContext(context);
|
|
251763
251700
|
const signalNodeMap = esTreeNodeToTSNodeMap;
|
|
@@ -251804,20 +251741,18 @@ const rule$q = createUntrackedRule({
|
|
|
251804
251741
|
});
|
|
251805
251742
|
|
|
251806
251743
|
function collectParts(node) {
|
|
251807
|
-
|
|
251808
|
-
|
|
251809
|
-
|
|
251810
|
-
return [node];
|
|
251744
|
+
return node.type === dist$3.AST_NODE_TYPES.BinaryExpression && node.operator === '+'
|
|
251745
|
+
? [...collectParts(node.left), ...collectParts(node.right)]
|
|
251746
|
+
: [node];
|
|
251811
251747
|
}
|
|
251812
251748
|
function isRootConcat(node) {
|
|
251813
251749
|
const { parent } = node;
|
|
251814
251750
|
return parent.type !== dist$3.AST_NODE_TYPES.BinaryExpression || parent.operator !== '+';
|
|
251815
251751
|
}
|
|
251816
251752
|
function isStringType(type, checker) {
|
|
251817
|
-
|
|
251818
|
-
|
|
251819
|
-
|
|
251820
|
-
return type.isStringLiteral() || checker.typeToString(type) === 'string';
|
|
251753
|
+
return type.isUnion()
|
|
251754
|
+
? type.types.every((t) => isStringType(t, checker))
|
|
251755
|
+
: type.isStringLiteral() || checker.typeToString(type) === 'string';
|
|
251821
251756
|
}
|
|
251822
251757
|
function buildMergedString(parts) {
|
|
251823
251758
|
const combined = parts.map((p) => p.value).join('');
|
|
@@ -251851,7 +251786,7 @@ function templateContent(template, renderExpr) {
|
|
|
251851
251786
|
: ''}`)
|
|
251852
251787
|
.join('');
|
|
251853
251788
|
}
|
|
251854
|
-
const rule$
|
|
251789
|
+
const rule$q = createRule({
|
|
251855
251790
|
create(context) {
|
|
251856
251791
|
const { sourceCode } = context;
|
|
251857
251792
|
let parserServices = null;
|
|
@@ -251963,28 +251898,25 @@ function buildUntrackedImportFixes(program, fixer) {
|
|
|
251963
251898
|
const coreImport = findRuntimeAngularCoreImport(program);
|
|
251964
251899
|
if (!coreImport) {
|
|
251965
251900
|
const firstStatement = program.body[0];
|
|
251966
|
-
|
|
251967
|
-
|
|
251968
|
-
|
|
251969
|
-
|
|
251970
|
-
|
|
251971
|
-
];
|
|
251901
|
+
return firstStatement
|
|
251902
|
+
? [
|
|
251903
|
+
fixer.insertTextBefore(firstStatement, "import { untracked } from '@angular/core';\n"),
|
|
251904
|
+
]
|
|
251905
|
+
: [];
|
|
251972
251906
|
}
|
|
251973
251907
|
const namedSpecifiers = coreImport.specifiers.filter((specifier) => specifier.type === dist$3.AST_NODE_TYPES.ImportSpecifier);
|
|
251974
251908
|
if (namedSpecifiers.length > 0) {
|
|
251975
251909
|
const lastNamedSpecifier = namedSpecifiers[namedSpecifiers.length - 1];
|
|
251976
|
-
|
|
251977
|
-
|
|
251978
|
-
|
|
251979
|
-
return [fixer.insertTextAfter(lastNamedSpecifier, ', untracked')];
|
|
251910
|
+
return lastNamedSpecifier
|
|
251911
|
+
? [fixer.insertTextAfter(lastNamedSpecifier, ', untracked')]
|
|
251912
|
+
: [];
|
|
251980
251913
|
}
|
|
251981
251914
|
const defaultImport = coreImport.specifiers.find((specifier) => specifier.type === dist$3.AST_NODE_TYPES.ImportDefaultSpecifier);
|
|
251982
|
-
|
|
251983
|
-
|
|
251984
|
-
|
|
251985
|
-
|
|
251986
|
-
|
|
251987
|
-
];
|
|
251915
|
+
return defaultImport
|
|
251916
|
+
? [fixer.insertTextAfter(defaultImport, ', { untracked }')]
|
|
251917
|
+
: [
|
|
251918
|
+
fixer.insertTextAfter(coreImport, "\nimport { untracked } from '@angular/core';"),
|
|
251919
|
+
];
|
|
251988
251920
|
}
|
|
251989
251921
|
/**
|
|
251990
251922
|
* Removes the `untracked` import specifier from `@angular/core`.
|
|
@@ -251996,7 +251928,6 @@ function buildImportRemovalFixes(program, fixer, sourceCode) {
|
|
|
251996
251928
|
return [];
|
|
251997
251929
|
}
|
|
251998
251930
|
const { importDecl, specifier: untrackedSpec } = match;
|
|
251999
|
-
const namedSpecifiers = importDecl.specifiers.filter((s) => s.type === dist$3.AST_NODE_TYPES.ImportSpecifier);
|
|
252000
251931
|
if (importDecl.specifiers.length === 1) {
|
|
252001
251932
|
return [fixer.remove(importDecl)];
|
|
252002
251933
|
}
|
|
@@ -252014,24 +251945,19 @@ function buildImportRemovalFixes(program, fixer, sourceCode) {
|
|
|
252014
251945
|
// Try to remove a leading comma (last specifier)
|
|
252015
251946
|
const textBefore = importText.slice(0, specStart - importStart);
|
|
252016
251947
|
const leadingCommaIdx = textBefore.lastIndexOf(',');
|
|
252017
|
-
|
|
252018
|
-
|
|
252019
|
-
|
|
252020
|
-
if (namedSpecifiers.length === 1) {
|
|
252021
|
-
return [fixer.remove(untrackedSpec)];
|
|
252022
|
-
}
|
|
252023
|
-
return [fixer.remove(untrackedSpec)];
|
|
251948
|
+
return leadingCommaIdx === -1
|
|
251949
|
+
? [fixer.remove(untrackedSpec)]
|
|
251950
|
+
: [fixer.removeRange([importStart + leadingCommaIdx, specEnd])];
|
|
252024
251951
|
}
|
|
252025
251952
|
|
|
252026
251953
|
function hasNamedDecorator(node, name) {
|
|
252027
251954
|
return node.decorators.some((decorator) => {
|
|
252028
251955
|
const expression = decorator.expression;
|
|
252029
|
-
|
|
252030
|
-
|
|
252031
|
-
|
|
252032
|
-
|
|
252033
|
-
|
|
252034
|
-
expression.callee.name === name);
|
|
251956
|
+
return expression.type === dist$3.AST_NODE_TYPES.Identifier
|
|
251957
|
+
? expression.name === name
|
|
251958
|
+
: expression.type === dist$3.AST_NODE_TYPES.CallExpression &&
|
|
251959
|
+
expression.callee.type === dist$3.AST_NODE_TYPES.Identifier &&
|
|
251960
|
+
expression.callee.name === name;
|
|
252035
251961
|
});
|
|
252036
251962
|
}
|
|
252037
251963
|
|
|
@@ -252087,13 +252013,12 @@ function dedent(text, extraSpaces) {
|
|
|
252087
252013
|
|
|
252088
252014
|
function isDirectCallOrNewArgument(node) {
|
|
252089
252015
|
const parent = node.parent;
|
|
252090
|
-
|
|
252091
|
-
node.type !== dist$3.AST_NODE_TYPES.FunctionExpression
|
|
252092
|
-
|
|
252093
|
-
|
|
252094
|
-
|
|
252095
|
-
|
|
252096
|
-
parent.arguments.includes(node));
|
|
252016
|
+
return node.type !== dist$3.AST_NODE_TYPES.ArrowFunctionExpression &&
|
|
252017
|
+
node.type !== dist$3.AST_NODE_TYPES.FunctionExpression
|
|
252018
|
+
? false
|
|
252019
|
+
: (parent.type === dist$3.AST_NODE_TYPES.CallExpression ||
|
|
252020
|
+
parent.type === dist$3.AST_NODE_TYPES.NewExpression) &&
|
|
252021
|
+
parent.arguments.includes(node);
|
|
252097
252022
|
}
|
|
252098
252023
|
function isStoredFunctionUsedAsCallOrNewArgument(fn, checker, esTreeNodeToTSNodeMap) {
|
|
252099
252024
|
const parent = fn.parent;
|
|
@@ -252164,29 +252089,26 @@ function isAllowedDeferredCallbackContext(node, checker, esTreeNodeToTSNodeMap)
|
|
|
252164
252089
|
return false;
|
|
252165
252090
|
}
|
|
252166
252091
|
const fn = getEnclosingFunction(node);
|
|
252167
|
-
|
|
252168
|
-
|
|
252169
|
-
|
|
252170
|
-
|
|
252171
|
-
isStoredFunctionUsedAsCallOrNewArgument(fn, checker, esTreeNodeToTSNodeMap));
|
|
252092
|
+
return fn
|
|
252093
|
+
? isDirectCallOrNewArgument(fn) ||
|
|
252094
|
+
isStoredFunctionUsedAsCallOrNewArgument(fn, checker, esTreeNodeToTSNodeMap)
|
|
252095
|
+
: false;
|
|
252172
252096
|
}
|
|
252173
252097
|
function isAllowedLazyAngularFactoryContext(node, program) {
|
|
252174
252098
|
const fn = getEnclosingFunction(node);
|
|
252175
|
-
|
|
252176
|
-
|
|
252177
|
-
|
|
252178
|
-
|
|
252179
|
-
isAngularUseFactoryFunction(fn));
|
|
252099
|
+
return !fn || !getReturnedReactiveOwnerCall(node, program)
|
|
252100
|
+
? false
|
|
252101
|
+
: isAngularInjectionTokenFactoryFunction(fn, program) ||
|
|
252102
|
+
isAngularUseFactoryFunction(fn);
|
|
252180
252103
|
}
|
|
252181
252104
|
function buildReactiveCallReplacement(outerUntrackedCall, reactiveCall, sourceCode) {
|
|
252182
252105
|
const text = sourceCode.getText(reactiveCall);
|
|
252183
|
-
|
|
252184
|
-
outerUntrackedCall.parent.type !== dist$3.AST_NODE_TYPES.ExpressionStatement
|
|
252185
|
-
|
|
252186
|
-
|
|
252187
|
-
return dedent(text, reactiveCall.loc.start.column - outerUntrackedCall.parent.loc.start.column);
|
|
252106
|
+
return reactiveCall.parent.type !== dist$3.AST_NODE_TYPES.ExpressionStatement ||
|
|
252107
|
+
outerUntrackedCall.parent.type !== dist$3.AST_NODE_TYPES.ExpressionStatement
|
|
252108
|
+
? text
|
|
252109
|
+
: dedent(text, reactiveCall.loc.start.column - outerUntrackedCall.parent.loc.start.column);
|
|
252188
252110
|
}
|
|
252189
|
-
const rule$
|
|
252111
|
+
const rule$p = createUntrackedRule({
|
|
252190
252112
|
create(context) {
|
|
252191
252113
|
const { checker, esTreeNodeToTSNodeMap, program, sourceCode } = getTypeAwareRuleContext(context);
|
|
252192
252114
|
const signalNodeMap = esTreeNodeToTSNodeMap;
|
|
@@ -252315,7 +252237,7 @@ function hasOpaqueSynchronousCalls(root, checker, esTreeNodeToTSNodeMap, program
|
|
|
252315
252237
|
});
|
|
252316
252238
|
return found;
|
|
252317
252239
|
}
|
|
252318
|
-
const rule$
|
|
252240
|
+
const rule$o = createUntrackedRule({
|
|
252319
252241
|
create(context) {
|
|
252320
252242
|
const { checker, esTreeNodeToTSNodeMap, program, sourceCode } = getTypeAwareRuleContext(context);
|
|
252321
252243
|
const signalNodeMap = esTreeNodeToTSNodeMap;
|
|
@@ -252397,17 +252319,16 @@ const rule$n = createUntrackedRule({
|
|
|
252397
252319
|
name: 'no-useless-untracked',
|
|
252398
252320
|
});
|
|
252399
252321
|
|
|
252400
|
-
const rule$
|
|
252322
|
+
const rule$n = createRule({
|
|
252401
252323
|
create(context, [{ printWidth }]) {
|
|
252402
252324
|
const sourceCode = context.sourceCode;
|
|
252403
252325
|
const getLineEndIndex = (lineStartIndex) => {
|
|
252404
252326
|
const text = sourceCode.text;
|
|
252405
252327
|
const newLineIndex = text.indexOf('\n', lineStartIndex);
|
|
252406
252328
|
const rawEndIndex = newLineIndex === -1 ? text.length : newLineIndex;
|
|
252407
|
-
|
|
252408
|
-
|
|
252409
|
-
|
|
252410
|
-
return rawEndIndex;
|
|
252329
|
+
return rawEndIndex > lineStartIndex && text[rawEndIndex - 1] === '\r'
|
|
252330
|
+
? rawEndIndex - 1
|
|
252331
|
+
: rawEndIndex;
|
|
252411
252332
|
};
|
|
252412
252333
|
const hasAnyCommentsInside = (node) => sourceCode.getCommentsInside(node).length > 0;
|
|
252413
252334
|
const isTemplateLikeExpression = (expression) => expression.type === dist$2.AST_NODE_TYPES.TemplateLiteral ||
|
|
@@ -252479,34 +252400,28 @@ const rule$m = createRule({
|
|
|
252479
252400
|
const valueExpression = property.value;
|
|
252480
252401
|
// eslint-disable-next-line @typescript-eslint/no-use-before-define
|
|
252481
252402
|
const valueText = renderExpressionOneLine(valueExpression);
|
|
252482
|
-
|
|
252483
|
-
|
|
252484
|
-
|
|
252485
|
-
return `${keyText}: ${valueText}`;
|
|
252403
|
+
return property.computed
|
|
252404
|
+
? `[${keyText}]: ${valueText}`
|
|
252405
|
+
: `${keyText}: ${valueText}`;
|
|
252486
252406
|
};
|
|
252487
252407
|
const renderObjectExpressionOneLine = (node) => {
|
|
252488
252408
|
const [onlyProperty] = node.properties;
|
|
252489
|
-
|
|
252490
|
-
return '{}';
|
|
252491
|
-
}
|
|
252492
|
-
return `{${renderPropertyOneLine(onlyProperty)}}`;
|
|
252409
|
+
return onlyProperty ? `{${renderPropertyOneLine(onlyProperty)}}` : '{}';
|
|
252493
252410
|
};
|
|
252494
252411
|
const renderExpressionOneLine = (expression) => {
|
|
252495
252412
|
const innerParen = getParenthesizedInner(expression);
|
|
252496
252413
|
if (innerParen) {
|
|
252497
252414
|
const inner = unwrapExpression(innerParen);
|
|
252498
|
-
|
|
252499
|
-
canInlineObjectExpression(inner)
|
|
252500
|
-
|
|
252501
|
-
|
|
252502
|
-
return sourceCode.getText(expression);
|
|
252415
|
+
return inner.type === dist$2.AST_NODE_TYPES.ObjectExpression &&
|
|
252416
|
+
canInlineObjectExpression(inner)
|
|
252417
|
+
? `(${renderObjectExpressionOneLine(inner)})`
|
|
252418
|
+
: sourceCode.getText(expression);
|
|
252503
252419
|
}
|
|
252504
252420
|
const unwrapped = unwrapExpression(expression);
|
|
252505
|
-
|
|
252506
|
-
canInlineObjectExpression(unwrapped)
|
|
252507
|
-
|
|
252508
|
-
|
|
252509
|
-
return sourceCode.getText(expression);
|
|
252421
|
+
return unwrapped.type === dist$2.AST_NODE_TYPES.ObjectExpression &&
|
|
252422
|
+
canInlineObjectExpression(unwrapped)
|
|
252423
|
+
? renderObjectExpressionOneLine(unwrapped)
|
|
252424
|
+
: sourceCode.getText(expression);
|
|
252510
252425
|
};
|
|
252511
252426
|
const hasPendingInnerInlineCandidate = (node) => {
|
|
252512
252427
|
if (node.properties.length !== 1) {
|
|
@@ -252718,7 +252633,7 @@ function renderTest(node, sourceCode) {
|
|
|
252718
252633
|
const text = sourceCode.getText(node);
|
|
252719
252634
|
return needsParenthesesInOrChain(node) ? `(${text})` : text;
|
|
252720
252635
|
}
|
|
252721
|
-
const rule$
|
|
252636
|
+
const rule$m = createRule({
|
|
252722
252637
|
create(context) {
|
|
252723
252638
|
const { sourceCode } = context;
|
|
252724
252639
|
function checkBody(statements) {
|
|
@@ -252807,6 +252722,169 @@ const rule$l = createRule({
|
|
|
252807
252722
|
name: 'prefer-combined-if-control-flow',
|
|
252808
252723
|
});
|
|
252809
252724
|
|
|
252725
|
+
const MAX_INLINE_CONDITIONAL_RETURN_LENGTH = 90;
|
|
252726
|
+
function getReturnStatement(statement) {
|
|
252727
|
+
if (statement.type === dist$3.AST_NODE_TYPES.ReturnStatement) {
|
|
252728
|
+
return statement;
|
|
252729
|
+
}
|
|
252730
|
+
if (statement.type !== dist$3.AST_NODE_TYPES.BlockStatement || statement.body.length !== 1) {
|
|
252731
|
+
return null;
|
|
252732
|
+
}
|
|
252733
|
+
const [onlyStatement] = statement.body;
|
|
252734
|
+
return onlyStatement?.type === dist$3.AST_NODE_TYPES.ReturnStatement ? onlyStatement : null;
|
|
252735
|
+
}
|
|
252736
|
+
function hasOnlyWhitespaceBetween(sourceCode, left, right) {
|
|
252737
|
+
return sourceCode.text.slice(left.range[1], right.range[0]).trim() === '';
|
|
252738
|
+
}
|
|
252739
|
+
function unwrapTypeAndParentheses(node) {
|
|
252740
|
+
let current = node;
|
|
252741
|
+
let didUnwrap = true;
|
|
252742
|
+
while (didUnwrap) {
|
|
252743
|
+
didUnwrap = false;
|
|
252744
|
+
const parenthesized = unwrapParenthesized(current);
|
|
252745
|
+
if (parenthesized !== current) {
|
|
252746
|
+
current = parenthesized;
|
|
252747
|
+
didUnwrap = true;
|
|
252748
|
+
continue;
|
|
252749
|
+
}
|
|
252750
|
+
switch (current.type) {
|
|
252751
|
+
case dist$3.AST_NODE_TYPES.TSAsExpression:
|
|
252752
|
+
case dist$3.AST_NODE_TYPES.TSNonNullExpression:
|
|
252753
|
+
case dist$3.AST_NODE_TYPES.TSSatisfiesExpression:
|
|
252754
|
+
case dist$3.AST_NODE_TYPES.TSTypeAssertion:
|
|
252755
|
+
current = current.expression;
|
|
252756
|
+
didUnwrap = true;
|
|
252757
|
+
break;
|
|
252758
|
+
}
|
|
252759
|
+
}
|
|
252760
|
+
return current;
|
|
252761
|
+
}
|
|
252762
|
+
function isConditionalExpression(node) {
|
|
252763
|
+
return (node !== null &&
|
|
252764
|
+
unwrapTypeAndParentheses(node).type === dist$3.AST_NODE_TYPES.ConditionalExpression);
|
|
252765
|
+
}
|
|
252766
|
+
function needsParenthesesInConditionalTest(node) {
|
|
252767
|
+
if (getParenthesizedInner(node)) {
|
|
252768
|
+
return false;
|
|
252769
|
+
}
|
|
252770
|
+
switch (node.type) {
|
|
252771
|
+
case dist$3.AST_NODE_TYPES.ArrowFunctionExpression:
|
|
252772
|
+
case dist$3.AST_NODE_TYPES.AssignmentExpression:
|
|
252773
|
+
case dist$3.AST_NODE_TYPES.ConditionalExpression:
|
|
252774
|
+
case dist$3.AST_NODE_TYPES.ObjectExpression:
|
|
252775
|
+
case dist$3.AST_NODE_TYPES.SequenceExpression:
|
|
252776
|
+
case dist$3.AST_NODE_TYPES.TSAsExpression:
|
|
252777
|
+
case dist$3.AST_NODE_TYPES.TSSatisfiesExpression:
|
|
252778
|
+
case dist$3.AST_NODE_TYPES.TSTypeAssertion:
|
|
252779
|
+
case dist$3.AST_NODE_TYPES.YieldExpression:
|
|
252780
|
+
return true;
|
|
252781
|
+
default:
|
|
252782
|
+
return false;
|
|
252783
|
+
}
|
|
252784
|
+
}
|
|
252785
|
+
function needsParenthesesInConditionalBranch(node) {
|
|
252786
|
+
if (getParenthesizedInner(node)) {
|
|
252787
|
+
return false;
|
|
252788
|
+
}
|
|
252789
|
+
switch (node.type) {
|
|
252790
|
+
case dist$3.AST_NODE_TYPES.ArrowFunctionExpression:
|
|
252791
|
+
case dist$3.AST_NODE_TYPES.AssignmentExpression:
|
|
252792
|
+
case dist$3.AST_NODE_TYPES.ConditionalExpression:
|
|
252793
|
+
case dist$3.AST_NODE_TYPES.SequenceExpression:
|
|
252794
|
+
case dist$3.AST_NODE_TYPES.TSAsExpression:
|
|
252795
|
+
case dist$3.AST_NODE_TYPES.TSSatisfiesExpression:
|
|
252796
|
+
case dist$3.AST_NODE_TYPES.TSTypeAssertion:
|
|
252797
|
+
case dist$3.AST_NODE_TYPES.YieldExpression:
|
|
252798
|
+
return true;
|
|
252799
|
+
default:
|
|
252800
|
+
return false;
|
|
252801
|
+
}
|
|
252802
|
+
}
|
|
252803
|
+
function renderExpression(node, sourceCode, needsParentheses) {
|
|
252804
|
+
const text = sourceCode.getText(node);
|
|
252805
|
+
return needsParentheses(node) ? `(${text})` : text;
|
|
252806
|
+
}
|
|
252807
|
+
function getStatementIndent(node, sourceCode) {
|
|
252808
|
+
const lineStart = sourceCode.getIndexFromLoc({
|
|
252809
|
+
column: 0,
|
|
252810
|
+
line: node.loc.start.line,
|
|
252811
|
+
});
|
|
252812
|
+
return sourceCode.text.slice(lineStart, node.range[0]);
|
|
252813
|
+
}
|
|
252814
|
+
function renderConditionalReturn(ifStatement, consequentExpression, alternateExpression, sourceCode) {
|
|
252815
|
+
const test = renderExpression(ifStatement.test, sourceCode, needsParenthesesInConditionalTest);
|
|
252816
|
+
const consequent = renderExpression(consequentExpression, sourceCode, needsParenthesesInConditionalBranch);
|
|
252817
|
+
const alternate = renderExpression(alternateExpression, sourceCode, needsParenthesesInConditionalBranch);
|
|
252818
|
+
const inlineReturn = `return ${test} ? ${consequent} : ${alternate};`;
|
|
252819
|
+
const indent = getStatementIndent(ifStatement, sourceCode);
|
|
252820
|
+
if (indent.length + inlineReturn.length <= MAX_INLINE_CONDITIONAL_RETURN_LENGTH) {
|
|
252821
|
+
return inlineReturn;
|
|
252822
|
+
}
|
|
252823
|
+
const branchIndent = `${indent} `;
|
|
252824
|
+
return `return ${test}\n${branchIndent}? ${consequent}\n${branchIndent}: ${alternate};`;
|
|
252825
|
+
}
|
|
252826
|
+
const rule$l = createRule({
|
|
252827
|
+
create(context) {
|
|
252828
|
+
const { sourceCode } = context;
|
|
252829
|
+
function checkBody(statements) {
|
|
252830
|
+
for (const [index, statement] of statements.entries()) {
|
|
252831
|
+
if (statement.type !== dist$3.AST_NODE_TYPES.IfStatement) {
|
|
252832
|
+
continue;
|
|
252833
|
+
}
|
|
252834
|
+
const nextStatement = statements[index + 1];
|
|
252835
|
+
if (nextStatement?.type !== dist$3.AST_NODE_TYPES.ReturnStatement) {
|
|
252836
|
+
continue;
|
|
252837
|
+
}
|
|
252838
|
+
const consequentReturn = getReturnStatement(statement.consequent);
|
|
252839
|
+
const finalReturn = nextStatement;
|
|
252840
|
+
const consequentArgument = consequentReturn?.argument ?? null;
|
|
252841
|
+
const finalArgument = finalReturn.argument;
|
|
252842
|
+
if (statement.alternate ||
|
|
252843
|
+
!consequentArgument ||
|
|
252844
|
+
!finalArgument ||
|
|
252845
|
+
isConditionalExpression(consequentArgument) ||
|
|
252846
|
+
isConditionalExpression(finalArgument) ||
|
|
252847
|
+
!hasOnlyWhitespaceBetween(sourceCode, statement, finalReturn) ||
|
|
252848
|
+
sourceCode.getCommentsInside(statement).length > 0 ||
|
|
252849
|
+
sourceCode.getCommentsInside(finalReturn).length > 0) {
|
|
252850
|
+
continue;
|
|
252851
|
+
}
|
|
252852
|
+
context.report({
|
|
252853
|
+
fix(fixer) {
|
|
252854
|
+
const replacement = renderConditionalReturn(statement, consequentArgument, finalArgument, sourceCode);
|
|
252855
|
+
return fixer.replaceTextRange([statement.range[0], finalReturn.range[1]], replacement);
|
|
252856
|
+
},
|
|
252857
|
+
messageId: 'preferConditionalReturn',
|
|
252858
|
+
node: statement,
|
|
252859
|
+
});
|
|
252860
|
+
}
|
|
252861
|
+
}
|
|
252862
|
+
return {
|
|
252863
|
+
BlockStatement(node) {
|
|
252864
|
+
checkBody(node.body);
|
|
252865
|
+
},
|
|
252866
|
+
Program(node) {
|
|
252867
|
+
checkBody(node.body);
|
|
252868
|
+
},
|
|
252869
|
+
SwitchCase(node) {
|
|
252870
|
+
checkBody(node.consequent);
|
|
252871
|
+
},
|
|
252872
|
+
};
|
|
252873
|
+
},
|
|
252874
|
+
meta: {
|
|
252875
|
+
docs: {
|
|
252876
|
+
description: 'Prefer a single conditional return over an if statement followed by another return statement.',
|
|
252877
|
+
},
|
|
252878
|
+
fixable: 'code',
|
|
252879
|
+
messages: {
|
|
252880
|
+
preferConditionalReturn: 'Replace this if/return pair with a single conditional return.',
|
|
252881
|
+
},
|
|
252882
|
+
schema: [],
|
|
252883
|
+
type: 'suggestion',
|
|
252884
|
+
},
|
|
252885
|
+
name: 'prefer-conditional-return',
|
|
252886
|
+
});
|
|
252887
|
+
|
|
252810
252888
|
function parseStrictNullCheck(node, getText) {
|
|
252811
252889
|
if (node.type !== dist$3.AST_NODE_TYPES.BinaryExpression) {
|
|
252812
252890
|
return null;
|
|
@@ -252824,29 +252902,26 @@ function parseStrictNullCheck(node, getText) {
|
|
|
252824
252902
|
if (left.type === dist$3.AST_NODE_TYPES.Literal && left.value === null) {
|
|
252825
252903
|
return { comparedWith: 'null', operand: getText(right), strictOp: operator };
|
|
252826
252904
|
}
|
|
252827
|
-
|
|
252828
|
-
|
|
252829
|
-
|
|
252830
|
-
return null;
|
|
252905
|
+
return left.type === dist$3.AST_NODE_TYPES.Identifier && left.name === 'undefined'
|
|
252906
|
+
? { comparedWith: 'undefined', operand: getText(right), strictOp: operator }
|
|
252907
|
+
: null;
|
|
252831
252908
|
}
|
|
252832
252909
|
function isParsedNullCheck(value) {
|
|
252833
252910
|
return value !== null;
|
|
252834
252911
|
}
|
|
252835
252912
|
function getLooseNullCheck(left, right) {
|
|
252836
|
-
|
|
252913
|
+
return !isParsedNullCheck(left) ||
|
|
252837
252914
|
!isParsedNullCheck(right) ||
|
|
252838
252915
|
left.strictOp !== right.strictOp ||
|
|
252839
252916
|
left.operand !== right.operand ||
|
|
252840
|
-
left.comparedWith === right.comparedWith
|
|
252841
|
-
|
|
252842
|
-
|
|
252843
|
-
return `${left.operand} ${left.strictOp === '!==' ? '!=' : '=='} null`;
|
|
252917
|
+
left.comparedWith === right.comparedWith
|
|
252918
|
+
? null
|
|
252919
|
+
: `${left.operand} ${left.strictOp === '!==' ? '!=' : '=='} null`;
|
|
252844
252920
|
}
|
|
252845
252921
|
function collectAndLeaves(node) {
|
|
252846
|
-
|
|
252847
|
-
|
|
252848
|
-
|
|
252849
|
-
return [node];
|
|
252922
|
+
return node.type === dist$3.AST_NODE_TYPES.LogicalExpression && node.operator === '&&'
|
|
252923
|
+
? [...collectAndLeaves(node.left), ...collectAndLeaves(node.right)]
|
|
252924
|
+
: [node];
|
|
252850
252925
|
}
|
|
252851
252926
|
function isAndChainRoot(node) {
|
|
252852
252927
|
return (node.parent.type !== dist$3.AST_NODE_TYPES.LogicalExpression ||
|
|
@@ -252920,10 +252995,9 @@ function getPushCall(node) {
|
|
|
252920
252995
|
return null;
|
|
252921
252996
|
}
|
|
252922
252997
|
const { property } = call.callee;
|
|
252923
|
-
|
|
252924
|
-
|
|
252925
|
-
|
|
252926
|
-
return call;
|
|
252998
|
+
return property.type !== dist$3.AST_NODE_TYPES.Identifier || property.name !== 'push'
|
|
252999
|
+
? null
|
|
253000
|
+
: call;
|
|
252927
253001
|
}
|
|
252928
253002
|
const rule$j = createRule({
|
|
252929
253003
|
create(context) {
|
|
@@ -252971,10 +253045,12 @@ const rule$j = createRule({
|
|
|
252971
253045
|
.map((arg) => sourceCode.getText(arg))
|
|
252972
253046
|
.join(', ');
|
|
252973
253047
|
const lastStmt = group[group.length - 1];
|
|
252974
|
-
|
|
252975
|
-
|
|
252976
|
-
|
|
252977
|
-
|
|
253048
|
+
return lastStmt
|
|
253049
|
+
? fixer.replaceTextRange([
|
|
253050
|
+
groupStmt.range[0],
|
|
253051
|
+
lastStmt.range[1],
|
|
253052
|
+
], `${arrayText}.push(${allArgs});`)
|
|
253053
|
+
: null;
|
|
252978
253054
|
},
|
|
252979
253055
|
}
|
|
252980
253056
|
: {}),
|
|
@@ -253014,10 +253090,9 @@ function getModuleKeywordToken(sourceCode, node) {
|
|
|
253014
253090
|
if (!firstToken) {
|
|
253015
253091
|
return null;
|
|
253016
253092
|
}
|
|
253017
|
-
|
|
253018
|
-
|
|
253019
|
-
|
|
253020
|
-
return firstToken;
|
|
253093
|
+
return firstToken.value === 'declare'
|
|
253094
|
+
? (sourceCode.getTokenAfter(firstToken) ?? null)
|
|
253095
|
+
: firstToken;
|
|
253021
253096
|
}
|
|
253022
253097
|
const rule$i = createRule({
|
|
253023
253098
|
create(context) {
|
|
@@ -253114,20 +253189,18 @@ function unwrapUsageExpression(node) {
|
|
|
253114
253189
|
}
|
|
253115
253190
|
function isStatementPositionCall(node) {
|
|
253116
253191
|
const usage = unwrapUsageExpression(node);
|
|
253117
|
-
|
|
253118
|
-
|
|
253119
|
-
|
|
253120
|
-
|
|
253121
|
-
usage.parent.parent.type === dist$3.AST_NODE_TYPES.ExpressionStatement);
|
|
253192
|
+
return usage.parent?.type === dist$3.AST_NODE_TYPES.ExpressionStatement
|
|
253193
|
+
? true
|
|
253194
|
+
: usage.parent?.type === dist$3.AST_NODE_TYPES.AwaitExpression &&
|
|
253195
|
+
usage.parent.parent.type === dist$3.AST_NODE_TYPES.ExpressionStatement;
|
|
253122
253196
|
}
|
|
253123
253197
|
function isConsoleMethodCall(node) {
|
|
253124
|
-
|
|
253198
|
+
return node.callee.type !== dist$3.AST_NODE_TYPES.MemberExpression ||
|
|
253125
253199
|
node.callee.object.type !== dist$3.AST_NODE_TYPES.Identifier ||
|
|
253126
253200
|
node.callee.object.name !== 'console' ||
|
|
253127
|
-
node.callee.property.type !== dist$3.AST_NODE_TYPES.Identifier
|
|
253128
|
-
|
|
253129
|
-
|
|
253130
|
-
return CONSOLE_METHODS.has(node.callee.property.name);
|
|
253201
|
+
node.callee.property.type !== dist$3.AST_NODE_TYPES.Identifier
|
|
253202
|
+
? false
|
|
253203
|
+
: CONSOLE_METHODS.has(node.callee.property.name);
|
|
253131
253204
|
}
|
|
253132
253205
|
function isDomImperativeCall(node, checker, esTreeNodeToTSNodeMap) {
|
|
253133
253206
|
if (node.callee.type === dist$3.AST_NODE_TYPES.MemberExpression &&
|
|
@@ -253149,14 +253222,13 @@ function isDomImperativeCall(node, checker, esTreeNodeToTSNodeMap) {
|
|
|
253149
253222
|
return returnType === 'void' || returnType === 'Promise<void>';
|
|
253150
253223
|
}
|
|
253151
253224
|
function isSuspiciousDomCallArgumentConsumer(node, checker, esTreeNodeToTSNodeMap, program) {
|
|
253152
|
-
|
|
253225
|
+
return isAngularUntrackedCall(node, program) ||
|
|
253153
253226
|
isSignalReadCall(node, checker, esTreeNodeToTSNodeMap) ||
|
|
253154
253227
|
isWritableSignalWrite(node, checker, esTreeNodeToTSNodeMap) ||
|
|
253155
253228
|
!isStatementPositionCall(node) ||
|
|
253156
|
-
isConsoleMethodCall(node)
|
|
253157
|
-
|
|
253158
|
-
|
|
253159
|
-
return isDomImperativeCall(node, checker, esTreeNodeToTSNodeMap);
|
|
253229
|
+
isConsoleMethodCall(node)
|
|
253230
|
+
? false
|
|
253231
|
+
: isDomImperativeCall(node, checker, esTreeNodeToTSNodeMap);
|
|
253160
253232
|
}
|
|
253161
253233
|
function isAliasDeclarationIdentifier(node) {
|
|
253162
253234
|
return (node.type === dist$3.AST_NODE_TYPES.Identifier &&
|
|
@@ -253298,13 +253370,12 @@ const rule$h = createUntrackedRule({
|
|
|
253298
253370
|
const untrackedAlias = findUntrackedAlias(program);
|
|
253299
253371
|
const alreadyHasUntracked = untrackedAlias != null;
|
|
253300
253372
|
const wrapped = buildUntrackedWrap(read, sourceCode, untrackedAlias ?? 'untracked');
|
|
253301
|
-
|
|
253302
|
-
|
|
253303
|
-
|
|
253304
|
-
|
|
253305
|
-
|
|
253306
|
-
|
|
253307
|
-
];
|
|
253373
|
+
return alreadyHasUntracked
|
|
253374
|
+
? (fixer) => [fixer.replaceText(read, wrapped)]
|
|
253375
|
+
: (fixer) => [
|
|
253376
|
+
fixer.replaceText(read, wrapped),
|
|
253377
|
+
...buildUntrackedImportFixes(program, fixer),
|
|
253378
|
+
];
|
|
253308
253379
|
}
|
|
253309
253380
|
return {
|
|
253310
253381
|
CallExpression(node) {
|
|
@@ -253353,10 +253424,9 @@ function getReturnedExpression(node) {
|
|
|
253353
253424
|
return null;
|
|
253354
253425
|
}
|
|
253355
253426
|
const statement = node.body.body[0];
|
|
253356
|
-
|
|
253357
|
-
|
|
253358
|
-
|
|
253359
|
-
return statement.argument;
|
|
253427
|
+
return statement?.type !== dist$3.AST_NODE_TYPES.ReturnStatement || !statement.argument
|
|
253428
|
+
? null
|
|
253429
|
+
: statement.argument;
|
|
253360
253430
|
}
|
|
253361
253431
|
|
|
253362
253432
|
function getWrappedSignalGetter(node, checker, esTreeNodeToTSNodeMap) {
|
|
@@ -253756,10 +253826,9 @@ function isImportsArrayProperty(property) {
|
|
|
253756
253826
|
}
|
|
253757
253827
|
|
|
253758
253828
|
function getImportedName$1(spec) {
|
|
253759
|
-
|
|
253760
|
-
|
|
253761
|
-
|
|
253762
|
-
return spec.imported.value;
|
|
253829
|
+
return spec.imported.type === dist$3.AST_NODE_TYPES.Identifier
|
|
253830
|
+
? spec.imported.name
|
|
253831
|
+
: spec.imported.value;
|
|
253763
253832
|
}
|
|
253764
253833
|
|
|
253765
253834
|
const MESSAGE_ID$3 = 'replaceTuiImport';
|
|
@@ -253956,10 +254025,7 @@ function getLineBreak(text) {
|
|
|
253956
254025
|
if (text.includes('\r\n')) {
|
|
253957
254026
|
return '\r\n';
|
|
253958
254027
|
}
|
|
253959
|
-
|
|
253960
|
-
return '\r';
|
|
253961
|
-
}
|
|
253962
|
-
return '\n';
|
|
254028
|
+
return text.includes('\r') ? '\r' : '\n';
|
|
253963
254029
|
}
|
|
253964
254030
|
function getLeadingIndentation(text) {
|
|
253965
254031
|
let index = 0;
|
|
@@ -254073,11 +254139,10 @@ function getVariableSpacingStatement(node) {
|
|
|
254073
254139
|
if (node.type === dist$3.AST_NODE_TYPES.VariableDeclaration) {
|
|
254074
254140
|
return { declaration: node, exported: false, node };
|
|
254075
254141
|
}
|
|
254076
|
-
|
|
254077
|
-
node.declaration?.type !== dist$3.AST_NODE_TYPES.VariableDeclaration
|
|
254078
|
-
|
|
254079
|
-
|
|
254080
|
-
return { declaration: node.declaration, exported: true, node };
|
|
254142
|
+
return node.type !== dist$3.AST_NODE_TYPES.ExportNamedDeclaration ||
|
|
254143
|
+
node.declaration?.type !== dist$3.AST_NODE_TYPES.VariableDeclaration
|
|
254144
|
+
? null
|
|
254145
|
+
: { declaration: node.declaration, exported: true, node };
|
|
254081
254146
|
}
|
|
254082
254147
|
function isRequireCall(node) {
|
|
254083
254148
|
return (node.type === dist$3.AST_NODE_TYPES.CallExpression &&
|
|
@@ -254099,10 +254164,9 @@ function isImportLikeInitializer(node) {
|
|
|
254099
254164
|
if (initializer.type === dist$3.AST_NODE_TYPES.MemberExpression) {
|
|
254100
254165
|
return isImportLikeInitializer(initializer.object);
|
|
254101
254166
|
}
|
|
254102
|
-
|
|
254103
|
-
|
|
254104
|
-
|
|
254105
|
-
return false;
|
|
254167
|
+
return initializer.type === dist$3.AST_NODE_TYPES.CallExpression
|
|
254168
|
+
? isImportLikeInitializer(initializer.callee)
|
|
254169
|
+
: false;
|
|
254106
254170
|
}
|
|
254107
254171
|
function isImportLikeVariableDeclaration(declaration) {
|
|
254108
254172
|
if (declaration.declarations.length !== 1) {
|
|
@@ -254110,10 +254174,7 @@ function isImportLikeVariableDeclaration(declaration) {
|
|
|
254110
254174
|
}
|
|
254111
254175
|
const [declarator] = declaration.declarations;
|
|
254112
254176
|
const init = declarator.init;
|
|
254113
|
-
|
|
254114
|
-
return false;
|
|
254115
|
-
}
|
|
254116
|
-
return isImportLikeInitializer(init);
|
|
254177
|
+
return init ? isImportLikeInitializer(init) : false;
|
|
254117
254178
|
}
|
|
254118
254179
|
const rule$7 = createRule({
|
|
254119
254180
|
create(context) {
|
|
@@ -254522,12 +254583,11 @@ function getConstArray(node) {
|
|
|
254522
254583
|
|
|
254523
254584
|
function isClassType(type) {
|
|
254524
254585
|
const symbol = type.getSymbol();
|
|
254525
|
-
|
|
254526
|
-
|
|
254527
|
-
|
|
254528
|
-
|
|
254529
|
-
|
|
254530
|
-
?.some((d) => ts.isClassDeclaration(d) || ts.isClassExpression(d)) ?? false);
|
|
254586
|
+
return symbol
|
|
254587
|
+
? (symbol
|
|
254588
|
+
.getDeclarations()
|
|
254589
|
+
?.some((d) => ts.isClassDeclaration(d) || ts.isClassExpression(d)) ?? false)
|
|
254590
|
+
: false;
|
|
254531
254591
|
}
|
|
254532
254592
|
|
|
254533
254593
|
function isExternalPureTuple(typeChecker, type) {
|
|
@@ -254536,10 +254596,7 @@ function isExternalPureTuple(typeChecker, type) {
|
|
|
254536
254596
|
}
|
|
254537
254597
|
const typeRef = type;
|
|
254538
254598
|
const typeArgs = typeChecker.getTypeArguments(typeRef);
|
|
254539
|
-
|
|
254540
|
-
return false;
|
|
254541
|
-
}
|
|
254542
|
-
return typeArgs.every((item) => isClassType(item));
|
|
254599
|
+
return typeArgs.length === 0 ? false : typeArgs.every((item) => isClassType(item));
|
|
254543
254600
|
}
|
|
254544
254601
|
|
|
254545
254602
|
const MESSAGE_ID$2 = 'spreadArrays';
|
|
@@ -254893,10 +254950,7 @@ function normalizeImportFilter(importFilter) {
|
|
|
254893
254950
|
function getRootPackageName(importPath) {
|
|
254894
254951
|
if (importPath.startsWith('@')) {
|
|
254895
254952
|
const segments = importPath.split('/');
|
|
254896
|
-
|
|
254897
|
-
return null;
|
|
254898
|
-
}
|
|
254899
|
-
return `${segments[0]}/${segments[1]}`;
|
|
254953
|
+
return segments.length < 2 ? null : `${segments[0]}/${segments[1]}`;
|
|
254900
254954
|
}
|
|
254901
254955
|
const parts = importPath.split('/');
|
|
254902
254956
|
return parts[0] ?? null;
|
|
@@ -254953,14 +255007,13 @@ function findNestedEntryPointRelativePaths(rootEntryDirectory) {
|
|
|
254953
255007
|
return [...new Set(directories)];
|
|
254954
255008
|
}
|
|
254955
255009
|
function selectCandidateEntryPointsForMode(allNestedRelativePaths, strict) {
|
|
254956
|
-
|
|
254957
|
-
|
|
254958
|
-
|
|
254959
|
-
|
|
254960
|
-
|
|
254961
|
-
|
|
254962
|
-
|
|
254963
|
-
});
|
|
255010
|
+
return strict
|
|
255011
|
+
? [...allNestedRelativePaths].sort((a, b) => {
|
|
255012
|
+
const depthA = a.split('/').filter(Boolean).length;
|
|
255013
|
+
const depthB = b.split('/').filter(Boolean).length;
|
|
255014
|
+
return depthB - depthA;
|
|
255015
|
+
})
|
|
255016
|
+
: allNestedRelativePaths.filter((relativePath) => !relativePath.includes('/'));
|
|
254964
255017
|
}
|
|
254965
255018
|
function mapSymbolsToEntryPointsUsingTypeChecker({ candidateEntryPoints, importedSymbols, rootEntryDirectory, state, }) {
|
|
254966
255019
|
const symbolToEntryPoint = new Map();
|
|
@@ -255111,10 +255164,9 @@ function buildImportStatement({ importKind, importPath, specifiers, state, }) {
|
|
|
255111
255164
|
if (namedSpecifiers.length > 0) {
|
|
255112
255165
|
clauses.push(`{${namedSpecifiers.map((specifier) => state.sourceCode.getText(specifier)).join(', ')}}`);
|
|
255113
255166
|
}
|
|
255114
|
-
|
|
255115
|
-
|
|
255116
|
-
|
|
255117
|
-
return `${importKeyword} ${clauses.join(', ')} from '${importPath}';`;
|
|
255167
|
+
return clauses.length === 0
|
|
255168
|
+
? null
|
|
255169
|
+
: `${importKeyword} ${clauses.join(', ')} from '${importPath}';`;
|
|
255118
255170
|
}
|
|
255119
255171
|
|
|
255120
255172
|
function getTypeName(param) {
|
|
@@ -255225,41 +255277,42 @@ const plugin = {
|
|
|
255225
255277
|
},
|
|
255226
255278
|
rules: {
|
|
255227
255279
|
'array-as-const': rule$5,
|
|
255228
|
-
'attrs-newline': rule$
|
|
255280
|
+
'attrs-newline': rule$R,
|
|
255229
255281
|
'class-property-naming': rule$4,
|
|
255230
|
-
'decorator-key-sort': rule$
|
|
255231
|
-
'element-newline': rule$
|
|
255282
|
+
'decorator-key-sort': rule$Q,
|
|
255283
|
+
'element-newline': rule$P,
|
|
255232
255284
|
'flat-exports': rule$3,
|
|
255233
|
-
'host-attributes-sort': rule$
|
|
255234
|
-
'html-logical-properties': rule$
|
|
255235
|
-
'import-integrity': rule$
|
|
255236
|
-
'injection-token-description': rule$
|
|
255237
|
-
'no-commonjs-import-patterns': rule$
|
|
255238
|
-
'no-deep-imports': rule$
|
|
255239
|
-
'no-deep-imports-to-indexed-packages': rule$
|
|
255240
|
-
'no-duplicate-attrs': rule$
|
|
255241
|
-
'no-duplicate-id': rule$
|
|
255242
|
-
'no-duplicate-in-head': rule$
|
|
255243
|
-
'no-fully-untracked-effect': rule$
|
|
255244
|
-
'no-href-with-router-link': rule$
|
|
255245
|
-
'no-implicit-public': rule$
|
|
255246
|
-
'no-import-assertions': rule$
|
|
255247
|
-
'no-infinite-loop': rule$
|
|
255248
|
-
'no-legacy-peer-deps': rule$
|
|
255249
|
-
'no-obsolete-attrs': rule$
|
|
255250
|
-
'no-obsolete-tags': rule$
|
|
255251
|
-
'no-playwright-empty-fill': rule$
|
|
255252
|
-
'no-project-as-in-ng-template': rule$
|
|
255253
|
-
'no-redundant-type-annotation': rule$
|
|
255254
|
-
'no-repeated-signal-in-conditional': rule$
|
|
255285
|
+
'host-attributes-sort': rule$O,
|
|
255286
|
+
'html-logical-properties': rule$N,
|
|
255287
|
+
'import-integrity': rule$M,
|
|
255288
|
+
'injection-token-description': rule$L,
|
|
255289
|
+
'no-commonjs-import-patterns': rule$K,
|
|
255290
|
+
'no-deep-imports': rule$J,
|
|
255291
|
+
'no-deep-imports-to-indexed-packages': rule$I,
|
|
255292
|
+
'no-duplicate-attrs': rule$H,
|
|
255293
|
+
'no-duplicate-id': rule$G,
|
|
255294
|
+
'no-duplicate-in-head': rule$F,
|
|
255295
|
+
'no-fully-untracked-effect': rule$E,
|
|
255296
|
+
'no-href-with-router-link': rule$D,
|
|
255297
|
+
'no-implicit-public': rule$C,
|
|
255298
|
+
'no-import-assertions': rule$B,
|
|
255299
|
+
'no-infinite-loop': rule$A,
|
|
255300
|
+
'no-legacy-peer-deps': rule$z,
|
|
255301
|
+
'no-obsolete-attrs': rule$y,
|
|
255302
|
+
'no-obsolete-tags': rule$x,
|
|
255303
|
+
'no-playwright-empty-fill': rule$w,
|
|
255304
|
+
'no-project-as-in-ng-template': rule$v,
|
|
255305
|
+
'no-redundant-type-annotation': rule$u,
|
|
255306
|
+
'no-repeated-signal-in-conditional': rule$t,
|
|
255255
255307
|
'no-restricted-attr-values': rule$2,
|
|
255256
|
-
'no-side-effects-in-computed': rule$
|
|
255257
|
-
'no-signal-reads-after-await-in-reactive-context': rule$
|
|
255258
|
-
'no-string-literal-concat': rule$
|
|
255259
|
-
'no-untracked-outside-reactive-context': rule$
|
|
255260
|
-
'no-useless-untracked': rule$
|
|
255261
|
-
'object-single-line': rule$
|
|
255262
|
-
'prefer-combined-if-control-flow': rule$
|
|
255308
|
+
'no-side-effects-in-computed': rule$s,
|
|
255309
|
+
'no-signal-reads-after-await-in-reactive-context': rule$r,
|
|
255310
|
+
'no-string-literal-concat': rule$q,
|
|
255311
|
+
'no-untracked-outside-reactive-context': rule$p,
|
|
255312
|
+
'no-useless-untracked': rule$o,
|
|
255313
|
+
'object-single-line': rule$n,
|
|
255314
|
+
'prefer-combined-if-control-flow': rule$m,
|
|
255315
|
+
'prefer-conditional-return': rule$l,
|
|
255263
255316
|
'prefer-deep-imports': rule$1,
|
|
255264
255317
|
'prefer-loose-null-check': rule$k,
|
|
255265
255318
|
'prefer-multi-arg-push': rule$j,
|