Skip to content

chore: bump root lint and formatting devDependencies - #129

Open
jeremytsng wants to merge 1 commit into
mainfrom
chore/bump-root-dev-tooling
Open

chore: bump root lint and formatting devDependencies#129
jeremytsng wants to merge 1 commit into
mainfrom
chore/bump-root-dev-tooling

Conversation

@jeremytsng

@jeremytsng jeremytsng commented Aug 6, 2026

Copy link
Copy Markdown
Contributor

Explanation

Bumps the root lint/format devDependencies to current ranges: eslint-plugin-import-x, eslint-plugin-jest, eslint-plugin-jsdoc, eslint-plugin-n, eslint-plugin-prettier, eslint-plugin-promise, prettier. Root-only tooling; no package code changes.

Two required follow-ons included:

  • eslint-plugin-n ≥17.24 flags import.meta.dirname as unsupported under engines.node: >=20 (needs Node ≥20.11). Replaced with dirname(fileURLToPath(import.meta.url)) in eslint.config.mjs. This was latent on main — any lockfile refresh would have broken yarn lint.
  • New eslint-plugin-import-x pulls unrs-resolver; added to the LavaMoat allow-scripts denylist.

eslint-import-resolver-typescript intentionally stays at ^3.6.3 — 4.x violates the peer range of @metamask/eslint-config-typescript@15. @lavamoat/allow-scripts is left untouched.

Verified: yarn lint, yarn build, yarn test all green.

References

N/A

Checklist

  • I've updated the test suite for new or updated code as appropriate
  • I've updated documentation (JSDoc, Markdown, etc.) for new or updated code as appropriate
  • I've communicated my changes to consumers by updating changelogs for packages I've changed
  • I've introduced breaking changes in this PR and have prepared draft pull requests for clients and consumer packages to resolve them

@jeremytsng
jeremytsng requested review from a team as code owners August 6, 2026 08:13
@socket-security

socket-security Bot commented Aug 6, 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
Updatedeslint-plugin-promise@​7.2.1 ⏵ 7.3.0100 +110010083100
Updatedeslint-plugin-import-x@​4.6.1 ⏵ 4.17.199 +1100100 +187 -2100
Updatedeslint-plugin-prettier@​5.2.1 ⏵ 5.5.6100 +110010091 -1100
Updatedeslint-plugin-n@​17.15.1 ⏵ 17.24.09810010092 -2100
Updatedeslint-plugin-jsdoc@​50.6.1 ⏵ 50.8.099 +110010096 +1100
Updatedprettier@​3.4.2 ⏵ 3.9.698 +1410097 +197100
Updatedeslint-plugin-jest@​28.10.0 ⏵ 28.14.099 +1100100 +199 +3100

View full report

@socket-security

socket-security Bot commented Aug 6, 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 Low
Potential code anomaly (AI signal): npm eslint-plugin-import-x is 65.0% likely to have a medium risk anomaly

Notes: No obvious malware behavior (no network, filesystem, or credential access) is present in this snippet. However, the rule performs dynamic evaluation using node:vm on attacker-controlled text taken directly from the source file’s leading comments. In a supply-chain/tooling context (e.g., linting untrusted code), this creates a meaningful toolchain execution risk even though the intention is validation. Primary risk is execution/side effects during linting, not runtime compromise of the shipped package.

Confidence: 0.65

Severity: 0.52

From: package.jsonnpm/eslint-plugin-import-x@4.17.1

ℹ 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/eslint-plugin-import-x@4.17.1. 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 prettier is 60.0% likely to have a medium risk anomaly

Notes: No direct evidence of embedded malware (no eval/new Function, no credential theft, no obvious backdoor/persistence, no explicit network exfiltration) is visible in this fragment. The dominant security concern is supply-chain/execution risk: the code dynamically imports and executes formatter plugins based on user/config-supplied plugin identifiers and resolution rooted at process.cwd(). Additionally, it can read/write local files (including writing formatted output back to caller-specified paths) and uses predictable temp JSON files that may be susceptible to interference in shared environments. Security posture depends heavily on whether plugin inputs and file paths are trusted/validated and whether dependency/plugin resolution is constrained.

Confidence: 0.60

Severity: 0.55

From: package.jsonnpm/prettier@3.9.6

ℹ 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/prettier@3.9.6. 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

@jeremytsng
jeremytsng marked this pull request as draft August 6, 2026 10:09
@jeremytsng
jeremytsng marked this pull request as ready for review August 11, 2026 07:12
@jeremytsng
jeremytsng deployed to default-branch August 11, 2026 07:12 — with GitHub Actions Active
Bump eslint-plugin-import-x, eslint-plugin-jest, eslint-plugin-jsdoc,
eslint-plugin-n, eslint-plugin-prettier, eslint-plugin-promise, and
prettier to current ranges.
eslint-import-resolver-typescript stays at ^3.6.3 to satisfy the peer
range of @metamask/eslint-config-typescript@15.

eslint-plugin-n >=17.24 tracks import.meta.dirname, which requires
Node >=20.11 and violates n/no-unsupported-features/node-builtins under
engines.node >=20. Replace it with dirname(fileURLToPath(import.meta.url))
in eslint.config.mjs.

New eslint-plugin-import-x pulls unrs-resolver, added to the LavaMoat
allow-scripts denylist.
@jeremytsng
jeremytsng force-pushed the chore/bump-root-dev-tooling branch from 992a5f4 to 27e3f78 Compare August 11, 2026 07:24
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.

1 participant