Home › Settings & CLI
Settings & CLI
Commands
Press Ctrl+Shift+P and type SPFX Pretty.
| Command |
|---|
| SPFX Pretty: Scan Project |
| SPFX Pretty: Show App Catalog Preview & Report |
| SPFX Pretty: Make Titles Nice (App Catalog + Toolbox) |
| SPFX Pretty: Generate Icons (.sppkg, Web Parts, Teams) |
| SPFX Pretty: Apply All Safe Fixes |
| SPFX Pretty: Upload Company Logo (App Catalog, Teams, Toolbox) |
| SPFX Pretty: Version Check & Upgrade Assessment |
| SPFX Pretty: Show Theme-Aware Web Part Snippet |
| SPFX Pretty: Filter by Severity... |
| SPFX Pretty: Show Errors Only |
| SPFX Pretty: Show Errors and Warnings |
| SPFX Pretty: Show All Findings |
| SPFX Pretty: Show Findings Panel |
| SPFX Pretty: Explain & How to Fix |
| SPFX Pretty: FAQ - What Each Finding Means |
| SPFX Pretty: Fix Step by Step |
Settings
File › Preferences › Settings, search SPFX Pretty.
| Setting | Default | What it does |
|---|---|---|
spfxPretty.brandColour | "#2A6FDB" | Brand colour used when generating icons (hex, e.g. #0F6CBD). |
spfxPretty.companyIcon | "" | Path to your company logo (PNG). Used for the App Catalog icon, Teams icons and fixes. Set by 'Upload Company Logo'. |
spfxPretty.brandWords | [] | Brand spellings to keep in suggested titles, e.g. ["Kachihro", "SharePoint"]. Also learnt from your web part titles and developer name. |
spfxPretty.checkLatestOnline | true | Ask the public npm registry for the latest SPFx version (only the package name is sent). Off = use the version table built into the extension. |
spfxPretty.appNamePrefix | "" | Optional prefix for every app name so your organisation's apps sort together in the App Catalog and Site Contents (e.g. 'Kachihro - '). |
spfxPretty.toolboxGroup | "" | Preferred modern toolbox group for your web parts. Only these predefined groups get a toolbox section - custom groupIds fall back to 'Advanced'. Options: Text, media, and content Discovery Communication and collaboration Planning and process Business and intelligence Site tools |
spfxPretty.developer.name | "" | Developer/company name shown in the App Catalog. |
spfxPretty.developer.websiteUrl | "" | Developer website URL. |
spfxPretty.developer.privacyUrl | "" | Privacy statement URL. |
spfxPretty.developer.termsOfUseUrl | "" | Terms of use URL. |
spfxPretty.developer.mpnId | "Undefined-1.0.0" | Microsoft Partner Network ID (or 'Undefined-x.y.z'). |
spfxPretty.disabledRules | [] | Rule IDs to skip, e.g. ["BRD003"]. Can also be set per project in .spfxprettyrc.json. |
spfxPretty.location | "activityBar" | Where the SPFX Pretty findings panel lives. Tip: if you dragged it somewhere and lost it, run 'View: Reset View Locations'. Options: activityBar explorer both |
spfxPretty.previewFixes | true | Show what a fix will change (file, lines before and after) and wait for Apply before changing anything. Turn off for one-click fixes. |
spfxPretty.showReportAfterScan | true | Open the App Catalog preview & report straight away: after 'Scan Project' and when you click the SPFX Pretty icon in the Activity Bar. Off = show a notification with a 'Show report' button instead. |
spfxPretty.scanOnSave | true | Re-scan automatically when manifests, package-solution.json or styles are saved. |
Per-project settings: .spfxprettyrc.json
Commit this to the project so the whole team (and the pipeline) agree:
{
"brandColour": "#2A6FDB",
"appNamePrefix": "Kachihro ",
"brandWords": [
"Kachihro"
],
"toolboxGroup": "Discovery",
"companyIcon": "sharepoint/assets/kachihro-logo.png",
"developer": {
"name": "Kachihro",
"websiteUrl": "https://<your-website>/"
},
"disabledRules": [
"SOL008"
]
}
Command line (pipelines)
node out/cli.js . --min-score 70 --fail-on error --html report.html --upgrade-md upgrade.md
| Option | What it does |
|---|---|
--fix | Apply all safe fixes |
--html <file> | Write the report as HTML (publish it as a build artifact) |
--upgrade-md <file> | Write the upgrade assessment |
--json | Machine-readable output |
--company-icon <png> | Use this logo for icon fixes |
--online / --latest <ver> | Compare with the latest SPFx from npm, or a given version |
--min-score <n>, --fail-on error|warning|info | Fail the build below a score or at a severity |