Skip to content

Conversation

@DMarinhoCodacy
Copy link
Contributor

No description provided.

codacy-production[bot]

This comment was marked as outdated.

Copy link

@codacy-production codacy-production bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

Small change: added a files array to the generated ESLint config to include many file extensions (js/jsx/ts/tsx/mjs/cjs/vue). No Codacy issues were raised. Review focuses on correctness, maintainability, and potential missing extensions or escaping concerns.

About this PR

Good to restrict rules to specific file types. Ensure this list matches the project's actual source file types (e.g., .jsx/.tsx usage, .mjs/.cjs presence). Consider centralizing the extensions list if used elsewhere to avoid duplication.
Low risk | High confidence


💡 Codacy uses AI. Check for mistakes.

func CreateEslintConfig(toolsConfigDir string, configuration []domain.PatternConfiguration) error {
result := `export default [
{
files: ["**/*.js", "**/*.jsx", "**/*.ts", "**/*.tsx", "**/*.mjs", "**/*.cjs", "**/*.vue"],

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

[Suggestion] You added files: ["**/*.js", "**/*.jsx", "**/*.ts", "**/*.tsx", "**/*.mjs", "**/*.cjs", "**/*.vue"]. Confirm that: (1) you want to include both .mjs and .cjs (commonjs vs ESM) — including both is fine but unnecessary if your repo uses only one; (2) any other extensions (e.g. .cts/.mts, .jsx in .tsx projects, or framework specific extensions) are not needed. If this list may grow, extract into a constant or a small helper to keep the template string clearer.

Medium risk | Medium confidence

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants