Skip to content
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

🛠 Repo: Enable ESLint's recommended rules for JS #5281

Open
5 tasks done
JoshuaKGoldberg opened this issue Jan 2, 2025 · 3 comments · May be fixed by #5282
Open
5 tasks done

🛠 Repo: Enable ESLint's recommended rules for JS #5281

JoshuaKGoldberg opened this issue Jan 2, 2025 · 3 comments · May be fixed by #5282
Labels
area: repository tooling concerning ease of contribution status: accepting prs Mocha can use your help with this one!

Comments

@JoshuaKGoldberg
Copy link
Member

Tooling Suggestion Checklist

Overview

Back in #5060, I'd added an ESLint config but not enabled any of the recommended rules from js.configs.recommended. The rules object is overridden by our custom settings:

mocha/eslint.config.js

Lines 11 to 26 in 3c191c0

module.exports = [
{
...js.configs.recommended,
languageOptions: {
ecmaVersion: 2020,
globals: {
...globals.browser,
...globals.node
},
sourceType: 'script'
},
rules: {
'no-var': 'off',
strict: ['error', 'global']
}
},

Additional Info

The fact that I missed this and no reviewers caught it is a testament to the ... joy of being new adopters of flat config. 🙃

@JoshuaKGoldberg JoshuaKGoldberg added area: repository tooling concerning ease of contribution status: in triage a maintainer should (re-)triage (review) this issue status: accepting prs Mocha can use your help with this one! and removed status: in triage a maintainer should (re-)triage (review) this issue labels Jan 2, 2025
@JoshuaKGoldberg JoshuaKGoldberg linked a pull request Jan 2, 2025 that will close this issue
3 tasks
@voxpelli
Copy link
Member

voxpelli commented Jan 2, 2025

Perhaps we could go with https://github.com/neostandard/neostandard as a base? Considering that semistandard was what was used before #5060 and neostandard now is an option?

@JoshuaKGoldberg
Copy link
Member Author

I'm tentatively in favor, but haven't dug into neostandard enough to have a super informed opinion. Is it a superset of ESLint's recommended JS rules, roughly? From what I've seen it seems like it'd be a good next step after this?

@Uzlopak
Copy link
Member

Uzlopak commented Jan 2, 2025

I think we should move to neostandard.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area: repository tooling concerning ease of contribution status: accepting prs Mocha can use your help with this one!
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants