@sheplu/editorconfig 0.14.0 → 0.14.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +2 -0
- package/package.json +1 -1
- package/src/cli/dispatch.js +7 -2
package/README.md
CHANGED
|
@@ -208,6 +208,8 @@ Single-file shape:
|
|
|
208
208
|
|
|
209
209
|
In `--recursive` mode the payload instead carries `recursive: true`, a `files` array (each with its `role`, `summary`, and `sections`) and a `crossFileIssues` array describing `child-root` / `redundant` / `contradiction` findings. When no JSON output is requested, the human-readable report is printed exactly as before.
|
|
210
210
|
|
|
211
|
+
`--json` is only meaningful for `check`; combining it with `--mode=write` is rejected with a non-zero exit.
|
|
212
|
+
|
|
211
213
|
### `--version`
|
|
212
214
|
|
|
213
215
|
```bash
|
package/package.json
CHANGED
package/src/cli/dispatch.js
CHANGED
|
@@ -60,18 +60,23 @@ async function dispatchWrite({ path, overwrite, languages, overrides }) {
|
|
|
60
60
|
}
|
|
61
61
|
}
|
|
62
62
|
|
|
63
|
-
async function handleWrite({ path, overwrite, languages, overrides, recursive }) {
|
|
63
|
+
async function handleWrite({ path, overwrite, languages, overrides, recursive, json }) {
|
|
64
64
|
if (recursive) {
|
|
65
65
|
logger.error('--recursive (-r) is only supported with --mode=check');
|
|
66
66
|
process.exitCode = 1;
|
|
67
67
|
return;
|
|
68
68
|
}
|
|
69
|
+
if (json) {
|
|
70
|
+
logger.error('--json is only supported with --mode=check');
|
|
71
|
+
process.exitCode = 1;
|
|
72
|
+
return;
|
|
73
|
+
}
|
|
69
74
|
await dispatchWrite({ path, overwrite, languages, overrides });
|
|
70
75
|
}
|
|
71
76
|
|
|
72
77
|
async function runCommand({ mode, path, overwrite, languages, strict, overrides, recursive, json }) {
|
|
73
78
|
if (mode === 'write') {
|
|
74
|
-
await handleWrite({ path, overwrite, languages, overrides, recursive });
|
|
79
|
+
await handleWrite({ path, overwrite, languages, overrides, recursive, json });
|
|
75
80
|
return;
|
|
76
81
|
}
|
|
77
82
|
if (mode === 'check') {
|