Skip to content

Commit

Permalink
Fix linting and formatting
Browse files Browse the repository at this point in the history
  • Loading branch information
cskrov committed Aug 26, 2024
1 parent 079353a commit 92c529d
Show file tree
Hide file tree
Showing 7 changed files with 27 additions and 19 deletions.
11 changes: 3 additions & 8 deletions server/.vscode/launch.json
Original file line number Diff line number Diff line change
@@ -1,18 +1,13 @@
{
// Use IntelliSense to learn about possible attributes.
// Hover to view descriptions of existing attributes.
// For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387
"version": "0.2.0",
"configurations": [
{
"type": "node",
"request": "launch",
"name": "Launch Program",
"skipFiles": [
"<node_internals>/**"
],
"skipFiles": ["<node_internals>/**"],
"program": "${workspaceFolder}/dist/server.js",
"cwd": "${workspaceFolder}",
"cwd": "${workspaceFolder}"
}
]
}
}
20 changes: 18 additions & 2 deletions server/.vscode/settings.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,11 @@
"editor.defaultFormatter": "biomejs.biome",
"editor.codeActionsOnSave": {
"quickfix.biome": "always",
"source.fixAll.biome": "always",
"source.fixAll.biome": "always",
"source.organizeImports.biome": "always",
"source.addMissingImports.ts": "explicit"
},
"editor.acceptSuggestionOnCommitCharacter": false,
"typescript.validate.enable": true,
"typescript.tsdk": "node_modules/typescript/lib",
"typescript.preferences.importModuleSpecifier": "non-relative",
Expand All @@ -21,7 +22,22 @@
"liveshare.allowGuestDebugControl": true,
"liveshare.allowGuestTaskControl": true,
"liveshare.notebooks.allowGuestExecuteCells": true,
"[json][javascript][javascriptreact][typescript][typescriptreact]": {
"[typescript]": {
"editor.defaultFormatter": "biomejs.biome"
},
"[typescriptreact]": {
"editor.defaultFormatter": "biomejs.biome"
},
"[javascript]": {
"editor.defaultFormatter": "biomejs.biome"
},
"[javascriptreact]": {
"editor.defaultFormatter": "biomejs.biome"
},
"[json]": {
"editor.defaultFormatter": "biomejs.biome"
},
"[jsonc]": {
"editor.defaultFormatter": "biomejs.biome"
}
}
7 changes: 2 additions & 5 deletions server/biome.json
Original file line number Diff line number Diff line change
Expand Up @@ -48,9 +48,6 @@
}
},
"files": {
"ignore": [
".vscode/**",
"dist/**"
]
"ignore": ["dist/**"]
}
}
}
2 changes: 1 addition & 1 deletion server/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -28,4 +28,4 @@
"@types/node": "22.5.0",
"typescript": "5.5.4"
}
}
}
2 changes: 1 addition & 1 deletion server/src/plugins/health.ts
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ export const healthPlugin = fastifyPlugin(
app.get('/isReady', async (__, reply) => {
const isTokenXClientReady = getIsTokenXClientReady();

if (!oboCache.isReady && !isTokenXClientReady) {
if (!(oboCache.isReady || isTokenXClientReady)) {
log.info({ msg: 'OBO Cache and TokenX Client not ready' });

return reply.status(503).type('text/plain').send('OBO Cache and TokenX Client not ready');
Expand Down
2 changes: 1 addition & 1 deletion server/src/plugins/serve-index/remove-saksnummer.test.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { removeSaksnummer } from '@app/plugins/serve-index/remove-saksnummer';
import { describe, expect, it } from 'bun:test';
import { removeSaksnummer } from '@app/plugins/serve-index/remove-saksnummer';

describe('redirect', () => {
it('should remove the whole query when saksnummer is only param', () => {
Expand Down
2 changes: 1 addition & 1 deletion server/src/slack.ts
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ const isConfigured = url !== undefined && url.length !== 0;
export const sendToSlack = async (message: string, icon_emoji: EmojiIcons) => {
const text = `[${ENVIRONMENT}] ${messagePrefix} ${message}`;

if (!isDeployed || !isConfigured) {
if (!(isDeployed && isConfigured)) {
return;
}

Expand Down

0 comments on commit 92c529d

Please sign in to comment.