pi-resource-paths¶
Literal Pi resource paths should exist in the assembled checkout
| Severity | warning (disabled) |
| Autofix | - |
| Since | v0.21.0 |
| Repo Types | pi, pi-package |
| Category | Pi |
Why¶
Pi resolves package resources relative to package.json, and project resource
paths and local package sources relative to .pi/settings.json. A missing
literal path can silently omit content.
The rule also checks pi.changelogPath. Pi 1.5.0 shows a package's changelog
after an update only when that path names a file inside the package; a missing
file or a path outside the package, including through a symlink, silently shows
nothing. Absolute paths, in POSIX or Windows spelling, count as outside the
package. An empty string turns the changelog off and is not checked.
Project settings paths trim surrounding whitespace and accept local file://
URLs within the repository. Package manifest paths retain their literal spelling.
Activation¶
This rule is opt-in because generated files and bundled npm dependencies may
not exist in a source checkout. Enable it with --rule pi-resource-paths after
assembling the package, or set rules.pi-resource-paths.enabled: true.
How to fix¶
Correct paths relative to the file declaring them, or build/install the bundled resources before linting. Configure rule exclusions for intentionally absent resources. The rule never installs packages itself.
Unmatched globs, exclusion patterns, template variables, remote package sources, home-relative paths, and paths outside the repository are skipped. It validates literal local existence, not runtime loading or the output of a future build.
Configuration¶
Run skillsaw explain pi-resource-paths to see this documentation and the rule's effective configuration in your terminal.