Skip to content

Commit

Permalink
Merge branch 'develop' into 30-webapp-dev-create-avatar-component
Browse files Browse the repository at this point in the history
  • Loading branch information
GODrums committed Aug 6, 2024
2 parents 1c699cf + 7fec3c2 commit b2d392d
Show file tree
Hide file tree
Showing 9 changed files with 1,312 additions and 174 deletions.
31 changes: 31 additions & 0 deletions .github/workflows/webapp-qa.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
name: Webapp QA

on:
pull_request:
paths:
- "webapp/**"
push:
paths:
- "webapp/**"
branches: [develop]

jobs:
quality:
name: Code Quality Checks
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v4
- name: Set up Node.js
uses: actions/setup-node@v4
with:
node-version: "22"
- name: Install dependencies
working-directory: ./webapp
run: npm ci
- name: Run ESLint
working-directory: ./webapp
run: npm run lint
- name: Run Prettier
working-directory: ./webapp
run: npm run prettier:check
5 changes: 4 additions & 1 deletion .vscode/settings.json
Original file line number Diff line number Diff line change
@@ -1,4 +1,7 @@
{
"java.compile.nullAnalysis.mode": "automatic",
"java.configuration.updateBuildConfiguration": "interactive"
"java.configuration.updateBuildConfiguration": "interactive",
"editor.codeActionsOnSave": {
"source.fixAll": true
}
}
2 changes: 1 addition & 1 deletion docs/system/top_level_architecture.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
9 changes: 9 additions & 0 deletions webapp/.prettierignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
# Ignore artifacts:
node_modules
dist
build
package-lock.json
.git

# Ignore OpenAPI generated files:
src/app/core/modules/openapi
10 changes: 10 additions & 0 deletions webapp/.prettierrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
{
"singleQuote": true,
"printWidth": 180,
"tabWidth": 2,
"useTabs": false,
"semi": true,
"bracketSpacing": true,
"trailingComma": "none",
"endOfLine": "lf"
}
2 changes: 1 addition & 1 deletion webapp/.vscode/extensions.json
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
{
// For more information, visit: https://go.microsoft.com/fwlink/?linkid=827846
"recommendations": ["angular.ng-template"]
"recommendations": ["angular.ng-template", "esbenp.prettier-vscode"]
}
76 changes: 76 additions & 0 deletions webapp/eslint.config.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,76 @@
const tsPlugin = require('@typescript-eslint/eslint-plugin');
const angularPlugin = require('@angular-eslint/eslint-plugin');
const angularTemplateParser = require('@angular-eslint/template-parser');
const typescriptParser = require('@typescript-eslint/parser');
const prettierPlugin = require('eslint-plugin-prettier');

module.exports = [
{
ignores: [
'.cache/',
'.git/',
'.github/',
'build/',
'coverage/',
'node/',
'node_modules/',
'src/app/core/modules/openapi/',
],
},
{
files: ['src/**/*.ts'],
languageOptions: {
parser: typescriptParser,
parserOptions: {
project: [
'./tsconfig.json',
'./tsconfig.app.json',
'./tsconfig.spec.json',
],
},
},
plugins: {
'@typescript-eslint': tsPlugin,
'@angular-eslint': angularPlugin,
'prettier': prettierPlugin,
},
rules: {
...prettierPlugin.configs.recommended.rules,
...tsPlugin.configs.recommended.rules,
...angularPlugin.configs.recommended.rules,
'@angular-eslint/directive-selector': [
'warn',
{
type: 'attribute',
prefix: 'app',
style: 'camelCase',
},
],
'@angular-eslint/component-selector': [
'warn',
{
type: 'element',
prefix: 'app',
style: 'kebab-case',
},
],
'@angular-eslint/prefer-standalone': 'error',
'@angular-eslint/template/prefer-ngsrc': 'error',
'@angular-eslint/template/prefer-self-closing-tags': 'error',
'@angular-eslint/template/prefer-control-flow': 'error',
},
},
{
files: ['src/**/*.html'],
languageOptions: {
parser: angularTemplateParser,
},
plugins: {
'@angular-eslint': angularPlugin,
'prettier': prettierPlugin,
},
rules: {
'prettier/prettier': ['error', { parser: 'angular' }],
},
},
];
Loading

0 comments on commit b2d392d

Please sign in to comment.