SPFX Pretty

Home › How to use

How to use SPFX Pretty

Install

  1. Open VS Code and go to Extensions (Ctrl+Shift+X).
  2. Search for SPFX Pretty and click Install - or open it on the Marketplace.
  3. Open an SPFx project. The SPFX icon appears on the Activity Bar (left edge).

Or from a terminal: code --install-extension kachihro.spfx-pretty

Updates arrive automatically through VS Code, like any other extension.

The report

Open an SPFx project (a folder with config/package-solution.json) and click the SPFX icon - the report opens straight away. It is grouped into sections you can fold:

SectionWhat you see
Where people see your appYour app as the App Catalog, "Add an app" and Site Contents show it - name, icon, description.
ToolboxEach web part tile with its title, icon and the toolbox section it really lands in.
Property paneThe labels and default values authors see when they edit the web part.
Version & upgradeSPFx, React, Node and TypeScript versions, and an upgrade plan with effort.
All checksEvery finding, grouped by area, with fix buttons and ? Explain.

Each section header has ✨ Fix all for its safe fixes, and a count of things to polish.

The report: your app as the App Catalog, "Add an app" and Site Contents show it
The report: your app as the App Catalog, "Add an app" and Site Contents show it
Toolbox tiles - expand an issue for the explanation, the exact change, and Apply / Ignore
Toolbox tiles - expand an issue for the explanation, the exact change, and Apply / Ignore
Property pane: the labels and default values authors see
Property pane: the labels and default values authors see

Fix step by step

Click ▶ Fix step by step at the top of the report (or the ▶ on the panel). It walks through every issue, worst first. For each one you can:

It re-scans after every change, so knock-on issues (like the About version going stale after a version bump) are picked up too.

Fix step by step: every issue, worst first - fix, explain, open, skip or ignore
Fix step by step: every issue, worst first - fix, explain, open, skip or ignore (illustration)

Nothing changes without you seeing it

Every fix first shows what it will change - the file, the lines before and after, any files it creates - and waits for Apply. ✨ Fix all lists every change first.

Nothing changes until you click Apply - you see exactly what will change first
Nothing changes until you click Apply - you see exactly what will change first (illustration)

Run SPFX Pretty: Upload Company Logo (or click 🖼 Upload company icon on the icon finding). Pick a square PNG and it becomes:

It is remembered for every project. A brand-colour placeholder icon is flagged until you upload a real one.

One company logo becomes every icon SharePoint and Teams need
One company logo becomes every icon SharePoint and Teams need

The findings panel

The findings panel: badge on the SPFX icon, filter, and the fix next to every finding
The findings panel: badge on the SPFX icon, filter, and the fix next to every finding (illustration)

Version check & upgrade assessment

Run SPFX Pretty: Version Check & Upgrade Assessment for a Markdown plan you can paste into a work item: current vs latest SPFx, React / Node / TypeScript, each step with Small / Medium / Large effort, and the CLI for Microsoft 365 command for the file-by-file report.

Version & upgrade: React / Node / TypeScript vs the latest SPFx, and a step-by-step plan with effort
Version & upgrade: React / Node / TypeScript vs the latest SPFx, and a step-by-step plan with effort

In a pipeline

The same checks run from the command line - see Settings & CLI.