Skip to content

Commit 192d1f3

Browse files
Fix eslint
1 parent 2db78ec commit 192d1f3

22 files changed

Lines changed: 39 additions & 30 deletions

.eslintrc.json

Lines changed: 15 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -18,9 +18,9 @@
1818
"createDefaultProgram": true
1919
},
2020
"extends": [
21+
"eslint:recommended",
22+
"plugin:@typescript-eslint/recommended",
2123
"plugin:@angular-eslint/recommended",
22-
"plugin:@angular-eslint/ng-cli-compat",
23-
"plugin:@angular-eslint/ng-cli-compat--formatting-add-on",
2424
"plugin:@angular-eslint/template/process-inline-templates"
2525
],
2626
"rules": {
@@ -81,7 +81,19 @@
8181
"format": null
8282
}
8383
],
84-
"no-underscore-dangle": "off"
84+
"@typescript-eslint/no-explicit-any": "off",
85+
"no-underscore-dangle": "off",
86+
"arrow-spacing": "error",
87+
"comma-spacing": "error",
88+
"indent": ["error", 2],
89+
"key-spacing": "error",
90+
"keyword-spacing": "error",
91+
"object-curly-spacing": ["error", "always"],
92+
"object-shorthand": "error",
93+
"spaced-comment": "error",
94+
"space-before-blocks": "error",
95+
"space-infix-ops": "error",
96+
"semi": "error"
8597
}
8698
},
8799
{

client/app/about/about.component.spec.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ describe('Component: About', () => {
1111
TestBed.configureTestingModule({
1212
declarations: [ AboutComponent ]
1313
})
14-
.compileComponents();
14+
.compileComponents();
1515
}));
1616

1717
beforeEach(() => {

client/app/about/about.component.ts

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,4 @@ import { Component } from '@angular/core';
77
})
88
export class AboutComponent {
99

10-
constructor() { }
11-
1210
}

client/app/account/account.component.spec.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ describe('Component: Account', () => {
3737
],
3838
schemas: [NO_ERRORS_SCHEMA]
3939
})
40-
.compileComponents();
40+
.compileComponents();
4141
}));
4242

4343
beforeEach(() => {

client/app/account/account.component.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ export class AccountComponent implements OnInit {
3131

3232
save(user: User): void {
3333
this.userService.editUser(user).subscribe({
34-
next: res => {
34+
next: () => {
3535
this.toast.setMessage('Account settings saved!', 'success');
3636
this.auth.currentUser = user;
3737
this.auth.isAdmin = user.role === 'admin';

client/app/add-cat-form/add-cat-form.component.spec.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ describe('Component: AddCatForm', () => {
2121
{ provide: CatService, useClass: CatServiceMock }
2222
]
2323
})
24-
.compileComponents();
24+
.compileComponents();
2525
}));
2626

2727
beforeEach(() => {

client/app/admin/admin.component.spec.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ describe('Component: Admin', () => {
3636
],
3737
schemas: [NO_ERRORS_SCHEMA]
3838
})
39-
.compileComponents();
39+
.compileComponents();
4040
}));
4141

4242
beforeEach(() => {

client/app/admin/admin.component.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ export class AdminComponent implements OnInit {
3333
deleteUser(user: User): void {
3434
if (window.confirm('Are you sure you want to delete ' + user.username + '?')) {
3535
this.userService.deleteUser(user).subscribe({
36-
next: data => this.toast.setMessage('User deleted successfully.', 'success'),
36+
next: () => this.toast.setMessage('User deleted successfully.', 'success'),
3737
error: error => console.log(error),
3838
complete: () => this.getUsers()
3939
});

client/app/cats/cats.component.spec.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ describe('Component: Cats', () => {
3333
],
3434
schemas: [CUSTOM_ELEMENTS_SCHEMA]
3535
})
36-
.compileComponents();
36+
.compileComponents();
3737
}));
3838

3939
beforeEach(() => {

client/app/login/login.component.spec.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ describe('Component: Login', () => {
2626
],
2727
schemas: [NO_ERRORS_SCHEMA]
2828
})
29-
.compileComponents();
29+
.compileComponents();
3030
}));
3131

3232
beforeEach(() => {

0 commit comments

Comments
 (0)