Implement shared eslint config through devenv

This commit is contained in:
Arnie 2024-10-25 23:47:55 +02:00
parent 4124de9311
commit 31eebd8dab
2 changed files with 10 additions and 0 deletions

1
.gitignore vendored
View File

@ -17,6 +17,7 @@
/app/frontend/.pnp /app/frontend/.pnp
/app/frontend/.pnp.js /app/frontend/.pnp.js
/app/frontend/.dependency-graph /app/frontend/.dependency-graph
/app/frontend/eslint.shared.mjs
# testing # testing
/app/frontend/coverage /app/frontend/coverage

View File

@ -23,6 +23,10 @@
inherit version; inherit version;
pname = "cv"; pname = "cv";
src = ./app/frontend; src = ./app/frontend;
preBuild = ''
cp ${nix.lib.eslint-config-file} ./eslint.shared.mjs
npm run check
'';
npmInstallFlags = "--no-audit --no-progress --no-fund"; npmInstallFlags = "--no-audit --no-progress --no-fund";
npmDepsHash = "sha256-p4rTpy0t8aajbubvtF1TA83/FFqvfKEOPBb5T0ZRfQY="; npmDepsHash = "sha256-p4rTpy0t8aajbubvtF1TA83/FFqvfKEOPBb5T0ZRfQY=";
npmPackFlags = [ "--ignore-scripts" ]; npmPackFlags = [ "--ignore-scripts" ];
@ -82,6 +86,11 @@
pkgs.go pkgs.go
pkgs.nodejs_22 pkgs.nodejs_22
]; ];
enterShell = ''
cp ${nix.lib.eslint-config-file} ./app/frontend/eslint.shared.mjs
'';
scripts = { scripts = {
# Override golangci-lint for vscode, because the extension incorrectly assumes usage of global binaries is preferred # Override golangci-lint for vscode, because the extension incorrectly assumes usage of global binaries is preferred
golangci-lint = { golangci-lint = {