Skip to content

Commit fbdfb6c

Browse files
authored
Angular 20 upgrade (#121)
* npm update * ngx bumps * first * 19 * 20 * more * linting rules * separate lint step * eslint bump * package lock sync * remove airbnb garbage * switch to eslint.config.mjs, fix linting errors * using mjs don't need this * set new output folder
1 parent 4f1b56a commit fbdfb6c

131 files changed

Lines changed: 13893 additions & 19430 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.github/workflows/docker-publish.yml

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -58,6 +58,16 @@ jobs:
5858
recreate: true
5959
path: code-coverage-results.md
6060

61+
front-end-lint:
62+
runs-on: ubuntu-latest
63+
steps:
64+
- uses: actions/checkout@v2
65+
- name: Run frontend lint
66+
working-directory: ./openalprwebhookprocessor.client
67+
run: |
68+
npm ci
69+
npm run lint
70+
6171
front-end-tests:
6272
runs-on: ubuntu-latest
6373
steps:
@@ -67,7 +77,6 @@ jobs:
6777
run: |
6878
npm ci
6979
npm run test:prod
70-
npm run lint
7180
7281
- name: Front End Code Coverage Report
7382
uses: irongut/CodeCoverageSummary@v1.3.0

openalprwebhookprocessor.client/.eslintrc.json

Lines changed: 0 additions & 72 deletions
This file was deleted.

openalprwebhookprocessor.client/angular.json

Lines changed: 35 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -11,11 +11,12 @@
1111
"prefix": "app",
1212
"architect": {
1313
"build": {
14-
"builder": "@angular-devkit/build-angular:browser",
14+
"builder": "@angular/build:application",
1515
"options": {
16-
"outputPath": "dist/openalprwebhookprocessor.client",
16+
"outputPath": {
17+
"base": "dist/openalprwebhookprocessor.client"
18+
},
1719
"index": "src/index.html",
18-
"main": "src/main.ts",
1920
"polyfills": [
2021
"zone.js"
2122
],
@@ -52,8 +53,8 @@
5253
}
5354
],
5455
"scripts": [],
55-
"serviceWorker": true,
56-
"ngswConfigPath": "ngsw-config.json"
56+
"serviceWorker": "ngsw-config.json",
57+
"browser": "src/main.ts"
5758
},
5859
"configurations": {
5960
"production": {
@@ -78,9 +79,7 @@
7879
"outputHashing": "all"
7980
},
8081
"development": {
81-
"buildOptimizer": false,
8282
"optimization": false,
83-
"vendorChunk": true,
8483
"extractLicenses": false,
8584
"sourceMap": true,
8685
"namedChunks": true
@@ -89,7 +88,7 @@
8988
"defaultConfiguration": "production"
9089
},
9190
"serve": {
92-
"builder": "@angular-devkit/build-angular:dev-server",
91+
"builder": "@angular/build:dev-server",
9392
"configurations": {
9493
"production": {
9594
"buildTarget": "openalprwebhookprocessor.client:build:production"
@@ -104,13 +103,13 @@
104103
}
105104
},
106105
"extract-i18n": {
107-
"builder": "@angular-devkit/build-angular:extract-i18n",
106+
"builder": "@angular/build:extract-i18n",
108107
"options": {
109108
"buildTarget": "openalprwebhookprocessor.client:build"
110109
}
111110
},
112111
"test": {
113-
"builder": "@angular-devkit/build-angular:karma",
112+
"builder": "@angular/build:karma",
114113
"options": {
115114
"polyfills": [
116115
"zone.js",
@@ -146,5 +145,31 @@
146145
"schematicCollections": [
147146
"@angular-eslint/schematics"
148147
]
148+
},
149+
"schematics": {
150+
"@schematics/angular:component": {
151+
"type": "component"
152+
},
153+
"@schematics/angular:directive": {
154+
"type": "directive"
155+
},
156+
"@schematics/angular:service": {
157+
"type": "service"
158+
},
159+
"@schematics/angular:guard": {
160+
"typeSeparator": "."
161+
},
162+
"@schematics/angular:interceptor": {
163+
"typeSeparator": "."
164+
},
165+
"@schematics/angular:module": {
166+
"typeSeparator": "."
167+
},
168+
"@schematics/angular:pipe": {
169+
"typeSeparator": "."
170+
},
171+
"@schematics/angular:resolver": {
172+
"typeSeparator": "."
173+
}
149174
}
150175
}
Lines changed: 71 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,71 @@
1+
import angularEslint from '@angular-eslint/eslint-plugin';
2+
import angularTemplate from '@angular-eslint/eslint-plugin-template';
3+
import angularParser from '@angular-eslint/template-parser';
4+
import globals from "globals";
5+
import tsParser from '@typescript-eslint/parser';
6+
import tsEslintPlugin from '@typescript-eslint/eslint-plugin';
7+
import stylistic from '@stylistic/eslint-plugin'
8+
9+
export default [
10+
{
11+
files: ['**/*.ts'],
12+
languageOptions: {
13+
globals: {
14+
...globals.browser,
15+
...globals.node,
16+
},
17+
parser: tsParser,
18+
parserOptions: {
19+
project: ['./tsconfig.json'],
20+
tsconfigRootDir: import.meta.dirname,
21+
sourceType: 'module',
22+
},
23+
},
24+
plugins: {
25+
'@typescript-eslint': tsEslintPlugin,
26+
'@angular-eslint': angularEslint,
27+
'@stylistic': stylistic,
28+
},
29+
rules: {
30+
...tsEslintPlugin.configs.recommended.rules,
31+
...angularEslint.configs.recommended.rules,
32+
...tsEslintPlugin.configs.strict.rules,
33+
...tsEslintPlugin.configs.stylistic.rules,
34+
...stylistic.configs.recommended.rules
35+
},
36+
},
37+
{
38+
files: ['**/*.html'],
39+
languageOptions: {
40+
parser: angularParser,
41+
},
42+
plugins: {
43+
'@angular-eslint/template': angularTemplate,
44+
},
45+
rules: {
46+
...angularTemplate.configs.recommended.rules,
47+
},
48+
},
49+
{
50+
files: ['**/*.spec.ts'],
51+
languageOptions: {
52+
globals: {
53+
...globals.jasmine,
54+
},
55+
parser: tsParser,
56+
parserOptions: {
57+
project: ['./tsconfig.spec.json'],
58+
tsconfigRootDir: import.meta.dirname,
59+
sourceType: 'module',
60+
},
61+
},
62+
plugins: {
63+
'@typescript-eslint': tsEslintPlugin,
64+
'@angular-eslint': angularEslint,
65+
},
66+
rules: {
67+
...tsEslintPlugin.configs.recommended.rules,
68+
...angularEslint.configs.recommended.rules,
69+
},
70+
},
71+
];

openalprwebhookprocessor.client/karma.conf.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ module.exports = function (config) {
1010
require('karma-chrome-launcher'),
1111
require('karma-jasmine-html-reporter'),
1212
require('karma-coverage'),
13-
require('@angular-devkit/build-angular/plugins/karma')
13+
1414
],
1515
client: {
1616
jasmine: {

openalprwebhookprocessor.client/openalprwebhookprocessor.client.esproj

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,6 @@
55
<!-- Allows the build (or compile) script located on package.json to run on Build -->
66
<ShouldRunBuildScript>false</ShouldRunBuildScript>
77
<!-- Folder where production build objects will be placed -->
8-
<PublishAssetsDirectory>$(MSBuildProjectDirectory)\dist\openalprwebhookprocessor.client\</PublishAssetsDirectory>
8+
<PublishAssetsDirectory>$(MSBuildProjectDirectory)\dist\openalprwebhookprocessor.client\browser\</PublishAssetsDirectory>
99
</PropertyGroup>
1010
</Project>

0 commit comments

Comments
 (0)