@utoo/lint 0.3.9 → 0.4.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 +11 -3
- package/bin/eslint.js +4 -0
- package/bin/fishlint-lint-staged.js +0 -0
- package/bin/fishlint.js +0 -0
- package/index.cjs +687 -290
- package/index.d.ts +11 -0
- package/index.js +687 -290
- package/lib/config-module.cjs +54 -0
- package/lib/estree-parser.cjs +662 -0
- package/lib/load-config.js +74 -1
- package/lib/native-rule-options.cjs +99 -0
- package/lib/plugin-runner.cjs +342 -0
- package/package.json +13 -10
- package/schema.json +24 -0
package/README.md
CHANGED
|
@@ -24,6 +24,9 @@ and JavaScript APIs.
|
|
|
24
24
|
parallel file linting.
|
|
25
25
|
- **Broad rule coverage** — More than 300 rules cover JavaScript, TypeScript,
|
|
26
26
|
React, JSX accessibility, and imports.
|
|
27
|
+
- **ESLint plugin compatibility** — Mount community ESLint plugins in
|
|
28
|
+
`utlint.config.ts`; their rules run alongside native rules with shared
|
|
29
|
+
suppressions, autofix, and reporting.
|
|
27
30
|
- **Familiar configuration** — Use typed `utlint.config.ts` or static
|
|
28
31
|
`utlint.config.json`, with ESLint-style rule names and severities.
|
|
29
32
|
- **Practical workflows** — Safe autofix, suppression comments, JSON output,
|
|
@@ -141,7 +144,8 @@ With utoo, run these scripts as `ut lint` and `ut lint:fix`.
|
|
|
141
144
|
| Select rules for one run | `utx @utoo/lint --rules=no-debugger,no-unused-vars src` |
|
|
142
145
|
| Use an explicit config | `utx @utoo/lint --config=utlint.config.json src` |
|
|
143
146
|
|
|
144
|
-
Run `utx @utoo/lint --help` for all CLI options.
|
|
147
|
+
Run `utx @utoo/lint --help` for all CLI options. Once the package is installed,
|
|
148
|
+
`utlint` is a shorter alias for the `utoo-lint` command.
|
|
145
149
|
|
|
146
150
|
## Configuration
|
|
147
151
|
|
|
@@ -215,8 +219,12 @@ utx @utoo/lint migrate eslint \
|
|
|
215
219
|
--output utlint.config.json
|
|
216
220
|
```
|
|
217
221
|
|
|
218
|
-
The package
|
|
219
|
-
incremental replacement workflows
|
|
222
|
+
The package registers only the `utoo-lint` and `utlint` commands. For
|
|
223
|
+
incremental replacement workflows it also ships an ESLint CLI wrapper at
|
|
224
|
+
`@utoo/lint/bin/eslint.js` and a fishlint compatibility CLI at
|
|
225
|
+
`@utoo/lint/bin/fishlint.js`. Neither is registered as a bin, so installing
|
|
226
|
+
`@utoo/lint` never changes what existing `eslint` or `fishlint` scripts run;
|
|
227
|
+
opt in per script instead. See the
|
|
220
228
|
[migration guide](https://github.com/utooland/utoo-lint/blob/main/docs/eslint-migration.md)
|
|
221
229
|
for supported mappings and known differences.
|
|
222
230
|
|
package/bin/eslint.js
CHANGED
|
@@ -1,4 +1,8 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
|
+
// ESLint CLI compatibility wrapper. It is deliberately not registered as an
|
|
3
|
+
// `eslint` bin: installing @utoo/lint must never change which tool an
|
|
4
|
+
// existing `eslint` script runs. Scripts opt in explicitly, for example
|
|
5
|
+
// `node node_modules/@utoo/lint/bin/eslint.js src`.
|
|
2
6
|
import { spawnSync } from "node:child_process";
|
|
3
7
|
import { fileURLToPath } from "node:url";
|
|
4
8
|
|
|
File without changes
|
package/bin/fishlint.js
CHANGED
|
File without changes
|