Fix Code Style
Run Prettier and ESLint to automatically format and fix code issues.
Steps
- •
Run ESLint with auto-fix:
bashpnpm lint
- •
Run Prettier (if needed for non-JS/TS files):
bashpnpm exec prettier --write "**/*.{json,css,md,yml,yaml}"
For Specific Files
If user specifies a file or pattern:
bash
pnpm exec prettier --write <path> npx eslint --fix <path>
Notes
- •ESLint handles .ts/.tsx/.js/.jsx files
- •Prettier handles JSON, CSS, Markdown, YAML
- •Both are run by lint-staged on commit automatically