-
-
Notifications
You must be signed in to change notification settings - Fork 43
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
Breaking: Switch to ESM (fixes #35) #39
Conversation
Hi @brettz9!, thanks for the Pull Request The pull request title isn't properly formatted. We ask that you update the message to match this format, as we use it to generate changelogs and automate releases.
Read more about contributing to ESLint here |
1 similar comment
Hi @brettz9!, thanks for the Pull Request The pull request title isn't properly formatted. We ask that you update the message to match this format, as we use it to generate changelogs and automate releases.
Read more about contributing to ESLint here |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It make senses to covert conf/*
to esm
It will force a change to the API; in particular in See discussion beginning at #35 (comment) |
We for sure don’t want to change the API. The API overall is frozen, so anything we can do to avoid changes is important. |
…sion, except tests/fixtures/rules/make-syntax-error-rule.js given that ModuleResolve uses the Node Resolution Algorithm
… a plugin at least), so create require
…llup config, and align it with eslint-scope
I think this is ready for further review. It keeps the old API by using CommonJS for the conf files. |
Thanks. This is on my todo list to review! |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Prepared eslint/eslint#14865, which currently uses this branch. That should be a good test for these changes.
const Legacy = { | ||
ConfigArray, | ||
createConfigArrayFactoryContext, | ||
CascadingConfigArrayFactory, | ||
ConfigArrayFactory, | ||
ConfigDependency, | ||
ExtractedConfig, | ||
IgnorePattern, | ||
OverrideTester, | ||
getUsedExtractedConfigs, | ||
|
||
// shared | ||
ConfigOps, | ||
ConfigValidator, | ||
ModuleResolver, | ||
naming | ||
}; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It seems we should add environments here since ESLint needs that:
The exported name could be BuiltInEnvironments
?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'll add that.
Co-authored-by: Milos Djermanovic <[email protected]>
Co-authored-by: Milos Djermanovic <[email protected]>
Co-authored-by: Milos Djermanovic <[email protected]>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This looks really good @brettz9! Thanks so much for all of the hard work.
const Legacy = { | ||
ConfigArray, | ||
createConfigArrayFactoryContext, | ||
CascadingConfigArrayFactory, | ||
ConfigArrayFactory, | ||
ConfigDependency, | ||
ExtractedConfig, | ||
IgnorePattern, | ||
OverrideTester, | ||
getUsedExtractedConfigs, | ||
|
||
// shared | ||
ConfigOps, | ||
ConfigValidator, | ||
ModuleResolver, | ||
naming | ||
}; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'll add that.
Fixes #35.
main
)Note that I converted CommonJS files to use the cjs extension as per
type: module
.I can align this to any file changes on #37.