Skip to content

Commit

Permalink
chore: lint changes
Browse files Browse the repository at this point in the history
  • Loading branch information
splincode committed Sep 20, 2024
1 parent a110e06 commit 68bb6d2
Show file tree
Hide file tree
Showing 6 changed files with 7 additions and 17 deletions.
5 changes: 0 additions & 5 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -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": [
Expand Down
2 changes: 1 addition & 1 deletion projects/cdk/schematics/ng-add/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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, {
Expand Down
1 change: 1 addition & 0 deletions projects/core/directives/appearance/appearance.bindings.ts
Original file line number Diff line number Diff line change
@@ -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';
Expand Down
2 changes: 1 addition & 1 deletion projects/demo/src/modules/app/app.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down
8 changes: 2 additions & 6 deletions projects/demo/src/modules/app/stackblitz/utils.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand All @@ -17,13 +13,13 @@ export const appPrefix = (stringsPart: TemplateStringsArray, path = ''): string

export const getSupportFiles = <T extends Record<string, string>>(
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'] = {};

Expand Down
6 changes: 2 additions & 4 deletions projects/demo/src/modules/components/abstract/control.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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'];

Expand All @@ -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]!;

Expand Down

0 comments on commit 68bb6d2

Please sign in to comment.