oxlint-tui 1.0.16 → 1.0.18

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 (3) hide show
  1. package/README.md +2 -5
  2. package/package.json +1 -1
  3. package/tui.js +8 -4
package/README.md CHANGED
@@ -6,8 +6,6 @@ A lightweight, dependency-free Node.js Terminal User Interface (TUI) for browsin
6
6
 
7
7
  It automatically loads your local configuration to show you the status of the rules toggled in your project and allows you to toggle them by selecting a rule in the Rules pane and pressing <kbd>1</kbd>, <kbd>2</kbd>, or <kbd>3</kbd>. The config file is modified in real-time.
8
8
 
9
- Pressing <kbd>r</kbd> will lint the project using "oxlint". Pressing <kbd>t</kbd> will lint include the oxlint-tsgolint package and lint the project using "oxlint --type-aware". The results are presented directly in the interface.
10
-
11
9
  **NOTE**: At the moment, comments will be erased from your configuration file when adding or toggling rules.
12
10
 
13
11
  ![screenshot](https://raw.githubusercontent.com/holoflash/oxlint-tui/refs/heads/main/screenshot.png)
@@ -62,9 +60,8 @@ oxlint-tui
62
60
  | **1** | Set selected rule to "off" |
63
61
  | **2** | Set selected rule to "warn" |
64
62
  | **3** | Set selected rule to "error" |
65
- | **x** | Run the selected rule |
66
- | **r** | Run all enabled rules with "oxlint" |
67
- | **t** | Run all enabled rules with "-p oxlint-tsgolint@latest oxlint --type-aware" |
63
+ | **x** | Run "oxlint" with the selected rule |
64
+ | **r** | Run "oxlint with all enabled rules |
68
65
  | **Enter** | Open Rule Documentation in Browser |
69
66
  | **q** / **Esc** | Quit |
70
67
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "oxlint-tui",
3
- "version": "1.0.16",
3
+ "version": "1.0.18",
4
4
  "description": "A Node TUI Oxlint rules and configuration browser",
5
5
  "type": "module",
6
6
  "bin": {
package/tui.js CHANGED
@@ -37,7 +37,6 @@ const KEY_MAP = {
37
37
  3: { type: "SET_STATUS", value: "error" },
38
38
  q: { type: "EXIT" },
39
39
  r: { type: "RUN_LINT" },
40
- t: { type: "RUN_TYPE_AWARE_LINT" },
41
40
  x: { type: "RUN_SINGLE_RULE" },
42
41
  };
43
42
 
@@ -193,7 +192,12 @@ function execute(action) {
193
192
  return;
194
193
 
195
194
  case "RUN_LINT":
196
- runLint();
195
+ const allRules = Object.values(state.rulesByCategory).flat();
196
+ const hasActiveTypeAwareRule = allRules.some(
197
+ (rule) => rule.isActive && rule.type_aware === true
198
+ );
199
+
200
+ runLint({ typeAware: hasActiveTypeAwareRule });
197
201
  return;
198
202
 
199
203
  case "RUN_SINGLE_RULE": {
@@ -353,7 +357,7 @@ function loadRules() {
353
357
  config = JSON.parse(
354
358
  stripJsonComments(fs.readFileSync(configPath, "utf8")),
355
359
  );
356
- } catch (e) {}
360
+ } catch (e) { }
357
361
  }
358
362
 
359
363
  const map = {};
@@ -614,7 +618,7 @@ function render() {
614
618
  ? `Config: ${state.configPath}`
615
619
  : "No config loaded";
616
620
  buffer.push(
617
- `\x1b[${rows - 1};2H${COLORS.dim}Arrows/HJKL: Nav | 1-3: Status | R: Lint | T: Lint with --type-aware | X: Run rule | Enter: Docs | Q: Quit | ${footerConfig}${COLORS.reset}`,
621
+ `\x1b[${rows - 1};2H${COLORS.dim}Arrows/HJKL: Nav | 1-3: Status | R: Lint | X: Run rule | Enter: Docs | Q: Quit | ${footerConfig}${COLORS.reset}`,
618
622
  );
619
623
  write(buffer.join(""));
620
624
  }