Commit 0ccffa3
authored
refactor(ci): enforce no-console rule in production code (JhaSourav07#601)
## Description
This PR adds an ESLint no-console rule to warn against accidental
console.log usage in production code while still allowing console.warn,
console.error, and console.info.
It also adds overrides for test files and scripts to avoid affecting
development/debug workflows.
Fixes JhaSourav07#379
---
## Pillar
- [x] Code Quality / Refactor
- [ ] Bug Fix
- [ ] Feature
- [ ] Documentation
---
## Changes Made
- Updated eslint.config.mjs
- Added no-console ESLint rule
- Allowed:
- console.warn
- console.error
- console.info
- Added overrides for:
- test files
- __tests__
- scripts/
- Verified no existing console.log usages remain in:
- lib/
- app/api/
- utils/
---
## Checklist
- [x] I have read the CONTRIBUTING.md guidelines
- [x] I ran npm run lint
- [x] I ran npm run test
- [x] I verified the production build passes
- [x] This PR is linked to an assigned issue
- [x] My changes are focused and minimal1 file changed
Lines changed: 11 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
8 | 8 | | |
9 | 9 | | |
10 | 10 | | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
11 | 22 | | |
12 | 23 | | |
13 | 24 | | |
0 commit comments