Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/workflows/frontend.yml
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ jobs:
strategy:
fail-fast: true
matrix:
node-version: [ 22 ]
node-version: [ 22, 24 ]
os: [ ubuntu-latest ]
runs-on: ${{ matrix.os }}
steps:
Expand Down
4 changes: 2 additions & 2 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -39,8 +39,8 @@
<!-- see https://mvnrepository.com/artifact/org.springframework.boot/spring-boot-starter-logging/3.5.8 -->
<logback.classic.version>1.5.21</logback.classic.version>

<node.version>v22.4.1</node.version>
<npm.version>10.8.1</npm.version>
<node.version>v22.21.1</node.version>
<npm.version>10.9.4</npm.version>

<skip.gpg>false</skip.gpg>
<reuseForks>true</reuseForks>
Expand Down
9 changes: 0 additions & 9 deletions simulator-ui/.eslintignore

This file was deleted.

99 changes: 0 additions & 99 deletions simulator-ui/.eslintrc.json

This file was deleted.

10 changes: 10 additions & 0 deletions simulator-ui/.prettierignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
node_modules
package-lock.json
.git

# Generated by jhipster:java-simple-application:maven
target
.mvn

# Generated by jhipster:client
target/classes/static/
20 changes: 8 additions & 12 deletions simulator-ui/.prettierrc
Original file line number Diff line number Diff line change
@@ -1,20 +1,16 @@
# Prettier configuration

printWidth: 140
singleQuote: true
tabWidth: 2
useTabs: false

# js and ts rules:
arrowParens: avoid

# jsx and tsx rules:
bracketSameLine: false

overrides:
- files: "*.html"
options:
parser: angular
- files: "*.java"
options:
tabWidth: 4
plugins:
- prettier-plugin-packagejson

overrides:
- files: "*.json"
options:
trailingComma: none
- prettier-plugin-java
11 changes: 6 additions & 5 deletions simulator-ui/angular.json
Original file line number Diff line number Diff line change
Expand Up @@ -23,10 +23,10 @@
"customWebpackConfig": {
"path": "./webpack/webpack.custom.js"
},
"outputPath": "target/classes/static/simulator-ui",
"outputPath": "target/classes/static/",
"index": "src/main/webapp/index.html",
"main": "src/main/webapp/main.ts",
"polyfills": ["zone.js"],
"polyfills": ["@angular/localize/init"],
"tsConfig": "tsconfig.app.json",
"inlineStyleLanguage": "scss",
"assets": [
Expand Down Expand Up @@ -58,7 +58,7 @@
{
"type": "anyComponentStyle",
"maximumWarning": "2kb",
"maximumError": "320kb"
"maximumError": "400kb"
}
]
},
Expand All @@ -77,7 +77,7 @@
"builder": "@angular-builders/custom-webpack:dev-server",
"options": {
"buildTarget": "citrus-simulator:build:development",
"port": 4200
"port": 9060
},
"configurations": {
"production": {
Expand All @@ -92,7 +92,8 @@
"test": {
"builder": "@angular-builders/jest:run",
"options": {
"configPath": "jest.conf.js"
"configPath": "jest.conf.js",
"tsConfig": "tsconfig.spec.json"
}
}
}
Expand Down
148 changes: 148 additions & 0 deletions simulator-ui/eslint.config.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,148 @@
import eslint from '@eslint/js';
// For a detailed explanation, visit: https://github.com/angular-eslint/angular-eslint/blob/main/docs/CONFIGURING_FLAT_CONFIG.md
import angular from 'angular-eslint';
import { defineConfig } from 'eslint/config';
import prettier from 'eslint-plugin-prettier/recommended';
import globals from 'globals';
import tseslint from 'typescript-eslint';
// jhipster-needle-eslint-add-import - JHipster will add additional import here

export default defineConfig(
{
languageOptions: {
globals: {
...globals.node,
},
},
},
{ ignores: ['.npm/', 'node_modules/'] },
{ ignores: ['src/main/java/', 'src/main/resources/'] },
{ ignores: ['target/classes/static/', 'target/'] },
eslint.configs.recommended,
{
files: ['**/*.{js,cjs,mjs}'],
rules: {
'no-unused-vars': ['error', { argsIgnorePattern: '^_' }],
},
},
{
files: ['src/main/webapp/**/*.ts'],
extends: [...tseslint.configs.strictTypeChecked, ...tseslint.configs.stylistic, ...angular.configs.tsRecommended],
languageOptions: {
globals: {
...globals.browser,
},
parserOptions: {
project: ['./tsconfig.app.json', './tsconfig.spec.json'],
},
},
processor: angular.processInlineTemplates,
rules: {
'@angular-eslint/component-selector': [
'error',
{
type: 'element',
prefix: 'app',
style: 'kebab-case',
},
],
'@angular-eslint/directive-selector': [
'error',
{
type: 'attribute',
prefix: 'jhi',
style: 'camelCase',
},
],
'@angular-eslint/relative-url-prefix': 'error',
'@typescript-eslint/consistent-type-definitions': 'off',
'@typescript-eslint/explicit-function-return-type': ['error', { allowExpressions: true }],
'@typescript-eslint/explicit-module-boundary-types': 'off',
'@typescript-eslint/member-ordering': [
'error',
{
default: [
'public-static-field',
'protected-static-field',
'private-static-field',
'public-instance-field',
'protected-instance-field',
'private-instance-field',
'constructor',
'public-static-method',
'protected-static-method',
'private-static-method',
'public-instance-method',
'protected-instance-method',
'private-instance-method',
],
},
],
'@typescript-eslint/no-confusing-void-expression': 'off',
'@typescript-eslint/no-empty-object-type': 'off',
'@typescript-eslint/no-explicit-any': 'off',
'@typescript-eslint/no-extraneous-class': 'off',
'@typescript-eslint/no-misused-spread': 'off',
'@typescript-eslint/no-floating-promises': 'off',
'@typescript-eslint/no-non-null-assertion': 'off',
'@typescript-eslint/no-shadow': ['error'],
'@typescript-eslint/no-unnecessary-condition': 'error',
'@typescript-eslint/no-unsafe-argument': 'off',
'@typescript-eslint/no-unsafe-assignment': 'off',
'@typescript-eslint/no-unsafe-call': 'off',
'@typescript-eslint/no-unsafe-member-access': 'off',
'@typescript-eslint/no-unused-vars': 'off',
'@typescript-eslint/prefer-nullish-coalescing': 'error',
'@typescript-eslint/prefer-optional-chain': 'error',
'@typescript-eslint/restrict-template-expressions': ['error', { allowNumber: true }],
'@typescript-eslint/unbound-method': 'off',
'arrow-body-style': 'error',
curly: 'error',
eqeqeq: ['error', 'always', { null: 'ignore' }],
'guard-for-in': 'error',
'no-bitwise': 'error',
'no-caller': 'error',
'no-console': ['error', { allow: ['warn', 'error'] }],
'no-eval': 'error',
'no-labels': 'error',
'no-new': 'error',
'no-new-wrappers': 'error',
'object-shorthand': ['error', 'always', { avoidExplicitReturnArrows: true }],
radix: 'error',
'spaced-comment': ['warn', 'always'],
},
},
{
files: ['src/main/webapp/**/*.spec.ts'],
rules: {
'@typescript-eslint/no-empty-function': 'off',
},
},
{
files: ['**/*.html'],
extends: [...angular.configs.templateRecommended, ...angular.configs.templateAccessibility],
rules: {
'@angular-eslint/template/click-events-have-key-events': 'off',
'@angular-eslint/template/interactive-supports-focus': 'off',
},
},
{
files: ['tests/**/*.ts'],
extends: [...tseslint.configs.strictTypeChecked, ...tseslint.configs.stylistic],
languageOptions: {
globals: {
...globals.browser,
},
parserOptions: {
project: ['./tsconfig.spec.json'],
},
},
rules: {
'@typescript-eslint/no-floating-promises': 'error',
},
},
// jhipster-needle-eslint-add-config - JHipster will add additional config here
{
extends: [prettier],
},
);
13 changes: 4 additions & 9 deletions simulator-ui/jest.conf.js
Original file line number Diff line number Diff line change
@@ -1,22 +1,17 @@
const { pathsToModuleNameMapper } = require('ts-jest');
import config from './tsconfig.json' with { type: 'json' };

const {
compilerOptions: { paths = {}, baseUrl = './' },
} = require('./tsconfig.json');
const environment = require('./webpack/environment');
const { baseUrl = './' } = config.compilerOptions;

module.exports = {
export default {
transformIgnorePatterns: ['node_modules/(?!.*\\.mjs$|dayjs/esm)'],
resolver: 'jest-preset-angular/build/resolvers/ng-jest-resolver.js',
globals: {
...environment,
__VERSION__: 'test',
},
roots: ['<rootDir>', `<rootDir>/${baseUrl}`],
modulePaths: [`<rootDir>/${baseUrl}`],
setupFiles: ['jest-date-mock'],
cacheDirectory: '<rootDir>/target/jest-cache',
coverageDirectory: '<rootDir>/target/test-results/',
moduleNameMapper: pathsToModuleNameMapper(paths, { prefix: `<rootDir>/${baseUrl}/` }),
reporters: [
'default',
['jest-junit', { outputDirectory: '<rootDir>/target/test-results/', outputName: 'TESTS-results-jest.xml' }],
Expand Down
Loading
Loading