Skip to content

Commit

Permalink
chore:🌻 resolve eslint
Browse files Browse the repository at this point in the history
  • Loading branch information
NsdHSO committed Oct 6, 2023
1 parent 8aed4a3 commit be97626
Show file tree
Hide file tree
Showing 5 changed files with 16 additions and 18 deletions.
Original file line number Diff line number Diff line change
@@ -1,10 +1,9 @@
import { Component, Input } from '@angular/core';
import { CommonModule } from '@angular/common';
import { ValueToggle } from 'ngx-ftx-forms';
import { BaseComponent } from '../base/base.component';
import { MatIconModule } from '@angular/material/icon';
import { FormsModule, ReactiveFormsModule } from '@angular/forms';
import { ValueToggle } from 'ngx-ftx-forms';

@Component({
selector: 'sivan-toggle',
standalone: true,
Expand Down
4 changes: 4 additions & 0 deletions ftx-sivan-shared/src/lib/directive/outline.directive.ts
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,7 @@ export class OutlineDirective implements OnInit, OnDestroy, AfterViewInit {
* @private
*/
private readonly renderer2 = inject(Renderer2);
//eslint-disable-next-line
@ViewChild('peerDiv', { static: false }) inputContainer: ElementRef | any;
@Input({ required: true }) control!: NgControl;
@Input({ required: true }) placeholder!: string;
Expand All @@ -43,6 +44,7 @@ export class OutlineDirective implements OnInit, OnDestroy, AfterViewInit {
* @private
*/
private destroy$ = new Subject();
//eslint-disable-next-line
private element: any;

ngOnInit(): void {
Expand All @@ -58,6 +60,7 @@ export class OutlineDirective implements OnInit, OnDestroy, AfterViewInit {
.subscribe();
fromEvent(peerDiv.childNodes[0], 'blur')
.pipe(
//eslint-disable-next-line
tap((inputValue: any) => {
if (inputValue.target.value < 1) {
const classToRemove = ['-top-2.5', 'h-5', 'text-xs'];
Expand Down Expand Up @@ -88,6 +91,7 @@ export class OutlineDirective implements OnInit, OnDestroy, AfterViewInit {
.subscribe();
fromEvent(peerDiv.childNodes[0], 'focus')
.pipe(
//eslint-disable-next-line
tap((inputValue: any) => {
if (inputValue.target.value < 1) {
this.addClassForHint(this.element);
Expand Down
2 changes: 1 addition & 1 deletion ftx-sivan-shared/src/lib/pipes/first-upper-case.pipe.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import { Pipe, PipeTransform } from '@angular/core';
standalone: true,
})
export class FirstUpperCasePipe implements PipeTransform {
transform(value: string | unknown, ...args: unknown[]): unknown {
transform(value: string | unknown): unknown {
if (typeof value === 'string' && value.length > 0) {
return value.charAt(0).toUpperCase() + value.slice(1);
}
Expand Down
14 changes: 6 additions & 8 deletions src/app/app.component.ts
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
import { AsyncPipe, JsonPipe, NgIf } from '@angular/common';
import { HttpClient } from '@angular/common/http';
import { ChangeDetectionStrategy, Component, inject } from '@angular/core';
import { RouterModule } from '@angular/router';
import { HttpClient } from '@angular/common/http';
import { of, switchMap, tap } from 'rxjs';
import { AsyncPipe, JsonPipe, NgIf } from '@angular/common';
import { of, switchMap } from 'rxjs';

@Component({
standalone: true,
Expand All @@ -14,14 +14,12 @@ import { AsyncPipe, JsonPipe, NgIf } from '@angular/common';
})
export class AppComponent {
http = inject(HttpClient);

user$ = this.http
.get(
'https://c60a8243-8834-4f11-8bde-e50b84c00883.mock.pstmn.io/localhost:3000'
)
.pipe(
switchMap((v) => {
return of(JSON.stringify(v));
})
);
.pipe(switchMap((v) => of(JSON.stringify(v))));

title = 'coagulu';
}
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
import { Component, inject, TemplateRef, ViewChild } from '@angular/core';
import { CommonModule } from '@angular/common';
import { Component, inject, TemplateRef, ViewChild } from '@angular/core';
import { FormsModule, ReactiveFormsModule } from '@angular/forms';
import { MatSelectModule } from '@angular/material/select';
import {
ButtonComponent,
Expand All @@ -8,12 +9,6 @@ import {
TypeConstantEnum,
TypePattern,
} from 'ngx-ftx-forms';
import {
FormControl,
FormGroup,
FormsModule,
ReactiveFormsModule,
} from '@angular/forms';
import { SivanInputComponent } from 'ngx-ftx-shared';

@Component({
Expand All @@ -34,6 +29,7 @@ export class SpendMoneyComponent {
@ViewChild('default') defaultTemplate!: TemplateRef<unknown>;

private readonly _fb = inject(GenerateFormBuilderService);

simple: any; //eslint-disable-line
currency: any; //eslint-disable-line
simpleData = {
Expand All @@ -44,6 +40,7 @@ export class SpendMoneyComponent {
labelHint: 'Name for User',
updateOn: 'blur',
} as DataFormBuilder;

constructor() {
this.simple = this._fb.buildFormFromJson(this.simpleData);
this.currency = this._fb.buildFormFromJson({
Expand Down

0 comments on commit be97626

Please sign in to comment.