Skip to content

Commit

Permalink
Upgrade to Angular v18 (#279)
Browse files Browse the repository at this point in the history
* Upgrade to angular v18 and eslint v9

* fix lint fix command

* Update other deps
  • Loading branch information
DavideViolante authored Aug 28, 2024
1 parent dd4237c commit 1b230a3
Show file tree
Hide file tree
Showing 8 changed files with 13,789 additions and 29,207 deletions.
110 changes: 0 additions & 110 deletions .eslintrc.json

This file was deleted.

2 changes: 1 addition & 1 deletion client/app/login/login.component.html
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ <h4 class="card-header">Login</h4>
<i class="fa fa-envelope"></i>
</span>
<input class="form-control" type="email" name="email"
formControlName="email" placeholder="Email" autofocus>
formControlName="email" placeholder="Email">
</div>
<div class="input-group" [ngClass]="setClassPassword()">
<span class="input-group-text">
Expand Down
2 changes: 1 addition & 1 deletion client/app/register/register.component.html
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ <h4 class="card-header">Register</h4>
<i class="fa fa-user"></i>
</span>
<input class="form-control" type="text" name="username"
formControlName="username" placeholder="Username" autofocus>
formControlName="username" placeholder="Username">
</div>
<div class="input-group" [ngClass]="setClassEmail()">
<span class="input-group-text">
Expand Down
57 changes: 57 additions & 0 deletions eslint.config.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,57 @@
// @ts-check
const eslint = require("@eslint/js");
const tseslint = require("typescript-eslint");
const angular = require("angular-eslint");

module.exports = tseslint.config(
{
files: ["**/*.ts"],
extends: [
eslint.configs.recommended,
...tseslint.configs.recommended,
...tseslint.configs.stylistic,
...angular.configs.tsRecommended,
],
processor: angular.processInlineTemplates,
rules: {
"@angular-eslint/directive-selector": [
"error",
{
type: "attribute",
prefix: "app",
style: "camelCase",
},
],
"@angular-eslint/component-selector": [
"error",
{
type: "element",
prefix: "app",
style: "kebab-case",
},
],

"@typescript-eslint/no-explicit-any": "off",
"no-underscore-dangle": "off",
"arrow-spacing": "error",
"comma-spacing": "error",
"indent": ["error", 2],
"key-spacing": "error",
"keyword-spacing": "error",
"object-curly-spacing": ["error", "always"],
"object-shorthand": "error",
"spaced-comment": "error",
"space-before-blocks": "error",
"space-infix-ops": "error",
"semi": "error",
},
},
{
files: ["**/*.html"],
extends: [
...angular.configs.templateRecommended,
...angular.configs.templateAccessibility,
],
rules: {},
}
);
Loading

0 comments on commit 1b230a3

Please sign in to comment.