Skip to content

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

@JoshuaKGoldberg

Description

@JoshuaKGoldberg

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. 🙃

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    Status

    No status

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions