Skip to content

Rename .prettierrc.js to .prettierrc.cjs when "type": "module" is set #79

@SandroMiguel

Description

@SandroMiguel

When installing eslint-config-cecilia in a project with "type": "module" defined in package.json, the .prettierrc.js file will fail to load due to module type mismatch.
This happens because Prettier expects the config to be in CommonJS format, but .js files are treated as ESM in such projects.

Suggested fix:
During install, if "type": "module" is detected, create .prettierrc.cjs instead of .js

This would improve compatibility with modern ESM-based projects

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions