-
Notifications
You must be signed in to change notification settings - Fork 5
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 to ESLint 9 and flat configs #20
Conversation
08e2bc5
to
9e31960
Compare
9e31960
to
90abb64
Compare
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.
Could you explain how the "errors" / "no errors" is supposed to work? I see that you commented out all errors. Would such a test fail if the line did not yield the particular error?
"scripts": { | ||
"test": "eslint ." | ||
"test": "npm-run-all test:*", | ||
"test:browser": "eslint browser --config browser/eslint.config.js --report-unused-disable-directives", |
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.
Smart.
As far as I understand, the errors specs contain overrides which are reported if eslint does not use them, cf. #20 (review) So if I have a snippet below, the script will report unused directive: const life = 42; // eslint-disable-line no-unused-vars
console.log(life); |
I spent quite some time trying to dig how eslint@9 handles overrides / globals. My goal was to write a test case that would pass with I propose that we sync (knowledge exchange) on the topic later this week @philippfromme. Seems to be of inherent complexity 🙈 |
Ok, I went on to drastically simplify this PR. From what it looks like 9be702a is a requirement to properly (later on) be able to have simple, per branch configurations. @barmac @philippfromme Please review. |
What I'd be interested in is whether the "full ES6" style of configuring things has a negative impact in different places (i.e. when consuming in Desktop Modeler). ➡️ I guess not, because we can provide the configuration in an |
This comment was marked as outdated.
This comment was marked as outdated.
LGTM 🚀 |
028de6a
to
260738f
Compare
One more thing [required] |
OK done via decea27. Check out the comment if you want to know details. I'd say we can squash it now. |
Closes #19 Related to bpmn-io/internal-docs#1042 BREAKING CHANGE: require eslint@9 (drop support for <= eslint@8) BREAKING CHANGE: use from ESM code-base, this module is ESM only BREAKING CHANGE: consume as ES module feat!: work off react:recommended and mocha:recommended rules
Allows us to get rid of some hacks.
All cleaned up and ready to merge 🚀 |
Congratz @philippfromme and @nikku for a successful migration |
Thanks for the help, guys! 💪🏻 |
Proposed Changes
Closes #19
Checklist
To ensure you provided everything we need to look at your PR:
@bpmn-io/sr
toolCloses {LINK_TO_ISSUE}
orRelated to {LINK_TO_ISSUE}