mirror of
https://codeberg.org/beerbrawl/beerbrawl.git
synced 2024-09-22 21:20:52 +02:00
chore: frontend: update prettier
Signed-off-by: Christoph Heiss <christoph@c8h4.io>
This commit is contained in:
parent
75ff5fdb14
commit
ff4002fbe3
|
@ -2,7 +2,7 @@
|
|||
|
||||
## First Steps
|
||||
|
||||
Navigate to the root folder of the project and execute `npm install`. Based on the *package.json* file, npm will download all required node_modules to run an Angular application.
|
||||
Navigate to the root folder of the project and execute `npm install`. Based on the _package.json_ file, npm will download all required node_modules to run an Angular application.
|
||||
Afterwards, execute `npm install -g @angular/cli` to install the Angular CLI globally.
|
||||
|
||||
## Development
|
||||
|
|
8
frontend/package-lock.json
generated
8
frontend/package-lock.json
generated
|
@ -63,7 +63,7 @@
|
|||
"karma-jasmine": "5.1.0",
|
||||
"karma-jasmine-html-reporter": "2.1.0",
|
||||
"nyc": "^17.0.0",
|
||||
"prettier": "^3.3.2",
|
||||
"prettier": "^3.3.3",
|
||||
"puppeteer": "^22.11.2",
|
||||
"ts-node": "10.9.2",
|
||||
"typescript": "5.4.5"
|
||||
|
@ -15585,9 +15585,9 @@
|
|||
}
|
||||
},
|
||||
"node_modules/prettier": {
|
||||
"version": "3.3.2",
|
||||
"resolved": "https://registry.npmjs.org/prettier/-/prettier-3.3.2.tgz",
|
||||
"integrity": "sha512-rAVeHYMcv8ATV5d508CFdn+8/pHPpXeIid1DdrPwXnaAdH7cqjVbpJaT5eq4yRAFU/lsbwYwSF/n5iNrdJHPQA==",
|
||||
"version": "3.3.3",
|
||||
"resolved": "https://registry.npmjs.org/prettier/-/prettier-3.3.3.tgz",
|
||||
"integrity": "sha512-i2tDNA0O5IrMO757lfrdQZCc2jPNDVntV0m/+4whiDfWaTKfMNgR7Qz0NAeGz/nRqF4m5/6CLzbP4/liHt12Ew==",
|
||||
"dev": true,
|
||||
"bin": {
|
||||
"prettier": "bin/prettier.cjs"
|
||||
|
|
|
@ -71,7 +71,7 @@
|
|||
"karma-jasmine": "5.1.0",
|
||||
"karma-jasmine-html-reporter": "2.1.0",
|
||||
"nyc": "^17.0.0",
|
||||
"prettier": "^3.3.2",
|
||||
"prettier": "^3.3.3",
|
||||
"puppeteer": "^22.11.2",
|
||||
"ts-node": "10.9.2",
|
||||
"typescript": "5.4.5"
|
||||
|
|
|
@ -80,7 +80,7 @@ export class InfoscreenKnockoutPhaseTreeComponent implements OnInit {
|
|||
? ['winner']
|
||||
: node.id === matchId && parentTeam && node.team && parentTeam.id !== node.team.id
|
||||
? ['loser']
|
||||
: node.preceedingStandings?.flatMap(n => findNodeById(n, node.team)) ?? ['loser'];
|
||||
: (node.preceedingStandings?.flatMap(n => findNodeById(n, node.team)) ?? ['loser']);
|
||||
|
||||
const [targetNode] = findNodeById(this.tree);
|
||||
|
||||
|
@ -99,7 +99,7 @@ export class InfoscreenKnockoutPhaseTreeComponent implements OnInit {
|
|||
findNode = (node: KoStandingDto, matchId: number): KoStandingDto[] =>
|
||||
node.id === matchId
|
||||
? [node]
|
||||
: node.preceedingStandings?.flatMap(n => this.findNode(n, matchId)) ?? [];
|
||||
: (node.preceedingStandings?.flatMap(n => this.findNode(n, matchId)) ?? []);
|
||||
|
||||
isBeginnerNode(preceedingStandings: KoStandingDto[] | undefined): boolean {
|
||||
return !preceedingStandings || preceedingStandings.length === 0;
|
||||
|
|
|
@ -55,7 +55,7 @@ export class EditKnockoutPhaseTreeComponent implements OnInit {
|
|||
const getTeamsFromTree = (node: KoStandingDto): TeamDto[] =>
|
||||
node.team
|
||||
? [node.team, ...(node.preceedingStandings?.flatMap(getTeamsFromTree) ?? [])]
|
||||
: node.preceedingStandings?.flatMap(getTeamsFromTree) ?? [];
|
||||
: (node.preceedingStandings?.flatMap(getTeamsFromTree) ?? []);
|
||||
|
||||
const map = new Map<number, TeamDto>();
|
||||
for (const team of getTeamsFromTree(this.tree)) {
|
||||
|
@ -174,12 +174,12 @@ export class EditKnockoutPhaseTreeComponent implements OnInit {
|
|||
findNode = (node: KoStandingDto, matchId: number): KoStandingDto[] =>
|
||||
node.id === matchId
|
||||
? [node]
|
||||
: node.preceedingStandings?.flatMap(n => this.findNode(n, matchId)) ?? [];
|
||||
: (node.preceedingStandings?.flatMap(n => this.findNode(n, matchId)) ?? []);
|
||||
|
||||
findParentNode = (node: KoStandingDto, matchId: number): KoStandingDto[] =>
|
||||
node.preceedingStandings?.some(n => n.id === matchId)
|
||||
? [node]
|
||||
: node.preceedingStandings?.flatMap(n => this.findParentNode(n, matchId)) ?? [];
|
||||
: (node.preceedingStandings?.flatMap(n => this.findParentNode(n, matchId)) ?? []);
|
||||
|
||||
canSelectMatchWinner = (matchId: number) => {
|
||||
if (!this.tree) {
|
||||
|
|
|
@ -9,15 +9,15 @@ module.exports = function (config) {
|
|||
require('karma-chrome-launcher'),
|
||||
require('karma-jasmine-html-reporter'),
|
||||
require('karma-coverage-istanbul-reporter'),
|
||||
require('@angular-devkit/build-angular/plugins/karma')
|
||||
require('@angular-devkit/build-angular/plugins/karma'),
|
||||
],
|
||||
client: {
|
||||
clearContext: false // leave Jasmine Spec Runner output visible in browser
|
||||
clearContext: false, // leave Jasmine Spec Runner output visible in browser
|
||||
},
|
||||
coverageIstanbulReporter: {
|
||||
dir: require('path').join(__dirname, '../coverage'),
|
||||
reports: ['html', 'lcovonly'],
|
||||
fixWebpackSourcePaths: true
|
||||
fixWebpackSourcePaths: true,
|
||||
},
|
||||
reporters: ['progress', 'kjhtml'],
|
||||
port: 9876,
|
||||
|
@ -25,6 +25,6 @@ module.exports = function (config) {
|
|||
logLevel: config.LOG_INFO,
|
||||
autoWatch: true,
|
||||
browsers: ['Chrome'],
|
||||
singleRun: false
|
||||
singleRun: false,
|
||||
});
|
||||
};
|
||||
|
|
Loading…
Reference in a new issue