Trim dev-only lint configs from the release archive#3214
Merged
Conversation
Two tracked files slipped through export-ignore after the ESLint flat-config migration: - `.stylelintrc.json` - `eslint.config.cjs` Both are now excluded from `git archive`. Also drops stale entries for `.eslintignore` and `.eslintrc.js`, which no longer exist in the repo. Adds a `gitattributes` skill that documents the audit workflow so this drift is easier to catch next time a tool is renamed.
There was a problem hiding this comment.
Pull request overview
This PR tightens the plugin’s release packaging by updating .gitattributes export-ignore rules so dev-only lint configuration files don’t get included in the WordPress.org release archive, and adds a reusable “gitattributes audit” skill to make future checks repeatable.
Changes:
- Add
export-ignorerules for.stylelintrc.jsonandeslint.config.cjs, and remove stale ignores for.eslintignore/.eslintrc.js. - Add a new
.agentsskill documenting a repeatablegit archiveaudit workflow (with a.claudestub pointing to it). - Add a changelog entry for the packaging fix.
Reviewed changes
Copilot reviewed 4 out of 4 changed files in this pull request and generated 1 comment.
| File | Description |
|---|---|
| .github/changelog/fix-gitattributes-coverage | Adds a changelog entry describing the packaging fix. |
| .gitattributes | Updates export-ignore coverage to exclude current dev-only lint config files and remove stale entries. |
| .claude/skills/gitattributes/SKILL.md | Adds the .claude skill stub pointing to the full .agents instructions. |
| .agents/skills/gitattributes/SKILL.md | Documents the audit workflow to verify release archive contents and keep .gitattributes current. |
Comment on lines
+14
to
+22
| ## Quick Audit (one command) | ||
|
|
||
| ```bash | ||
| # Entries in the release archive at the repository root | ||
| git archive --format=tar HEAD | tar -t | awk -F/ '{print $1}' | sort -u | ||
|
|
||
| # Same, but uses the working-tree .gitattributes (use while iterating on edits) | ||
| git archive --worktree-attributes --format=tar HEAD | tar -t | awk -F/ '{print $1}' | sort -u | ||
| ``` |
There was a problem hiding this comment.
The section title says “Quick Audit (one command)”, but the block includes two variants (committed attributes vs --worktree-attributes). Consider renaming this heading to something like “Quick Audit (one-liner)” or “Quick Audit (commands)” to match the content.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fixes a gap in
.gitattributeswhere two tracked dev-only config files were leaking into the WordPress.org release zip, and adds a skill so the audit is easy to repeat.Proposed changes:
export-ignorefor.stylelintrc.jsonandeslint.config.cjs(both were being included ingit archiveoutput, i.e. shipped to users).export-ignoreentries for.eslintignoreand.eslintrc.js, which no longer exist after the ESLint flat-config migration.gitattributesskill (.agents/skills/gitattributes/SKILL.mdwith stub in.claude/skills/) documenting the audit workflow: one-command check, bucket-by-bucket rules, and the--worktree-attributestrick for previewing changes before committing.Other information:
Root cause: the ESLint flat-config migration renamed
.eslintrc.js→eslint.config.cjsbut.gitattributeswas not updated. The new skill's red-flag list explicitly calls out this failure mode.Testing instructions:
git archive --worktree-attributes --format=tar HEAD | tar -t | awk -F/ '{print $1}' | sort -uLICENSE,activitypub.php,assets,build,includes,integration,patterns,readme.txt,templates.trunk(same command, without--worktree-attributes): that output additionally contains.stylelintrc.jsonandeslint.config.cjs— confirming the leak this PR fixes.Changelog entry
Changelog Entry Details
Significance
Type
Message
Trim dev-only configuration files from the plugin release package.