fallow config
Find out why your config is not applied. Fallow config shows the resolved fallow config and which file was loaded, like eslint --print-config and dprint output-resolved-config.
Use fallow config when fallow does not apply your config as you expect. The command prints the resolved configuration and the path of the loaded config file. This helps most in a monorepo with more than one .fallowrc.json file.
fallow config
By default, the command prints the loaded config path to stderr. Then it prints the config as JSON to stdout, with extends resolved. On a zero-config project, the stderr line is no config file found, using defaults:
loaded config: /repo/.fallowrc.json
{
"entry": ["src/main.ts"],
"ignorePatterns": ["dist/**"],
"duplicates": {
"ignoreImports": true
},
...
}
Options
| Flag | Description |
|---|---|
--path | Print only the config file path, on one line, with no JSON. Easier to use in shell scripts. |
The command obeys the global --config <path> flag. If you pass it, fallow loads that path directly and does not search the directory tree.
Exit codes
| Code | Meaning |
|---|---|
0 | The default view succeeded. Fallow found and loaded a config file, or, on a zero-config project, printed the effective defaults |
2 | Error, for example a parse failure or a missing explicit --config path |
3 | Only in --path mode, when no config file exists, so there is no path to report. The default view prints the defaults and exits 0. |
Examples
Verify which config the LSP/CLI picked up
In a monorepo, run fallow from inside a sub-package:
cd packages/app
fallow config --path
# /repo/.fallowrc.json (root config inherited, sub-package has none of its own)
If a sub-package has its own config, fallow prints that path. The first match wins.
Use an explicit config file
fallow --config ./my-config.json config
Pipe to jq for further inspection
fallow config | jq '.duplicates'
The loaded config: ... line goes to stderr, so stdout has only the JSON document. See Loaded config disclosure.
Detect "no config" in scripts
if ! fallow config --path > /tmp/fallow-cfg-path 2>/dev/null; then
echo "no fallow config found, will use defaults"
fi