Skip to content

chore: align Node.js config with Node.js ESLint config - #10

Merged
Mrtenz merged 3 commits into
mainfrom
mrtenz/eslint-rules-nodejs
Sep 18, 2026
Merged

Mrtenz merged 3 commits into
mainfrom
mrtenz/eslint-rules-nodejs

Conversation

@Mrtenz

@Mrtenz Mrtenz commented Sep 14, 2026

Copy link
Copy Markdown
Member

This pull request aligns the Node.js oxlint config with the Node.js ESLint config.

Rules not natively implemented in Oxlint are enabled via eslint-plugin-n, loaded as a JS plugin using the jsPlugins option.

Rules not added

The following rules from the ESLint config are not added to the oxlint config, and why.

Rule Reason
n/no-missing-import Disabled in the ESLint config
n/no-missing-require Disabled in the ESLint config
n/no-restricted-import Requires explicit restrictions to be configured — not applicable without configuration
n/no-restricted-require Requires explicit restrictions to be configured — not applicable without configuration
n/no-unsupported-features/es-syntax Disabled in the ESLint config
n/no-process-exit Replaced by unicorn/no-process-exit
no-restricted-globals Not needed — the Node.js environment already excludes browser globals

@Mrtenz
Mrtenz added this pull request to stack #9 September 14, 2026 13:17
@socket-security

socket-security Bot commented Sep 14, 2026 •

Copy link
Copy Markdown

Review the following changes in direct dependencies. Learn more about Socket for GitHub.

Diff Package Supply Chain
Security
Vulnerability Quality Maintenance License
Addedeslint-plugin-n@​18.3.09810010095100

View full report

@socket-security

socket-security Bot commented Sep 14, 2026 •

Copy link
Copy Markdown

Warning

MetaMask internal reviewing guidelines:

  • Do not ignore-all
  • Each alert has instructions on how to review if you don't know what it means. If lost, ask your Security Liaison or the supply-chain group
  • Copy-paste ignore lines for specific packages or a group of one kind with a note on what research you did to deem it safe.
    @SocketSecurity ignore npm/PACKAGE@VERSION
Action Severity Alert  (click "▶" to expand/collapse)
Warn Medium
Network access: npm eslint-plugin-n in module globalThis["fetch"]

Module: globalThis["fetch"]

Location: Package overview

From: package.json → npm/eslint-plugin-n@18.3.0

ℹ Read more on: This package | This alert | What is network access?

Next steps: Take a moment to review the security alert above. Review the linked package source code to understand the potential risk. Ensure the package is not malicious before proceeding. If you're unsure how to proceed, reach out to your security team or ask the Socket team for help at support@socket.dev.

Suggestion: Packages should remove all network access that is functionally unnecessary. Consumers should audit network access to ensure legitimate use.

Mark the package as acceptable risk. To ignore this alert only in this pull request, reply with the comment @SocketSecurity ignore npm/eslint-plugin-n@18.3.0. You can also ignore all packages with @SocketSecurity ignore-all. To ignore an alert for all future pull requests, use Socket's Dashboard to change the triage state of this alert.

Warn Low
Potential code anomaly (AI signal): npm tapable is 62.0% likely to have a medium risk anomaly

Notes: No overt malicious behavior (no IO, network, filesystem, credential access, or persistence) is present in this fragment. The main security concern is that it uses runtime code generation (new Function) and emits executable JavaScript assembled from options-driven metadata (args/taps/interceptors). If these configuration fields or any emitted expressions are attacker-influenced, it can enable arbitrary code execution in the host. Even with safe codegen, executing provided taps/interceptors means malicious plugins can run arbitrary code with the caller’s privileges.

Confidence: 0.62

Severity: 0.56

From: package.json → npm/eslint-plugin-n@18.3.0 → npm/tapable@2.3.3

ℹ Read more on: This package | This alert | What is an AI-detected potential code anomaly?

Next steps: Take a moment to review the security alert above. Review the linked package source code to understand the potential risk. Ensure the package is not malicious before proceeding. If you're unsure how to proceed, reach out to your security team or ask the Socket team for help at support@socket.dev.

Suggestion: An AI system found a low-risk anomaly in this package. It may still be fine to use, but you should check that it is safe before proceeding.

Mark the package as acceptable risk. To ignore this alert only in this pull request, reply with the comment @SocketSecurity ignore npm/tapable@2.3.3. You can also ignore all packages with @SocketSecurity ignore-all. To ignore an alert for all future pull requests, use Socket's Dashboard to change the triage state of this alert.

View full report

@Mrtenz
Mrtenz marked this pull request as ready for review September 14, 2026 13:38
@Mrtenz
Mrtenz force-pushed the mrtenz/eslint-rules-nodejs branch from 42afc56 to 7d463aa Compare September 15, 2026 09:10
@Mrtenz
Mrtenz force-pushed the mrtenz/eslint-rules-nodejs branch 2 times, most recently from 77d4c9f to 47a6364 Compare September 16, 2026 13:40
@Mrtenz
Mrtenz force-pushed the mrtenz/eslint-rules-nodejs branch from 78e4ea0 to 7bf4468 Compare September 17, 2026 11:12

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

The snapshot file seems out of date as it does not include any n/* rules 🤔

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.

Unfortunately JS plugin rules don't show up in this snapshot. 😕 May need to rethink the way we generate these.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Hmm okay. This just makes it difficult to compare the total set of rules in this PR to the total set in the eslint-config-nodejs package.

@mcmire mcmire Sep 18, 2026 •

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

But yes it looks like there is a bug report about this here: oxc-project/oxc#22117. There is also a PR to fix this here: oxc-project/oxc#26143

@mcmire mcmire Sep 18, 2026 •

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Anyway, getting back to this. It appears that unlike the ESLint config, we are not extending from the recommended set of rules, so the rules we're using are all the rules we're using. Is that right? If so, then this looks good.

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.

Yes, that's right.

@Mrtenz
Mrtenz force-pushed the mrtenz/eslint-rules-nodejs branch from 7bf4468 to 1e444e9 Compare September 18, 2026 11:19
@Mrtenz
Mrtenz force-pushed the mrtenz/eslint-rules-nodejs branch from 1e444e9 to 2df1a0b Compare September 18, 2026 11:48
@Mrtenz
Mrtenz force-pushed the mrtenz/eslint-rules-nodejs branch from 2df1a0b to 997cff0 Compare September 18, 2026 15:05
@Mrtenz
Mrtenz force-pushed the mrtenz/eslint-rules-nodejs branch from 997cff0 to 6ee8c7b Compare September 18, 2026 16:14
Base automatically changed from mrtenz/eslint-rules-jest to main September 18, 2026 16:16
@Mrtenz
Mrtenz force-pushed the mrtenz/eslint-rules-nodejs branch from 6ee8c7b to 15fb908 Compare September 18, 2026 16:16
@Mrtenz
Mrtenz merged commit 1521841 into main Sep 18, 2026
8 checks passed
@Mrtenz
Mrtenz deleted the mrtenz/eslint-rules-nodejs branch September 18, 2026 16:17
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.

2 participants