From e8e71fdfdcf8ff94fd96cd78e23e0f7574db4539 Mon Sep 17 00:00:00 2001 From: Zoe Roux Date: Wed, 8 Dec 2021 10:56:33 +0100 Subject: [PATCH] CI: fixing the angular's linter --- front/.eslintrc.json | 35 +++--- front/package.json | 6 +- front/projects/host/.eslintrc.json | 5 +- .../episodes-list.component.html | 4 +- .../items-grid/items-grid.component.html | 4 +- .../show-grid/show-grid.component.html | 2 +- .../app/pages/player/player.component.html | 4 +- front/yarn.lock | 116 ++++++++++++------ 8 files changed, 114 insertions(+), 62 deletions(-) diff --git a/front/.eslintrc.json b/front/.eslintrc.json index 02c0b5de..9165b64c 100644 --- a/front/.eslintrc.json +++ b/front/.eslintrc.json @@ -3,6 +3,15 @@ "ignorePatterns": [ "projects/**/*" ], + "env": { + "browser": true, + "es6": true, + "node": true + }, + "plugins": [ + "@typescript-eslint", + "@angular-eslint" + ], "overrides": [ { "files": [ @@ -17,8 +26,7 @@ }, "extends": [ "plugin:@angular-eslint/recommended", - "plugin:@angular-eslint/template/process-inline-templates", - "plugin:@typescript-eslint/recommended-requiring-type-checking" + "plugin:@angular-eslint/template/process-inline-templates" ], "rules": { "@angular-eslint/component-class-suffix": "error", @@ -81,7 +89,7 @@ } ], "@typescript-eslint/consistent-type-assertions": "error", - "@typescript-eslint/dot-notation": "error", + // "@typescript-eslint/dot-notation": "error", "@typescript-eslint/member-delimiter-style": [ "error", { @@ -96,7 +104,7 @@ } ], "@typescript-eslint/member-ordering": "error", - "@typescript-eslint/naming-convention": "error", + //"@typescript-eslint/naming-convention": "error", "@typescript-eslint/no-empty-function": "off", "@typescript-eslint/no-empty-interface": "error", "@typescript-eslint/no-explicit-any": "off", @@ -158,11 +166,9 @@ "undefined" ], "id-match": "error", - "import/no-deprecated": "warn", "jsdoc/check-alignment": "off", "jsdoc/check-indentation": "off", "jsdoc/newline-after-description": "off", - "jsdoc/no-types": "error", "max-classes-per-file": "off", "max-len": [ "error", @@ -197,7 +203,6 @@ "error", "never" ], - "prefer-arrow/prefer-arrow-functions": "error", "prefer-const": "error", "quote-props": [ "error", @@ -224,7 +229,14 @@ } ], "use-isnan": "error", - "valid-typeof": "off" + "valid-typeof": "off", + "indent": [ + "error", + "tab", + { + "SwitchCase": 1 + } + ] } }, { @@ -238,13 +250,6 @@ } ], "rules": { - "indent": [ - "error", - "tab", - { - "SwitchCase": 1 - } - ], "linebreak-style": [ "error", "unix" diff --git a/front/package.json b/front/package.json index f22d39cf..91ae0652 100644 --- a/front/package.json +++ b/front/package.json @@ -51,9 +51,9 @@ "@types/jquery": "^3.5.8", "@types/node": "^16.11.9", "@types/video.js": "^7.3.27", - "@typescript-eslint/eslint-plugin": "5.3.0", - "@typescript-eslint/parser": "5.3.0", - "eslint": "^8.2.0", + "@typescript-eslint/eslint-plugin": "5.6.0", + "@typescript-eslint/parser": "5.6.0", + "eslint": "^8.4.1", "ts-node": "~10.4.0", "typescript": "4.4.4" } diff --git a/front/projects/host/.eslintrc.json b/front/projects/host/.eslintrc.json index 1945d31d..638ef0c9 100644 --- a/front/projects/host/.eslintrc.json +++ b/front/projects/host/.eslintrc.json @@ -1,7 +1,8 @@ { "extends": "../../.eslintrc.json", "ignorePatterns": [ - "!**/*" + "!**/*", + "src/polyfills.ts" ], "overrides": [ { @@ -10,7 +11,7 @@ ], "parserOptions": { "project": [ - "tsconfig.json" + "projects/host/tsconfig.json" ], "createDefaultProgram": true }, diff --git a/front/projects/host/src/app/components/episodes-list/episodes-list.component.html b/front/projects/host/src/app/components/episodes-list/episodes-list.component.html index b144e977..d526b6af 100644 --- a/front/projects/host/src/app/components/episodes-list/episodes-list.component.html +++ b/front/projects/host/src/app/components/episodes-list/episodes-list.component.html @@ -20,12 +20,12 @@ -
{{episode.show.title}} - S{{episode.seasonNumber}}:E{{episode.episodeNumber}}
+
{{episode.show.title}} - S{{episode.seasonNumber}}:E{{episode.episodeNumber}}
{{episode.show.title}}

{{episode.title}}

-
S{{episode.seasonNumber}}:E{{episode.episodeNumber}} - {{episode.title}}
+
S{{episode.seasonNumber}}:E{{episode.episodeNumber}} - {{episode.title}}
{{episode.title}}

{{episode.overview}}

diff --git a/front/projects/host/src/app/components/items-grid/items-grid.component.html b/front/projects/host/src/app/components/items-grid/items-grid.component.html index 4b3970c8..ea1f2548 100644 --- a/front/projects/host/src/app/components/items-grid/items-grid.component.html +++ b/front/projects/host/src/app/components/items-grid/items-grid.component.html @@ -1,6 +1,6 @@
diff --git a/front/projects/host/src/app/components/show-grid/show-grid.component.html b/front/projects/host/src/app/components/show-grid/show-grid.component.html index 2377cc1e..f69df1f7 100644 --- a/front/projects/host/src/app/components/show-grid/show-grid.component.html +++ b/front/projects/host/src/app/components/show-grid/show-grid.component.html @@ -8,7 +8,7 @@

{{show.title}}

-

{{show.startYear}} - {{show.endYear}}

+

{{show.startYear}} - {{show.endYear}}

{{show.startYear}}

{{show.overview}}