@ttsc/lint 0.7.3 → 0.8.0-dev.20260506

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/README.md +21 -18
  2. package/package.json +3 -3
package/README.md CHANGED
@@ -74,11 +74,11 @@ Keep `@ttsc/lint` as the first plugin entry — see [Plugin order](#plugin-order
74
74
  "no-var": "error",
75
75
  "prefer-const": "error",
76
76
  "no-explicit-any": "warning",
77
- "no-console": "off"
78
- }
79
- }
80
- ]
81
- }
77
+ "no-console": "off",
78
+ },
79
+ },
80
+ ],
81
+ },
82
82
  }
83
83
  ```
84
84
 
@@ -103,10 +103,10 @@ You can also keep the rules in a standalone file and reference it from `tsconfig
103
103
  "plugins": [
104
104
  {
105
105
  "transform": "@ttsc/lint",
106
- "config": "./ttsc-lint.config.ts"
107
- }
108
- ]
109
- }
106
+ "config": "./ttsc-lint.config.ts",
107
+ },
108
+ ],
109
+ },
110
110
  }
111
111
  ```
112
112
 
@@ -116,7 +116,7 @@ export default {
116
116
  "no-var": "error",
117
117
  "prefer-const": "error",
118
118
  "no-explicit-any": "warning",
119
- "no-console": "off"
119
+ "no-console": "off",
120
120
  };
121
121
  ```
122
122
 
@@ -130,21 +130,24 @@ The `config` field accepts:
130
130
 
131
131
  `@ttsc/lint` must be the first plugin in `compilerOptions.plugins`.
132
132
 
133
- It inspects the source you wrote, so output plugins (`@ttsc/banner`, `@ttsc/paths`, `@ttsc/strip`) have to come after it.
133
+ It inspects the source you wrote, so transform plugins such as `@ttsc/banner`, `@ttsc/paths`, and `@ttsc/strip` have to come after it.
134
134
 
135
135
  ```jsonc
136
136
  {
137
137
  "compilerOptions": {
138
138
  "plugins": [
139
139
  // Keep lint first.
140
- { "transform": "@ttsc/lint", "config": { "no-var": "error", "prefer-const": "error" } },
140
+ {
141
+ "transform": "@ttsc/lint",
142
+ "config": { "no-var": "error", "prefer-const": "error" },
143
+ },
141
144
 
142
- // Output plugins run after emit, in order.
143
- { "transform": "@ttsc/banner", "banner": "/*! @license MIT */" },
145
+ // First-party utilities use their documented transform order.
146
+ { "transform": "@ttsc/banner", "banner": "License MIT" },
144
147
  { "transform": "@ttsc/paths" },
145
- { "transform": "@ttsc/strip", "calls": ["console.log"] }
146
- ]
147
- }
148
+ { "transform": "@ttsc/strip", "calls": ["console.log"] },
149
+ ],
150
+ },
148
151
  }
149
152
  ```
150
153
 
@@ -161,7 +164,7 @@ Rules are off until you enable them:
161
164
  "no-var": "error",
162
165
  "eqeqeq": "error",
163
166
  "prefer-template": "warning",
164
- "no-non-null-assertion": "off"
167
+ "no-non-null-assertion": "off",
165
168
  }
166
169
  ```
167
170
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@ttsc/lint",
3
- "version": "0.7.3",
3
+ "version": "0.8.0-dev.20260506",
4
4
  "description": "Reference ttsc plugin: ESLint-style lint rules hosted in the same Program/Checker as the type-check pass.",
5
5
  "main": "lib/index.js",
6
6
  "types": "lib/index.d.ts",
@@ -27,10 +27,10 @@
27
27
  "plugin"
28
28
  ],
29
29
  "devDependencies": {
30
- "@typescript/native-preview": "7.0.0-dev.20260501.1",
30
+ "@typescript/native-preview": "7.0.0-dev.20260504.1",
31
31
  "@types/node": "^25.3.0",
32
32
  "rimraf": "^6.1.2",
33
- "ttsc": "0.7.3"
33
+ "ttsc": "0.8.0-dev.20260506"
34
34
  },
35
35
  "repository": {
36
36
  "type": "git",