Skip to content

Commit

Permalink
add lint workflow
Browse files Browse the repository at this point in the history
  • Loading branch information
auumgn committed Oct 26, 2023
1 parent 20de98c commit b61b178
Show file tree
Hide file tree
Showing 8 changed files with 12 additions and 12 deletions.
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: Format
name: Prettier & Lint
on:
pull_request:
branches: [main]
Expand All @@ -17,9 +17,9 @@ jobs:
- name: Install dependencies
working-directory: ui
run: npm ci
- name: Run prettier
- name: Run formatter
working-directory: ui
run: npm run prettier
run: npm run format
- name: add and commit any files that have changed
id: add_and_commit
uses: EndBug/add-and-commit@c8bfb4ff65642c4c54445500822f6e7da558994a
Expand Down
4 changes: 2 additions & 2 deletions ui/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,10 +9,10 @@
"watch": "ng build --base-href ./ --watch --configuration development",
"test": "ng test",
"lint": "ng lint",
"prettier": "npx prettier --write ."
"format": "ng lint --fix && npx prettier --write ."
},
"private": true,
"dependencies": {
"dependencies": {
"@angular/animations": "^16.2.9",
"@angular/cdk": "^16.2.9",
"@angular/common": "^16.2.9",
Expand Down
2 changes: 1 addition & 1 deletion ui/src/app/account/account.module.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import { NgModule } from '@angular/core'
import { CommonModule } from '@angular/common'
import { LoginComponent } from './login/login.component'
import { RouterModule, Routes } from '@angular/router'
import { RouterModule } from '@angular/router'
import { ReactiveFormsModule } from '@angular/forms'
import { routes } from './account.route'

Expand Down
2 changes: 0 additions & 2 deletions ui/src/app/account/account.route.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,5 @@
import { Routes } from '@angular/router'
import { LoginComponent } from './login/login.component'
import { AuthGuard } from './auth.guard'
import { HomeComponent } from '../home/home.component'

export const routes: Routes = [
{
Expand Down
2 changes: 1 addition & 1 deletion ui/src/app/account/auth.guard.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ import {

import { StateStorageService } from './service/state-storage.service'
import { AccountService } from './service/account.service'
import { Observable, filter, map, take } from 'rxjs'
import { Observable, filter, map } from 'rxjs'

export const AuthGuard = (
route: ActivatedRouteSnapshot,
Expand Down
2 changes: 2 additions & 0 deletions ui/src/app/account/login/login.component.html
Original file line number Diff line number Diff line change
Expand Up @@ -87,8 +87,10 @@
<p></p>
<div class="alert alert-warning">
<a
tabindex="1"
class="alert-link"
(click)="requestResetPassword()"
(keypress)="requestResetPassword()"
jhiTranslate="login.password.forgot.string"
>Did you forget your password?</a
>
Expand Down
4 changes: 2 additions & 2 deletions ui/src/app/layout/navbar/navbar.component.html
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
<span jhiTranslate="global.menu.account.loggedInAs.string"></span>
<b>{{ this.getUserName() }}</b> |
<span jhiTranslate="global.menu.account.logoutAs.string"></span
><a (click)="logoutAs()" id="logoutAs.string">
><a tabindex="1" (click)="logoutAs()" (keypress)="logoutAs()" id="logoutAs.string">
{{ this.getUserName() }}
<fa-icon icon="sign-out-alt" [fixedWidth]="true"></fa-icon>
</a>
Expand Down Expand Up @@ -344,7 +344,7 @@
</a>
</li>
<li>
<a class="dropdown-item" (click)="logout()" id="logout">
<a class="dropdown-item" tabindex="1" (click)="logout()" (keypress)="logout()" id="logout">
<fa-icon [icon]="faSignOutAlt" [fixedWidth]="true"></fa-icon>
<span jhiTranslate="global.menu.account.logout.string"
>Sign out</span
Expand Down
2 changes: 1 addition & 1 deletion ui/src/app/shared/model/event.model.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,6 @@ import { EventType } from 'src/app/app.constants'
export class Event {
constructor(
public type: EventType,
public payload: String
public payload: string
) {}
}

0 comments on commit b61b178

Please sign in to comment.