Skip to content

chore: add allowScripts field to package.json#489

Merged
lumirlumir merged 2 commits into
eslint:mainfrom
Chaejy:chore-add-allowscripts
Jul 19, 2026
Merged

chore: add allowScripts field to package.json#489
lumirlumir merged 2 commits into
eslint:mainfrom
Chaejy:chore-add-allowscripts

Conversation

@Chaejy

@Chaejy Chaejy commented Jul 19, 2026

Copy link
Copy Markdown
Contributor

Prerequisites checklist

AI acknowledgment

  • I did not use AI to generate this PR.
  • (If the above is not checked) I have reviewed the AI-generated content before submitting.

What is the purpose of this pull request?

Add the allowScripts field to package.json for the npm install scripts policy, following the same approach as the PR for eslint/eslint.

What changes did you make? (Give an overview)

Starting with npm 12, install scripts that aren't covered by allowScripts are blocked by default. On a fresh install, three packages are blocked: yorkie and fsevents (×2, macOS-only).

This PR allows only yorkie, since it's the only one whose install script is actually required — it installs the git hooks, so when it's blocked the pre-commit hook is never created and lint-staged no longer runs on commit.

fsevents is intentionally left out: its install script isn't required, and the module still loads and works correctly without it.

I left the entry unpinned ("yorkie": true) since this repository commits package-lock.json, so the version is already locked. I'd be happy to pin it if reviewers prefer.

Related Issues

Is there anything you'd like reviewers to focus on?

Verified on npm 12.0.1 / Node.js v24.18.0 (rm -rf node_modules && npm install):

  • Without allowScripts, yorkie is blocked and .git/hooks/pre-commit is missing.
  • With "yorkie": true, yorkie runs and the hook is created.
  • fsevents loads correctly even while its install script stays blocked.

I'd appreciate any feedback on whether fsevents should be handled explicitly, and on the unpinned-vs-pinned decision.

@linux-foundation-easycla

linux-foundation-easycla Bot commented Jul 19, 2026

Copy link
Copy Markdown

CLA Signed
The committers listed above are authorized under a signed CLA.

  • ✅ login: Chaejy / name: Jiyeon (0538fa0)

@netlify

netlify Bot commented Jul 19, 2026

Copy link
Copy Markdown

Deploy Preview for eslint-code-explorer ready!

Name Link
🔨 Latest commit 49d067c
🔍 Latest deploy log https://app.netlify.com/projects/eslint-code-explorer/deploys/6a5ceea3d26f1f0009f1524a
😎 Deploy Preview https://deploy-preview-489--eslint-code-explorer.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.
🤖 Make changes Run an agent on this branch

To edit notification comments on pull requests, go to your Netlify project configuration.

@eslintbot eslintbot added this to Triage Jul 19, 2026
@github-project-automation github-project-automation Bot moved this to Needs Triage in Triage Jul 19, 2026
@lumirlumir lumirlumir moved this from Needs Triage to Triaging in Triage Jul 19, 2026

@lumirlumir lumirlumir left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Thanks for opening this PR. This change makes sense to me, but I left one comment.

Comment thread package.json Outdated
@lumirlumir lumirlumir added the accepted There is consensus among the team that this change meets the criteria for inclusion label Jul 19, 2026
Co-authored-by: lumir <yonghyeon0324@gmail.com>

@lumirlumir lumirlumir left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

LGTM, thanks!

@lumirlumir
lumirlumir merged commit f32136f into eslint:main Jul 19, 2026
9 checks passed
@github-project-automation github-project-automation Bot moved this from Triaging to Complete in Triage Jul 19, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

accepted There is consensus among the team that this change meets the criteria for inclusion chore

Projects

Status: Complete

Development

Successfully merging this pull request may close these issues.

3 participants