Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

lint-staged #356

Closed
mob8607 opened this issue Jan 16, 2024 · 2 comments
Closed

lint-staged #356

mob8607 opened this issue Jan 16, 2024 · 2 comments

Comments

@mob8607
Copy link
Collaborator

mob8607 commented Jan 16, 2024

As soon as some files are staged the npm run lint-staged command throws following error:

ReferenceError: module is not defined in ES module scope
This file is being treated as an ES module because it has a '.js' file extension and 'vue-template/package.json' contains "type": "module". To treat it as a CommonJS script, rename it to use the '.cjs' file extension.
@patric-eberle
Copy link
Member

Note: this error will also be shown if you try to commit.

@patric-eberle
Copy link
Member

In my opinion it should be able to fix this by using export default ... instead of module.exports.

mob8607 added a commit that referenced this issue Jan 18, 2024
mob8607 added a commit that referenced this issue Jan 18, 2024
@mob8607 mob8607 mentioned this issue Jan 18, 2024
12 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants