Skip to content
Esc
↑↓navigate↵open⌘Jpreview
On this page

pun config

Print resolved settings and enabled rules as TOML or JSON.

pun config prints the resolved configuration, in the same sections as pun.toml: [php], [files], [extensions], [format], [lint], and [analyse].

pun config
pun config --format json
pun config --preset psr12

Resolved values

Field Contents
Command rules tables Enabled rules after preset, set, group, and rule settings, with levels and options
[[lint.overrides]] Path overrides as configured, not applied to a file
Command exclude lists Shared exclusions plus command-specific exclusions
[extensions] Each extension as "on" or "off"; one pun.toml leaves out is "off"
ecosystems The extensions on for that command, minus those whose group is "off"
[analyse] switches The preset’s type switches, which with the enabled rules set the analysis level
[php] version The explicit setting, otherwise the lowest version require.php allows, otherwise 8.4

Disabled rules are left out. The TOML output starts with a comment that names the configuration sources.

Options

Flag Meaning
--format toml|json Output format. Default toml.
--config <path> Read another config file.
--preset <name> Resolve a built-in format preset without pun.toml.

A resolved setting isn’t always supported at run time. See analysis limitations.

Last updated on

Was this page helpful?