pnpm-format

bởi microsoft

Định dạng mã nguồn bằng pnpm và khắc phục các lỗi định dạng phổ biến.

npx skills add https://github.com/microsoft/typespec --skill pnpm-format

Format code with pnpm

Use this skill any time formatting is required in the TypeSpec repo. Do not assume formatting happens automatically; always run pnpm format following this guidance.

Preconditions

  • Command must run from the repository root (where package.json and pnpm-workspace.yaml live).
  • Dependencies must be installed.

Steps

  1. Confirm you are at the repo root.
  2. If node_modules are missing or pnpm complains about missing packages, run:
    pnpm install
    
  3. Run the formatter:
    pnpm format
    
  4. If the command fails with ERR_PNPM_NO_IMPORTER_MANIFEST_FOUND, you are not at the repo root. cd to the root and retry.
  5. If pnpm format exits with a non-zero code but prints a list of changed files, re-run pnpm format once to ensure a clean exit.

Notes

  • Do not cancel the command; formatting may take about a minute.

Thêm skills từ microsoft

oss-growth
microsoft
Cá tính tăng trưởng OSS
official
accessibility-aria-expert
microsoft
Phát hiện và sửa các vấn đề về khả năng tiếp cận trong giao diện web React/Fluent UI. Sử dụng khi xem xét mã để đảm bảo tương thích với trình đọc màn hình, sửa nhãn ARIA, đảm bảo…
official
generate-canvas-app
microsoft
[DEPRECATED — sử dụng canvas-app thay thế] Tạo một ứng dụng canvas Power Apps hoàn chỉnh.
official
django
microsoft
Các phương pháp tốt nhất cho phát triển web Django bao gồm models, views, templates và testing.
official
github-issue-creator
microsoft
Chuyển đổi ghi chú thô, nhật ký lỗi, ghi âm giọng nói hoặc ảnh chụp màn hình thành báo cáo vấn đề markdown sắc nét theo phong cách GitHub. Sử dụng khi người dùng dán thông tin lỗi, lỗi…
official
python-package-management
microsoft
Sử dụng uv để quản lý phụ thuộc và poethepoet để tự động hóa tác vụ.
official
runtime-validation
microsoft
Xác thực thời gian chạy cho các ứng dụng đã di chuyển — bao gồm chiến lược kiểm thử (giai đoạn lập kế hoạch) và thực thi kiểm thử (giai đoạn xác thực): xác minh khởi động,…
official
azure-postgres-ts
microsoft
Kết nối đến Azure Database for PostgreSQL Flexible Server bằng gói pg (node-postgres) với hỗ trợ xác thực mật khẩu và Microsoft Entra ID (không mật khẩu).
official