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

Use ESM eslint config files #5263

Merged
merged 1 commit into from
Jun 27, 2022
Merged

Use ESM eslint config files #5263

merged 1 commit into from
Jun 27, 2022

Conversation

benmccann
Copy link
Member

I'm not sure why this uses .cjs files. Maybe a holdover from an old version of eslint

@changeset-bot
Copy link

changeset-bot bot commented Jun 24, 2022

🦋 Changeset detected

Latest commit: c90e9a3

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 1 package
Name Type
create-svelte Patch

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

@Rich-Harris
Copy link
Member

oh nice i didn't realise they supported ESM now

@Rich-Harris Rich-Harris merged commit 500067b into master Jun 27, 2022
@Rich-Harris Rich-Harris deleted the eslint-esm branch June 27, 2022 17:20
This was referenced Jun 27, 2022
oekazuma added a commit to oekazuma/kit that referenced this pull request Jun 28, 2022
@avarun42
Copy link
Contributor

does this actually work? making this change in my own SvelteKit project results in the error:

Error [ERR_REQUIRE_ESM]: require() of ES Module /Users/varun/code/application/.eslintrc.js from /Users/varun/code/application/node_modules/@eslint/eslintrc/dist/eslintrc.cjs not supported.
Instead change the require of .eslintrc.js in /Users/varun/code/application/node_modules/@eslint/eslintrc/dist/eslintrc.cjs to a dynamic import() which is available in all CommonJS modules.

The ESLint docs also state:

JavaScript (ESM) - use .eslintrc.cjs when running ESLint in JavaScript packages that specify "type":"module" in their package.json. Note that ESLint does not support ESM configuration at this time.

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.

3 participants