-
-
Notifications
You must be signed in to change notification settings - Fork 9
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
Update configuration for ESM #133
Conversation
We are moving to ESM on the `stylelint/stylelint` repo: stylelint/stylelint#5291
}, | ||
env: { | ||
es6: true, | ||
node: true, | ||
}, | ||
plugins: ["eslint-comments", "jest", "node", "sort-requires"], |
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.
[note] This config is needless because they are automatically set via extends
:
plugin:eslint-comments/recommended
plugin:jest/recommended
plugin:node/recommended-module
@@ -111,7 +112,6 @@ module.exports = { | |||
"prefer-rest-params": "error", | |||
"prefer-spread": "error", | |||
"prefer-template": "error", | |||
"sort-requires/sort-requires": "error", | |||
strict: ["error", "global"], | |||
"sort-imports": ["error", { allowSeparatedGroups: true }], |
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.
[note] I've enabled allowSeparatedGroups
because the pattern grouping imports by an empty line are common in our code base.
https://eslint.org/docs/rules/sort-imports#allowseparatedgroups
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.
Thanks, LGTM.
I guess we don't need to merge and release this until we're ready to work on stylelint/stylelint#5291?
Surely, it seems good to try this unpublished change on --- a/package.json
+++ b/package.json
@@ -165,7 +165,7 @@
"benchmark": "^2.1.4",
"common-tags": "^1.8.0",
"eslint": "^7.25.0",
- "eslint-config-stylelint": "^13.1.1",
+ "eslint-config-stylelint": "github:stylelint/eslint-config-stylelint#esm",
"got": "^11.8.2",
"husky": "^6.0.0",
"jest": "^27.0.1", Perhaps, we may want to update this ESLint configuration as we move forward with our ESM support. |
[`remark@14`](https://github.com/remarkjs/remark/releases/tag/14.0.0) has been supported only ESM. So, this package needs to become ESM to bump up `remark` dependencies. Here are the installation commands: ```shell npm install \ remark-cli@latest \ remark-frontmatter@latest \ remark-preset-lint-recommended@latest \ remark-preset-prettier@latest \ remark-validate-links@latest npm install 'github:stylelint/eslint-config-stylelint#esm' ``` Note that this change needs the ESLint configuration for ESM. See <stylelint/eslint-config-stylelint#133>
Yeah, might as well. Saves us having to release another version when we actually do the ESM migration. |
Thanks. I’ll proceed with the release of 14.0.0. 💪🏼 |
Related to stylelint/stylelint#5291
We are moving to ESM on the
stylelint/stylelint
repo: stylelint/stylelint#5291This update will be required for the migration.
eslint-plugin-sort-requires
with the core rulesort-imports
I think some changes may be controversial. Please give me feedback!