@taiga-ui/eslint-plugin-experience-next 0.263.0 → 0.265.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 +81 -7
- package/package.json +2 -2
package/index.esm.js
CHANGED
|
@@ -373,12 +373,14 @@ const modernAngularRules = {
|
|
|
373
373
|
preferSignals: 17
|
|
374
374
|
};
|
|
375
375
|
try {
|
|
376
|
-
const
|
|
376
|
+
const {
|
|
377
|
+
major
|
|
378
|
+
} = require('@angular/cli').VERSION;
|
|
377
379
|
angularVersion = parseInt(major, 10);
|
|
378
380
|
} catch {}
|
|
379
381
|
var recommended = tseslint.config(progress.configs['recommended-ci'], require('eslint-plugin-de-morgan').configs.recommended, require('eslint-plugin-import').flatConfigs.recommended, require('eslint-plugin-import').flatConfigs.typescript, require('eslint-plugin-promise').configs['flat/recommended'], {
|
|
380
382
|
ignores: ['*/icons/all.ts', '**/tests-report/**', '**/snapshots/**', '**/test-results/**', '**/.nx/**', '404.html', '*.jpg', '*.svg', '*.less', '*.scss', '*.txt', '*.png', '*.jpg', '*.webmanifest', '*.pdf', '*.mp3', '*.ogv', '*.mp4', '*.ico', '*.xml', '*.md', 'LICENSE', 'jest.preset.js', '*.config.js', 'node_modules', 'dist', '**/node_modules/**', '**/*@dasherize__/**', '**/coverage/**', 'eslintrc.js', '.eslintrc.js', '**/*.d.ts', '**/dist/**', '**/docs/**', '**/bin/**', '.cache/**', '.git/**', '.idea/**']
|
|
381
|
-
}, eslint.configs.recommended, tseslint.configs.
|
|
383
|
+
}, eslint.configs.recommended, tseslint.configs.all, require('eslint-config-prettier'), {
|
|
382
384
|
files: ['**/*.ts', '**/*.js'],
|
|
383
385
|
plugins: {
|
|
384
386
|
'@stylistic': stylistic,
|
|
@@ -392,7 +394,7 @@ var recommended = tseslint.config(progress.configs['recommended-ci'], require('e
|
|
|
392
394
|
unicorn,
|
|
393
395
|
'unused-imports': unusedImports
|
|
394
396
|
},
|
|
395
|
-
extends: [eslint.configs.recommended, ...tseslint.configs.
|
|
397
|
+
extends: [eslint.configs.recommended, ...tseslint.configs.all, ...angular.configs.tsRecommended],
|
|
396
398
|
languageOptions: {
|
|
397
399
|
parserOptions: {
|
|
398
400
|
ecmaVersion: 'latest',
|
|
@@ -705,6 +707,9 @@ var recommended = tseslint.config(progress.configs['recommended-ci'], require('e
|
|
|
705
707
|
'@typescript-eslint/no-useless-constructor': 'error',
|
|
706
708
|
'@typescript-eslint/no-var-requires': 'error',
|
|
707
709
|
'@typescript-eslint/only-throw-error': 'error',
|
|
710
|
+
'@typescript-eslint/parameter-properties': ['error', {
|
|
711
|
+
allow: ['public readonly', 'protected readonly', 'private readonly']
|
|
712
|
+
}],
|
|
708
713
|
'@typescript-eslint/prefer-as-const': 'error',
|
|
709
714
|
'@typescript-eslint/prefer-find': 'error',
|
|
710
715
|
'@typescript-eslint/prefer-for-of': 'error',
|
|
@@ -947,6 +952,8 @@ var recommended = tseslint.config(progress.configs['recommended-ci'], require('e
|
|
|
947
952
|
files: ['**/*.html'],
|
|
948
953
|
extends: [...angular.configs.templateRecommended, ...angular.configs.templateAccessibility],
|
|
949
954
|
rules: {
|
|
955
|
+
'@typescript-eslint/no-confusing-void-expression': 'off',
|
|
956
|
+
'@typescript-eslint/no-meaningless-void-operator': 'off',
|
|
950
957
|
'@angular-eslint/template/interactive-supports-focus': 'off',
|
|
951
958
|
'@angular-eslint/template/label-has-associated-control': 'off',
|
|
952
959
|
'@angular-eslint/template/no-distracting-elements': 'error',
|
|
@@ -954,7 +961,51 @@ var recommended = tseslint.config(progress.configs['recommended-ci'], require('e
|
|
|
954
961
|
'@angular-eslint/template/no-negated-async': 'off',
|
|
955
962
|
'@angular-eslint/template/prefer-control-flow': angularVersion >= modernAngularRules.preferControlFlow ? 'error' : 'off',
|
|
956
963
|
'@angular-eslint/template/prefer-self-closing-tags': 'error',
|
|
964
|
+
'@typescript-eslint/await-thenable': 'off',
|
|
957
965
|
'@typescript-eslint/ban-ts-comment': 'off',
|
|
966
|
+
'@typescript-eslint/consistent-type-exports': 'off',
|
|
967
|
+
'@typescript-eslint/consistent-type-imports': 'off',
|
|
968
|
+
'@typescript-eslint/dot-notation': 'off',
|
|
969
|
+
'@typescript-eslint/naming-convention': 'off',
|
|
970
|
+
'@typescript-eslint/no-array-delete': 'off',
|
|
971
|
+
'@typescript-eslint/no-duplicate-type-constituents': 'off',
|
|
972
|
+
'@typescript-eslint/no-implied-eval': 'off',
|
|
973
|
+
'@typescript-eslint/no-misused-promises': 'off',
|
|
974
|
+
'@typescript-eslint/no-mixed-enums': 'off',
|
|
975
|
+
'@typescript-eslint/no-redundant-type-constituents': 'off',
|
|
976
|
+
'@typescript-eslint/no-unnecessary-boolean-literal-compare': 'off',
|
|
977
|
+
'@typescript-eslint/no-unnecessary-qualifier': 'off',
|
|
978
|
+
'@typescript-eslint/no-unnecessary-template-expression': 'off',
|
|
979
|
+
'@typescript-eslint/no-unnecessary-type-arguments': 'off',
|
|
980
|
+
'@typescript-eslint/no-unnecessary-type-assertion': 'off',
|
|
981
|
+
'@typescript-eslint/no-unnecessary-type-parameters': 'off',
|
|
982
|
+
'@typescript-eslint/no-unsafe-argument': 'off',
|
|
983
|
+
'@typescript-eslint/no-unsafe-assignment': 'off',
|
|
984
|
+
'@typescript-eslint/no-unsafe-call': 'off',
|
|
985
|
+
'@typescript-eslint/no-unsafe-enum-comparison': 'off',
|
|
986
|
+
'@typescript-eslint/no-unsafe-type-assertion': 'off',
|
|
987
|
+
'@typescript-eslint/non-nullable-type-assertion-style': 'off',
|
|
988
|
+
'@typescript-eslint/only-throw-error': 'off',
|
|
989
|
+
'@typescript-eslint/prefer-destructuring': 'off',
|
|
990
|
+
'@typescript-eslint/prefer-find': 'off',
|
|
991
|
+
'@typescript-eslint/prefer-includes': 'off',
|
|
992
|
+
'@typescript-eslint/prefer-optional-chain': 'off',
|
|
993
|
+
'@typescript-eslint/prefer-promise-reject-errors': 'off',
|
|
994
|
+
'@typescript-eslint/prefer-readonly': 'off',
|
|
995
|
+
'@typescript-eslint/prefer-reduce-type-parameter': 'off',
|
|
996
|
+
'@typescript-eslint/prefer-regexp-exec': 'off',
|
|
997
|
+
'@typescript-eslint/prefer-return-this-type': 'off',
|
|
998
|
+
'@typescript-eslint/prefer-string-starts-ends-with': 'off',
|
|
999
|
+
'@typescript-eslint/promise-function-async': 'off',
|
|
1000
|
+
'@typescript-eslint/related-getter-setter-pairs': 'off',
|
|
1001
|
+
'@typescript-eslint/require-array-sort-compare': 'off',
|
|
1002
|
+
'@typescript-eslint/require-await': 'off',
|
|
1003
|
+
'@typescript-eslint/restrict-plus-operands': 'off',
|
|
1004
|
+
'@typescript-eslint/restrict-template-expressions': 'off',
|
|
1005
|
+
'@typescript-eslint/return-await': 'off',
|
|
1006
|
+
'@typescript-eslint/switch-exhaustiveness-check': 'off',
|
|
1007
|
+
'@typescript-eslint/unbound-method': 'off',
|
|
1008
|
+
'@typescript-eslint/use-unknown-in-catch-callback-variable': 'off',
|
|
958
1009
|
'import/namespace': 'off'
|
|
959
1010
|
}
|
|
960
1011
|
}, {
|
|
@@ -1030,6 +1081,9 @@ var recommended = tseslint.config(progress.configs['recommended-ci'], require('e
|
|
|
1030
1081
|
files: ['**/*'],
|
|
1031
1082
|
rules: {
|
|
1032
1083
|
'@angular-eslint/use-injectable-provided-in': 'off',
|
|
1084
|
+
'@typescript-eslint/no-confusing-void-expression': 'off',
|
|
1085
|
+
'@typescript-eslint/no-invalid-this': 'off',
|
|
1086
|
+
'@typescript-eslint/no-invalid-void-type': 'off',
|
|
1033
1087
|
'sonarjs/no-invalid-await': 'off',
|
|
1034
1088
|
'@angular-eslint/component-class-suffix': 'off',
|
|
1035
1089
|
'@angular-eslint/component-max-inline-declarations': 'off',
|
|
@@ -1051,21 +1105,37 @@ var recommended = tseslint.config(progress.configs['recommended-ci'], require('e
|
|
|
1051
1105
|
'@typescript-eslint/adjacent-overload-signatures': 'off',
|
|
1052
1106
|
'@typescript-eslint/ban-ts-comment': 'off',
|
|
1053
1107
|
'@typescript-eslint/class-literal-property-style': 'off',
|
|
1108
|
+
'@typescript-eslint/class-methods-use-this': 'off',
|
|
1054
1109
|
'@typescript-eslint/consistent-return': 'off',
|
|
1055
1110
|
'@typescript-eslint/explicit-module-boundary-types': 'off',
|
|
1111
|
+
'@typescript-eslint/init-declarations': 'off',
|
|
1112
|
+
'@typescript-eslint/method-signature-style': 'off',
|
|
1056
1113
|
'@typescript-eslint/no-base-to-string': 'off',
|
|
1114
|
+
'@typescript-eslint/no-deprecated': 'off',
|
|
1057
1115
|
'@typescript-eslint/no-explicit-any': 'off',
|
|
1058
1116
|
'@typescript-eslint/no-floating-promises': 'off',
|
|
1117
|
+
'@typescript-eslint/no-magic-numbers': 'off',
|
|
1118
|
+
'@typescript-eslint/no-misused-promises': 'off',
|
|
1119
|
+
'@typescript-eslint/no-misused-spread': 'off',
|
|
1059
1120
|
'@typescript-eslint/no-non-null-assertion': 'off',
|
|
1060
1121
|
'@typescript-eslint/no-require-imports': 'off',
|
|
1061
1122
|
'@typescript-eslint/no-shadow': 'off',
|
|
1062
1123
|
'@typescript-eslint/no-unnecessary-condition': 'off',
|
|
1124
|
+
'@typescript-eslint/no-unnecessary-template-expression': 'off',
|
|
1125
|
+
'@typescript-eslint/no-unnecessary-type-parameters': 'off',
|
|
1126
|
+
'@typescript-eslint/no-unsafe-argument': 'off',
|
|
1127
|
+
'@typescript-eslint/no-unsafe-assignment': 'off',
|
|
1128
|
+
'@typescript-eslint/no-unsafe-call': 'off',
|
|
1063
1129
|
'@typescript-eslint/no-unsafe-member-access': 'off',
|
|
1064
1130
|
'@typescript-eslint/no-unsafe-return': 'off',
|
|
1131
|
+
'@typescript-eslint/no-unsafe-type-assertion': 'off',
|
|
1065
1132
|
'@typescript-eslint/no-var-requires': 'off',
|
|
1133
|
+
'@typescript-eslint/prefer-destructuring': 'off',
|
|
1066
1134
|
'@typescript-eslint/prefer-nullish-coalescing': 'off',
|
|
1067
1135
|
'@typescript-eslint/prefer-readonly-parameter-types': 'off',
|
|
1136
|
+
'@typescript-eslint/restrict-template-expressions': 'off',
|
|
1068
1137
|
'@typescript-eslint/strict-boolean-expressions': 'off',
|
|
1138
|
+
'@typescript-eslint/unbound-method': 'off',
|
|
1069
1139
|
camelcase: 'off',
|
|
1070
1140
|
'class-methods-use-this': 'off',
|
|
1071
1141
|
complexity: 'off',
|
|
@@ -9218,7 +9288,9 @@ const config$7 = {
|
|
|
9218
9288
|
ClassDeclaration(node) {
|
|
9219
9289
|
const decorators = Array.from(node.decorators ?? []);
|
|
9220
9290
|
decorators.forEach(decorator => {
|
|
9221
|
-
const
|
|
9291
|
+
const {
|
|
9292
|
+
expression
|
|
9293
|
+
} = decorator;
|
|
9222
9294
|
const decoratorName = expression.callee?.name ?? '';
|
|
9223
9295
|
if (decoratorName in (ORDER || {})) {
|
|
9224
9296
|
const orderList = ORDER[decoratorName];
|
|
@@ -9235,7 +9307,7 @@ const config$7 = {
|
|
|
9235
9307
|
const sortedDecoratorProperties = [...correct, ...forgottenProps].map(key => properties.find(prop => prop.key.name === key));
|
|
9236
9308
|
const newDecoratorArgument = `{${sortedDecoratorProperties.map(({
|
|
9237
9309
|
range
|
|
9238
|
-
}) => fileContent.slice(...range))}}`;
|
|
9310
|
+
}) => fileContent.slice(...range)).toString()}}`;
|
|
9239
9311
|
return fixer.replaceTextRange(argument.range, newDecoratorArgument);
|
|
9240
9312
|
},
|
|
9241
9313
|
message: `Incorrect order keys in @${decoratorName} decorator, please sort by [${correct.join(' -> ')}]`,
|
|
@@ -9327,7 +9399,7 @@ const config$5 = {
|
|
|
9327
9399
|
};
|
|
9328
9400
|
const isDeepImport = source => !!source.match(new RegExp(deepImport, 'g'))?.length;
|
|
9329
9401
|
const isInsideTheSameEntryPoint = source => {
|
|
9330
|
-
const filePath = path$1.relative(context.
|
|
9402
|
+
const filePath = path$1.relative(context.cwd, context.filename).replaceAll(/\\+/g, '/');
|
|
9331
9403
|
const [currentFileProjectName] = currentProject && new RegExp(currentProject, 'g').exec(filePath) || [];
|
|
9332
9404
|
const [importSourceProjectName] = source.match(new RegExp(projectName, 'g')) || [];
|
|
9333
9405
|
return Boolean(currentFileProjectName && importSourceProjectName && currentFileProjectName === importSourceProjectName);
|
|
@@ -9553,7 +9625,9 @@ const config$1 = {
|
|
|
9553
9625
|
ClassDeclaration(node) {
|
|
9554
9626
|
const decorators = Array.from(node.decorators ?? []);
|
|
9555
9627
|
decorators.forEach(decorator => {
|
|
9556
|
-
const
|
|
9628
|
+
const {
|
|
9629
|
+
expression
|
|
9630
|
+
} = decorator;
|
|
9557
9631
|
const decoratorArguments = Array.from(expression.arguments ?? []);
|
|
9558
9632
|
for (const argument of decoratorArguments) {
|
|
9559
9633
|
const properties = Array.from(argument.properties ?? []).reduce((mappings, item) => {
|
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.265.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
|
"main": "index.ts",
|
|
@@ -13,7 +13,7 @@
|
|
|
13
13
|
"angular-eslint": ">=19.2.1",
|
|
14
14
|
"eslint": ">=9.22.0",
|
|
15
15
|
"eslint-config-prettier": ">=10.1.1",
|
|
16
|
-
"eslint-plugin-de-morgan": ">=1.2.
|
|
16
|
+
"eslint-plugin-de-morgan": ">=1.2.1",
|
|
17
17
|
"eslint-plugin-decorator-position": ">=6.0.0",
|
|
18
18
|
"eslint-plugin-file-progress": ">=3.0.1",
|
|
19
19
|
"eslint-plugin-import": ">=2.31.0",
|