Skip to content

Commit

Permalink
chore: apply changes after linting [bot]
Browse files Browse the repository at this point in the history
  • Loading branch information
taiga-family-bot authored and taiga-family-bot committed Mar 6, 2024
1 parent 4596451 commit 2a4b246
Show file tree
Hide file tree
Showing 176 changed files with 296 additions and 276 deletions.
2 changes: 1 addition & 1 deletion projects/angular/src/lib/deprecated.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import {Directive, Input, NgModule} from '@angular/core';
import {MaskitoOptions} from '@maskito/core';
import type {MaskitoOptions} from '@maskito/core';

import {MaskitoDirective} from './maskito.directive';
import {MaskitoPipe} from './maskito.pipe';
Expand Down
14 changes: 3 additions & 11 deletions projects/angular/src/lib/maskito.directive.ts
Original file line number Diff line number Diff line change
@@ -1,18 +1,10 @@
import {
Directive,
ElementRef,
inject,
Input,
NgZone,
OnChanges,
OnDestroy,
} from '@angular/core';
import type {OnChanges, OnDestroy} from '@angular/core';
import {Directive, ElementRef, inject, Input, NgZone} from '@angular/core';
import {DefaultValueAccessor} from '@angular/forms';
import type {MaskitoElementPredicate, MaskitoOptions} from '@maskito/core';
import {
Maskito,
MASKITO_DEFAULT_ELEMENT_PREDICATE,
MaskitoElementPredicate,
MaskitoOptions,
maskitoTransform,
} from '@maskito/core';

Expand Down
6 changes: 4 additions & 2 deletions projects/angular/src/lib/maskito.pipe.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
import {Pipe, PipeTransform} from '@angular/core';
import {MASKITO_DEFAULT_OPTIONS, MaskitoOptions, maskitoTransform} from '@maskito/core';
import type {PipeTransform} from '@angular/core';
import {Pipe} from '@angular/core';
import type {MaskitoOptions} from '@maskito/core';
import {MASKITO_DEFAULT_OPTIONS, maskitoTransform} from '@maskito/core';

@Pipe({
standalone: true,
Expand Down
5 changes: 3 additions & 2 deletions projects/angular/src/lib/maskito.spec.ts
Original file line number Diff line number Diff line change
@@ -1,8 +1,9 @@
import {Component} from '@angular/core';
import {ComponentFixture, TestBed} from '@angular/core/testing';
import type {ComponentFixture} from '@angular/core/testing';
import {TestBed} from '@angular/core/testing';
import {FormControl, ReactiveFormsModule} from '@angular/forms';
import {MaskitoDirective, MaskitoPipe} from '@maskito/angular';
import {MaskitoOptions} from '@maskito/core';
import type {MaskitoOptions} from '@maskito/core';

describe('Maskito Angular package', () => {
@Component({
Expand Down
2 changes: 1 addition & 1 deletion projects/core/src/lib/classes/mask-model/mask-model.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import {
import type {
ElementState,
MaskitoMaskExpression,
MaskitoOptions,
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import {MASKITO_DEFAULT_OPTIONS} from '../../../constants';
import {MaskitoOptions} from '../../../types';
import type {MaskitoOptions} from '../../../types';
import {MaskModel} from '../mask-model';

describe('MaskModel | Fixed characters', () => {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import {ElementState, MaskitoOptions} from '../../../types';
import type {ElementState, MaskitoOptions} from '../../../types';

export function applyOverwriteMode(
{value, selection}: ElementState,
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import {ElementState, MaskitoMaskExpression} from '../../../types';
import type {ElementState, MaskitoMaskExpression} from '../../../types';
import {guessValidValueByPattern} from './guess-valid-value-by-pattern';
import {guessValidValueByRegExp} from './guess-valid-value-by-reg-exp';
import {validateValueWithMask} from './validate-value-with-mask';
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import {ElementState} from '../../../types';
import type {ElementState} from '../../../types';
import {isFixedCharacter} from './is-fixed-character';

export function getLeadingFixedCharacters(
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import {ElementState} from '../../../types';
import type {ElementState} from '../../../types';
import {getLeadingFixedCharacters} from './get-leading-fixed-characters';
import {isFixedCharacter} from './is-fixed-character';
import {validateValueWithMask} from './validate-value-with-mask';
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import {ElementState} from '../../../types';
import type {ElementState} from '../../../types';

export function guessValidValueByRegExp(
{value, selection}: ElementState,
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import {ElementState, MaskitoMaskExpression} from '../../../types';
import type {ElementState, MaskitoMaskExpression} from '../../../types';
import {isFixedCharacter} from './is-fixed-character';

export function removeFixedMaskCharacters(
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import {MaskitoMaskExpression} from '../../../types';
import type {MaskitoMaskExpression} from '../../../types';
import {isFixedCharacter} from './is-fixed-character';

export function validateValueWithMask(
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import {MaskitoElementPredicate} from '../types';
import type {MaskitoElementPredicate} from '../types';

export const MASKITO_DEFAULT_ELEMENT_PREDICATE: MaskitoElementPredicate = e =>
e.querySelector<HTMLInputElement | HTMLTextAreaElement>('input,textarea') ||
Expand Down
2 changes: 1 addition & 1 deletion projects/core/src/lib/constants/default-options.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import {MaskitoOptions} from '../types';
import type {MaskitoOptions} from '../types';

export const MASKITO_DEFAULT_OPTIONS: Required<MaskitoOptions> = {
mask: /^.*$/,
Expand Down
7 changes: 6 additions & 1 deletion projects/core/src/lib/mask.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,11 @@
import {MaskHistory, MaskModel} from './classes';
import {MASKITO_DEFAULT_OPTIONS} from './constants';
import {ElementState, MaskitoOptions, SelectionRange, TypedInputEvent} from './types';
import type {
ElementState,
MaskitoOptions,
SelectionRange,
TypedInputEvent,
} from './types';
import {
areElementValuesEqual,
EventListener,
Expand Down
2 changes: 1 addition & 1 deletion projects/core/src/lib/types/element-state.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import {SelectionRange} from './selection-range';
import type {SelectionRange} from './selection-range';

export interface ElementState {
readonly value: string;
Expand Down
8 changes: 4 additions & 4 deletions projects/core/src/lib/types/mask-options.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import {ElementState} from './element-state';
import {MaskitoMask} from './mask';
import {MaskitoPostprocessor, MaskitoPreprocessor} from './mask-processors';
import {MaskitoPlugin} from './plugin';
import type {ElementState} from './element-state';
import type {MaskitoMask} from './mask';
import type {MaskitoPostprocessor, MaskitoPreprocessor} from './mask-processors';
import type {MaskitoPlugin} from './plugin';

export interface MaskitoOptions {
readonly mask: MaskitoMask;
Expand Down
2 changes: 1 addition & 1 deletion projects/core/src/lib/types/mask-processors.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import {ElementState} from './element-state';
import type {ElementState} from './element-state';

export type MaskitoPreprocessor = (
_: {
Expand Down
2 changes: 1 addition & 1 deletion projects/core/src/lib/types/mask.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import {ElementState} from './element-state';
import type {ElementState} from './element-state';

export type MaskitoMaskExpression = Array<RegExp | string> | RegExp;

Expand Down
2 changes: 1 addition & 1 deletion projects/core/src/lib/types/plugin.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import {MaskitoOptions} from './mask-options';
import type {MaskitoOptions} from './mask-options';

export type MaskitoPlugin = (
element: HTMLInputElement | HTMLTextAreaElement,
Expand Down
2 changes: 1 addition & 1 deletion projects/core/src/lib/utils/dom/event-listener.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import {TypedInputEvent} from '../../types';
import type {TypedInputEvent} from '../../types';

export class EventListener {
private readonly listeners: Array<() => void> = [];
Expand Down
2 changes: 1 addition & 1 deletion projects/core/src/lib/utils/dom/update-element.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import {ElementState} from '../../types';
import type {ElementState} from '../../types';

/**
* Sets value to element, and dispatches input event
Expand Down
2 changes: 1 addition & 1 deletion projects/core/src/lib/utils/element-states-equality.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import {ElementState} from '../types';
import type {ElementState} from '../types';

export function areElementValuesEqual(
sampleState: ElementState,
Expand Down
2 changes: 1 addition & 1 deletion projects/core/src/lib/utils/get-line-selection.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import {ElementState, SelectionRange} from '../types';
import type {ElementState, SelectionRange} from '../types';

export function getLineSelection(
{value, selection}: ElementState,
Expand Down
2 changes: 1 addition & 1 deletion projects/core/src/lib/utils/get-not-empty-selection.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import {ElementState, SelectionRange} from '../types';
import type {ElementState, SelectionRange} from '../types';

export function getNotEmptySelection(
{value, selection}: ElementState,
Expand Down
2 changes: 1 addition & 1 deletion projects/core/src/lib/utils/get-word-selection.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import {ElementState, SelectionRange} from '../types';
import type {ElementState, SelectionRange} from '../types';

const TRAILING_SPACES_REG = /\s+$/g;
const LEADING_SPACES_REG = /^\s+/g;
Expand Down
2 changes: 1 addition & 1 deletion projects/core/src/lib/utils/initial-calibration-plugin.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import {MaskitoOptions, MaskitoPlugin} from '../types';
import type {MaskitoOptions, MaskitoPlugin} from '../types';
import {maskitoUpdateElement} from './dom/update-element';
import {maskitoTransform} from './transform';

Expand Down
2 changes: 1 addition & 1 deletion projects/core/src/lib/utils/pipe.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import {MaskitoPostprocessor, MaskitoPreprocessor} from '../types';
import type {MaskitoPostprocessor, MaskitoPreprocessor} from '../types';

/**
* @internal
Expand Down
2 changes: 1 addition & 1 deletion projects/core/src/lib/utils/strict-composition-plugin.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import {ElementState, MaskitoPlugin, TypedInputEvent} from '../types';
import type {ElementState, MaskitoPlugin, TypedInputEvent} from '../types';
import {maskitoUpdateElement} from './dom/update-element';
import {areElementStatesEqual} from './element-states-equality';
import {maskitoTransform} from './transform';
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import {ElementState} from '../../types';
import type {ElementState} from '../../types';
import {getNotEmptySelection} from '../get-not-empty-selection';

describe('getNotEmptySelection', () => {
Expand Down
2 changes: 1 addition & 1 deletion projects/core/src/lib/utils/test/pipe.spec.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import {ElementState, MaskitoPostprocessor, MaskitoPreprocessor} from '../../types';
import type {ElementState, MaskitoPostprocessor, MaskitoPreprocessor} from '../../types';
import {maskitoPipe} from '../pipe';

describe('maskitoPipe', () => {
Expand Down
2 changes: 1 addition & 1 deletion projects/core/src/lib/utils/test/transform.spec.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import {MaskitoOptions} from '../../types';
import type {MaskitoOptions} from '../../types';
import {maskitoTransform} from '../transform';

describe('maskitoTransform', () => {
Expand Down
2 changes: 1 addition & 1 deletion projects/core/src/lib/utils/transform.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import {MaskModel} from '../classes';
import {MASKITO_DEFAULT_OPTIONS} from '../constants';
import {ElementState, MaskitoOptions} from '../types';
import type {ElementState, MaskitoOptions} from '../types';
import {maskitoPipe} from './pipe';

export function maskitoTransform(value: string, maskitoOptions: MaskitoOptions): string;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import {MaskitoOptions} from '@maskito/core';
import type {MaskitoOptions} from '@maskito/core';

import {TestInput} from '../utils';

Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import {maskitoInitialCalibrationPlugin, MaskitoOptions} from '@maskito/core';
import type {MaskitoOptions} from '@maskito/core';
import {maskitoInitialCalibrationPlugin} from '@maskito/core';
import {createOutputSpy} from 'cypress/angular';

import {TestInput} from '../utils';
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import {MaskitoOptions} from '@maskito/core';
import type {MaskitoOptions} from '@maskito/core';
import {maskitoNumberOptionsGenerator} from '@maskito/kit';

import {BROWSER_SUPPORTS_REAL_EVENTS} from '../../../support/constants';
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import {MaskitoOptions} from '@maskito/core';
import type {MaskitoOptions} from '@maskito/core';
import {
maskitoAddOnFocusPlugin,
maskitoCaretGuard,
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import {MaskitoOptions} from '@maskito/core';
import type {MaskitoOptions} from '@maskito/core';
import {maskitoCaretGuard, maskitoNumberOptionsGenerator} from '@maskito/kit';

import {TestInput} from '../utils';
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import {MaskitoOptions} from '@maskito/core';
import type {MaskitoOptions} from '@maskito/core';
import {maskitoDateOptionsGenerator, maskitoWithPlaceholder} from '@maskito/kit';
import {createOutputSpy} from 'cypress/angular';

Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import {ChangeDetectionStrategy, Component} from '@angular/core';
import {FormsModule} from '@angular/forms';
import {MaskitoDirective} from '@maskito/angular';
import {MaskitoElementPredicate, MaskitoOptions} from '@maskito/core';
import type {MaskitoElementPredicate, MaskitoOptions} from '@maskito/core';

@Component({
standalone: true,
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import {MaskitoOptions} from '@maskito/core';
import type {MaskitoOptions} from '@maskito/core';

import {TestInput} from '../utils';
import {MultiTestInputComponent} from './multi-test.component';
Expand Down
Original file line number Diff line number Diff line change
@@ -1,10 +1,7 @@
import {Component, EventEmitter, Input, Output} from '@angular/core';
import {MaskitoDirective} from '@maskito/angular';
import {
MASKITO_DEFAULT_ELEMENT_PREDICATE,
MaskitoElementPredicate,
MaskitoOptions,
} from '@maskito/core';
import type {MaskitoElementPredicate, MaskitoOptions} from '@maskito/core';
import {MASKITO_DEFAULT_ELEMENT_PREDICATE} from '@maskito/core';

@Component({
standalone: true,
Expand Down
3 changes: 2 additions & 1 deletion projects/demo/server.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,8 @@ import 'zone.js/node';
import {APP_BASE_HREF} from '@angular/common';
import {provideLocation, provideUserAgent} from '@ng-web-apis/universal';
import {ngExpressEngine} from '@nguniversal/express-engine';
import express, {Express} from 'express';
import type {Express} from 'express';
import express from 'express';
import {existsSync} from 'fs';
import {join} from 'path';

Expand Down
3 changes: 2 additions & 1 deletion projects/demo/src/app/app.component.spec.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
import {APP_BASE_HREF} from '@angular/common';
import {ComponentFixture, TestBed} from '@angular/core/testing';
import type {ComponentFixture} from '@angular/core/testing';
import {TestBed} from '@angular/core/testing';
import {Router} from '@angular/router';
import {DemoPath} from '@demo/constants';

Expand Down
7 changes: 4 additions & 3 deletions projects/demo/src/app/app.providers.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
import {isPlatformBrowser, LocationStrategy, PathLocationStrategy} from '@angular/common';
import {inject, PLATFORM_ID, Provider} from '@angular/core';
import type {Provider} from '@angular/core';
import {inject, PLATFORM_ID} from '@angular/core';
import {DocExamplePrimaryTab} from '@demo/constants';
import type {TuiDocSourceCodePathOptions} from '@taiga-ui/addon-doc';
import {
TUI_DOC_CODE_EDITOR,
TUI_DOC_DEFAULT_TABS,
Expand All @@ -10,9 +12,8 @@ import {
TUI_DOC_SOURCE_CODE,
TUI_DOC_TITLE,
tuiDocExampleOptionsProvider,
TuiDocSourceCodePathOptions,
} from '@taiga-ui/addon-doc';
import {PolymorpheusContent} from '@tinkoff/ng-polymorpheus';
import type {PolymorpheusContent} from '@tinkoff/ng-polymorpheus';
import {HIGHLIGHT_OPTIONS} from 'ngx-highlightjs';

import {DEMO_PAGES} from '../pages/pages';
Expand Down
3 changes: 2 additions & 1 deletion projects/demo/src/app/app.routes.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
import {NgModule} from '@angular/core';
import {RouterModule, Routes} from '@angular/router';
import type {Routes} from '@angular/router';
import {RouterModule} from '@angular/router';
import {DemoPath} from '@demo/constants';

/* eslint-disable @typescript-eslint/promise-function-async */
Expand Down
3 changes: 2 additions & 1 deletion projects/demo/src/app/server-error-handler.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import {ErrorHandler, Injectable} from '@angular/core';
import type {ErrorHandler} from '@angular/core';
import {Injectable} from '@angular/core';
import {hasFlag} from 'scripts/helpers/argv';

// TODO
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import {DocExamplePrimaryTab} from '@demo/constants';
import {TUI_DOC_EXAMPLE_CONTENT_PROCESSOR} from '@taiga-ui/addon-doc';
import {TuiInjectionTokenType} from '@taiga-ui/cdk';
import type {TUI_DOC_EXAMPLE_CONTENT_PROCESSOR} from '@taiga-ui/addon-doc';
import type {TuiInjectionTokenType} from '@taiga-ui/cdk';

import {ANGULAR_DEFAULT_TAB} from './default-tabs/angular-default-tab';
import {JS_DEFAULT_TAB} from './default-tabs/js-default-tab';
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import {ChangeDetectionStrategy, Component} from '@angular/core';
import {FormsModule} from '@angular/forms';
import {MaskitoDirective} from '@maskito/angular';
import {MaskitoElementPredicate, MaskitoOptions} from '@maskito/core';
import type {MaskitoElementPredicate, MaskitoOptions} from '@maskito/core';
import {TuiGroupModule} from '@taiga-ui/core';
import {TuiInputModule} from '@taiga-ui/kit';

Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import {ChangeDetectionStrategy, Component} from '@angular/core';
import {MaskitoDirective} from '@maskito/angular';
import {MaskitoOptions} from '@maskito/core';
import type {MaskitoOptions} from '@maskito/core';
import {maskitoNumberOptionsGenerator} from '@maskito/kit';

@Component({
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import {ChangeDetectionStrategy, Component} from '@angular/core';
import {MaskitoDirective} from '@maskito/angular';
import {MaskitoOptions} from '@maskito/core';
import type {MaskitoOptions} from '@maskito/core';
import {maskitoNumberOptionsGenerator} from '@maskito/kit';

@Component({
Expand Down
Loading

0 comments on commit 2a4b246

Please sign in to comment.