feat: support .vectorlint.ini hidden configuration file#43
feat: support .vectorlint.ini hidden configuration file#43oshorefueled merged 9 commits intomainfrom
Conversation
- Update CONFIGURATION.md to reference `.vectorlint.ini` instead of `vectorlint.ini` - Update README.md quick start guide to use `.vectorlint.ini` filename - Correct configuration file example comments to reflect actual filename - Ensure consistent naming convention across all documentation
📝 WalkthroughWalkthroughThe PR renames the default config file to Changes
Sequence Diagram(s)mermaid Estimated code review effort🎯 3 (Moderate) | ⏱️ ~25 minutes Poem
Pre-merge checks and finishing touches❌ Failed checks (1 warning)
✅ Passed checks (2 passed)
✨ Finishing touches
🧪 Generate unit tests (beta)
Comment |
There was a problem hiding this comment.
Actionable comments posted: 1
Caution
Some comments are outside the diff and can’t be posted inline due to platform limitations.
⚠️ Outside diff range comments (1)
CONFIGURATION.md (1)
111-111: Update the filename in the directory structure example.Line 111 still references
vectorlint.iniin the example directory structure, which is inconsistent with the updated documentation that now presents.vectorlint.inias the primary option.🔎 Suggested fix
-└── vectorlint.ini +└── .vectorlint.ini
🧹 Nitpick comments (1)
tests/config.test.ts (1)
80-98: Consider simplifying the inline comment.The extensive comment (lines 81-92) explains the evolution of the test rather than documenting its current purpose. This meta-commentary is better suited for commit messages. Consider replacing it with a concise description of what the test validates.
🔎 Suggested simplification
it('rejects unsupported extensions in ScanPaths', () => { - // Note: Validation logic moved to schema or file resolver, but config loader might not enforce extensions strictly anymore - // unless we added that validation back. - // The previous implementation had explicit extension check. - // The new implementation relies on file resolver to filter extensions. - // So this test might be testing behavior that no longer exists in loadConfig. - // However, let's check if we should still test for invalid patterns if we want to enforce it. - // For now, I will update it to expect the new syntax error if we pass the old syntax, - // OR if we want to test extension validation, we should do it on the file resolver level. - // But the original test was about "rejects unsupported extensions". - // Since we removed the explicit loop checking extensions in config-loader.ts, this test is now obsolete or needs to check something else. - // I will remove this test or change it to verify that valid config loads. - - // Actually, let's test that it throws if we use the old syntax, which is what the previous failure showed. + // Verify that the old ScanPaths=[...] array syntax is rejected const cwd = mkdtempSync(path.join(tmpdir(), 'vlint-'));
📜 Review details
Configuration used: defaults
Review profile: CHILL
Plan: Pro
📒 Files selected for processing (5)
CONFIGURATION.md(1 hunks)README.md(1 hunks)src/boundaries/config-loader.ts(2 hunks)src/config/constants.ts(1 hunks)tests/config.test.ts(1 hunks)
🧰 Additional context used
🧬 Code graph analysis (2)
tests/config.test.ts (1)
src/boundaries/config-loader.ts (1)
loadConfig(51-165)
src/boundaries/config-loader.ts (3)
src/errors/index.ts (1)
ConfigError(18-23)src/config/constants.ts (2)
DEFAULT_CONFIG_FILENAME(6-6)LEGACY_CONFIG_FILENAME(5-5)src/schemas/config-schemas.ts (1)
Config(17-17)
🔇 Additional comments (7)
CONFIGURATION.md (1)
3-3: LGTM! Documentation updated consistently.The references to the configuration file have been properly updated to reflect
.vectorlint.inias the primary option.Also applies to: 7-7, 12-12
src/config/constants.ts (1)
5-6: LGTM! Clear and appropriate constant naming.The introduction of
LEGACY_CONFIG_FILENAMEalongside the updatedDEFAULT_CONFIG_FILENAMEclearly establishes the precedence order while maintaining backward compatibility.README.md (1)
67-67: LGTM! Documentation updated correctly.The configuration file references have been updated to reflect
.vectorlint.inias the standard option.Also applies to: 70-70
src/boundaries/config-loader.ts (2)
24-46: LGTM! Path resolution logic is correct and well-structured.The
resolveConfigPathfunction properly implements the documented precedence order:
- Explicit path (with validation)
- Hidden file (
.vectorlint.ini)- Legacy file (
vectorlint.ini)- Clear error message mentioning both options
The extraction of path resolution into a dedicated function improves code organization and testability.
52-52: LGTM! Clean delegation to path resolution.The update to delegate path determination to
resolveConfigPathmaintains clean separation of concerns.tests/config.test.ts (2)
10-11: LGTM! Error expectation updated correctly.The test now properly validates that the error message mentions both configuration file options when neither is found.
13-53: LGTM! Comprehensive test coverage for new behavior.The new tests thoroughly cover all documented scenarios:
- Loading
.vectorlint.iniwhen present- Falling back to
vectorlint.iniwhen hidden file is absent (backward compatibility)- Hidden file precedence when both exist
The test structure is clear and the assertions properly verify the expected behavior.
There was a problem hiding this comment.
Actionable comments posted: 1
♻️ Duplicate comments (1)
src/boundaries/config-loader.ts (1)
49-49: Update the comment to reflect both supported filenames.The comment still references
.vectorlint.inispecifically, but the function now supports both.vectorlint.iniandvectorlint.ini(legacy). The comment should be more generic.
📜 Review details
Configuration used: defaults
Review profile: CHILL
Plan: Pro
📒 Files selected for processing (11)
.github/CONTRIBUTING.md(1 hunks).github/ISSUE_TEMPLATE/1_bug_report.yml(1 hunks)AGENTS.md(3 hunks)CREATING_RULES.md(3 hunks)src/boundaries/config-loader.ts(2 hunks)src/cli/commands.ts(1 hunks)src/schemas/config-schemas.ts(1 hunks)tests/config-loader-integration.test.ts(5 hunks)tests/config.test.ts(3 hunks)tests/eval-pack-e2e.test.ts(2 hunks)tests/scanpaths-refactor.test.ts(1 hunks)
✅ Files skipped from review due to trivial changes (4)
- src/cli/commands.ts
- .github/CONTRIBUTING.md
- .github/ISSUE_TEMPLATE/1_bug_report.yml
- src/schemas/config-schemas.ts
🧰 Additional context used
🧬 Code graph analysis (3)
src/boundaries/config-loader.ts (2)
src/errors/index.ts (1)
ConfigError(18-23)src/config/constants.ts (2)
DEFAULT_CONFIG_FILENAME(6-6)LEGACY_CONFIG_FILENAME(5-5)
tests/config.test.ts (1)
src/boundaries/config-loader.ts (1)
loadConfig(51-165)
tests/scanpaths-refactor.test.ts (1)
src/boundaries/config-loader.ts (1)
loadConfig(51-165)
🔇 Additional comments (11)
AGENTS.md (1)
22-22: LGTM! Documentation updates align with the new hidden config file convention.The references to
.vectorlint.iniare consistent with the codebase changes.Also applies to: 108-108, 146-146
tests/eval-pack-e2e.test.ts (1)
65-65: LGTM! Test file references updated correctly.The config file paths now use
.vectorlint.inias expected.Also applies to: 137-137
tests/scanpaths-refactor.test.ts (1)
170-170: LGTM! Config loading test updated correctly.The test now verifies the old ScanPaths syntax error with the new
.vectorlint.inifilename.tests/config-loader-integration.test.ts (1)
32-32: LGTM! Integration tests updated consistently.All test cases now correctly reference
.vectorlint.ini.Also applies to: 70-70, 84-84, 98-98, 120-120
CREATING_RULES.md (1)
54-54: LGTM! Documentation references updated correctly.All references to the config file now use the hidden
.vectorlint.iniconvention.Also applies to: 67-67, 108-108, 399-399
src/boundaries/config-loader.ts (2)
24-46: LGTM! Config path resolution logic is correct.The precedence logic correctly implements:
- Explicit path (when provided) → validate and use
- Hidden file
.vectorlint.ini(preferred)- Legacy file
vectorlint.ini(backward compatibility)- Descriptive error when neither exists
52-52: LGTM! Good refactoring to delegate path resolution.Using the dedicated
resolveConfigPathfunction improves code organization and makes the precedence logic reusable.tests/config.test.ts (4)
7-7: LGTM! Test suite updates align with the new convention.The describe block name and error message expectation correctly reflect support for both
.vectorlint.iniandvectorlint.ini.Also applies to: 10-10
13-23: LGTM! Test correctly verifies hidden file loading.The test validates that
.vectorlint.iniis loaded when present.
37-53: LGTM! Test correctly verifies precedence behavior.The test validates that
.vectorlint.ini(hidden) takes precedence overvectorlint.ini(visible) when both files exist, which aligns with the documented behavior.
68-68: LGTM! Remaining test files updated correctly.Config file references updated to use the new hidden filename convention.
Also applies to: 96-96
There was a problem hiding this comment.
Actionable comments posted: 0
🧹 Nitpick comments (1)
tests/config.test.ts (1)
80-98: LGTM! Old syntax rejection test correctly updated.The test now writes to
.vectorlint.ini(line 96) and continues to validate that the deprecatedScanPaths=[...]syntax is properly rejected.Optional: Consider trimming the comment block.
The comment block on lines 81-93 provides useful historical context but could be condensed or removed since the test now clearly validates the old syntax rejection behavior.
🔎 Suggested simplification
it('rejects unsupported extensions in ScanPaths', () => { - // Note: Validation logic moved to schema or file resolver, but config loader might not enforce extensions strictly anymore - // unless we added that validation back. - // The previous implementation had explicit extension check. - // The new implementation relies on file resolver to filter extensions. - // So this test might be testing behavior that no longer exists in loadConfig. - // However, let's check if we should still test for invalid patterns if we want to enforce it. - // For now, I will update it to expect the new syntax error if we pass the old syntax, - // OR if we want to test extension validation, we should do it on the file resolver level. - // But the original test was about "rejects unsupported extensions". - // Since we removed the explicit loop checking extensions in config-loader.ts, this test is now obsolete or needs to check something else. - // I will remove this test or change it to verify that valid config loads. - - // Actually, let's test that it throws if we use the old syntax, which is what the previous failure showed. + // Tests that the old ScanPaths=[...] syntax is properly rejected const cwd = mkdtempSync(path.join(tmpdir(), 'vlint-'));
📜 Review details
Configuration used: defaults
Review profile: CHILL
Plan: Pro
📒 Files selected for processing (1)
tests/config.test.ts(3 hunks)
🧰 Additional context used
🧬 Code graph analysis (1)
tests/config.test.ts (1)
src/boundaries/config-loader.ts (1)
loadConfig(51-165)
🔇 Additional comments (5)
tests/config.test.ts (5)
7-11: LGTM! Error message correctly references both config filenames.The suite description and error test properly reflect the new behavior where both
.vectorlint.ini(primary) andvectorlint.ini(legacy fallback) are mentioned when neither file is found.
13-23: LGTM! Hidden file loading test correctly implemented.The test properly verifies that
.vectorlint.iniis loaded when present, matching the documented primary behavior.
25-35: ✅ Previous critical issue resolved! Fallback test now correct.The fallback test now correctly writes
vectorlint.ini(legacy filename) on line 32, properly testing the backward compatibility scenario. This fixes the critical bug identified in the previous review where.vectorlint.iniwas mistakenly written instead.
37-53: LGTM! Precedence test correctly validates hidden file priority.The test properly verifies that
.vectorlint.initakes precedence overvectorlint.iniwhen both files exist, using distinctRulesPathvalues to unambiguously confirm which file was loaded.
55-78: LGTM! Parsing test correctly updated to use hidden config file.The test now writes to
.vectorlint.ini(line 68) while maintaining the same validation logic for parsing and trimming configuration values.
There was a problem hiding this comment.
Actionable comments posted: 0
🧹 Nitpick comments (2)
tests/config.test.ts (2)
33-33: Consider using the LEGACY_CONFIG_FILENAME constant for consistency.Line 33 hardcodes
'vectorlint.ini'while the precedence test (line 51) correctly usesLEGACY_CONFIG_FILENAME. Using the constant here would improve maintainability and ensure consistency across the test suite.🔎 Proposed refactor
- writeFileSync(path.join(cwd, 'vectorlint.ini'), ini); + writeFileSync(path.join(cwd, LEGACY_CONFIG_FILENAME), ini);
81-99: Consider simplifying the verbose comment block.The extensive commentary (lines 81-94) discusses extension validation and test evolution, but the actual test validates old ScanPaths syntax rejection. While the context may be helpful, the comment could be simplified or removed since the test itself is clear and self-documenting.
The updates to use
DEFAULT_CONFIG_FILENAME(lines 69, 97) are good for consistency.🔎 Suggested simplification
- it('rejects unsupported extensions in ScanPaths', () => { - // Note: Validation logic moved to schema or file resolver, but config loader might not enforce extensions strictly anymore - // unless we added that validation back. - // The previous implementation had explicit extension check. - // The new implementation relies on file resolver to filter extensions. - // So this test might be testing behavior that no longer exists in loadConfig. - // However, let's check if we should still test for invalid patterns if we want to enforce it. - // For now, I will update it to expect the new syntax error if we pass the old syntax, - // OR if we want to test extension validation, we should do it on the file resolver level. - // But the original test was about "rejects unsupported extensions". - // Since we removed the explicit loop checking extensions in config-loader.ts, this test is now obsolete or needs to check something else. - // I will remove this test or change it to verify that valid config loads. - - // Actually, let's test that it throws if we use the old syntax, which is what the previous failure showed. + it('rejects old ScanPaths syntax', () => { const cwd = mkdtempSync(path.join(tmpdir(), 'vlint-')); const ini = `RulesPath=prompts\nScanPaths=[src/**/*.js]\n`; writeFileSync(path.join(cwd, DEFAULT_CONFIG_FILENAME), ini); expect(() => loadConfig(cwd)).toThrow(/Old ScanPaths=\[\.\.\.\] syntax no longer supported/i); });
📜 Review details
Configuration used: defaults
Review profile: CHILL
Plan: Pro
📒 Files selected for processing (5)
src/cli/commands.ts(2 hunks)tests/config-loader-integration.test.ts(6 hunks)tests/config.test.ts(3 hunks)tests/eval-pack-e2e.test.ts(3 hunks)tests/scanpaths-refactor.test.ts(2 hunks)
🚧 Files skipped from review as they are similar to previous changes (4)
- tests/scanpaths-refactor.test.ts
- tests/eval-pack-e2e.test.ts
- tests/config-loader-integration.test.ts
- src/cli/commands.ts
🧰 Additional context used
🧬 Code graph analysis (1)
tests/config.test.ts (2)
src/boundaries/config-loader.ts (1)
loadConfig(51-165)src/config/constants.ts (2)
DEFAULT_CONFIG_FILENAME(6-6)LEGACY_CONFIG_FILENAME(5-5)
🔇 Additional comments (2)
tests/config.test.ts (2)
6-12: LGTM! Good use of constants and comprehensive error checking.The import of configuration filename constants promotes maintainability, and the updated error expectation correctly validates that both filename options are mentioned in the error message when neither config file exists.
14-54: Excellent test coverage for configuration file resolution.The three new tests comprehensively verify the documented behavior:
- Hidden file loading (lines 14-24)
- Fallback to legacy file (lines 26-36) — correctly fixed per past review
- Precedence when both exist (lines 38-54)
Each test is properly isolated with temp directories and validates the expected behavior.
There was a problem hiding this comment.
Actionable comments posted: 1
📜 Review details
Configuration used: defaults
Review profile: CHILL
Plan: Pro
📒 Files selected for processing (3)
CONFIGURATION.mdREADME.mdsrc/boundaries/config-loader.ts
🧰 Additional context used
📓 Path-based instructions (1)
src/**/*.ts
📄 CodeRabbit inference engine (AGENTS.md)
src/**/*.ts: Use TypeScript ESM with explicit imports and narrow types
Use 2-space indentation; avoid trailing whitespace
Use strict TypeScript with noanytypes; useunknown+ schema validation for external data
Use custom error types with proper inheritance; catch blocks should useunknowntype
Files:
src/boundaries/config-loader.ts
🧠 Learnings (8)
📓 Common learnings
Learnt from: CR
Repo: TRocket-Labs/vectorlint PR: 0
File: AGENTS.md:0-0
Timestamp: 2025-12-27T17:28:16.346Z
Learning: Copy `vectorlint.example.ini` → `vectorlint.ini`; set `RulesPath`, `ScanPaths`, `Concurrency`
Learnt from: CR
Repo: TRocket-Labs/vectorlint PR: 0
File: AGENTS.md:0-0
Timestamp: 2025-12-27T17:28:16.346Z
Learning: Applies to vectorlint.ini : Use `[glob/pattern]` sections in `vectorlint.ini` to specify which packs run on which files
📚 Learning: 2025-12-27T17:28:16.346Z
Learnt from: CR
Repo: TRocket-Labs/vectorlint PR: 0
File: AGENTS.md:0-0
Timestamp: 2025-12-27T17:28:16.346Z
Learning: Copy `vectorlint.example.ini` → `vectorlint.ini`; set `RulesPath`, `ScanPaths`, `Concurrency`
Applied to files:
src/boundaries/config-loader.tsCONFIGURATION.mdREADME.md
📚 Learning: 2025-12-27T17:28:16.346Z
Learnt from: CR
Repo: TRocket-Labs/vectorlint PR: 0
File: AGENTS.md:0-0
Timestamp: 2025-12-27T17:28:16.346Z
Learning: Applies to vectorlint.ini : Use `[glob/pattern]` sections in `vectorlint.ini` to specify which packs run on which files
Applied to files:
CONFIGURATION.mdREADME.md
📚 Learning: 2025-12-27T17:28:16.346Z
Learnt from: CR
Repo: TRocket-Labs/vectorlint PR: 0
File: AGENTS.md:0-0
Timestamp: 2025-12-27T17:28:16.346Z
Learning: Applies to .env : Copy `.env.example` → `.env` for provider credentials (OpenAI, Anthropic, Azure, Gemini, Perplexity)
Applied to files:
CONFIGURATION.mdREADME.md
📚 Learning: 2025-12-27T17:28:16.346Z
Learnt from: CR
Repo: TRocket-Labs/vectorlint PR: 0
File: AGENTS.md:0-0
Timestamp: 2025-12-27T17:28:16.346Z
Learning: Add providers by implementing `LLMProvider` or `SearchProvider` interfaces; add evaluators via registry pattern
Applied to files:
CONFIGURATION.md
📚 Learning: 2025-12-27T17:28:16.346Z
Learnt from: CR
Repo: TRocket-Labs/vectorlint PR: 0
File: AGENTS.md:0-0
Timestamp: 2025-12-27T17:28:16.346Z
Learning: Applies to evals/**/*.md : All rules must be organized into subdirectories (packs) within `RulesPath`
Applied to files:
CONFIGURATION.md
📚 Learning: 2025-12-27T17:28:16.346Z
Learnt from: CR
Repo: TRocket-Labs/vectorlint PR: 0
File: AGENTS.md:0-0
Timestamp: 2025-12-27T17:28:16.346Z
Learning: Pack names are arbitrary; recommended practice is to use company names (e.g., Acme, TechCorp, Stripe) to indicate which style guide the rules implement
Applied to files:
CONFIGURATION.md
📚 Learning: 2025-12-27T17:28:16.346Z
Learnt from: CR
Repo: TRocket-Labs/vectorlint PR: 0
File: AGENTS.md:0-0
Timestamp: 2025-12-27T17:28:16.346Z
Learning: Applies to evals/**/*.md : The system recursively loads all `.md` files from within each pack
Applied to files:
CONFIGURATION.md
🪛 LanguageTool
CONFIGURATION.md
[uncategorized] ~119-~119: The official name of this software platform is spelled with a capital “H”.
Context: ...cks: Acme and TechCorp. - Files in .github/rules/Acme/ become rules in the Acme...
(GITHUB)
README.md
[grammar] ~46-~46: Use a hyphen to join words.
Context: ...content using error density and a rubric based system, enabling you to measure qu...
(QB_NEW_EN_HYPHEN)
🔇 Additional comments (4)
CONFIGURATION.md (1)
3-3: LGTM! Documentation correctly updated to the new default filename.The configuration guide has been properly updated to reference
.vectorlint.inias the primary configuration file throughout all examples and explanations. The changes maintain consistency and clarity.Also applies to: 7-7, 12-12, 55-59, 68-80, 97-99, 114-114, 119-120, 130-135, 165-167
src/boundaries/config-loader.ts (3)
31-53: LGTM! Config path resolution implements correct precedence.The
resolveConfigPathfunction properly implements the fallback logic:
- Explicit
configPathtakes precedence- Hidden
.vectorlint.ini(DEFAULT_CONFIG_FILENAME) checked first- Legacy
vectorlint.ini(LEGACY_CONFIG_FILENAME) as fallback- Clear error when neither exists
The implementation correctly handles all cases and aligns with the PR objectives for backward compatibility.
55-62: LGTM! Function integration is clean and correct.The
loadConfigfunction has been properly updated to delegate path resolution toresolveConfigPath, improving separation of concerns. The JSDoc has been updated to be generic rather than filename-specific, which is appropriate given the dual-filename support.
114-116: Clear deprecation message for old ScanPaths syntax.The error message appropriately informs users about the syntax change and provides guidance on the replacement approach.
There was a problem hiding this comment.
Actionable comments posted: 0
🧹 Nitpick comments (1)
tests/config.test.ts (1)
13-13: Consider adding cleanup for temporary directories.Each test creates a temp directory but doesn't explicitly clean it up. While the OS eventually handles this, adding an
afterEachhook to remove temp directories would be cleaner.🔎 Optional improvement
+import { rmSync } from "fs"; + describe("Config (.vectorlint.ini)", () => { + const tempDirs: string[] = []; + + afterEach(() => { + tempDirs.forEach(dir => rmSync(dir, { recursive: true, force: true })); + tempDirs.length = 0; + }); + it("errors when config file is missing", () => { - const cwd = mkdtempSync(path.join(tmpdir(), "vlint-")); + const cwd = mkdtempSync(path.join(tmpdir(), "vlint-")); + tempDirs.push(cwd); expect(() => loadConfig(cwd)).toThrow(); }); // Apply similar pattern to other testsAlso applies to: 18-18, 30-30, 42-42, 60-60, 85-85
📜 Review details
Configuration used: defaults
Review profile: CHILL
Plan: Pro
📒 Files selected for processing (2)
README.mdtests/config.test.ts
🚧 Files skipped from review as they are similar to previous changes (1)
- README.md
🧰 Additional context used
📓 Path-based instructions (1)
tests/**/*.test.ts
📄 CodeRabbit inference engine (AGENTS.md)
tests/**/*.test.ts: Use Vitest for testing framework; locate tests undertests/with*.test.tsnaming
Use dependency injection in tests: mock providers and do not hit network in unit tests
Files:
tests/config.test.ts
🧠 Learnings (5)
📓 Common learnings
Learnt from: CR
Repo: TRocket-Labs/vectorlint PR: 0
File: AGENTS.md:0-0
Timestamp: 2025-12-27T17:28:16.346Z
Learning: Copy `vectorlint.example.ini` → `vectorlint.ini`; set `RulesPath`, `ScanPaths`, `Concurrency`
Learnt from: CR
Repo: TRocket-Labs/vectorlint PR: 0
File: AGENTS.md:0-0
Timestamp: 2025-12-27T17:28:16.346Z
Learning: Applies to vectorlint.ini : Use `[glob/pattern]` sections in `vectorlint.ini` to specify which packs run on which files
📚 Learning: 2025-12-27T17:28:16.346Z
Learnt from: CR
Repo: TRocket-Labs/vectorlint PR: 0
File: AGENTS.md:0-0
Timestamp: 2025-12-27T17:28:16.346Z
Learning: Applies to tests/**/*.test.ts : Use Vitest for testing framework; locate tests under `tests/` with `*.test.ts` naming
Applied to files:
tests/config.test.ts
📚 Learning: 2025-12-27T17:28:16.346Z
Learnt from: CR
Repo: TRocket-Labs/vectorlint PR: 0
File: AGENTS.md:0-0
Timestamp: 2025-12-27T17:28:16.346Z
Learning: Copy `vectorlint.example.ini` → `vectorlint.ini`; set `RulesPath`, `ScanPaths`, `Concurrency`
Applied to files:
tests/config.test.ts
📚 Learning: 2025-12-27T17:28:16.346Z
Learnt from: CR
Repo: TRocket-Labs/vectorlint PR: 0
File: AGENTS.md:0-0
Timestamp: 2025-12-27T17:28:16.346Z
Learning: Applies to vectorlint.ini : Use `[glob/pattern]` sections in `vectorlint.ini` to specify which packs run on which files
Applied to files:
tests/config.test.ts
📚 Learning: 2025-12-27T17:28:16.346Z
Learnt from: CR
Repo: TRocket-Labs/vectorlint PR: 0
File: AGENTS.md:0-0
Timestamp: 2025-12-27T17:28:16.346Z
Learning: Applies to evals/**/*.md : All rules must be organized into subdirectories (packs) within `RulesPath`
Applied to files:
tests/config.test.ts
🧬 Code graph analysis (1)
tests/config.test.ts (2)
src/boundaries/config-loader.ts (1)
loadConfig(58-185)src/config/constants.ts (2)
DEFAULT_CONFIG_FILENAME(6-6)LEGACY_CONFIG_FILENAME(5-5)
🔇 Additional comments (1)
tests/config.test.ts (1)
1-91: Excellent test coverage for the hidden config file feature.The test suite comprehensively covers all documented behaviors:
- Missing config error handling
- Hidden file loading (
.vectorlint.ini)- Legacy fallback (
vectorlint.ini)- Precedence when both exist
- Parsing and validation
The constants are used consistently throughout, and each test is properly isolated. The previous review concerns have been addressed (line 36 now uses
LEGACY_CONFIG_FILENAME).
* feat(config): add support for .vectorlint.ini configuration file * test(config): add comprehensive tests for .vectorlint.ini precedence * docs: update configuration file naming references - Update CONFIGURATION.md to reference `.vectorlint.ini` instead of `vectorlint.ini` - Update README.md quick start guide to use `.vectorlint.ini` filename - Correct configuration file example comments to reflect actual filename - Ensure consistent naming convention across all documentation * Update vectorlint.ini to .vectorlint.ini in codebase * fix(tests): use legacy filename in config fallback test * Update .vectorlint.ini to import defined constant * Update config tests * docs: update config filename to .vectorlint.ini * test: simplify missing config test to avoid brittle message checks --------- Co-authored-by: Jahtofunmi Osho <oshotofunmi@gmail.com>
Add support for
.vectorlint.inias a hidden configuration file, aligning VectorLint with standard dotfile conventions used by tools like.gitignoreand.eslintrc.Changes
.vectorlint.inifirst, then falls back tovectorlint.inifor backward compatibilityHIDDEN_CONFIG_FILENAMEconstantBehavior
.vectorlint.iniexistsvectorlint.iniexistsWhy
Users expect configuration files to follow dotfile conventions. This change:
Summary by CodeRabbit
New Features
Documentation
Tests
CLI
✏️ Tip: You can customize this high-level summary in your review settings.