2025-10-03 11:57:01 +02:00
|
|
|
#!/usr/bin/env sh
|
feat(ponder): Add strict ESLint + Prettier with pre-commit hooks (#52)
- Install eslint, @typescript-eslint plugins, prettier, husky, lint-staged
- Configure ESLint flat config with TypeScript parser
- Enforce: no-explicit-any (with exceptions), no-unused-vars, naming-convention, prefer-const, no-console
- Set style: 2-space indent, 140 char max-len, disable complexity rules
- Configure Prettier: single quotes, 140 width, trailing commas
- Setup husky pre-commit hook to auto-fix and format on commit
- Replace console.log/warn with context.logger.info/warn in handlers
- Remove console.log from ponder.config.ts (replaced with comment)
- Add npm scripts: lint, lint:fix, format, format:check
- All lint rules pass without warnings
resolvel #45
Co-authored-by: johba <johba@harb.eth>
Reviewed-on: https://codeberg.org/johba/harb/pulls/52
2025-10-04 15:37:26 +02:00
|
|
|
. "$(dirname -- "$0")/_/husky.sh"
|
2025-10-03 16:51:44 +02:00
|
|
|
set -e
|
|
|
|
|
|
2025-10-04 15:17:09 +02:00
|
|
|
if [ -d "onchain" ]; then
|
|
|
|
|
(cd onchain && npx lint-staged)
|
|
|
|
|
fi
|
|
|
|
|
|
2025-10-03 16:51:44 +02:00
|
|
|
if [ -d "kraiken-lib" ]; then
|
|
|
|
|
(cd kraiken-lib && npx lint-staged)
|
|
|
|
|
fi
|
|
|
|
|
|
2025-10-04 15:40:30 +02:00
|
|
|
if [ -d "services/txnBot" ]; then
|
|
|
|
|
(cd services/txnBot && npx lint-staged)
|
|
|
|
|
fi
|
|
|
|
|
|
2025-10-03 16:51:44 +02:00
|
|
|
if [ -d "web-app" ]; then
|
|
|
|
|
(cd web-app && npx lint-staged)
|
|
|
|
|
fi
|
feat(ponder): Add strict ESLint + Prettier with pre-commit hooks (#52)
- Install eslint, @typescript-eslint plugins, prettier, husky, lint-staged
- Configure ESLint flat config with TypeScript parser
- Enforce: no-explicit-any (with exceptions), no-unused-vars, naming-convention, prefer-const, no-console
- Set style: 2-space indent, 140 char max-len, disable complexity rules
- Configure Prettier: single quotes, 140 width, trailing commas
- Setup husky pre-commit hook to auto-fix and format on commit
- Replace console.log/warn with context.logger.info/warn in handlers
- Remove console.log from ponder.config.ts (replaced with comment)
- Add npm scripts: lint, lint:fix, format, format:check
- All lint rules pass without warnings
resolvel #45
Co-authored-by: johba <johba@harb.eth>
Reviewed-on: https://codeberg.org/johba/harb/pulls/52
2025-10-04 15:37:26 +02:00
|
|
|
|
|
|
|
|
if [ -d "services/ponder" ]; then
|
|
|
|
|
(cd services/ponder && npx lint-staged)
|
|
|
|
|
fi
|