chore: format shell scripts, the Dockerfile and shell snippets in docs with prettier-plugin-sh - #2078
artembelik wants to merge 5 commits into
Conversation
…ttier-plugin-sh Adds prettier-plugin-sh, so `yarn run prettier` and lint-staged also cover shell scripts, tools/e2e/Dockerfile, husky hooks, ignore files, .gitattributes, .nvmrc and CODEOWNERS. - the plugin is off for *.md and *.mdx: the sh parser reads doc placeholders as redirects and turns `--project <your project> --fix=false` into `--project project < your > --fix=false` - .husky/_ is ignored: husky generates it locally and hides it from git with its own .gitignore, which prettier does not read - CODEOWNERS loses its column alignment and entrypoint.sh gets a space after `2>`, both per the plugin defaults Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
- keep CODEOWNERS out of prettier to preserve its column alignment - format the shell snippets in Markdown too: quote the `<placeholders>` so the sh parser reads them as words rather than redirects Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Write the placeholders in shell snippets as plain UPPER_CASE words (PROJECT_NAME, SCHEMATIC_NAME) instead of quoted `"<...>"`, which read as if the quotes were required. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
|
Visit the preview URL for this PR (updated for commit 55afc6d): https://koobiq-next--prs-2078-yhqdgeju.web.app (expires Fri, 25 Sep 2026 09:43:09 GMT) 🔥 via Firebase Hosting GitHub Action 🌎 Sign: c9e37e518febda70d0317d07e8ceb35ac43c534c |
|
@artembelik синтаксис со скобками пришел из доки angular: зачем менять на |
There was a problem hiding this comment.
Copilot review overview
🟡 Changes recommended
Two documentation examples currently introduce incorrect/inconsistent CLI placeholders (approve-api argument format and a mismatched trace path placeholder) that should be corrected before merging.
Get a fresh assessment by requesting another Copilot review.
Review effort: Lite
Findings: 2
Open (2)
What changed in this PR
This PR integrates prettier-plugin-sh into the repository’s Prettier setup so yarn run prettier (and lint-staged) also formats shell scripts, shell snippets in Markdown, and related files; it additionally updates documentation command placeholders to be compatible with the plugin’s parsing.
Changes:
- Add
prettier-plugin-shto Prettier configuration and dependencies (with corresponding lockfile updates). - Reformat shell-related docs and scripts per the new formatter behavior.
- Replace angle-bracket placeholders in shell snippets with plain-word placeholders (e.g.
PROJECT_NAME,SCHEMATIC_NAME) to avoid redirection parsing.
| File | Description |
|---|---|
| yarn.lock | Adds lock entries for prettier-plugin-sh and its dependencies. |
| package.json | Adds prettier-plugin-sh to devDependencies. |
| .prettierrc.js | Registers prettier-plugin-sh in Prettier plugins list. |
| .prettierignore | Ignores Husky-generated hooks and .github/CODEOWNERS to avoid unwanted reformatting. |
| tools/e2e/entrypoint.sh | Shell formatting changes produced by the new Prettier plugin. |
| AGENTS.md | Updates contributor guidance to mention the sh plugin and placeholder rules. |
| docs/PUBLIC_API.md | Updates the approve-api command placeholder in docs. |
| docs/guides/06-testing.md | Re-formats Playwright troubleshooting commands and placeholders. |
| docs/guides/05-releasing-packages.md | Re-formats a release helper shell loop for readability/consistency. |
| docs/guides/schematics.en.mdx | Replaces angle-bracket schematic placeholder with a Prettier-safe placeholder. |
| docs/guides/schematics.ru.mdx | Replaces angle-bracket schematic placeholder with a Prettier-safe placeholder. |
| docs/guides/migration.en.mdx | Updates migration command examples to use Prettier-safe placeholders. |
| docs/guides/migration.ru.mdx | Updates migration command examples to use Prettier-safe placeholders. |
| packages/schematics/src/migrations/top-bar-container-selectors/README.md | Updates --project placeholder in schematic usage examples. |
| packages/schematics/src/migrations/toast-stack-and-defaults/README.md | Updates --project placeholder in schematic usage examples. |
| packages/schematics/src/migrations/tag-slots/README.md | Updates --project placeholder in schematic usage examples. |
| packages/schematics/src/migrations/tag-list-cleaner/README.md | Updates --project placeholder in schematic usage examples. |
| packages/schematics/src/migrations/splitter-deprecated-path/README.md | Updates --project placeholder in schematic usage examples. |
| packages/schematics/src/migrations/scrollbar-deprecated-path/README.md | Updates --project placeholder in schematic usage examples. |
| packages/schematics/src/migrations/read-state-dwell-handlers/README.md | Updates --project placeholder in schematic usage examples. |
| packages/schematics/src/migrations/notification-center-signals/README.md | Updates --project placeholder in schematic usage examples. |
| packages/schematics/src/migrations/new-icons-pack/README.md | Updates placeholders and line wrapping in multi-line schematic command examples. |
| packages/schematics/src/migrations/mandatory-peer-dependencies/README.md | Updates --project placeholder in schematic usage examples. |
| packages/schematics/src/migrations/locale-configuration-providers/README.md | Updates --project placeholder in schematic usage examples. |
| packages/schematics/src/migrations/loader-overlay-size-attr/README.md | Updates --project placeholder in schematic usage examples. |
| packages/schematics/src/migrations/list-tree-multiple-input/README.md | Updates --project placeholder in schematic usage examples. |
| packages/schematics/src/migrations/icons-replacement/README.md | Updates --project and JSON-path placeholders in schematic usage examples. |
| packages/schematics/src/migrations/filter-bar-rename-action/README.md | Updates --project placeholder in schematic usage examples. |
| packages/schematics/src/migrations/file-upload-deprecated-outputs/README.md | Updates --project placeholder in schematic usage examples. |
| packages/schematics/src/migrations/empty-state-size-attr/README.md | Updates --project placeholder in schematic usage examples. |
| packages/schematics/src/migrations/dropdown-demote-overlay/README.md | Updates --project placeholder in schematic usage examples. |
| packages/schematics/src/migrations/deprecated-icons/README.md | Updates --project placeholder in schematic usage examples. |
| packages/schematics/src/migrations/css-selectors/README.md | Updates --project placeholder in schematic usage examples. |
| packages/schematics/src/migrations/button-truncation/README.md | Updates --project placeholder in schematic usage examples. |
| packages/schematics/src/migrations/button-toggle-signals-and-aria/README.md | Updates --project placeholder in schematic usage examples. |
| packages/schematics/src/migrations/button-state-and-styles/README.md | Updates --project placeholder in schematic usage examples. |
| packages/schematics/src/migrations/autocomplete-panel-width-auto/README.md | Updates --project placeholder in schematic usage examples. |
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
Bring back the quoted `"<your project>"` placeholders: they keep the familiar look and are still valid shell, so the sh plugin formats the snippets instead of rewriting or skipping them. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
вернул |
🚨 E2E tests failedReview the report for details. 💡 Comment |
🚨 E2E tests failedReview the report for details. 💡 Comment |


Summary
подключил
prettier-plugin-sh: теперьyarn run prettierи lint-staged форматируют shell-скрипты,tools/e2e/Dockerfile, husky-хуки, ignore-файлы,.gitattributes,.nvmrcи shell-сниппеты в Markdown.tools/e2e/Dockerfileуже был в нужном формате, поэтому в диффе его нетList of notable changes:
prettier-plugin-shв плагины prettier--project "<your project>"вместо--project <your project>. для парсера<и>- редиректы: если за плейсхолдером идут аргументы, команда переписывается (--project <your project> --fix=falseпревращается в--project project < your > --fix=false), а если плейсхолдер в конце строки, блок не парсится и молча пропускается. таких блоков было 97 из 249AGENTS.md, цикл в05-releasing-packages.mdразвёрнут в несколько строк, единый отступ у переносов в READMEnew-icons-packtools/e2e/entrypoint.sh: пробел после2>, это дефолт плагина.prettierignore:.husky/_(хуки, которые генерирует husky: git их прячет вложенным.gitignore, а prettier его не читает) и.github/CODEOWNERS, чтобы сохранить выравнивание колонокAGENTS.md: про плагин и про кавычки вокруг плейсхолдеровWhat should reviewers focus on?
docs/guides/migration.{en,ru}.mdx, README схематиков) - это увидят пользователи на сайтеbashвpackages/cli/README.mdтак и не форматируется: внутри JSON, а не команда🤖 Generated with Claude Code