-
-
Notifications
You must be signed in to change notification settings - Fork 589
Update xo to v1.0.5 #3485
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
base: development
Are you sure you want to change the base?
Update xo to v1.0.5 #3485
Conversation
c3e48a9
to
7494c00
Compare
xo.config.js
Outdated
{ | ||
extends: [compatPlugin.configs["flat/recommended"]], | ||
languageOptions: { | ||
sourceType: "commonjs", |
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 not 100% about this change. I'd expect script
to still work, but apparently something has changed in ESLint v9 or xo and we get plenty of warnings about strict
and no-implicit-globals
without this.
no-implicit-globals
is useful, but it'd require quite refactoring. Maybe we should revisit the sourceType
later if needed.
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 works with script
if you add a rule "no-implicit-globals": "off",
and change the script
rule to strict: ["error", "global"],
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.
Yeah, but the thing is I don't want to disable the rules. They are based on the value of scriptType which works with the previous version just fine.
I'll think about it but something seems wrong somewhere since can't find a related changelog entry in ESLint.
xo.config.js
Outdated
{ | ||
extends: [compatPlugin.configs["flat/recommended"]], | ||
languageOptions: { | ||
sourceType: "commonjs", |
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 works with script
if you add a rule "no-implicit-globals": "off",
and change the script
rule to strict: ["error", "global"],
"no-negated-condition": "off", | ||
"promise/prefer-await-to-then": "off", | ||
"prefer-arrow-callback": "error", | ||
"prefer-destructuring": [ |
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.
As it's off, you can shorten it to "prefer-destructuring": "off",
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 plan to enable it later, no need to hide it all.
Signed-off-by: XhmikosR <xhmikosr@gmail.com>
Closes #3497 by superseding it.
Thank you for your contribution to the Pi-hole Community!
Please read the comments below to help us consider your Pull Request.
We are all volunteers and completing the process outlined will help us review your commits quicker.
Please make sure you
What does this PR aim to accomplish?:
How does this PR accomplish the above?:
Link documentation PRs if any are needed to support this PR:
By submitting this pull request, I confirm the following:
git rebase
)