Commit Graph

4 Commits

Author SHA1 Message Date
imfozilbek
a34ca85241 chore: refactor hardcoded values to constants (v0.5.1)
Major internal refactoring to eliminate hardcoded values and improve
maintainability. Guardian now fully passes its own quality checks!

Changes:
- Extract all RepositoryViolation messages to domain constants
- Extract all framework leak template strings to centralized constants
- Extract all layer paths to infrastructure constants
- Extract all regex patterns to IMPORT_PATTERNS constant
- Add 30+ new constants for better maintainability

New files:
- src/infrastructure/constants/paths.ts (layer paths, patterns)
- src/domain/constants/Messages.ts (25+ repository messages)
- src/domain/constants/FrameworkCategories.ts (framework categories)
- src/shared/constants/layers.ts (layer names)

Impact:
- Reduced hardcoded values from 37 to 1 (97% improvement)
- Guardian passes its own src/ directory checks with 0 violations
- All 292 tests still passing (100% pass rate)
- No breaking changes - fully backwards compatible

Test results:
- 292 tests passing (100% pass rate)
- 96.77% statement coverage
- 83.82% branch coverage
2025-11-24 20:12:08 +05:00
imfozilbek
1d22a7d070 chore: update ESLint and Prettier configuration
Update code formatting and linting rules for guardian package.
Ensure consistent code style across monorepo.
2025-11-24 02:55:10 +05:00
imfozilbek
6fe90a708b chore: add comment style rules to eslint config
Add ESLint rules to enforce comment style:
- Require space after // in single-line comments
- Prefer JSDoc style for multi-line comments
- Warn on TODO/FIXME/HACK comments
- Update documentation with comment style guide
2025-11-23 21:42:51 +05:00
imfozilbek
5e9477cd21 chore: configure code quality tools
Add EditorConfig for consistent editor settings, Prettier for formatting (4-space indentation), ESLint with TypeScript rules, and linting documentation
2025-11-23 21:19:34 +05:00