Skip to content

Commit 5d94729

Browse files
authored
Merge pull request #11 from dimeloper/feature/dep-updates-19.2
Dependency updates to v19.2
2 parents 53418af + 4a96481 commit 5d94729

36 files changed

Lines changed: 2338 additions & 1451 deletions

.eslintrc.json

Lines changed: 40 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,40 @@
1+
{
2+
"root": true,
3+
"ignorePatterns": ["projects/**/*"],
4+
"overrides": [
5+
{
6+
"files": ["*.ts"],
7+
"parserOptions": {
8+
"project": ["tsconfig.json", "e2e/tsconfig.json"],
9+
"createDefaultProgram": true
10+
},
11+
"extends": [
12+
"plugin:@angular-eslint/recommended",
13+
"plugin:@angular-eslint/template/process-inline-templates"
14+
],
15+
"rules": {
16+
"@angular-eslint/component-selector": [
17+
"error",
18+
{
19+
"prefix": "app",
20+
"style": "kebab-case",
21+
"type": "element"
22+
}
23+
],
24+
"@angular-eslint/directive-selector": [
25+
"error",
26+
{
27+
"prefix": "app",
28+
"style": "camelCase",
29+
"type": "attribute"
30+
}
31+
]
32+
}
33+
},
34+
{
35+
"files": ["*.html"],
36+
"extends": ["plugin:@angular-eslint/template/recommended"],
37+
"rules": {}
38+
}
39+
]
40+
}

.github/workflows/pr-checks.yml

Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
name: PR Checks
2+
3+
on:
4+
pull_request:
5+
branches: [ main ]
6+
7+
jobs:
8+
lint-and-test:
9+
runs-on: ubuntu-latest
10+
11+
steps:
12+
- uses: actions/checkout@v4
13+
14+
- name: Install pnpm
15+
uses: pnpm/action-setup@v2
16+
with:
17+
version: 8
18+
19+
- name: Setup Node.js
20+
uses: actions/setup-node@v4
21+
with:
22+
node-version: '20'
23+
cache: 'pnpm'
24+
25+
- name: Install dependencies
26+
run: pnpm install
27+
28+
- name: Run linting
29+
run: pnpm lint
30+
31+
- name: Run tests
32+
run: pnpm ng test --browsers=ChromeHeadless --watch=false

.husky/pre-commit

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
pnpm run lint || exit 1
2+
pnpm run format:check || exit 1

README.md

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -56,6 +56,15 @@ pnpm audit:optimized-pages
5656

5757
[DEVELOPER.md](DEVELOPER.md)
5858

59+
## CI/CD Setup
60+
61+
The project uses GitHub Actions for continuous integration. The workflow runs on every pull request to the main branch and performs the following checks:
62+
63+
- Linting: Runs ESLint to check code quality
64+
- Tests: Runs unit tests in a headless Chrome environment
65+
66+
The workflow configuration can be found in `.github/workflows/pr-checks.yml`.
67+
5968
## Recommended Web Vitals blog post
6069

6170
[Navigating the Waters of Core Web Vitals in 2024](https://medium.com/@dimeloper/navigating-the-waters-of-core-web-vitals-in-2024-3cd6a08666d9)

angular.json

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -107,7 +107,17 @@
107107
"@angular/material/prebuilt-themes/pink-bluegrey.css",
108108
"src/styles.scss"
109109
],
110-
"scripts": []
110+
"scripts": [],
111+
"browsers": "ChromeHeadless"
112+
}
113+
},
114+
"lint": {
115+
"builder": "@angular-eslint/builder:lint",
116+
"options": {
117+
"lintFilePatterns": [
118+
"src/**/*.ts",
119+
"src/**/*.html"
120+
]
111121
}
112122
}
113123
}

package.json

Lines changed: 28 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -7,25 +7,29 @@
77
"build": "ng build",
88
"watch": "ng build --watch --configuration development",
99
"test": "ng test",
10+
"lint": "ng lint",
11+
"format": "prettier --write \"src/**/*.{ts,html,scss}\"",
12+
"format:check": "prettier --check \"src/**/*.{ts,html,scss}\"",
1013
"serve:ssr:angular-optimization-examples": "node dist/angular-optimization-examples/server/server.mjs",
1114
"audit:bad-pages": "unlighthouse --site https://ng-pokedex-optimization.netlify.app --urls /pokedex-bad/,/pokemon-bad/ivysaur/,/pokemon-bad/charizard/",
1215
"audit:optimized-pages": "unlighthouse --site https://ng-pokedex-optimization.netlify.app --urls /pokedex-optimized/,/pokemon-optimized/ivysaur/,/pokemon-optimized/charizard/",
13-
"bundle-report": "ng build --configuration production --source-map && source-map-explorer dist/*.js"
16+
"bundle-report": "ng build --configuration production --source-map && source-map-explorer dist/*.js",
17+
"prepare": "husky"
1418
},
1519
"private": true,
1620
"dependencies": {
17-
"@angular/animations": "^19.1.0",
18-
"@angular/cdk": "19.0.5",
19-
"@angular/common": "^19.1.0",
20-
"@angular/compiler": "^19.1.0",
21-
"@angular/core": "^19.1.0",
22-
"@angular/forms": "^19.1.0",
21+
"@angular/animations": "^19.2.8",
22+
"@angular/cdk": "19.2.11",
23+
"@angular/common": "^19.2.8",
24+
"@angular/compiler": "^19.2.8",
25+
"@angular/core": "^19.2.8",
26+
"@angular/forms": "^19.2.8",
2327
"@angular/material": "19.0.5",
24-
"@angular/platform-browser": "^19.1.0",
25-
"@angular/platform-browser-dynamic": "^19.1.0",
26-
"@angular/platform-server": "^19.1.0",
27-
"@angular/router": "^19.1.0",
28-
"@angular/ssr": "^19.1.1",
28+
"@angular/platform-browser": "^19.2.8",
29+
"@angular/platform-browser-dynamic": "^19.2.8",
30+
"@angular/platform-server": "^19.2.8",
31+
"@angular/router": "^19.2.8",
32+
"@angular/ssr": "^19.2.9",
2933
"@netlify/angular-runtime": "^2.1.0",
3034
"express": "^4.18.2",
3135
"ngx-device-detector": "^9.0.0",
@@ -34,12 +38,21 @@
3438
"zone.js": "~0.15.0"
3539
},
3640
"devDependencies": {
37-
"@angular-devkit/build-angular": "^19.1.1",
38-
"@angular/cli": "^19.1.1",
39-
"@angular/compiler-cli": "^19.1.0",
41+
"@angular-devkit/build-angular": "^19.2.9",
42+
"@angular-eslint/builder": "^19.3.0",
43+
"@angular-eslint/eslint-plugin": "^19.3.0",
44+
"@angular-eslint/eslint-plugin-template": "^19.3.0",
45+
"@angular-eslint/schematics": "^19.3.0",
46+
"@angular-eslint/template-parser": "^19.3.0",
47+
"@angular/cli": "^19.2.9",
48+
"@angular/compiler-cli": "^19.2.8",
4049
"@types/express": "^4.17.17",
4150
"@types/jasmine": "~5.1.0",
4251
"@types/node": "^20.17.10",
52+
"@typescript-eslint/eslint-plugin": "^8.31.0",
53+
"@typescript-eslint/parser": "^8.31.0",
54+
"eslint": "^9.25.1",
55+
"husky": "^9.1.7",
4356
"jasmine-core": "~5.1.0",
4457
"karma": "~6.4.0",
4558
"karma-chrome-launcher": "~3.2.0",

0 commit comments

Comments
 (0)