Conversation
❌ Deploy Preview for cutetix-admin failed.
|
There was a problem hiding this comment.
Pull request overview
This PR introduces a linting/tooling setup (ESLint + Prettier + Stylelint), wires Angular ESLint into angular.json, and applies broad formatting/typing refactors across TS/HTML/SCSS to satisfy the new rules.
Changes:
- Add lint scripts/configs (Prettier, Stylelint, Angular ESLint) and a GitHub Actions lint job.
- Tighten TypeScript compiler options and refactor code to more explicit typing / type-only imports.
- Reformat and adjust SCSS/HTML across the app (including some variable/token refactors).
Reviewed changes
Copilot reviewed 98 out of 109 changed files in this pull request and generated 6 comments.
Show a summary per file
| File | Description |
|---|---|
| tsconfig.json | Enables stricter TS compiler/lint-aligned options and updates target/module. |
| src/styles/_typography.scss | Re-formats typography rules; restructures heading selectors. |
| src/styles/_fonts.scss | Prettier-style formatting of font-face declarations. |
| src/styles/_colors.scss | Refactors color tokens to CSS variables + SCSS vars. |
| src/styles/_button.scss | Reworks button styling and variants; aligns with new token approach. |
| src/styles.scss | Re-formats global styles and media queries. |
| src/main.ts | Re-formats imports and bootstrap flow. |
| src/index.html | Prettier formatting for HTML structure/attributes. |
| src/environments/environment.development.ts | Formatting updates. |
| src/app/utils/deepEqual.ts | Removes @ts-nocheck and applies lint-driven refactor. |
| src/app/user-profile/user-profile.component.ts | Formatting updates. |
| src/app/user-profile/user-profile.component.scss | Formatting updates. |
| src/app/user-profile/user-profile.component.html | Formatting updates. |
| src/app/types/auth.types.ts | Converts interfaces to type shapes + formatting. |
| src/app/tokens/storage.tokens.ts | Updates indexed-access type syntax. |
| src/app/tokens/lock.tokens.ts | Updates indexed-access type syntax. |
| src/app/shared/shared.module.ts | Reorders imports and compresses NgModule metadata. |
| src/app/services/visibility.service.ts | Import formatting + trailing commas. |
| src/app/services/update.service.ts | Refactors imports/types and formatting. |
| src/app/services/storage.service.ts | Refactors rxjs imports/types and improves boolean parsing. |
| src/app/services/logging.service.ts | Formatting + stronger typing of internal fields. |
| src/app/not-found/not-found.component.ts | Formatting updates. |
| src/app/not-found/not-found.component.scss | Formatting updates. |
| src/app/not-found/not-found.component.html | Formatting updates. |
| src/app/login-page/login-page.component.ts | Refactors imports/typing and browser capability check formatting. |
| src/app/login-page/login-page.component.scss | Reformat + updates to keyframes naming and colors. |
| src/app/login-page/login-page.component.html | Template formatting and attribute wrapping. |
| src/app/interceptors/auth.interceptor.ts | Uses type-only import + formatting. |
| src/app/hello/hello.component.ts | Uses type-only import + formatting. |
| src/app/hello/hello.component.scss | Reformat + keyframes naming. |
| src/app/hello/hello.component.html | Template formatting. |
| src/app/guards/logout.guard.ts | Uses type-only import + formatting. |
| src/app/guards/auth.guard.ts | Expands control flow braces + formatting. |
| src/app/components/user-info/user-info.component.ts | Refactors countdown logic formatting/typing. |
| src/app/components/user-info/user-info.component.scss | Formatting + pseudo-element style changes. |
| src/app/components/user-info/user-info.component.html | Template formatting. |
| src/app/components/local-storage-field/local-storage-field.component.ts | Refactors typing/control-flow + lint-friendly formatting. |
| src/app/components/local-storage-field/local-storage-field.component.scss | Formatting + modern CSS syntax usage. |
| src/app/components/local-storage-field/local-storage-field.component.html | Template formatting. |
| src/app/components/copyright/copyright.component.ts | Formatting updates. |
| src/app/components/copyright/copyright.component.scss | Formatting updates. |
| src/app/components/copyright/copyright.component.html | Template formatting. |
| src/app/app.routes.ts | Refactors routes to const + formatting/import order. |
| src/app/app.module.ts | Reorders imports and formats module metadata/providers. |
| src/app/app.component.ts | Refactors imports/formatting and expands calls for readability. |
| src/app/app.component.spec.ts | Removes the default app component spec. |
| src/app/app.component.html | Whitespace-only formatting. |
| src/app/administration/tickets/tickets.types.ts | Converts interface to type + type-only import. |
| src/app/administration/tickets/tickets.service.ts | Switches to typed HttpClient calls and removes redundant mapping. |
| src/app/administration/tickets/new/tickets-new.component.ts | Refactors to inject() pattern and formatting/typing updates. |
| src/app/administration/tickets/new/tickets-new.component.html | Template formatting. |
| src/app/administration/tickets/list/tickets-list.component.ts | Refactors to inject() pattern + expands filter logic formatting. |
| src/app/administration/tickets/list/tickets-list.component.scss | Formatting updates. |
| src/app/administration/tickets/list/tickets-list.component.html | Template formatting. |
| src/app/administration/ticket_groups/ticket_groups.types.ts | Converts interfaces to type + type-only import. |
| src/app/administration/ticket_groups/ticket_groups.service.ts | Switches to typed HttpClient calls and removes redundant mapping. |
| src/app/administration/ticket_groups/new/ticket_groups-new.component.ts | Refactors to inject() pattern + formatting updates. |
| src/app/administration/ticket_groups/new/ticket_groups-new.component.html | Template formatting. |
| src/app/administration/ticket_groups/list/ticket_groups-list.component.ts | Refactors to inject() pattern + formatting updates. |
| src/app/administration/ticket_groups/list/ticket_groups-list.component.scss | Formatting updates. |
| src/app/administration/ticket_groups/list/ticket_groups-list.component.html | Template formatting. |
| src/app/administration/ticket_groups/edit/events-edit.component.ts | Refactors to inject() pattern + formatting updates. |
| src/app/administration/ticket_groups/edit/events-edit.component.html | Template formatting. |
| src/app/administration/loading/loading.component.ts | Formatting updates. |
| src/app/administration/loading/loading.component.scss | Updates colors/gradients + formatting. |
| src/app/administration/loading/loading.component.html | Formatting updates. |
| src/app/administration/layout/nav-bar/nav-bar.component.ts | Refactors to inject() pattern + formatting updates. |
| src/app/administration/layout/nav-bar/nav-bar.component.scss | Formatting + token refactor for borders/overlays. |
| src/app/administration/layout/nav-bar/nav-bar.component.html | Template formatting + added keyboard handler on overlay. |
| src/app/administration/layout/nav-bar/menu-items.ts | Type-only import + formatting updates. |
| src/app/administration/layout/nav-bar/menu-builder.ts | Type-only import + formatting updates. |
| src/app/administration/layout/nav-bar-subitem/nav-bar-subitem.component.ts | Formatting updates. |
| src/app/administration/layout/nav-bar-subitem/nav-bar-subitem.component.scss | Formatting updates. |
| src/app/administration/layout/nav-bar-subitem/nav-bar-subitem.component.html | Template formatting. |
| src/app/administration/layout/nav-bar-item/nav-bar-item.component.ts | Type-only import + formatting updates. |
| src/app/administration/layout/nav-bar-item/nav-bar-item.component.scss | Formatting + minor structure adjustments. |
| src/app/administration/layout/nav-bar-item/nav-bar-item.component.html | Template formatting + added custom action handler. |
| src/app/administration/layout/logged-user/logged-user.component.ts | Refactors to inject() pattern + formatting updates. |
| src/app/administration/layout/logged-user/logged-user.component.scss | Reorders selectors + formatting updates. |
| src/app/administration/layout/logged-user/logged-user.component.html | Template formatting. |
| src/app/administration/layout/layout.component.ts | Formatting updates. |
| src/app/administration/layout/layout.component.scss | Formatting updates. |
| src/app/administration/layout/layout.component.html | Template formatting. |
| src/app/administration/events/list/events-list.component.ts | Refactors to inject() pattern + removes dtTrigger pattern. |
| src/app/administration/events/list/events-list.component.scss | Formatting updates. |
| src/app/administration/events/list/events-list.component.html | Template formatting. |
| src/app/administration/events/form/events-form.component.ts | Refactors to inject() pattern + formatting updates. |
| src/app/administration/events/form/events-form.component.html | Template formatting. |
| src/app/administration/events/events.types.ts | Converts interfaces to type + type-only import. |
| src/app/administration/events/events.service.ts | Switches to typed HttpClient calls and removes redundant mapping. |
| src/app/administration/dashboard/event-overview/dashboard-event-overview.component.ts | Formatting + type-only import updates. |
| src/app/administration/dashboard/event-overview/dashboard-event-overview.component.scss | Refactors styling and import statement. |
| src/app/administration/dashboard/event-overview/dashboard-event-overview.component.html | Formatting updates. |
| src/app/administration/dashboard/dashboard.component.ts | Formatting updates. |
| src/app/administration/dashboard/dashboard.component.html | Formatting updates. |
| src/app/administration/common/styles.scss | Formatting updates + form/table tweaks. |
| src/app/administration/administration.module.ts | Import order + formatting updates. |
| package.json | Adds lint scripts and lint-related devDependencies; bumps Angular versions. |
| angular.json | Adds lint builder target and sets ESLint schematics collection; adjusts budgets. |
| .stylelintrc | Adds Stylelint configuration for SCSS. |
| .prettierrc.ts | Adds Prettier configuration as TS module. |
| .github/workflows/publish-docker.yml | Removes prior Docker publish workflow. |
| .github/workflows/jobs.yml | Adds lint job and rebuilds Docker publish workflow with a lint dependency. |
| .gitattributes | Enforces LF line endings. |
| .eslintrc.json | Enables prettier integration and adds import ordering + stricter TS lint rules. |
| .eslintignore | Adds ESLint ignore patterns. |
Comments suppressed due to low confidence (10)
src/app/administration/layout/nav-bar/nav-bar.component.html:17
- The overlay
<div>is not focusable by keyboard but has a(keypress)handler. This will still fail accessibility checks and can also trigger on any key. Prefer making it a<button type="button">(or addtabindex="0"+role="button") and handle onlykeydown.enter/keydown.space.
src/app/administration/layout/nav-bar-item/nav-bar-item.component.html:19 - For the logout/custom action, an
<a>withouthrefis being used as a button and wired to(click)/(keypress). This is not keyboard-accessible by default andkeypressfires for many keys. Use a<button type="button">or addrole="button",tabindex="0", and handlekeydown.enter/keydown.spaceonly.
.github/workflows/jobs.yml:12 - This workflow uses floating action refs (
actions/checkout@master,elgohr/Publish-Docker-Github-Action@master) which is unsafe (can change unexpectedly) andactions/setup-node@v3is outdated. Pin to stable major tags (e.g.actions/checkout@v4,actions/setup-node@v4) and consider pinning the Docker action to a release SHA/tag.
- name: Checkout repository
uses: actions/checkout@master
- name: Set up Node.js
uses: actions/setup-node@v3
with:
.eslintignore:2
- The ignore pattern
src/utils/deepEqual.tsdoes not match the actual file path (src/app/utils/deepEqual.ts), so ESLint will still lint it (and likely fail due toany,eqeqeqdisables, etc.). Alsoindex.htmlwon't matchsrc/index.html. Update these patterns to the correct paths (or glob patterns) for what you intend to exclude.
src/utils/deepEqual.ts
index.html
src/app/login-page/login-page.component.scss:138
animation: 300ms fadeIn;referencesfadeIn, but this stylesheet defines@keyframes fade-in(notfadeIn). As a result the wait-text animation won't run; update the animation name to match the defined keyframes (or define@keyframes fadeIn).
src/app/administration/events/form/events-form.component.ts:106- The error toast title says "Cannot load ticket group" but this component is loading an Event. This makes troubleshooting harder; update the title/message to refer to the event being loaded.
error: err => {
this.form.get("name")?.disable();
this.form.get("ticketsSalesStart")?.disable();
this.form.get("ticketsSalesEnd")?.disable();
this.toastr.error(err.message, "Cannot load ticket group", {
progressBar: true,
});
src/app/utils/deepEqual.ts:3
- The ESLint disable comment is duplicated (
@typescript-eslint/no-explicit-anyis listed twice). Also, if you intend to disableno-explicit-anyfor the whole file/function, prefer a single rule entry or a file-level disable that is explicit and consistent.
src/app/services/update.service.ts:93 - Typo in log message: "Error ocurred" → "Error occurred".
src/app/utils/deepEqual.ts:63 - Non-English / stray comment (
// Oprava chyby ...) was introduced in the comparison branch. This reads like an internal note and will be confusing to future maintainers; please remove it (the eslint-disable above already documents why!=is used, or better: switch to strict comparisons where possible).
src/app/administration/common/styles.scss:72 - This file references the
fadeInkeyframes (animation: ... fadeIn), but the keyframes were renamed tofade-inelsewhere and there is no longer any@keyframes fadeInin the styles. Either restore@keyframes fadeInin a shared stylesheet or update these animations to usefade-in.
.error {
animation: 500ms fadeIn;
animation-delay: 300ms;
animation-fill-mode: backwards;
background-color: rgb(255 0 0 / 15%);
padding: 1.5rem;
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
| &.destructive { | ||
| background: $dangerColor; | ||
|
|
||
| &:disabled { | ||
| opacity: 0.33; | ||
| cursor: not-allowed; | ||
| text-decoration: none; | ||
| &:focus, | ||
| &:active { | ||
| background: $dangerColorDark; | ||
| } | ||
|
|
||
| &:not(:disabled) { | ||
| box-shadow: inset 0px -2px 0px $accentColorDark; | ||
| box-shadow: inset 0 -2px 0 var(--danger-color-dark); | ||
| } |
There was a problem hiding this comment.
The destructive variant uses var(--danger-color-dark), but the defined token is --color-danger-dark (and SCSS $dangerColorDark). This makes the box-shadow color resolve to nothing / fallback.
| @@ -1,71 +1,70 @@ | |||
| @import "../../../../styles/colors"; | |||
| @import url("../../../../styles/colors"); | |||
There was a problem hiding this comment.
@import url("../../../../styles/colors"); turns this into a plain CSS import, so SCSS variables like $backColorMedium / $dangerColorDark used below will be undefined and SCSS compilation will fail. Use @use "../../../../styles/colors" as *; (or a non-url() SCSS import) to import the variables/mixins.
| @import url("../../../../styles/colors"); | |
| @use "../../../../styles/colors" as *; |
| h3 { | ||
| font-size: 32px; | ||
| padding-left: 64px; | ||
| font-weight: 700; | ||
| height: 56px; |
There was a problem hiding this comment.
h3 and h2 rules are nested inside the h4 { ... } block, so they will only apply to h3/h2 elements that are descendants of an h4 (which should never happen). This likely breaks global heading styling; move h2/h3 back to top-level selectors instead of nesting them under h4.
| &:focus, | ||
| &:active { | ||
| background: var(--accent-color-dark); | ||
| } | ||
|
|
||
| &:hover, | ||
| &:focus { | ||
| color: $foreColor; | ||
| cursor: pointer; | ||
| user-select: none; | ||
| transition: 100ms all; | ||
| } | ||
|
|
||
| &:disabled { | ||
| opacity: 0.33; | ||
| cursor: not-allowed; | ||
| text-decoration: none; | ||
| font-weight: 400; | ||
| } | ||
|
|
||
| &.large { | ||
| height: 50px; | ||
| min-width: 160px; | ||
| padding-left: 32px; | ||
| padding-right: 32px; | ||
| margin-left: 16px; | ||
| margin-right: 16px; | ||
|
|
||
| & > .fa-icon { | ||
| transform: scale(1.3); | ||
| } | ||
| } | ||
| &:not(:disabled) { | ||
| box-shadow: inset 0 -2px 0 var(--accent-color-dark); | ||
| } |
There was a problem hiding this comment.
These styles reference CSS custom properties --accent-color-dark (and later --danger-color-dark), but the palette defines --color-accent-dark / --color-danger-dark (and SCSS vars $accentColorDark / $dangerColorDark). As written, focus/active background and box-shadow will not pick up the intended colors.
| width: 100%; | ||
| height: 100%; | ||
| background-color: rgb(var(--color-background-medium-dark), 50%); | ||
| z-index: 100; | ||
| cursor: pointer; |
There was a problem hiding this comment.
background-color: rgb(var(--color-background-medium-dark), 50%); is not valid CSS: --color-background-medium-dark is a hex color (e.g. #5e5e5e), and rgb() doesn't accept a hex var plus an alpha like this. Use color-mix(...), rgb(... / 50%) with numeric channels, or a dedicated --color-*-rgba token.
| public getById(id: string): Observable<> { | ||
| return this.httpClient.get<TicketGroup>( | ||
| new URL( |
There was a problem hiding this comment.
getById has an invalid return type (Observable<>), which will not compile. It should be Observable<TicketGroup> (matching the httpClient.get<TicketGroup>(...)).
No description provided.