Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore: GEO-1263 eslint 9 settings #887

Open
wants to merge 4 commits into
base: main
Choose a base branch
from
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
9 changes: 5 additions & 4 deletions .vscode/fin-pay-transparency.code-workspace
Original file line number Diff line number Diff line change
@@ -1,25 +1,26 @@
{
"folders": [
{
"name": "infrastructure",
"path": ".."
},
{
"name": "admin-frontend",
"path": "../admin-frontend"
},
{
"name": "frontend",
"path": "../frontend"
},
{
"name": "backend",
"path": "../backend"
},
{
"path": "../doc-gen-service"
},
{
"path": "../backend-external"
},
{
"path": "../clamav-service"
}
],
"settings": {
Expand All @@ -37,7 +38,7 @@
"admin-frontend": true,
"doc-gen-service": true,
"backend-external": true,
"coverage": true
"clamav-service": true,
}
}
}
18 changes: 9 additions & 9 deletions .vscode/launch.json
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
"skipFiles": ["<node_internals>/**"],
"type": "node",
"cwd": "${workspaceFolder}/backend",
"preLaunchTask": "Launch and migrate database",
"preLaunchTask": "Launch and migrate database in container",
"outputCapture": "std",
"presentation": {
"hidden": true,
Expand Down Expand Up @@ -51,18 +51,18 @@
}
},
{
// Start clamav server which depends on clamav also running in podman.
// clamav requires quite a bit of memory and therefore isn't included with the rest by detault.
"name": "ClamAV Server",
"request": "launch",
"runtimeArgs": ["run-script", "dev"],
"runtimeExecutable": "npm",
"skipFiles": ["<node_internals>/**"],
"type": "node",
"cwd": "${workspaceFolder}/clamav-service",
"preLaunchTask": "Launch ClamAV",
"preLaunchTask": "Launch ClamAV in container",
"postDebugTask": "Stop ClamAV container",
"outputCapture": "std",
"presentation": {
"hidden": true,
"group": "Individual Servers",
"order": 1
}
Expand Down Expand Up @@ -118,8 +118,7 @@
"group": "Browser",
"order": 1
},
// This is a hack to get rid of some warnings
"resolveSourceMapLocations": [
"resolveSourceMapLocations": [ // This is a hack to get rid of some warnings
"${workspaceFolder}/**",
"!**/node_modules/**"
]
Expand Down Expand Up @@ -151,8 +150,7 @@
"group": "Browser",
"order": 1
},
// This is a hack to get rid of some warnings
"resolveSourceMapLocations": [
"resolveSourceMapLocations": [ // This is a hack to get rid of some warnings
"${workspaceFolder}/**",
"!**/node_modules/**"
]
Expand All @@ -176,6 +174,7 @@
"Frontend Server",
"Admin-Frontend Server",
"DocGenService Server",
"ClamAV Server",
"Open All URLs (No Debugging)"
],
"stopAll": true,
Expand All @@ -196,7 +195,8 @@
"Backend-External Server",
"Frontend Server",
"Admin-Frontend Server",
"DocGenService Server"
"DocGenService Server",
"ClamAV Server"
],
"stopAll": true,
"presentation": {
Expand Down
32 changes: 26 additions & 6 deletions .vscode/tasks.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,16 +4,23 @@
{
// This starts the database container and performs the Flyway
// migration to get the database uptodate with the latest changes.
"label": "Launch and migrate database",
"label": "Launch and migrate database in container",
"type": "shell",
"command": "podman-compose up -d database-migrations",
"command": "podman compose up -d database-migrations",
"problemMatcher": []
},
{
// This creates a new temporary container in podman to run clamav.
"label": "Launch ClamAV",
// This starts a container in podman to run clamav.
"label": "Launch ClamAV in container",
"type": "shell",
"command": "podman run --rm -d -p 3310:3310 --name 'clamav' clamav/clamav",
"command": "podman compose up -d clamav",
"problemMatcher": []
},
{
// Stop clamav (becuase it's a memory hog)
"label": "Stop ClamAV container",
"type": "shell",
"command": "podman compose stop clamav",
"problemMatcher": []
},
{
Expand All @@ -39,7 +46,20 @@
"args": [
"-NoProfile",
"-Command",
"$jobs = @(); Get-ChildItem -Directory | ForEach-Object { $dir = $_.FullName; $packageJsonPath = Join-Path -Path $dir -ChildPath \"package.json\"; if (Test-Path $packageJsonPath) { $jobs += Start-Job -ScriptBlock { param ($dir); Write-Host -ForegroundColor Yellow \"Running 'npm install' in $dir\"; Push-Location $dir; npm install; Pop-Location; } -ArgumentList $dir }}; $jobs | ForEach-Object { $job = $_; $job | Wait-Job; $job | Receive-Job; $job | Remove-Job; }; Write-Host -ForegroundColor Green \"All npm install jobs have completed.\""
"$jobs = @();",
"Get-ChildItem -Directory | ForEach-Object {",
"$dir = $_.FullName;",
"$packageJsonPath = Join-Path -Path $dir -ChildPath \"package.json\";",
"if (Test-Path $packageJsonPath) {",
"$jobs += Start-Job -ScriptBlock {",
"param ($dir);",
"Write-Host -ForegroundColor Yellow \"Running 'npm install' in $dir\";",
"Push-Location $dir;",
"npm install;",
"Pop-Location; }",
"-ArgumentList $dir }};",
"$jobs | ForEach-Object { $job = $_; $job | Wait-Job; $job | Receive-Job; $job | Remove-Job; };",
"Write-Host -ForegroundColor Green \"All npm install jobs have completed.\""
],
"problemMatcher": []
}
Expand Down
20 changes: 20 additions & 0 deletions admin-frontend/eslint.config.mjs
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
// @ts-check
import globals from 'globals';
import pluginJs from '@eslint/js';
import tseslint from 'typescript-eslint';
import pluginVue from 'eslint-plugin-vue';
import eslintConfigPrettier from 'eslint-config-prettier';

export default tseslint.config(
{ languageOptions: { globals: globals.browser } },
pluginJs.configs.recommended,
...tseslint.configs.recommended,
...pluginVue.configs['flat/recommended'],
eslintConfigPrettier,
{
files: ['**/*.vue'],
languageOptions: {
parserOptions: { parser: tseslint.parser },
},
},
);
Loading
Loading