chore: add husky pre-commit hook and lint-staged configuration
- Created a pre-commit hook in .husky to run lint-staged. - Added .lintstagedrc.mjs to format frontend files with Prettier and apply Spotless to backend Java files. - Introduced .prettierignore to exclude specific directories from formatting.
This commit is contained in:
1 parent
5d2d85aa8c
commit
878da155bd
564 files changed
+61467
-47179
No files matched your search
@@ -9,32 +9,33 @@ import { SessionService } from '../../services/session.service';
|
||||
import { WorkspaceService } from '../../services/workspace.service';
|
||||
|
||||
@Component({
|
||||
selector: 'app-dashboard-page',
|
||||
imports: [FontAwesomeModule, MatButtonModule, MatProgressBarModule],
|
||||
templateUrl: './dashboard-page.html',
|
||||
styleUrl: './dashboard-page.css',
|
||||
selector: 'app-dashboard-page',
|
||||
imports: [FontAwesomeModule, MatButtonModule, MatProgressBarModule],
|
||||
templateUrl: './dashboard-page.html',
|
||||
styleUrl: './dashboard-page.css',
|
||||
})
|
||||
export class DashboardPage {
|
||||
readonly faTableCellsLarge = faTableCellsLarge;
|
||||
private readonly http = inject(HttpClient);
|
||||
private readonly router = inject(Router);
|
||||
readonly session = inject(SessionService);
|
||||
readonly workspace = inject(WorkspaceService);
|
||||
readonly userInitial = computed(() => this.session.username().charAt(0).toUpperCase());
|
||||
readonly helloMessage = signal('');
|
||||
readonly faTableCellsLarge = faTableCellsLarge;
|
||||
private readonly http = inject(HttpClient);
|
||||
private readonly router = inject(Router);
|
||||
readonly session = inject(SessionService);
|
||||
readonly workspace = inject(WorkspaceService);
|
||||
readonly userInitial = computed(() => this.session.username().charAt(0).toUpperCase());
|
||||
readonly helloMessage = signal('');
|
||||
|
||||
constructor() {
|
||||
this.workspace.loadApartments();
|
||||
}
|
||||
constructor() {
|
||||
this.workspace.loadApartments();
|
||||
}
|
||||
|
||||
checkConnection(): void {
|
||||
this.http.get('/api/hello', { responseType: 'text' }).subscribe({
|
||||
next: (message) => this.helloMessage.set(message),
|
||||
error: (error) => this.helloMessage.set(`Failed to connect to backend: ${error.statusText}`),
|
||||
});
|
||||
}
|
||||
checkConnection(): void {
|
||||
this.http.get('/api/hello', { responseType: 'text' }).subscribe({
|
||||
next: (message) => this.helloMessage.set(message),
|
||||
error: (error) =>
|
||||
this.helloMessage.set(`Failed to connect to backend: ${error.statusText}`),
|
||||
});
|
||||
}
|
||||
|
||||
showApartments(): void {
|
||||
this.router.navigateByUrl('/apartments');
|
||||
}
|
||||
showApartments(): void {
|
||||
this.router.navigateByUrl('/apartments');
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user