add new default files extensions#4970
Conversation
Up to standards ✅🟢 Issues
|
| Metric | Results |
|---|---|
| Duplication | 0 |
AI Reviewer: first review requested successfully. AI can make mistakes. Always validate suggestions.
TIP This summary will be updated as you push new changes.
There was a problem hiding this comment.
Pull Request Overview
While this PR expands the default file extensions to include .mjs, .jsm, and .vue, it also removes .json from the list. This removal is not mentioned in the title and constitutes a potentially breaking change for existing users. Additionally, the PR lacks unit tests to verify these modifications and omits several modern extensions like .cjs, .mts, and .cts that are relevant to the languages being addressed.
About this PR
- No unit tests were included in the PR to verify the modification of the default file list. It is critical to ensure the generator returns the expected list of files.
- No PR description was provided to explain the reasoning for these changes, particularly the removal of the .json extension.
Test suggestions
- Verify that generateFilesToAnalyze returns the new extensions (.mjs, .jsm, .vue) when no files are specified in the configuration.
- Verify that .json files are no longer included in the default list returned by generateFilesToAnalyze.
Prompt proposal for missing tests
Consider implementing these tests if applicable:
1. Verify that generateFilesToAnalyze returns the new extensions (.mjs, .jsm, .vue) when no files are specified in the configuration.
2. Verify that .json files are no longer included in the default list returned by generateFilesToAnalyze.
TIP Improve review quality by adding custom instructions
TIP How was this review? Give us feedback
| "**/*.mjs", | ||
| "**/*.jsm", | ||
| "**/*.vue", |
There was a problem hiding this comment.
🔴 HIGH RISK
Suggestion: The removal of '/*.json' from the default file list contradicts the 'add' intent specified in the title and appears to be a regression. Additionally, to fully support modern module resolution in JavaScript and TypeScript projects, consider including '/.cjs', '**/.mts', and '**/*.cts'.
Try running the following prompt in your coding agent:
In
src/configCreator.ts, update thedefaultFilesToAnalyzearray to include**/*.json,**/*.cjs,**/*.mts, and**/*.ctswhile preserving the other newly added extensions (.mjs,.jsm,.vue).
No description provided.