Skip to content

Fix lint:cjs to explicitly ignore package.json and package-lock.json#8001

Merged
pelikhan merged 5 commits intomain-9969beee31b5f93ffrom
copilot/update-lint-ignore-files
Dec 28, 2025
Merged

Fix lint:cjs to explicitly ignore package.json and package-lock.json#8001
pelikhan merged 5 commits intomain-9969beee31b5f93ffrom
copilot/update-lint-ignore-files

Conversation

Copy link
Contributor

Copilot AI commented Dec 28, 2025

The lint:cjs npm script was not consistently ignoring package.json and package-lock.json files across all contexts, causing CI failures when these files didn't match prettier's formatting expectations.

Changes

  • Added explicit --ignore-path ../../../.prettierignore flag to format:cjs and lint:cjs scripts in actions/setup/js/package.json

Context

The root .prettierignore already contains patterns for package.json and package-lock.json, but prettier wasn't consistently applying them when run from the actions/setup/js subdirectory. Other scripts in the same package.json (format:pkg-json, check:pkg-json) already use this explicit ignore-path pattern.

- "lint:cjs": "npx prettier --check '**/*.cjs' '**/*.ts' '**/*.json'",
+ "lint:cjs": "npx prettier --check '**/*.cjs' '**/*.ts' '**/*.json' --ignore-path ../../../.prettierignore",
Original prompt

Reference: https://github.com/githubnext/gh-aw/actions/runs/20556731587/job/59041958931#step:6:1

lint:cjs should ignore package.json and package-lock.json files


✨ Let Copilot coding agent set things up for you — coding agent works faster and does higher quality work when set up for your repo.

Copilot AI and others added 4 commits December 28, 2025 17:04
Updated format:cjs and lint:cjs scripts in actions/setup/js/package.json to explicitly reference the root .prettierignore file using --ignore-path flag. This ensures package.json and package-lock.json files are consistently ignored during linting and formatting operations.

Co-authored-by: pelikhan <4175913+pelikhan@users.noreply.github.com>
Co-authored-by: pelikhan <4175913+pelikhan@users.noreply.github.com>
Co-authored-by: pelikhan <4175913+pelikhan@users.noreply.github.com>
Copilot AI changed the title [WIP] Update lint:cjs to ignore package.json and package-lock.json Fix lint:cjs to explicitly ignore package.json and package-lock.json Dec 28, 2025
Copilot AI requested a review from pelikhan December 28, 2025 17:10
@pelikhan pelikhan marked this pull request as ready for review December 28, 2025 17:12
@pelikhan pelikhan merged commit 17dd46e into main-9969beee31b5f93f Dec 28, 2025
@pelikhan pelikhan deleted the copilot/update-lint-ignore-files branch December 28, 2025 17:12
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