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
Migrate lib/index
to ESM
#7159
Migrate lib/index
to ESM
#7159
Conversation
|
This is now ready for 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.
LGTM! Thanks for your continued work on this!
@@ -3,21 +3,21 @@ | |||
const checkAgainstRule = require('./utils/checkAgainstRule.cjs'); | |||
const createPlugin = require('./createPlugin.cjs'); | |||
const createStylelint = require('./createStylelint.cjs'); | |||
const formatters = require('./formatters/index.cjs'); | |||
const index$1 = require('./formatters/index.cjs'); |
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'm definitely not the biggest fan of index
and index$1
, though since this is internal only to this file (i.e. it gets renamed on export as stylelint
) and is auto-generated, I think this is fine (i.e. not merge-blocking).
I do wonder if we can set some sort of rollup configuration option to change how these identifiers are generated? But very low-priority work.
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 searched for an option you thought, but unfortunately, I cannot find it. (Please let me know if you find it instead 🙏🏼 )
https://rollupjs.org/configuration-options/
The simplest way could be to rename from formatters/index.mjs
to formatters.mjs
, but I'd like to avoid doing it for now so that we could easily trace commit history.
Ref #5291
This PR needs to wait for the merge of:
lib/postcssPlugin
to ESM #7152lib/standalone
to ESM #7158