Skip to content

Commit d3fa479

Browse files
committed
Format all files with Prettier
1 parent 5728459 commit d3fa479

Some content is hidden

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

61 files changed

+741
-633
lines changed

.github/workflows/dependency-check.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ on:
44
push:
55
workflow_dispatch:
66
schedule:
7-
- cron: "0 6 * * MON" # every Monday at 6:00 AM UTC
7+
- cron: '0 6 * * MON' # every Monday at 6:00 AM UTC
88

99
jobs:
1010
check-dependencies:
@@ -17,7 +17,7 @@ jobs:
1717
- name: Set up Node.js
1818
uses: actions/setup-node@v4
1919
with:
20-
node-version: "20"
20+
node-version: '20'
2121

2222
- name: Install dependencies
2323
run: npm ci

.prettierignore

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,4 @@
1-
coverage
2-
dist
1+
dist/
2+
package-lock.json
3+
*.min.js
4+
*.snap

.prettierrc.json

Lines changed: 10 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,11 @@
11
{
2-
"singleQuote": true,
3-
"trailingComma": "es5",
4-
"endOfLine": "auto",
5-
"bracketSameLine": true,
6-
"printWidth": 150,
7-
"htmlWhitespaceSensitivity": "ignore"
8-
}
2+
"semi": true,
3+
"trailingComma": "none",
4+
"singleQuote": true,
5+
"printWidth": 80,
6+
"tabWidth": 2,
7+
"useTabs": false,
8+
"bracketSpacing": true,
9+
"arrowParens": "always",
10+
"endOfLine": "lf"
11+
}

README.md

Lines changed: 44 additions & 38 deletions
Original file line numberDiff line numberDiff line change
@@ -1,38 +1,44 @@
1-
## Installation and Development Server
2-
3-
1. Clone this repository:
4-
```bash
5-
git clone <repository-url>
6-
```
7-
2. Navigate to the project directory:
8-
```bash
9-
cd <project-folder>
10-
```
11-
3. Install the dependencies:
12-
```bash
13-
npm install
14-
```
15-
4. Start the development server:
16-
```bash
17-
npm start
18-
```
19-
20-
Navigate to `http://localhost:4200/` in your browser to see the application. The application will automatically reload if you change any of the source files.
21-
22-
______
23-
**Note:** Ensure you have an updated version of Node.js installed on your machine. You can verify your Node.js version with:
24-
```bash
25-
node -v
26-
```
27-
If you are using nvm as your Node.js version manager, you can switch to the right version with:
28-
```bash
29-
nvm use
30-
```
31-
_____
32-
## Build
33-
34-
To build the application, run:
35-
36-
```bash
37-
npm run build
38-
```
1+
## Installation and Development Server
2+
3+
1. Clone this repository:
4+
```bash
5+
git clone <repository-url>
6+
```
7+
2. Navigate to the project directory:
8+
```bash
9+
cd <project-folder>
10+
```
11+
3. Install the dependencies:
12+
```bash
13+
npm install
14+
```
15+
4. Start the development server:
16+
```bash
17+
npm start
18+
```
19+
20+
Navigate to `http://localhost:4200/` in your browser to see the application. The application will automatically reload if you change any of the source files.
21+
22+
---
23+
24+
**Note:** Ensure you have an updated version of Node.js installed on your machine. You can verify your Node.js version with:
25+
26+
```bash
27+
node -v
28+
```
29+
30+
If you are using nvm as your Node.js version manager, you can switch to the right version with:
31+
32+
```bash
33+
nvm use
34+
```
35+
36+
---
37+
38+
## Build
39+
40+
To build the application, run:
41+
42+
```bash
43+
npm run build
44+
```

angular.json

Lines changed: 6 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -20,15 +20,10 @@
2020
"outputPath": "dist",
2121
"index": "src/index.html",
2222
"browser": "src/main.ts",
23-
"polyfills": [
24-
"zone.js"
25-
],
23+
"polyfills": ["zone.js"],
2624
"tsConfig": "tsconfig.app.json",
2725
"inlineStyleLanguage": "scss",
28-
"assets": [
29-
"src/favicon.ico",
30-
"src/assets"
31-
],
26+
"assets": ["src/favicon.ico", "src/assets"],
3227
"styles": [
3328
"@angular/material/prebuilt-themes/azure-blue.css",
3429
"src/styles.scss",
@@ -107,16 +102,10 @@
107102
"test": {
108103
"builder": "@angular-devkit/build-angular:karma",
109104
"options": {
110-
"polyfills": [
111-
"zone.js",
112-
"zone.js/testing"
113-
],
105+
"polyfills": ["zone.js", "zone.js/testing"],
114106
"tsConfig": "tsconfig.spec.json",
115107
"inlineStyleLanguage": "scss",
116-
"assets": [
117-
"src/favicon.ico",
118-
"src/assets"
119-
],
108+
"assets": ["src/favicon.ico", "src/assets"],
120109
"styles": [
121110
"@angular/material/prebuilt-themes/azure-blue.css",
122111
"src/styles.scss"
@@ -130,18 +119,13 @@
130119
"lint": {
131120
"builder": "@angular-eslint/builder:lint",
132121
"options": {
133-
"lintFilePatterns": [
134-
"src/**/*.ts",
135-
"src/**/*.html"
136-
]
122+
"lintFilePatterns": ["src/**/*.ts", "src/**/*.html"]
137123
}
138124
}
139125
}
140126
}
141127
},
142128
"cli": {
143-
"schematicCollections": [
144-
"angular-eslint"
145-
]
129+
"schematicCollections": ["angular-eslint"]
146130
}
147131
}

eslint.config.js

Lines changed: 22 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -1,48 +1,48 @@
11
// @ts-check
2-
const eslint = require("@eslint/js");
3-
const tseslint = require("typescript-eslint");
4-
const angular = require("angular-eslint");
2+
const eslint = require('@eslint/js');
3+
const tseslint = require('typescript-eslint');
4+
const angular = require('angular-eslint');
55
const prettierConfig = require('eslint-config-prettier');
66
const prettier = require('eslint-plugin-prettier');
77

88
module.exports = tseslint.config(
99
{
10-
files: ["**/*.ts"],
10+
files: ['**/*.ts'],
1111
extends: [
1212
eslint.configs.recommended,
1313
...tseslint.configs.recommended,
1414
...tseslint.configs.stylistic,
1515
...angular.configs.tsRecommended,
16-
prettierConfig,
16+
prettierConfig
1717
],
1818
plugins: { prettier },
1919
processor: angular.processInlineTemplates,
2020
rules: {
21-
"@angular-eslint/directive-selector": [
22-
"error",
21+
'@angular-eslint/directive-selector': [
22+
'error',
2323
{
24-
type: "attribute",
25-
prefix: "app",
26-
style: "camelCase",
27-
},
24+
type: 'attribute',
25+
prefix: 'app',
26+
style: 'camelCase'
27+
}
2828
],
29-
"@angular-eslint/component-selector": [
30-
"error",
29+
'@angular-eslint/component-selector': [
30+
'error',
3131
{
32-
type: "element",
33-
prefix: "app",
34-
style: "kebab-case",
35-
},
32+
type: 'element',
33+
prefix: 'app',
34+
style: 'kebab-case'
35+
}
3636
],
37-
'prettier/prettier': 'error',
38-
},
37+
'prettier/prettier': 'error'
38+
}
3939
},
4040
{
41-
files: ["**/*.html"],
41+
files: ['**/*.html'],
4242
extends: [
4343
...angular.configs.templateRecommended,
44-
...angular.configs.templateAccessibility,
44+
...angular.configs.templateAccessibility
4545
],
46-
rules: {},
46+
rules: {}
4747
}
4848
);

package.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,8 @@
88
"watch": "ng build --watch --configuration development",
99
"test": "ng test",
1010
"serve:ssr:diverintech.github.io": "node dist/diverintech.github.io/server/server.mjs",
11-
"lint": "ng lint"
11+
"lint": "ng lint",
12+
"format": "prettier --write ."
1213
},
1314
"private": true,
1415
"dependencies": {

server.ts

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -20,9 +20,12 @@ export function app(): express.Express {
2020
// Example Express Rest API endpoints
2121
// server.get('/api/**', (req, res) => { });
2222
// Serve static files from /browser
23-
server.get('*.*', express.static(browserDistFolder, {
24-
maxAge: '1y'
25-
}));
23+
server.get(
24+
'*.*',
25+
express.static(browserDistFolder, {
26+
maxAge: '1y'
27+
})
28+
);
2629

2730
// All regular routes use the Angular engine
2831
server.get('*', (req, res, next) => {
@@ -34,7 +37,7 @@ export function app(): express.Express {
3437
documentFilePath: indexHtml,
3538
url: `${protocol}://${headers.host}${originalUrl}`,
3639
publicPath: browserDistFolder,
37-
providers: [{ provide: APP_BASE_HREF, useValue: baseUrl }],
40+
providers: [{ provide: APP_BASE_HREF, useValue: baseUrl }]
3841
})
3942
.then((html) => res.send(html))
4043
.catch((err) => next(err));

src/app/app.component.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,4 +2,4 @@
22
<main>
33
<router-outlet></router-outlet>
44
</main>
5-
<app-footer *ngIf="!isHomePage"></app-footer>
5+
<app-footer *ngIf="!isHomePage"></app-footer>

src/app/app.component.ts

Lines changed: 24 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,11 @@
11
import { Component, OnInit } from '@angular/core';
22
import { CommonModule } from '@angular/common';
3-
import { NavigationEnd, Router, RouterModule, RouterOutlet } from '@angular/router';
3+
import {
4+
NavigationEnd,
5+
Router,
6+
RouterModule,
7+
RouterOutlet
8+
} from '@angular/router';
49
import { FooterComponent } from './shared-components/footer/footer.component';
510
import { TranslateModule } from '@ngx-translate/core';
611
import { filter } from 'rxjs/operators';
@@ -10,22 +15,33 @@ import { NavbarComponent } from './shared-components/navbar/navbar.component';
1015
@Component({
1116
selector: 'app-root',
1217
standalone: true,
13-
imports: [CommonModule, RouterOutlet, RouterModule, NavbarComponent, FooterComponent, TranslateModule],
18+
imports: [
19+
CommonModule,
20+
RouterOutlet,
21+
RouterModule,
22+
NavbarComponent,
23+
FooterComponent,
24+
TranslateModule
25+
],
1426
templateUrl: './app.component.html',
1527
styleUrl: './app.component.scss'
1628
})
1729
export class AppComponent implements OnInit {
1830
public title = 'Curriculum';
1931
public isHomePage = false;
2032

21-
constructor(private translationService: TranslationService, private router: Router) { }
33+
constructor(
34+
private translationService: TranslationService,
35+
private router: Router
36+
) {}
2237

2338
ngOnInit(): void {
2439
this.translationService.setLang(this.translationService.defaultLang);
25-
this.router.events.pipe(
26-
filter(event => event instanceof NavigationEnd)
27-
).subscribe(() => {
28-
this.isHomePage = this.router.url === '/' || this.router.url === '/home';
29-
});
40+
this.router.events
41+
.pipe(filter((event) => event instanceof NavigationEnd))
42+
.subscribe(() => {
43+
this.isHomePage =
44+
this.router.url === '/' || this.router.url === '/home';
45+
});
3046
}
3147
}

0 commit comments

Comments
 (0)