@jterrazz/typescript 10.1.0 → 10.1.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.
@@ -614,8 +614,11 @@ run_checks() {
614
614
  # Bash decides whether the file is there; the script decides what it says.
615
615
  #
616
616
  # What fix mode judges is what SURVIVED the rewrite, so its machine-readable
617
- # run is made here, after the fixer, and in the foreground.
618
- if [ -f "$BASELINE_FILE" ]; then
617
+ # run is made here, after the fixer, and in the foreground — with the unsafe
618
+ # fixers armed again, so a directive that names one of them is used, not
619
+ # reported unused. The fixer's own exit code is never the verdict: it ran
620
+ # with those rules allowed. Without a baseline the judge wants zero.
621
+ if [ -f "$BASELINE_FILE" ] || [ "$FIX_MODE" = true ]; then
619
622
  if [ -n "$lint_json_pid" ]; then
620
623
  wait $lint_json_pid
621
624
  else
@@ -128,7 +128,18 @@ if (import.meta.main) {
128
128
  const baseline = readBaseline(root);
129
129
 
130
130
  if (baseline === null) {
131
- exit(Object.keys(counts).length > 0 ? 1 : 0);
131
+ const rules = Object.keys(counts).toSorted();
132
+ for (const rule of rules) {
133
+ stdout.write(
134
+ `${rule} ${counts[rule]} diagnostic(s), and the project keeps no baseline\n`,
135
+ );
136
+ }
137
+ if (rules.length > 0) {
138
+ stdout.write(
139
+ "Fix them, or run 'typescript baseline' to record where the project stands.\n",
140
+ );
141
+ }
142
+ exit(rules.length > 0 ? 1 : 0);
132
143
  }
133
144
 
134
145
  const broken = judge(counts, baseline);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@jterrazz/typescript",
3
- "version": "10.1.0",
3
+ "version": "10.1.1",
4
4
  "license": "MIT",
5
5
  "author": "Jean-Baptiste Terrazzoni <contact@jterrazz.com>",
6
6
  "repository": {