diff --git a/package.json b/package.json index d13a6240684a..c7f1a30b53aa 100644 --- a/package.json +++ b/package.json @@ -81,12 +81,7 @@ ], "rules": { "jest/prefer-importing-jest-globals": "off", - "sonarjs/concise-regex": "off", - "sonarjs/no-angular-bypass-sanitization": "off", - "sonarjs/no-nested-conditional": "off", - "sonarjs/no-unused-expressions": "off", "sonarjs/prefer-nullish-coalescing": "off", - "sonarjs/redundant-type-aliases": "off", "unicorn/consistent-destructuring": "off" }, "overrides": [ diff --git a/projects/cdk/schematics/ng-add/index.ts b/projects/cdk/schematics/ng-add/index.ts index 5cce85252f7e..cca2dfd5c5bf 100644 --- a/projects/cdk/schematics/ng-add/index.ts +++ b/projects/cdk/schematics/ng-add/index.ts @@ -41,7 +41,7 @@ function addAngularCdkDep(tree: Tree): void { return; } - const majorVersionArr = /[0-9]+/.exec(angularCore); + const majorVersionArr = /\d+/.exec(angularCore); if (majorVersionArr) { addPackageJsonDependency(tree, { diff --git a/projects/core/directives/appearance/appearance.bindings.ts b/projects/core/directives/appearance/appearance.bindings.ts index 67a231a3f4d7..5bd10b89a56f 100644 --- a/projects/core/directives/appearance/appearance.bindings.ts +++ b/projects/core/directives/appearance/appearance.bindings.ts @@ -1,3 +1,4 @@ +/* eslint-disable sonarjs/redundant-type-aliases */ import type {Signal, WritableSignal} from '@angular/core'; import {tuiDirectiveBinding} from '@taiga-ui/cdk/utils/miscellaneous'; import type {TuiInteractiveState} from '@taiga-ui/core/types'; diff --git a/projects/demo/src/modules/app/app.config.ts b/projects/demo/src/modules/app/app.config.ts index 86817e90ac82..5d9bdfd5bf07 100644 --- a/projects/demo/src/modules/app/app.config.ts +++ b/projects/demo/src/modules/app/app.config.ts @@ -165,7 +165,7 @@ export const config: ApplicationConfig = { { provide: TUI_DOC_URL_STATE_HANDLER, useFactory: () => (tree: UrlTree) => - String(tree).replace(/^\/(next|v[0-9]+)\//, ''), + String(tree).replace(/^\/(next|v\d+)\//, ''), }, { provide: TUI_DOC_TYPE_REFERENCE_HANDLER, diff --git a/projects/demo/src/modules/app/stackblitz/utils.ts b/projects/demo/src/modules/app/stackblitz/utils.ts index 242885090525..60377ddb2193 100644 --- a/projects/demo/src/modules/app/stackblitz/utils.ts +++ b/projects/demo/src/modules/app/stackblitz/utils.ts @@ -2,10 +2,6 @@ import type {Project} from '@stackblitz/sdk'; import {isLess, isPrimaryComponentFile} from '../utils'; -type FileName = string; - -type FileContent = string; - export const prepareLess = (content: string): string => content.replaceAll( /@import.+taiga-ui-local(.less)?';/g, @@ -17,13 +13,13 @@ export const appPrefix = (stringsPart: TemplateStringsArray, path = ''): string export const getSupportFiles = >( files: T, -): Array<[FileName, FileContent]> => +): Array<[fileName: string, fileContent: string]> => Object.entries(files).filter( ([fileName, content]) => content && !isPrimaryComponentFile(fileName), ); export const prepareSupportFiles = ( - files: Array<[FileName, FileContent]>, + files: Array<[fileName: string, fileContent: string]>, ): Project['files'] => { const processedContent: Project['files'] = {}; diff --git a/projects/demo/src/modules/components/abstract/control.ts b/projects/demo/src/modules/components/abstract/control.ts index 05de9467dae8..52e0c71ea78b 100644 --- a/projects/demo/src/modules/components/abstract/control.ts +++ b/projects/demo/src/modules/components/abstract/control.ts @@ -24,8 +24,6 @@ viewBox="0 0 24 24"> const CUSTOM_SVG_NAME = 'Bell'; -type TuiPossibleGenericType = any; - export abstract class AbstractExampleTuiControl extends AbstractExampleTuiInteractive implements AbstractExampleTuiDropdown @@ -48,7 +46,7 @@ export abstract class AbstractExampleTuiControl 'url', ]; - public readonly maxLengthVariants: readonly TuiPossibleGenericType[] = [10]; + public readonly maxLengthVariants: readonly any[] = [10]; public readonly inputModeVariants: readonly string[] = ['text', 'numeric']; @@ -65,7 +63,7 @@ export abstract class AbstractExampleTuiControl public inputMode = this.inputModeVariants[0]!; - public maxLength: TuiPossibleGenericType | null = null; + public maxLength: any = null; public type = this.typeVariants[0]!;