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
Flat ESLint support #12679
Flat ESLint support #12679
Conversation
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 think this would be a good time to reference Eslint as a peer dependency to ensure that someone using this package also has Eslint v9 installed.
Wdyt?
This would make people that have a desire to stay on the previous version of eslint 8.57.0 got an error (after package update). As per eslint 9.0.0 they support only flat config, and other config are deprecated. We can reference it as a peer dep, but in that case most of work to make it compatible with 8.57.0 version would be useless. |
@christian-bromann I would not enforce consumers to use eslint 9+, if legacy config is still supported (which should be left supported for gradual migration) @MadSandwich could you please add more details on changes in |
Sure,
This part was changed, to implicit specify where CJS and ESM should pick up their imports.
And that part was changed, just to be sure, that written tests inside wdio still would work and rules are not affected. |
@christian-bromann what do u think, on my comments above? |
@MadSandwich the change looks good to me. It would be awesome if we could have a smoke test for this, to verify if we actually catch linting issues. However this would be out of scope and it would be fine to put this into a separate issues. One request I have is to raise the same PR to the |
@christian-bromann I will try to write some smoke test on weekend. And same PR is raised on v8 (#12716) |
@MadSandwich thanks, mind updating your branch? We have fixed some things in |
8f88e73
to
aed569d
Compare
@MadSandwich mhm .. I was hoping that your branch would pass now, mind taking a look? |
@christian-bromann for no reason it fails build for wdio-global, and the only one thing help me successfully build is return back |
@MadSandwich can you update your |
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 a ton!
Hey MadSandwich 👋 Thank you for your contribution to WebdriverIO! Your pull request has been marked as an "Expensable" contribution. We've sent you an email with further instructions on how to claim your expenses from our development fund. Please make sure to check your spam folder as well. If you have any questions, feel free to reach out to us at expense@webdriver.io or in the contributing channel on Discord. We are looking forward to more contributions from you in the future 🙌 Have a nice day, |
Proposed changes
ESLint version: 8.57.0
ESLint version: 9.0.0
What have been done: Using migration guide and some repositories where such changes was already introduced, made some changes to
index.ts
&package.json
files. Result was tested on several repositories using different types of configuration, no issues where detected, except while tested with TS (typescript-eslint/typescript-eslint#8211), it working well except it fully ignoringglobals
.To make rule work against
globals
, 'no-undef' rule should be added (TS only).p.s. I can attach screenshots with my tests, if it would help anyhow. But it would be great if somebody can take a look on it, before merge.
Types of changes
Checklist
Backport Request
//: # (The current
main
branch is the development branch for WebdriverIO v9. If your change should be released to the current major version of WebdriverIO (v8), please raise another PR with the same changes against thev8
branch.)v9
and doesn't need to be back-portedFurther comments
Reviewers: @webdriverio/project-committers