feat : add ESLint linter to frontend with pre-commit hook
Add ESLint with @nuxt/eslint-config enforcing 4-space indentation. Add make nuxt-lint and nuxt-lint-fix targets. Add ESLint check to pre-commit hook (lint only, no auto-fix). Fix auth.vue indentation from 2 to 4 spaces. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
10
pre-commit
10
pre-commit
@@ -24,6 +24,16 @@ else
|
||||
fi
|
||||
echo "--- php-cs-fixer pre commit hook finish---"
|
||||
|
||||
echo "--- eslint pre commit hook start ---"
|
||||
make nuxt-lint
|
||||
ESLINT_RESULT=$?
|
||||
|
||||
if [ $ESLINT_RESULT -ne 0 ]; then
|
||||
echo "ESLint failed. Aborting commit."
|
||||
exit 1
|
||||
fi
|
||||
echo "--- eslint pre commit hook finished ---"
|
||||
|
||||
echo "--- phpunit pre commit hook start ---"
|
||||
make test
|
||||
PHPUNIT_RESULT=$?
|
||||
|
||||
Reference in New Issue
Block a user