Skip to content

Add lint:fix commands and update agent guidance#5303

Open
jamesricky wants to merge 2 commits intomainfrom
add-lint-fix-commands
Open

Add lint:fix commands and update agent guidance#5303
jamesricky wants to merge 2 commits intomainfrom
add-lint-fix-commands

Conversation

@jamesricky
Copy link
Contributor

Add lint:fix scripts to all packages, demo services, docs, and storybook to provide a single command for auto-fixing ESLint, Prettier, and Stylelint issues. A root-level lint:fix script orchestrates all workspaces.

AGENTS.md is updated to document these commands and instruct agents to run lint:fix after making code changes.

@jamesricky jamesricky force-pushed the add-lint-fix-commands branch from 78ab8b9 to 1c66801 Compare March 12, 2026 12:17
Add `lint:fix` scripts to all packages, demo services, docs, and storybook to provide a single command for auto-fixing ESLint, Prettier, and Stylelint issues.
A root-level `lint:fix` script orchestrates all workspaces.

`AGENTS.md` is updated to document these commands and instruct agents to run `lint:fix` after making code changes.
Comment on lines +25 to +27
"lint:fix:eslint": "eslint --fix --max-warnings 0 src/ '**/*.json' --no-warn-ignored",
"lint:fix:prettier": "pnpm exec prettier --write '*.{ts,js,json,md,yml,yaml,css,scss}'",
"lint:fix:style": "pnpm exec stylelint --fix '**/*.{css,scss}'",
Copy link
Collaborator

Choose a reason for hiding this comment

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

What do you think about reusing the existing scripts?

"lint:fix:eslint": "pnpm run lint:eslint --fix",
"lint:fix:prettier": "pnpm run lint:prettier --write",
"lint:fix:style": "pnpm run lint:style --fix",

Then we (or the agent) won't forget to update one of the two scripts when making some changes.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Good point, I did this for eslint and stylelint.

It's not possible for prettier unfortunately, as this needs either the --check or the --write argument, so appending one to the other doesn't work.
We could have a base-prettier script, when separate :check and :fix scripts, but I think that's overkill.

Copy link
Collaborator

Choose a reason for hiding this comment

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

It's possible to use both check and write, see

image

@jamesricky jamesricky requested a review from johnnyomair March 16, 2026 07:36
Copy link
Collaborator

@johnnyomair johnnyomair left a comment

Choose a reason for hiding this comment

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

IMO we could reuse lint:prettier for lint:fix:prettier, but I'm fine with the duplication as well.

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.

3 participants