Skip to content

Commit

Permalink
Merge pull request #12 from SloMR/ImproveLogger
Browse files Browse the repository at this point in the history
Improve logger
  • Loading branch information
SloMR authored Oct 21, 2024
2 parents 82c2520 + 1ad190c commit 0da2ea7
Show file tree
Hide file tree
Showing 37 changed files with 3,253 additions and 5,579 deletions.
18 changes: 18 additions & 0 deletions .github/workflows/npm.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,24 @@ jobs:
run: npm ci
working-directory: client

- name: Run lint with fix
run: npm run lint:fix
working-directory: client

- name: Format code with Prettier
run: npm run format
working-directory: client

- name: Commit lint/format changes (if any)
if: success() && github.ref == 'refs/heads/main'
run: |
git config --global user.name "GitHub Actions"
git config --global user.email "actions@github.com"
git add .
git commit -m "CI: Lint and format fixes applied [skip ci]" || echo "No changes to commit"
git push
working-directory: client

- name: Build the Angular app
run: npm run build --configuration=production
working-directory: client
7 changes: 7 additions & 0 deletions .prettierrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
{
"singleQuote": true,
"printWidth": 100,
"tabWidth": 2,
"trailingComma": "es5",
"semi": true
}
28 changes: 6 additions & 22 deletions client/angular.json
Original file line number Diff line number Diff line change
Expand Up @@ -26,20 +26,15 @@
"outputPath": "dist/client",
"index": "src/index.html",
"browser": "src/main.ts",
"polyfills": [
"zone.js"
],
"polyfills": ["zone.js"],
"tsConfig": "tsconfig.app.json",
"assets": [
{
"glob": "**/*",
"input": "public"
}
],
"styles": [
"@angular/material/prebuilt-themes/azure-blue.css",
"src/styles.css"
],
"styles": ["@angular/material/prebuilt-themes/azure-blue.css", "src/styles.css"],
"scripts": [],
"server": "src/main.server.ts",
"prerender": true,
Expand Down Expand Up @@ -115,39 +110,28 @@
"test": {
"builder": "@angular-devkit/build-angular:karma",
"options": {
"polyfills": [
"zone.js",
"zone.js/testing"
],
"polyfills": ["zone.js", "zone.js/testing"],
"tsConfig": "tsconfig.spec.json",
"assets": [
{
"glob": "**/*",
"input": "public"
}
],
"styles": [
"@angular/material/prebuilt-themes/azure-blue.css",
"src/styles.css"
],
"styles": ["@angular/material/prebuilt-themes/azure-blue.css", "src/styles.css"],
"scripts": []
}
},
"lint": {
"builder": "@angular-eslint/builder:lint",
"options": {
"lintFilePatterns": [
"src/**/*.ts",
"src/**/*.html"
]
"lintFilePatterns": ["src/**/*.ts", "src/**/*.html"]
}
}
}
}
},
"cli": {
"schematicCollections": [
"@angular-eslint/schematics"
]
"schematicCollections": ["@angular-eslint/schematics"]
}
}
43 changes: 20 additions & 23 deletions client/eslint.config.js
Original file line number Diff line number Diff line change
@@ -1,43 +1,40 @@
// @ts-check
const eslint = require("@eslint/js");
const tseslint = require("typescript-eslint");
const angular = require("angular-eslint");
const eslint = require('@eslint/js');
const tslint = require('typescript-eslint');
const angular = require('angular-eslint');

module.exports = tseslint.config(
module.exports = tslint.config(
{
files: ["**/*.ts"],
files: ['**/*.ts'],
extends: [
eslint.configs.recommended,
...tseslint.configs.recommended,
...tseslint.configs.stylistic,
...tslint.configs.recommended,
...tslint.configs.stylistic,
...angular.configs.tsRecommended,
],
processor: angular.processInlineTemplates,
rules: {
"@angular-eslint/directive-selector": [
"error",
'@angular-eslint/directive-selector': [
'error',
{
type: "attribute",
prefix: "app",
style: "camelCase",
type: 'attribute',
prefix: 'app',
style: 'camelCase',
},
],
"@angular-eslint/component-selector": [
"error",
'@angular-eslint/component-selector': [
'error',
{
type: "element",
prefix: "app",
style: "kebab-case",
type: 'element',
prefix: 'app',
style: 'kebab-case',
},
],
'@typescript-eslint/no-explicit-any': 'off',
},
},
{
files: ["**/*.html"],
extends: [
...angular.configs.templateRecommended,
...angular.configs.templateAccessibility,
],
files: ['**/*.html'],
extends: [...angular.configs.templateRecommended, ...angular.configs.templateAccessibility],
rules: {},
}
);
Loading

0 comments on commit 0da2ea7

Please sign in to comment.