-
-
Notifications
You must be signed in to change notification settings - Fork 3k
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
chore: enable ESLint's recommended JS rules #5282
base: main
Are you sure you want to change the base?
chore: enable ESLint's recommended JS rules #5282
Conversation
spy(); | ||
done(); | ||
}, 50); | ||
}, 10); |
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 tweaked this to have a bit smaller of a total setTimeout
time.
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.
Everything else looks good so I'm happy to approve, but I'm too new to comment on this one, hoping someone else can weigh in to confirm no breaking changes or anything!
spy(); | ||
done(); | ||
}, 50); | ||
}, 10); |
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.
Everything else looks good so I'm happy to approve, but I'm too new to comment on this one, hoping someone else can weigh in to confirm no breaking changes or anything!
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 we should go with neostandard instead of continue to customize our own. Mocha used to be a standard
linted project
@voxpelli I don't see why we need to block this in the meantime. Are there specific lint rules from the ESLint recommended set that you don't think we should enable? I personally don't like big conglomeration projects like neostandard. I find them to conflate logical rules with stylistic ones, and obfuscate the differences by presenting a single unified config area. I might not be correct and am certainly open to the discussion - but I think there's going to be back-and-forth on whether to use neostandard. If anything, I would think enabling the ESLint recommended rules would help onboard to neostandard, no? Either:
|
I don't see the reluctance to move to neostandard – both me and @Uzlopak was pro that in #5281 (comment) and we both use it in our other projects such as As such: Why should we spend time setting up different rules and possibly diverging mocha from what it was prior to #5060 ? Isn't that just a waste of time that may in turn cause even more waste of time?
Not true with
There is no relation between ESLint recommended and neostandard at all – any subset / superset is completely coincidental – I do not believe ESLint recommended is a subset |
Heh, this confuses me. Are you saying there are rules in ESLint's recommended set that you wouldn't want enabled? I'm not clear on how this answers #5282 (comment) - what work do you see as likely needing to be undone if+when Mocha switches to neostandard? Especially given:
(ACK, thanks - I had misinterpreted. Filed neostandard/neostandard#273) |
@@ -20,6 +20,8 @@ module.exports = [ | |||
sourceType: 'script' | |||
}, | |||
rules: { | |||
'no-empty': 'off', | |||
'no-redeclare': 'off', | |||
'no-var': '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.
This would be a TODO for a subsequent PR, to keep the diff small.
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.
And no-var
for sure!
Marking as blocked per discussion in #5301. |
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.
Can't spend more time on this, either create a PR of your own if there's any interest in neostandard or just merge this and disregard that.
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 guess I have to approve to get rid of the blocker
PR Checklist
status: accepting prs
Overview
Fixes all the
no-unused-vars
complaints, and suppresses the rules that would be more intricate to fix.