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

Enable linting of *.cjs and *.mjs files #1057

Merged
merged 1 commit into from
Jan 2, 2023
Merged

Conversation

dominykas
Copy link
Contributor

Closes #1053 - I had the code lying around, so I may as well make it public... Happy to close this if this is not useful :)

overrides: [
{
files: ['*.cjs'],
parserOptions: { sourceType: 'script' }
Copy link
Contributor Author

Choose a reason for hiding this comment

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

This was necessary for the should lint ESM files test - now that cjs is also being scanned, the test needed an update, but it was also complaining that use strict is not necessary, because it was getting parsed as a module. TBH, I didn't have time to properly figure out why - eslint should be doing this by default for *.cjs files...

But this does unblock further improvements, I'd hope.

@devinivy devinivy added this to the 25.1.0 milestone Jan 2, 2023
@devinivy
Copy link
Member

devinivy commented Jan 2, 2023

Looks great, thanks again @dominykas!

@devinivy devinivy merged commit 5284408 into hapijs:master Jan 2, 2023
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.

Lint .mjs (et al)
2 participants