Initial commit

This commit is contained in:
2026-03-12 12:43:56 +01:00
commit f733dee856
137 changed files with 51192 additions and 0 deletions

47
.claude/hooks/lint.cjs Normal file
View File

@@ -0,0 +1,47 @@
const { execSync } = require('child_process')
const path = require('path')
const PROJECT_ROOT = path.resolve(__dirname, '../..')
let input = ''
process.stdin.on('data', chunk => { input += chunk })
process.stdin.on('end', () => {
try {
const data = JSON.parse(input)
const filePath = data.tool_input?.file_path
if (!filePath) process.exit(0)
const ext = path.extname(filePath).toLowerCase()
if (ext === '.php') {
try {
const result = execSync(
`php vendor/bin/phpstan analyse "${filePath}" --level=5 --no-progress --error-format=raw`,
{ cwd: PROJECT_ROOT, encoding: 'utf8', timeout: 30000 }
)
if (result.trim()) {
process.stderr.write('[PHPStan]\n' + result.trim() + '\n')
}
} catch (e) {
if (e.stdout?.trim()) {
process.stderr.write('[PHPStan]\n' + e.stdout.trim() + '\n')
}
}
}
if (['.js', '.jsx'].includes(ext) && filePath.includes('src')) {
try {
execSync(
`npx eslint "${filePath}" --max-warnings 0`,
{ cwd: PROJECT_ROOT, encoding: 'utf8', timeout: 30000 }
)
} catch (e) {
if (e.stdout?.trim()) {
process.stderr.write('[ESLint]\n' + e.stdout.trim() + '\n')
}
}
}
} catch {
// JSON parse error - ignore
}
})

6
.claude/settings.json Normal file
View File

@@ -0,0 +1,6 @@
{
"enabledPlugins": {
"frontend-design@claude-plugins-official": true,
"code-review@claude-plugins-official": true
}
}

View File

@@ -0,0 +1,27 @@
{
"permissions": {
"allow": [
"Bash(npm run:*)",
"Bash(rm:*)",
"Bash(cp:*)",
"Bash(mv:*)",
"Bash(mkdir:*)",
"Bash(diff:*)",
"Bash(mysql:*)",
"Bash(sed:*)",
"Bash(npx eslint:*)",
"Bash(php:*)",
"Bash(npm install:*)",
"Bash(grep:*)",
"Bash(composer require:*)",
"Bash(vendor/bin/phpcs:*)",
"Bash(vendor/bin/phpcbf:*)",
"Bash(vendor/bin/phpstan analyse:*)",
"Bash(wc:*)",
"Read(//tmp/**)",
"Bash(read f:*)",
"Bash(find D:\\\\Weby\\\\BOHA Website\\\\New\\\\api:*)",
"Bash(find:*)"
]
}
}