Skip to content

chore: enabled eslint-plugin-n#5280

Merged
JoshuaKGoldberg merged 7 commits into
mochajs:mainfrom
JoshuaKGoldberg:eslint-plugin-n
Mar 17, 2025
Merged

chore: enabled eslint-plugin-n#5280
JoshuaKGoldberg merged 7 commits into
mochajs:mainfrom
JoshuaKGoldberg:eslint-plugin-n

Conversation

@JoshuaKGoldberg
Copy link
Copy Markdown
Member

@JoshuaKGoldberg JoshuaKGoldberg commented Jan 2, 2025

PR Checklist

Overview

Adds eslint-plugin-n's recommended-script flat config. Amazingly, there were almost no reports from the core rules there. The only changes are commented inline.

Also enables n/prefer-node-protocol for the reasons mentioned in the doc. All reports were fixed with npm run lint:code -- --fix.

Comment thread docs/_data/supporters.js
@@ -1,5 +1,3 @@
#!/usr/bin/env node
Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

n/hashbang: this hashbang comment is unnecessary.

Comment thread lib/cli/cli.js
@@ -1,5 +1,3 @@
#!/usr/bin/env node
Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

n/hashbang: this hashbang comment is unnecessary.

Comment thread scripts/update-authors.js
@@ -1,12 +1,11 @@
#!/usr/bin/env node
Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

n/hashbang: this hashbang comment is unnecessary.

@JoshuaKGoldberg JoshuaKGoldberg marked this pull request as ready for review March 10, 2025 20:58
@JoshuaKGoldberg JoshuaKGoldberg requested a review from a team March 10, 2025 20:59
@JoshuaKGoldberg JoshuaKGoldberg merged commit 945d6e3 into mochajs:main Mar 17, 2025
lennonnikolas pushed a commit to lennonnikolas/mocha that referenced this pull request Jan 24, 2026
* chore: enabled eslint-plugin-n

* Actually included rules, without the override

* Revert unrelated formatting changes

* fix test/node-unit/cli/options.spec.js tests

* Use @rollup/plugin-alias for building node: prefixes
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

🛠 Repo: Enable eslint-plugin-n in ESLint config

2 participants