@taiga-ui/eslint-plugin-experience-next 0.384.0 → 0.386.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/configs/html-eslint.d.ts +1 -57
- package/index.esm.js +27 -25
- package/package.json +9 -5
package/configs/html-eslint.d.ts
CHANGED
|
@@ -1,58 +1,2 @@
|
|
|
1
|
-
|
|
2
|
-
import htmlParser from '@html-eslint/parser';
|
|
3
|
-
declare const _default: ({
|
|
4
|
-
ignores: string[];
|
|
5
|
-
files?: undefined;
|
|
6
|
-
rules?: undefined;
|
|
7
|
-
} | {
|
|
8
|
-
files: string[];
|
|
9
|
-
plugins: {
|
|
10
|
-
html: typeof html;
|
|
11
|
-
};
|
|
12
|
-
language: string;
|
|
13
|
-
languageOptions: {
|
|
14
|
-
parser: typeof htmlParser;
|
|
15
|
-
};
|
|
16
|
-
rules: {
|
|
17
|
-
'@taiga-ui/experience-next/no-href-with-router-link': string;
|
|
18
|
-
'html/indent': string;
|
|
19
|
-
'html/no-extra-spacing-attrs': string;
|
|
20
|
-
'html/no-multiple-h1': string;
|
|
21
|
-
'html/no-restricted-attr-values': (string | {
|
|
22
|
-
attrPatterns: string[];
|
|
23
|
-
attrValuePatterns: string[];
|
|
24
|
-
message: string;
|
|
25
|
-
})[];
|
|
26
|
-
'html/no-restricted-attrs': (string | {
|
|
27
|
-
attrPatterns: string[];
|
|
28
|
-
message: string;
|
|
29
|
-
tagPatterns: string[];
|
|
30
|
-
})[];
|
|
31
|
-
'html/require-closing-tags': string;
|
|
32
|
-
'html/require-img-alt': (string | {
|
|
33
|
-
substitute: string[];
|
|
34
|
-
})[];
|
|
35
|
-
'html/use-baseline': string;
|
|
36
|
-
"html/require-lang": "error";
|
|
37
|
-
"html/require-doctype": "error";
|
|
38
|
-
"html/require-title": "error";
|
|
39
|
-
"html/attrs-newline": "error";
|
|
40
|
-
"html/element-newline": ["error", {
|
|
41
|
-
inline: string[];
|
|
42
|
-
}];
|
|
43
|
-
"html/no-duplicate-id": "error";
|
|
44
|
-
"html/require-li-container": "error";
|
|
45
|
-
"html/quotes": "error";
|
|
46
|
-
"html/no-obsolete-tags": "error";
|
|
47
|
-
"html/no-duplicate-attrs": "error";
|
|
48
|
-
"html/no-duplicate-in-head": "error";
|
|
49
|
-
};
|
|
50
|
-
ignores?: undefined;
|
|
51
|
-
} | {
|
|
52
|
-
files: string[];
|
|
53
|
-
rules: {
|
|
54
|
-
'html/no-restricted-attr-values': string;
|
|
55
|
-
};
|
|
56
|
-
ignores?: undefined;
|
|
57
|
-
})[];
|
|
1
|
+
declare const _default: import("@eslint/config-helpers").Config[];
|
|
58
2
|
export default _default;
|
package/index.esm.js
CHANGED
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
import fs, { readFileSync } from 'node:fs';
|
|
2
2
|
import html from '@html-eslint/eslint-plugin';
|
|
3
3
|
import htmlParser from '@html-eslint/parser';
|
|
4
|
+
import { defineConfig } from 'eslint/config';
|
|
4
5
|
import { createRequire } from 'node:module';
|
|
5
6
|
import eslint from '@eslint/js';
|
|
6
7
|
import markdown from '@eslint/markdown';
|
|
7
8
|
import rxjs from '@smarttools/eslint-plugin-rxjs';
|
|
8
9
|
import stylistic from '@stylistic/eslint-plugin';
|
|
9
10
|
import angular from 'angular-eslint';
|
|
10
|
-
import { defineConfig } from 'eslint/config';
|
|
11
11
|
import compat from 'eslint-plugin-compat';
|
|
12
12
|
import progress from 'eslint-plugin-file-progress';
|
|
13
13
|
import jest from 'eslint-plugin-jest';
|
|
@@ -26,7 +26,7 @@ import ts from 'typescript';
|
|
|
26
26
|
import { AST_NODE_TYPES as AST_NODE_TYPES$1 } from '@typescript-eslint/types';
|
|
27
27
|
import path from 'node:path';
|
|
28
28
|
|
|
29
|
-
var htmlEslint = [
|
|
29
|
+
var htmlEslint = defineConfig([
|
|
30
30
|
{
|
|
31
31
|
ignores: [
|
|
32
32
|
'**/tests-report/**',
|
|
@@ -38,15 +38,14 @@ var htmlEslint = [
|
|
|
38
38
|
],
|
|
39
39
|
},
|
|
40
40
|
{
|
|
41
|
-
...html.configs.recommended,
|
|
42
41
|
files: ['**/*.html'],
|
|
43
42
|
plugins: { html },
|
|
43
|
+
extends: ['html/recommended'],
|
|
44
44
|
language: 'html/html',
|
|
45
45
|
languageOptions: {
|
|
46
46
|
parser: htmlParser,
|
|
47
47
|
},
|
|
48
48
|
rules: {
|
|
49
|
-
...html.configs.recommended.rules,
|
|
50
49
|
'@taiga-ui/experience-next/no-href-with-router-link': 'error',
|
|
51
50
|
'html/indent': 'off', // prettier conflicts
|
|
52
51
|
'html/no-extra-spacing-attrs': 'off', // prettier conflicts
|
|
@@ -116,7 +115,7 @@ var htmlEslint = [
|
|
|
116
115
|
'html/no-restricted-attr-values': 'off',
|
|
117
116
|
},
|
|
118
117
|
},
|
|
119
|
-
];
|
|
118
|
+
]);
|
|
120
119
|
|
|
121
120
|
const TUI_RECOMMENDED_NAMING_CONVENTION = [
|
|
122
121
|
{
|
|
@@ -272,6 +271,11 @@ var recommended = defineConfig([
|
|
|
272
271
|
tseslint.configs.all,
|
|
273
272
|
],
|
|
274
273
|
languageOptions: {
|
|
274
|
+
globals: {
|
|
275
|
+
...globals.builtin,
|
|
276
|
+
...globals.browser,
|
|
277
|
+
...globals.node,
|
|
278
|
+
},
|
|
275
279
|
parserOptions: {
|
|
276
280
|
ecmaVersion: 'latest',
|
|
277
281
|
errorOnTypeScriptSyntacticAndSemanticIssues: false,
|
|
@@ -280,18 +284,8 @@ var recommended = defineConfig([
|
|
|
280
284
|
warnOnUnsupportedTypeScriptVersion: false,
|
|
281
285
|
...parserOptions,
|
|
282
286
|
},
|
|
283
|
-
globals: {
|
|
284
|
-
...globals.builtin,
|
|
285
|
-
...globals.browser,
|
|
286
|
-
...globals.node,
|
|
287
|
-
},
|
|
288
287
|
},
|
|
289
288
|
rules: {
|
|
290
|
-
'@typescript-eslint/no-confusing-void-expression': 'off',
|
|
291
|
-
'@typescript-eslint/no-import-type-side-effects': 'off', // verbatimModuleSyntax should be false
|
|
292
|
-
'@typescript-eslint/no-invalid-void-type': 'off',
|
|
293
|
-
'no-void': ['error', { allowAsStatement: true }],
|
|
294
|
-
'sonarjs/no-identical-functions': 'error',
|
|
295
289
|
'@stylistic/function-call-spacing': 'error',
|
|
296
290
|
'@stylistic/lines-between-class-members': [
|
|
297
291
|
'error',
|
|
@@ -376,6 +370,7 @@ var recommended = defineConfig([
|
|
|
376
370
|
'@typescript-eslint/explicit-member-accessibility': [
|
|
377
371
|
'error',
|
|
378
372
|
{
|
|
373
|
+
accessibility: 'explicit',
|
|
379
374
|
overrides: {
|
|
380
375
|
accessors: 'explicit',
|
|
381
376
|
constructors: 'no-public',
|
|
@@ -383,7 +378,6 @@ var recommended = defineConfig([
|
|
|
383
378
|
parameterProperties: 'explicit',
|
|
384
379
|
properties: 'explicit',
|
|
385
380
|
},
|
|
386
|
-
accessibility: 'explicit',
|
|
387
381
|
},
|
|
388
382
|
],
|
|
389
383
|
'@typescript-eslint/explicit-module-boundary-types': 'off',
|
|
@@ -400,6 +394,7 @@ var recommended = defineConfig([
|
|
|
400
394
|
],
|
|
401
395
|
'@typescript-eslint/no-base-to-string': 'off',
|
|
402
396
|
'@typescript-eslint/no-confusing-non-null-assertion': 'error',
|
|
397
|
+
'@typescript-eslint/no-confusing-void-expression': 'off',
|
|
403
398
|
'@typescript-eslint/no-deprecated': 'off',
|
|
404
399
|
'@typescript-eslint/no-duplicate-enum-values': 'error',
|
|
405
400
|
'@typescript-eslint/no-duplicate-type-constituents': 'error',
|
|
@@ -431,7 +426,9 @@ var recommended = defineConfig([
|
|
|
431
426
|
'@typescript-eslint/no-floating-promises': 'off',
|
|
432
427
|
'@typescript-eslint/no-for-in-array': 'error',
|
|
433
428
|
'@typescript-eslint/no-implied-eval': 'error',
|
|
429
|
+
'@typescript-eslint/no-import-type-side-effects': 'off', // verbatimModuleSyntax should be false
|
|
434
430
|
'@typescript-eslint/no-inferrable-types': 'error',
|
|
431
|
+
'@typescript-eslint/no-invalid-void-type': 'off',
|
|
435
432
|
'@typescript-eslint/no-magic-numbers': 'off',
|
|
436
433
|
'@typescript-eslint/no-misused-promises': 'off',
|
|
437
434
|
'@typescript-eslint/no-misused-spread': 'off',
|
|
@@ -547,8 +544,8 @@ var recommended = defineConfig([
|
|
|
547
544
|
'@typescript-eslint/switch-exhaustiveness-check': [
|
|
548
545
|
'error',
|
|
549
546
|
{
|
|
550
|
-
considerDefaultExhaustiveForUnions: true,
|
|
551
547
|
allowDefaultCaseForExhaustiveSwitch: true,
|
|
548
|
+
considerDefaultExhaustiveForUnions: true,
|
|
552
549
|
requireDefaultForNonUnion: false,
|
|
553
550
|
},
|
|
554
551
|
],
|
|
@@ -566,8 +563,8 @@ var recommended = defineConfig([
|
|
|
566
563
|
'decorator-position/decorator-position': [
|
|
567
564
|
'error',
|
|
568
565
|
{
|
|
569
|
-
printWidth: 120,
|
|
570
566
|
methods: 'above',
|
|
567
|
+
printWidth: 120,
|
|
571
568
|
properties: 'above',
|
|
572
569
|
},
|
|
573
570
|
],
|
|
@@ -722,10 +719,10 @@ var recommended = defineConfig([
|
|
|
722
719
|
},
|
|
723
720
|
],
|
|
724
721
|
'no-var': 'error',
|
|
722
|
+
'no-void': ['error', { allowAsStatement: true }],
|
|
725
723
|
'perfectionist/sort-array-includes': [
|
|
726
724
|
'error',
|
|
727
725
|
{
|
|
728
|
-
groupKind: 'literals-first',
|
|
729
726
|
ignoreCase: true,
|
|
730
727
|
order: 'asc',
|
|
731
728
|
type: 'alphabetical',
|
|
@@ -742,7 +739,6 @@ var recommended = defineConfig([
|
|
|
742
739
|
'perfectionist/sort-sets': [
|
|
743
740
|
'error',
|
|
744
741
|
{
|
|
745
|
-
groupKind: 'literals-first',
|
|
746
742
|
ignoreCase: true,
|
|
747
743
|
order: 'asc',
|
|
748
744
|
type: 'alphabetical',
|
|
@@ -778,6 +774,7 @@ var recommended = defineConfig([
|
|
|
778
774
|
'promise/param-names': 'error',
|
|
779
775
|
'simple-import-sort/exports': 'error',
|
|
780
776
|
'simple-import-sort/imports': 'error',
|
|
777
|
+
'sonarjs/no-identical-functions': 'error',
|
|
781
778
|
'sonarjs/no-inverted-boolean-check': 'error',
|
|
782
779
|
'spaced-comment': [
|
|
783
780
|
'error',
|
|
@@ -947,6 +944,7 @@ var recommended = defineConfig([
|
|
|
947
944
|
{
|
|
948
945
|
ignoreWithDirectives: [
|
|
949
946
|
'tuiButtonClose',
|
|
947
|
+
'tuiButtonCopy',
|
|
950
948
|
'tuiAccordion',
|
|
951
949
|
'tuiButtonX',
|
|
952
950
|
'tuiOption',
|
|
@@ -992,7 +990,6 @@ var recommended = defineConfig([
|
|
|
992
990
|
files: ['**/*.pw.spec.ts'],
|
|
993
991
|
extends: [playwright.configs['flat/recommended']],
|
|
994
992
|
rules: {
|
|
995
|
-
'playwright/no-networkidle': 'off',
|
|
996
993
|
'compat/compat': 'off',
|
|
997
994
|
'jest/prefer-importing-jest-globals': 'off',
|
|
998
995
|
'playwright/expect-expect': [
|
|
@@ -1002,6 +999,7 @@ var recommended = defineConfig([
|
|
|
1002
999
|
},
|
|
1003
1000
|
],
|
|
1004
1001
|
'playwright/no-force-option': 'error',
|
|
1002
|
+
'playwright/no-networkidle': 'off',
|
|
1005
1003
|
'playwright/no-skipped-test': 'off',
|
|
1006
1004
|
'playwright/no-wait-for-selector': 'off',
|
|
1007
1005
|
'playwright/no-wait-for-timeout': 'off',
|
|
@@ -1034,7 +1032,6 @@ var recommended = defineConfig([
|
|
|
1034
1032
|
* If enabled we have
|
|
1035
1033
|
* Expected to be running in 'ProxyZone', but it was not found
|
|
1036
1034
|
*/
|
|
1037
|
-
'jest/valid-title': 'error',
|
|
1038
1035
|
'jest/prefer-ending-with-an-expect': 'off',
|
|
1039
1036
|
'jest/prefer-importing-jest-globals': 'off',
|
|
1040
1037
|
'jest/prefer-lowercase-title': [
|
|
@@ -1072,6 +1069,7 @@ var recommended = defineConfig([
|
|
|
1072
1069
|
},
|
|
1073
1070
|
],
|
|
1074
1071
|
'jest/unbound-method': 'off',
|
|
1072
|
+
'jest/valid-title': 'error',
|
|
1075
1073
|
},
|
|
1076
1074
|
},
|
|
1077
1075
|
{
|
|
@@ -1667,6 +1665,7 @@ const rule$3 = createRule$6({
|
|
|
1667
1665
|
create(context) {
|
|
1668
1666
|
const { currentProject, deepImport, ignoreImports, importDeclaration, projectName, } = { ...DEFAULT_OPTIONS, ...context.options[0] };
|
|
1669
1667
|
const isDeepImport = (source) => !!source && new RegExp(deepImport, 'g').test(source);
|
|
1668
|
+
const isSideEffectImport = (node) => node.specifiers.length === 0;
|
|
1670
1669
|
const isInsideTheSameEntryPoint = (source) => {
|
|
1671
1670
|
const filePath = path
|
|
1672
1671
|
.relative(context.cwd, context.filename)
|
|
@@ -1680,9 +1679,11 @@ const rule$3 = createRule$6({
|
|
|
1680
1679
|
const shouldIgnore = (source) => !!source && ignoreImports.some((p) => new RegExp(p, 'g').test(source));
|
|
1681
1680
|
return {
|
|
1682
1681
|
[`ImportDeclaration[source.value=/${importDeclaration}/]`](node) {
|
|
1683
|
-
|
|
1684
|
-
|
|
1685
|
-
|
|
1682
|
+
if (!node || isSideEffectImport(node)) {
|
|
1683
|
+
return;
|
|
1684
|
+
}
|
|
1685
|
+
const importSource = node.source.value;
|
|
1686
|
+
if (!importSource ||
|
|
1686
1687
|
!isDeepImport(importSource) ||
|
|
1687
1688
|
isInsideTheSameEntryPoint(importSource) ||
|
|
1688
1689
|
shouldIgnore(importSource)) {
|
|
@@ -2394,6 +2395,7 @@ const DEFAULT_DECORATORS = ['Component', 'Directive', 'NgModule', 'Pipe'];
|
|
|
2394
2395
|
const DEFAULT_EXCEPTIONS = [
|
|
2395
2396
|
{ from: 'TuiTextfieldOptionsDirective', to: 'TuiTextfield' },
|
|
2396
2397
|
{ from: 'TuiPreviewDialogDirective', to: 'TuiPreview' },
|
|
2398
|
+
{ from: 'TuiAccountComponent', to: 'TuiAccountComponent' },
|
|
2397
2399
|
];
|
|
2398
2400
|
const createRule$2 = ESLintUtils.RuleCreator((name) => name);
|
|
2399
2401
|
const rule$1 = createRule$2({
|
package/package.json
CHANGED
|
@@ -1,23 +1,27 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@taiga-ui/eslint-plugin-experience-next",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.386.0",
|
|
4
4
|
"description": "An ESLint plugin to enforce a consistent code styles across taiga-ui projects",
|
|
5
5
|
"license": "Apache-2.0",
|
|
6
6
|
"type": "module",
|
|
7
|
+
"overrides": {
|
|
8
|
+
"@angular/cli": ">=19.0.0"
|
|
9
|
+
},
|
|
7
10
|
"devDependencies": {
|
|
8
11
|
"@typescript-eslint/rule-tester": "8.53.0",
|
|
9
12
|
"glob": "13.0.0"
|
|
10
13
|
},
|
|
11
14
|
"peerDependencies": {
|
|
15
|
+
"@angular/cli": ">=19.0.0",
|
|
12
16
|
"@eslint/compat": "^2.0.0",
|
|
13
17
|
"@eslint/markdown": "^7.5.1",
|
|
14
|
-
"@html-eslint/eslint-plugin": "^0.
|
|
18
|
+
"@html-eslint/eslint-plugin": "^0.52.1",
|
|
15
19
|
"@html-eslint/parser": "^0.52.0",
|
|
16
20
|
"@smarttools/eslint-plugin-rxjs": "^1.0.22",
|
|
17
21
|
"@stylistic/eslint-plugin": "^5.6.1",
|
|
18
22
|
"@types/glob": "*",
|
|
19
23
|
"@typescript-eslint/eslint-plugin": "^8.53.0",
|
|
20
|
-
"angular-eslint": "^
|
|
24
|
+
"angular-eslint": "^21.1.0",
|
|
21
25
|
"eslint": "^9.39.2",
|
|
22
26
|
"eslint-config-prettier": "^10.1.7",
|
|
23
27
|
"eslint-plugin-compat": "^6.0.2",
|
|
@@ -27,7 +31,7 @@
|
|
|
27
31
|
"eslint-plugin-import": "^2.32.0",
|
|
28
32
|
"eslint-plugin-jest": "^29.5.0",
|
|
29
33
|
"eslint-plugin-package-json": "^0.85.0",
|
|
30
|
-
"eslint-plugin-perfectionist": "^
|
|
34
|
+
"eslint-plugin-perfectionist": "^5.3.1",
|
|
31
35
|
"eslint-plugin-playwright": "^2.5.0",
|
|
32
36
|
"eslint-plugin-prettier": "^5.5.4",
|
|
33
37
|
"eslint-plugin-promise": "^7.2.1",
|
|
@@ -36,7 +40,7 @@
|
|
|
36
40
|
"eslint-plugin-unicorn": "^62.0.0",
|
|
37
41
|
"eslint-plugin-unused-imports": "^4.3.0",
|
|
38
42
|
"glob": "*",
|
|
39
|
-
"globals": "^
|
|
43
|
+
"globals": "^17.0.0",
|
|
40
44
|
"typescript-eslint": "^8.50.0"
|
|
41
45
|
},
|
|
42
46
|
"publishConfig": {
|