fix(storage): correct column priority types and setup pre-push hook

- Fix Storage.tsx using number priorities instead of string literals
- Move husky configuration to repository root for proper git hook support
- Add package.json/lock.json to root (un-ignore in .gitignore)
- Configure pre-push hook to run type-check before push
This commit is contained in:
rcourtman
2025-12-26 12:21:37 +00:00
parent a5d92d5359
commit 3eedbff6e6
7 changed files with 70 additions and 29 deletions

3
.gitignore vendored
View File

@@ -103,8 +103,7 @@ testing-tools/*
manual-test*.md
verify-*.md
test-*.md
package.json
package-lock.json
*.test.js
*.test.md
screenshots/

0
frontend-modern/.husky/pre-push → .husky/pre-push Normal file → Executable file
View File

View File

@@ -27,7 +27,6 @@
"eslint": "^8.57.0",
"eslint-config-prettier": "^9.0.0",
"eslint-plugin-solid": "^0.14.0",
"husky": "^9.1.7",
"jsdom": "^24.1.0",
"postcss": "^8.4.0",
"prettier": "^3.3.0",
@@ -3761,22 +3760,6 @@
"node": ">= 14"
}
},
"node_modules/husky": {
"version": "9.1.7",
"resolved": "https://registry.npmjs.org/husky/-/husky-9.1.7.tgz",
"integrity": "sha512-5gs5ytaNjBrh5Ow3zrvdUUY+0VxIuWVL4i9irt6friV+BqdCfmV11CQTWMiBYWHbXhco+J1kHfTOUkePhCDvMA==",
"dev": true,
"license": "MIT",
"bin": {
"husky": "bin.js"
},
"engines": {
"node": ">=18"
},
"funding": {
"url": "https://github.com/sponsors/typicode"
}
},
"node_modules/iconv-lite": {
"version": "0.6.3",
"resolved": "https://registry.npmjs.org/iconv-lite/-/iconv-lite-0.6.3.tgz",

View File

@@ -25,8 +25,7 @@
"lint": "eslint \"src/**/*.{ts,tsx}\"",
"lint:fix": "eslint \"src/**/*.{ts,tsx}\" --fix",
"format": "prettier --write \"src/**/*.{ts,tsx,css,json}\"",
"format:check": "prettier --check \"src/**/*.{ts,tsx,css,json}\"",
"prepare": "husky"
"format:check": "prettier --check \"src/**/*.{ts,tsx,css,json}\""
},
"dependencies": {
"@solidjs/router": "^0.10.10",
@@ -47,7 +46,6 @@
"eslint": "^8.57.0",
"eslint-config-prettier": "^9.0.0",
"eslint-plugin-solid": "^0.14.0",
"husky": "^9.1.7",
"jsdom": "^24.1.0",
"postcss": "^8.4.0",
"prettier": "^3.3.0",
@@ -57,4 +55,4 @@
"vite-plugin-solid": "^2.8.0",
"vitest": "^3.2.4"
}
}
}

View File

@@ -65,12 +65,12 @@ const Storage: Component = () => {
// Column definitions for storage table
const STORAGE_COLUMNS: ColumnDef[] = [
{ id: 'type', label: 'Type', priority: 3, toggleable: true },
{ id: 'content', label: 'Content', priority: 4, toggleable: true },
{ id: 'status', label: 'Status', priority: 2, toggleable: true },
{ id: 'shared', label: 'Shared', priority: 5, toggleable: true },
{ id: 'free', label: 'Free', priority: 4, toggleable: true },
{ id: 'total', label: 'Total', priority: 3, toggleable: true },
{ id: 'type', label: 'Type', priority: 'secondary', toggleable: true },
{ id: 'content', label: 'Content', priority: 'supplementary', toggleable: true },
{ id: 'status', label: 'Status', priority: 'primary', toggleable: true },
{ id: 'shared', label: 'Shared', priority: 'detailed', toggleable: true },
{ id: 'free', label: 'Free', priority: 'supplementary', toggleable: true },
{ id: 'total', label: 'Total', priority: 'secondary', toggleable: true },
];
// Column visibility management

32
package-lock.json generated Normal file
View File

@@ -0,0 +1,32 @@
{
"name": "pulse",
"version": "1.0.0",
"lockfileVersion": 3,
"requires": true,
"packages": {
"": {
"name": "pulse",
"version": "1.0.0",
"license": "ISC",
"devDependencies": {
"husky": "^9.1.7"
}
},
"node_modules/husky": {
"version": "9.1.7",
"resolved": "https://registry.npmjs.org/husky/-/husky-9.1.7.tgz",
"integrity": "sha512-5gs5ytaNjBrh5Ow3zrvdUUY+0VxIuWVL4i9irt6friV+BqdCfmV11CQTWMiBYWHbXhco+J1kHfTOUkePhCDvMA==",
"dev": true,
"license": "MIT",
"bin": {
"husky": "bin.js"
},
"engines": {
"node": ">=18"
},
"funding": {
"url": "https://github.com/sponsors/typicode"
}
}
}
}

29
package.json Normal file
View File

@@ -0,0 +1,29 @@
{
"name": "pulse",
"version": "1.0.0",
"description": "<div align=\"center\"> <img src=\"docs/images/pulse-logo.svg\" alt=\"Pulse Logo\" width=\"120\" /> <h1>Pulse</h1> <p><strong>Real-time monitoring for Proxmox, Docker, and Kubernetes infrastructure.</strong></p>",
"main": "index.js",
"directories": {
"doc": "docs",
"test": "tests"
},
"scripts": {
"test": "echo \"Error: no test specified\" && exit 1",
"prepare": "husky"
},
"repository": {
"type": "git",
"url": "git+https://github.com/rcourtman/Pulse.git"
},
"keywords": [],
"author": "",
"license": "ISC",
"type": "commonjs",
"bugs": {
"url": "https://github.com/rcourtman/Pulse/issues"
},
"homepage": "https://github.com/rcourtman/Pulse#readme",
"devDependencies": {
"husky": "^9.1.7"
}
}