oxlint-tui 1.0.8 → 1.0.10

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.
Files changed (2) hide show
  1. package/package.json +1 -1
  2. package/tui.js +6 -4
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "oxlint-tui",
3
- "version": "1.0.8",
3
+ "version": "1.0.10",
4
4
  "description": "A Node TUI Oxlint rules and configuration browser",
5
5
  "type": "module",
6
6
  "bin": {
package/tui.js CHANGED
@@ -6,6 +6,7 @@ import readline from "readline";
6
6
  import fs from "node:fs";
7
7
 
8
8
  const OXLINT_VERSION = "1.41.0";
9
+ const TSGOLINT_VERSION = "0.11.1";
9
10
 
10
11
  const COLORS = {
11
12
  reset: "\x1b[0m",
@@ -37,7 +38,6 @@ const KEY_MAP = {
37
38
  q: { type: "EXIT" },
38
39
  r: { type: "RUN_LINT" },
39
40
  t: { type: "RUN_TYPE_AWARE_LINT" },
40
- escape: { type: "EXIT" },
41
41
  };
42
42
 
43
43
  let state = {
@@ -47,7 +47,7 @@ let state = {
47
47
  scrollCat: 0,
48
48
  scrollRule: 0,
49
49
  isLinting: false,
50
- message: "Press R to lint; T to lint using --type-aware",
50
+ message: "oxlint-tui",
51
51
  messageType: "dim",
52
52
  ...loadRules(),
53
53
  };
@@ -91,7 +91,9 @@ function runLint(type_aware) {
91
91
  state.messageType = "info";
92
92
  render();
93
93
 
94
- const cmd = `npx -p oxlint@${OXLINT_VERSION} ${type_aware ? "-p oxlint-tsgolint@latest oxlint --type-aware" : "oxlint"}`;
94
+ const cmd = type_aware
95
+ ? `npx --yes -p oxlint@${OXLINT_VERSION} -p oxlint-tsgolint@${TSGOLINT_VERSION} oxlint --type-aware`
96
+ : `npx --yes oxlint@${OXLINT_VERSION}`;
95
97
 
96
98
  exec(cmd, (error, stdout, stderr) => {
97
99
  const fullOutput = stdout + stderr;
@@ -526,7 +528,7 @@ function render() {
526
528
  ? `Config: ${state.configPath}`
527
529
  : "No config loaded";
528
530
  buffer.push(
529
- `\x1b[${rows - 1};2H${COLORS.dim}Arrows: Nav | 1-3: Status | Space: Lint | Enter: Docs | Q: Quit | ${footerConfig}${COLORS.reset}`,
531
+ `\x1b[${rows - 1};2H${COLORS.dim}Arrows/HJKL: Nav | 1-3: Status | R: Lint | T: Lint with --type-aware | Enter: Docs | Q: Quit | ${footerConfig}${COLORS.reset}`,
530
532
  );
531
533
  write(buffer.join(""));
532
534
  }