diff --git a/src/eslint.config.mjs b/src/eslint.config.mjs new file mode 100644 index 0000000..dc57168 --- /dev/null +++ b/src/eslint.config.mjs @@ -0,0 +1,57 @@ +import path from "node:path"; +import { fileURLToPath } from "node:url"; +import js from "@eslint/js"; +import { FlatCompat } from "@eslint/eslintrc"; + +const __filename = fileURLToPath(import.meta.url); +const __dirname = path.dirname(__filename); +const compat = new FlatCompat({ + baseDirectory: __dirname, + recommendedConfig: js.configs.recommended, + allConfig: js.configs.all +}); + +export default [{ + ignores: ["projects/**/*"], +}, ...compat.extends( + "eslint:recommended", + "plugin:@typescript-eslint/recommended", + "plugin:@angular-eslint/recommended", + "plugin:@angular-eslint/template/process-inline-templates", +).map(config => ({ + ...config, + files: ["**/*.ts"], +})), { + files: ["**/*.ts"], + + rules: { + "no-unused-vars": "off", + + "@typescript-eslint/no-unused-vars": ["warn", { + argsIgnorePattern: "^_", + varsIgnorePattern: "^_", + caughtErrorsIgnorePattern: "^_", + }], + + "@angular-eslint/directive-selector": ["error", { + type: "attribute", + prefix: "app", + style: "camelCase", + }], + + "@angular-eslint/component-selector": ["error", { + type: "element", + prefix: "app", + style: "kebab-case", + }], + }, +}, ...compat.extends( + "plugin:@angular-eslint/template/recommended", + "plugin:@angular-eslint/template/accessibility", +).map(config => ({ + ...config, + files: ["**/*.html"], +})), { + files: ["**/*.html"], + rules: {}, +}]; \ No newline at end of file diff --git a/src/src/app/common/components/standard-banner/standard-banner.component.ts b/src/src/app/common/components/standard-banner/standard-banner.component.ts index 7690c3c..3d6840a 100644 --- a/src/src/app/common/components/standard-banner/standard-banner.component.ts +++ b/src/src/app/common/components/standard-banner/standard-banner.component.ts @@ -17,7 +17,7 @@ import { MatButton } from '@angular/material/button'; export class StandardBannerComponent implements OnInit { public userIsLoggedIn: boolean = false; - constructor(private router: Router) { + constructor() { } ngOnInit(): void { diff --git a/src/src/app/common/interface/google-sign-in-response.ts b/src/src/app/common/interface/google-sign-in-response.ts deleted file mode 100644 index 4fa0993..0000000 --- a/src/src/app/common/interface/google-sign-in-response.ts +++ /dev/null @@ -1,6 +0,0 @@ -export interface GoogleSignInResponse { - clientId: string; - client_id: string; - credential: string; - select_by: string; -} diff --git a/src/src/app/view/home/home.component.scss b/src/src/app/view/home/home.component.scss index 8fef11f..31be6b2 100644 --- a/src/src/app/view/home/home.component.scss +++ b/src/src/app/view/home/home.component.scss @@ -10,8 +10,3 @@ padding: 10px; margin: 10px; } - -.logout-button { - text-align: right; - margin-right: 10px; -} diff --git a/src/src/app/view/login/login.component.scss b/src/src/app/view/login/login.component.scss index dd5a235..8b7a8e7 100644 --- a/src/src/app/view/login/login.component.scss +++ b/src/src/app/view/login/login.component.scss @@ -8,22 +8,6 @@ g_id_onload { width: fit-content; } -.twitch-login-button { - text-align: center; - align-content: center; - vertical-align: middle; - margin-left: auto; - margin-right: auto; - margin-top: 5px; - width: 200px; - height: 40px; - background: rgb(191, 148, 255); - color: $background-color; - font-weight: bold; - border-radius: 3px; - cursor: pointer; -} - .side-by-side { display: inline-block; vertical-align: middle; diff --git a/src/src/app/view/twitch/twitch-bot-config/twitch-bot-config.component.scss b/src/src/app/view/twitch/twitch-bot-config/twitch-bot-config.component.scss index 723f951..472468f 100644 --- a/src/src/app/view/twitch/twitch-bot-config/twitch-bot-config.component.scss +++ b/src/src/app/view/twitch/twitch-bot-config/twitch-bot-config.component.scss @@ -14,8 +14,3 @@ .save { text-align: right; } - -.snack-bar-error { - --mdc-snackbar-container-color: green; - --mat-mdc-snack-bar-button-color: white; -} diff --git a/src/src/app/view/twitch/twitch-bot-config/twitch-bot-config.component.ts b/src/src/app/view/twitch/twitch-bot-config/twitch-bot-config.component.ts index b775652..e2d4401 100644 --- a/src/src/app/view/twitch/twitch-bot-config/twitch-bot-config.component.ts +++ b/src/src/app/view/twitch/twitch-bot-config/twitch-bot-config.component.ts @@ -73,9 +73,9 @@ export class TwitchBotConfigComponent implements OnInit, OnDestroy { return; } - // Get the token, if there isn't one then they didn't get here by hitting the login button. Lets send them back - // to the login page if that's the case. It'll help us keep people synced on updates the permissions we request - // from their tokens. + // Get the token, if there isn't one then they didn't get here by hitting the login button. Let's send them back + // to the login page if that's the case. It'll help us keep people synced on updates to the permissions we + // request from their tokens. const token = params.get('token'); if (!token) { this.router.navigate(['twitch-bot']); diff --git a/src/src/app/view/vm-manager/interface/ActionableDockerResource.ts b/src/src/app/view/vm-manager/interface/ActionableDockerResource.ts index 55c2b4d..8c5079f 100644 --- a/src/src/app/view/vm-manager/interface/ActionableDockerResource.ts +++ b/src/src/app/view/vm-manager/interface/ActionableDockerResource.ts @@ -3,3 +3,4 @@ import { DockerResource } from '../../../common/interface/docker-resource'; export interface ActionableDockerResource extends DockerResource { isRunning: boolean; } + diff --git a/src/src/styles.scss b/src/src/styles.scss index 169cd62..2de86cc 100644 --- a/src/src/styles.scss +++ b/src/src/styles.scss @@ -190,7 +190,7 @@ body { } } -// A common class fixure for starting a flex container. +// A common class fixture for starting a flex container. .flex-container { display: flex; flex-wrap: wrap;