Skip to content

Commit dd13309

Browse files
committed
✏️ fix files linter
1 parent 65ac971 commit dd13309

File tree

59 files changed

+292
-315
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

59 files changed

+292
-315
lines changed

src/app/app.component.spec.ts

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
import { TestBed } from '@angular/core/testing';
2+
23
import { AppComponent } from './app.component';
34

45
describe('AppComponent', () => {
@@ -13,19 +14,23 @@ describe('AppComponent', () => {
1314
it('should create the app', () => {
1415
const fixture = TestBed.createComponent(AppComponent);
1516
const app = fixture.componentInstance;
17+
1618
expect(app).toBeTruthy();
1719
});
1820

1921
it(`should have as title 'frontend'`, () => {
2022
const fixture = TestBed.createComponent(AppComponent);
2123
const app = fixture.componentInstance;
24+
2225
expect(app.title).toEqual('frontend');
2326
});
2427

2528
it('should render title', () => {
2629
const fixture = TestBed.createComponent(AppComponent);
2730
fixture.detectChanges();
2831
const compiled = fixture.nativeElement as HTMLElement;
29-
expect(compiled.querySelector('.content span')?.textContent).toContain('frontend app is running!');
32+
33+
expect(compiled.querySelector('.content span')?.textContent)
34+
.toContain('frontend app is running!');
3035
});
3136
});

src/app/app.component.ts

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
import { Component } from '@angular/core';
2+
23
import { SettingService } from '@services/setting.service';
34

45
@Component({
@@ -7,6 +8,7 @@ import { SettingService } from '@services/setting.service';
78
styleUrls: ['./app.component.css']
89
})
910
export class AppComponent {
11+
title = 'frontend';
1012
constructor(
1113
private settingService: SettingService,
1214
) {
@@ -18,4 +20,5 @@ export class AppComponent {
1820
this.settingService.setTheme(theme as 'dark'|'light');
1921
}
2022
}
23+
2124
}

src/app/app.module.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
1+
import { HttpClientModule, } from '@angular/common/http';
12
import { NgModule } from '@angular/core';
23
import { BrowserModule } from '@angular/platform-browser';
3-
import { HttpClientModule, } from '@angular/common/http';
44

55
import { AppComponent } from './app.component';
66
import { AppRoutingModule } from './app.routing';

src/app/auth/auth.component.ts

Lines changed: 16 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,15 @@
1-
import { Component, ElementRef, HostListener, OnDestroy, OnInit, ViewChild } from '@angular/core';
1+
import { Component,
2+
ElementRef,
3+
HostListener,
4+
OnDestroy,
5+
OnInit,
6+
ViewChild
7+
} from '@angular/core';
8+
29
import { Subscription } from 'rxjs';
310

411
import { AuthService } from '@services/auth.service';
12+
513
import { IModalAuth } from '@interfaces/modal.interface';
614

715
@Component({
@@ -15,9 +23,9 @@ export class AuthComponent implements OnInit, OnDestroy {
1523
@ViewChild('modalAuth') modalAuth: ElementRef;
1624
private bodyElement = document.body as HTMLBodyElement;
1725

18-
public showLogin: boolean = false;
19-
public showMore: boolean = true;
20-
private modalOpen: boolean = false;
26+
public showLogin = false;
27+
public showMore = true;
28+
private modalOpen = false;
2129

2230
constructor(private authService: AuthService) {}
2331

@@ -26,7 +34,9 @@ export class AuthComponent implements OnInit, OnDestroy {
2634
}
2735

2836
ngOnInit(): void {
29-
this.authSubscription = this.authService.isAuthenticatedEmitter.subscribe(({ to, isAuth }) => !isAuth && to !== 'hide' ? this.openModal({to, isAuth}) : '');
37+
this.authSubscription = this.authService.isAuthenticatedEmitter
38+
.subscribe(({ to, isAuth }) =>
39+
!isAuth && to !== 'hide' ? this.openModal({to, isAuth}) : '');
3040
}
3141

3242
openModal(options: IModalAuth): void {
@@ -57,7 +67,7 @@ export class AuthComponent implements OnInit, OnDestroy {
5767
}
5868

5969
@HostListener('window:keyup.esc', ['$event'])
60-
onKeyup(event: any) {
70+
onKeyup() {
6171
if(this.modalOpen) {
6272
this.closeModal();
6373
}

src/app/auth/auth.module.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
1-
import { NgModule } from '@angular/core';
21
import { CommonModule } from '@angular/common';
2+
import { NgModule } from '@angular/core';
3+
import { FormsModule, ReactiveFormsModule } from '@angular/forms';
34

45
import { AuthComponent } from './auth.component';
56
import { ComponentsModule } from './components/components.module';
6-
import { FormsModule, ReactiveFormsModule } from '@angular/forms';
77

88
@NgModule({
99
declarations: [

src/app/auth/components/components.module.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
1-
import { NgModule } from '@angular/core';
21
import { CommonModule } from '@angular/common';
2+
import { NgModule } from '@angular/core';
33
import { FormsModule, ReactiveFormsModule } from '@angular/forms';
44

55
import { LoginComponent } from './login/login.component';

src/app/auth/components/login/login.component.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
import { Component, EventEmitter, OnInit, Output } from '@angular/core';
22
import { FormBuilder, FormGroup, Validators } from '@angular/forms';
3+
34
import { AuthService } from '@services/auth.service';
45

56
@Component({
@@ -42,7 +43,7 @@ export class LoginComponent implements OnInit {
4243
this.message = message;
4344
}
4445
}
45-
})
46+
});
4647
}
4748
}
4849

src/app/auth/components/more-features/more-features.component.ts

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,12 @@
1-
import { Component, EventEmitter, OnInit, Output } from '@angular/core';
1+
import { Component, EventEmitter, Output } from '@angular/core';
22

33
@Component({
44
selector: 'app-more-features',
55
templateUrl: './more-features.component.html',
66
styleUrls: ['./more-features.component.css']
77
})
8-
export class MoreFeaturesComponent implements OnInit {
8+
export class MoreFeaturesComponent {
99
@Output() changeView: EventEmitter<boolean> = new EventEmitter();
10-
constructor() { }
11-
12-
ngOnInit(): void {
13-
}
1410

1511
change(value: boolean): void {
1612
this.changeView.emit(value);

src/app/auth/components/register/register.component.ts

Lines changed: 12 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,10 @@
11
import { Component, EventEmitter, OnInit, Output } from '@angular/core';
22
import { FormBuilder, FormGroup, Validators } from '@angular/forms';
3-
import { ILogin } from '@interfaces/login.interface';
3+
44
import { AuthService } from '@services/auth.service';
5+
6+
import { ILogin } from '@interfaces/login.interface';
7+
58
import MatchPassword from '@utils/match-password.util';
69
import { RegexExpressions } from '@utils/regex.util';
710

@@ -30,21 +33,24 @@ export class RegisterComponent implements OnInit {
3033
loadForm() {
3134
this.registerForm = this.fb.group({
3235
email: ['', [Validators.required, Validators.pattern(this.regexExpressions.EMAIL)]],
33-
password: ['', [Validators.required, Validators.pattern(this.regexExpressions.PASSWORD)]],
36+
password: ['', [
37+
Validators.required,
38+
Validators.pattern(this.regexExpressions.PASSWORD)]
39+
],
3440
password2: ['', [Validators.required]],
3541
},{
3642
validators: [
3743
MatchPassword.match('password', 'password2'),
3844
]
39-
})
45+
});
4046
}
4147

4248
register() {
4349
if(this.registerForm.valid) {
4450
const data: ILogin = {
4551
email: this.registerForm.get('email')?.value,
4652
password: this.registerForm.get('password')?.value,
47-
}
53+
};
4854
this.authService.signIn(data).subscribe({
4955
next: () => {
5056
this.closeModal.emit(true);
@@ -56,11 +62,11 @@ export class RegisterComponent implements OnInit {
5662
this.message = message;
5763
}
5864
}
59-
})
65+
});
6066
}
6167
}
6268

63-
changePage(): void{
69+
changePage(): void {
6470
this.showLogin.emit(true);
6571
}
6672

src/app/core/components/components.module.ts

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,9 @@
1-
import { NgModule } from '@angular/core';
21
import { CommonModule } from '@angular/common';
3-
import { SidebarComponent } from './sidebar/sidebar.component';
2+
import { NgModule } from '@angular/core';
43
import { RouterModule } from '@angular/router';
54

5+
import { SidebarComponent } from './sidebar/sidebar.component';
6+
67
@NgModule({
78
declarations: [
89
SidebarComponent

0 commit comments

Comments
 (0)