@taiga-ui/eslint-plugin-experience-next 0.550.0 → 0.551.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/index.esm.js +34 -8
- package/package.json +1 -1
package/index.esm.js
CHANGED
|
@@ -15439,14 +15439,17 @@ function supportsBuiltInAt(compilerOptions) {
|
|
|
15439
15439
|
function getTypeAwareRuleContext(context) {
|
|
15440
15440
|
const parserServices = dist$4.ESLintUtils.getParserServices(context);
|
|
15441
15441
|
const { sourceCode } = context;
|
|
15442
|
+
const tsProgram = parserServices.program;
|
|
15443
|
+
const esTreeNodeToTSNodeMap = parserServices.esTreeNodeToTSNodeMap;
|
|
15444
|
+
const tsNodeToESTreeNodeMap = parserServices.tsNodeToESTreeNodeMap;
|
|
15442
15445
|
return {
|
|
15443
|
-
checker:
|
|
15444
|
-
esTreeNodeToTSNodeMap
|
|
15446
|
+
checker: tsProgram.getTypeChecker(),
|
|
15447
|
+
esTreeNodeToTSNodeMap,
|
|
15445
15448
|
parserServices,
|
|
15446
15449
|
program: sourceCode.ast,
|
|
15447
15450
|
sourceCode,
|
|
15448
|
-
tsNodeToESTreeNodeMap
|
|
15449
|
-
tsProgram
|
|
15451
|
+
tsNodeToESTreeNodeMap,
|
|
15452
|
+
tsProgram,
|
|
15450
15453
|
};
|
|
15451
15454
|
}
|
|
15452
15455
|
|
|
@@ -51720,13 +51723,30 @@ function readSourceFile(fileName) {
|
|
|
51720
51723
|
return null;
|
|
51721
51724
|
}
|
|
51722
51725
|
}
|
|
51726
|
+
function hasModifierKind(node, kind) {
|
|
51727
|
+
const record = node;
|
|
51728
|
+
const { modifiers } = record;
|
|
51729
|
+
return (Array.isArray(modifiers) &&
|
|
51730
|
+
modifiers.some((modifier) => getRecord(modifier)?.['kind'] === kind));
|
|
51731
|
+
}
|
|
51732
|
+
function statementHasDefaultExportModifier(statement) {
|
|
51733
|
+
return (hasModifierKind(statement, ts.SyntaxKind.ExportKeyword) &&
|
|
51734
|
+
hasModifierKind(statement, ts.SyntaxKind.DefaultKeyword));
|
|
51735
|
+
}
|
|
51736
|
+
function isDefaultExportAssignment(statement) {
|
|
51737
|
+
const record = getRecord(statement);
|
|
51738
|
+
return (record !== null &&
|
|
51739
|
+
'expression' in record &&
|
|
51740
|
+
'isExportEquals' in record &&
|
|
51741
|
+
record['isExportEquals'] !== true);
|
|
51742
|
+
}
|
|
51723
51743
|
function sourceFileHasDefaultExport(sourceFile) {
|
|
51724
51744
|
return sourceFile.statements.some((statement) => {
|
|
51725
|
-
const
|
|
51726
|
-
if (
|
|
51745
|
+
const { exportClause, isTypeOnly } = statement;
|
|
51746
|
+
if (statementHasDefaultExportModifier(statement) ||
|
|
51747
|
+
isDefaultExportAssignment(statement)) {
|
|
51727
51748
|
return true;
|
|
51728
51749
|
}
|
|
51729
|
-
const { exportClause, isTypeOnly } = statement;
|
|
51730
51750
|
if (isTypeOnly === true) {
|
|
51731
51751
|
return false;
|
|
51732
51752
|
}
|
|
@@ -53028,6 +53048,8 @@ const indexExportsCache = new Map();
|
|
|
53028
53048
|
const rule$O = createRule({
|
|
53029
53049
|
create(context) {
|
|
53030
53050
|
const parserServices = dist$4.ESLintUtils.getParserServices(context);
|
|
53051
|
+
// Parser services and this rule can be typed through different physical
|
|
53052
|
+
// TypeScript copies, while the runtime Program shape stays compatible.
|
|
53031
53053
|
const program = parserServices.program;
|
|
53032
53054
|
const compilerOptions = program.getCompilerOptions();
|
|
53033
53055
|
const compilerHost = ts.createCompilerHost(compilerOptions, true);
|
|
@@ -56163,7 +56185,9 @@ const rule$r = createRule({
|
|
|
56163
56185
|
return false;
|
|
56164
56186
|
}
|
|
56165
56187
|
const tsNode = parserServices.esTreeNodeToTSNodeMap.get(node);
|
|
56166
|
-
return
|
|
56188
|
+
return tsNode
|
|
56189
|
+
? isStringType(checker.getTypeAtLocation(tsNode), checker)
|
|
56190
|
+
: false;
|
|
56167
56191
|
}
|
|
56168
56192
|
const getText = (n) => sourceCode.getText(n);
|
|
56169
56193
|
const wrapExpr = (expr) => `\${${getText(expr)}}`;
|
|
@@ -59417,6 +59441,8 @@ const rule$1 = createRule({
|
|
|
59417
59441
|
return state;
|
|
59418
59442
|
}
|
|
59419
59443
|
const parserServices = dist$4.ESLintUtils.getParserServices(context);
|
|
59444
|
+
// Parser services and this rule can be typed through different physical
|
|
59445
|
+
// TypeScript copies, while the runtime Program shape stays compatible.
|
|
59420
59446
|
const program = parserServices.program;
|
|
59421
59447
|
state = {
|
|
59422
59448
|
allowedPackages,
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@taiga-ui/eslint-plugin-experience-next",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.551.0",
|
|
4
4
|
"description": "An ESLint plugin to enforce a consistent code styles across taiga-ui projects",
|
|
5
5
|
"homepage": "https://github.com/taiga-family/toolkit#readme",
|
|
6
6
|
"bugs": {
|