@utoo/lint 0.0.3 → 0.0.4

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 ADDED
@@ -0,0 +1,98 @@
1
+ # @utoo/lint
2
+
3
+ ![utoo-lint logo](assets/utoo-lint-logo.svg)
4
+
5
+ High performance linter for JavaScript and TypeScript written by Zig.
6
+
7
+ ## Install
8
+
9
+ ```bash
10
+ npm install -D @utoo/lint
11
+ ```
12
+
13
+ ## CLI
14
+
15
+ Run the linter with:
16
+
17
+ ```bash
18
+ npx utoo-lint src
19
+ ```
20
+
21
+ If no target is provided, `utoo-lint` scans the current directory. It skips
22
+ `.git`, `.zig-cache`, `node_modules`, `vendor`, and `zig-out`.
23
+
24
+ Use a config file:
25
+
26
+ ```bash
27
+ npx utoo-lint --config=utoo.json src
28
+ ```
29
+
30
+ Run a focused rule set:
31
+
32
+ ```bash
33
+ npx utoo-lint --rules=no-debugger,no-console src
34
+ ```
35
+
36
+ Use machine-readable output:
37
+
38
+ ```bash
39
+ npx utoo-lint --format=json src
40
+ ```
41
+
42
+ ## Configuration
43
+
44
+ Create a `utoo.json` file:
45
+
46
+ ```json
47
+ {
48
+ "$schema": "https://raw.githubusercontent.com/fireairforce/utoo-lint/main/npm/utoo-lint/schema.json",
49
+ "files": ["src/**/*.{js,jsx,ts,tsx}"],
50
+ "ignores": ["dist", "node_modules"],
51
+ "rules": {
52
+ "no-console": "off",
53
+ "no-debugger": "error"
54
+ }
55
+ }
56
+ ```
57
+
58
+ Start from the packaged frontend template:
59
+
60
+ ```bash
61
+ cp node_modules/@utoo/lint/configs/frontend.json utoo.json
62
+ ```
63
+
64
+ ## ESLint Migration
65
+
66
+ Convert an existing ESLint config into the native utoo format:
67
+
68
+ ```bash
69
+ npx utoo-lint migrate eslint --from eslint.config.js --output utoo.json
70
+ ```
71
+
72
+ The package also provides compatibility bins for common replacement flows:
73
+
74
+ ```bash
75
+ npx eslint --config utoo.json src
76
+ npx fishlint eslint --disable-setup --config utoo.json --glob src
77
+ ```
78
+
79
+ ## JavaScript API
80
+
81
+ ```js
82
+ import { lintFiles } from "@utoo/lint";
83
+
84
+ const report = lintFiles(["src"], {
85
+ config: "utoo.json",
86
+ rules: ["no-debugger"]
87
+ });
88
+
89
+ console.log(report.diagnostics);
90
+ ```
91
+
92
+ CommonJS is supported through `require("@utoo/lint")`.
93
+
94
+ ## Binary Resolution
95
+
96
+ `@utoo/lint` installs a platform-specific optional dependency containing the
97
+ native `utoo-lint` binary. Set `UTOO_LINT_BIN=/path/to/utoo-lint` to force a
98
+ specific binary during local development.
@@ -0,0 +1,32 @@
1
+ <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 1040 313.21" role="img" aria-labelledby="title desc">
2
+ <title id="title">utoo lint logo</title>
3
+ <desc id="desc">The original UTOO horizontal logo extended with a lint suffix.</desc>
4
+ <defs>
5
+ <style>
6
+ .dark { fill: #404040; }
7
+ .blue { fill: #0b9dee; }
8
+ .white { fill: #fff; }
9
+ .suffix {
10
+ fill: #404040;
11
+ font-family: Inter, "Avenir Next", Arial, sans-serif;
12
+ font-size: 120px;
13
+ font-weight: 750;
14
+ letter-spacing: 0;
15
+ }
16
+ </style>
17
+ </defs>
18
+ <g>
19
+ <g>
20
+ <path class="white" d="M.92,87.82s-.92,10.54-.92,28.84v180.3s.3,16.07,16.36,16.07h167.99s60.35-68.01-18.32-122.31c0,0,29.73-152.23-33.33-172.06,0,0-36.57-1.22-36.9,54.61,0,0-17.52-80.61-73.37-34.24,0,0-20.87,24.26-21.52,48.8Z"/>
21
+ <path class="blue" d="M48.5,177.6l-34.98,1.83S1.89,148.77.68,110.94c0,0-4.13-64.67,23.91-94.88,0,0,22.33-24.1,50.26-7.02,0,0,12.31,7.93,19.22,23.19,0,0,3-23.8,28.52-31.42,0,0,28.52-6.41,45.04,16.78,0,0,17.41,19.78,22.22,72.12,0,0,3.6,60.58-8.11,94.44l.11.8s26.16,17.16,36.67,53.16c0,0,13.21,43.01-17.41,74.44l-.57.48h-44.36s23.08-7.26,31.34-30.75c0,0,10.06-22.19-1.95-47.67,0,0-13.21-26.46-41.29-39.89l3.75-16.32s6.53-27.11,7.73-47.86c0,0,1.8-55.52-8.71-77.18,0,0-6.91-16.17-18.92-14.95,0,0-16.13,3.66-16.32,25.63,0,0,.03,43.09,2.51,67.34,0,0,3.83,27.23-9.46,33.86,0,0-16.21,8.01-24.32-14.64,0,0-2.7-5.95-1.58-21.51,0,0,1.13-43.7-3.15-64.52,0,0-3.83-22.88-19.14-22.42,0,0-15.09-.69-20.04,29.74,0,0-5.18,35.46,2.93,69.33,0,0,2.8,15.66,8.94,36.37Z"/>
22
+ <polygon class="dark" points="49.66 222.52 52.7 241.06 68.68 245.29 54.68 254.14 56.94 271.22 95.81 241.93 49.66 222.52"/>
23
+ <polygon class="dark" points="133.13 228.13 134.93 240.79 164.35 237.74 161.35 217.76 133.13 228.13"/>
24
+ </g>
25
+ <g>
26
+ <path class="blue" d="M291.08,196.89l33.6,3.11s-7.62,48.56,4.52,69.18c0,0,7.91,17.22,27.11,12.99,0,0,13.18-1.98,17.74-22.31,0,0,7.29-34.73,0-60.14l35.06-.56s7.34,29.08-3.39,68.89c0,0-6.21,32.33-44.89,43.76,0,0-53.65,12.85-69.74-47.86,0,0-7.91-26.26,0-67.06Z"/>
27
+ <path class="blue" d="M426.52,199.29l2.07,29.69,38.87-1.88-2.82,51.86-.94,16s.85,15.83,14.78,17.98c0,0,20.09,3.28,21.36-22.41l-1.27-62.68,37.13,1.13.85-29.69h-110.02Z"/>
28
+ <path class="blue" d="M622.6,275.33s2.26,14.96,14.68,24.99l-.56,1.27s-17.08,17.08-48.56,9.32c0,0-33.88-10.09-38.54-42.85,0,0-3.67-30.78,12.85-47.01,0,0,14.68-20.75,56.47-16.09,0,0,20.19,2.82,31.91,23.29,0,0,8.47,12.14,11.44,25.27,0,0,2.68,18.21,19.06,27.53,0,0,18.92,7.48,27.53-8.89,0,0,8.61-16.09-1.13-31.2,0,0-5.51-11.86-21.74-10.87,0,0-15.81.14-18.49,13.98,0,0-3.53-12.42-10.73-22.02,0,0-5.36-6.92-9.6-9.46,0,0,13.27-13.27,33.74-16.38,0,0,24.42-4.38,46.02,10.59,0,0,20.05,11.15,22.59,40.24,0,0,2.96,26.12-11.44,43.62,0,0-13.84,20.42-42.21,22.28,0,0-30.49,2.85-44.05-9.72,0,0-17.51-11.44-24.14-33.18,0,0-1.84-5.71-2.54-15.63,0,0-3.95-16.13-18.21-17.41,0,0-11.29-3.11-20.05,8.19,0,0-7.91,12.28-.42,27.39,0,0,2.96,10.45,18.07,11.01,0,0,12.14.56,15.81-7.48,0,0,1.27-2.12,2.26-.78Z"/>
29
+ </g>
30
+ </g>
31
+ <text class="suffix" x="790" y="294">lint</text>
32
+ </svg>
package/index.cjs CHANGED
@@ -92,6 +92,7 @@ const BUILTIN_RULE_IDS = [
92
92
  "eol-last",
93
93
  "eqeqeq",
94
94
  "for-direction",
95
+ "func-names",
95
96
  "getter-return",
96
97
  "guard-for-in",
97
98
  "linebreak-style",
@@ -232,6 +233,7 @@ const BUILTIN_RULE_IDS = [
232
233
  "prefer-destructuring",
233
234
  "prefer-exponentiation-operator",
234
235
  "prefer-numeric-literals",
236
+ "prefer-object-has-own",
235
237
  "prefer-object-spread",
236
238
  "prefer-promise-reject-errors",
237
239
  "prefer-regex-literals",
@@ -239,6 +241,7 @@ const BUILTIN_RULE_IDS = [
239
241
  "prefer-spread",
240
242
  "prefer-template",
241
243
  "radix",
244
+ "require-await",
242
245
  "require-atomic-updates",
243
246
  "require-yield",
244
247
  "spaced-comment",
@@ -246,6 +249,8 @@ const BUILTIN_RULE_IDS = [
246
249
  "unicode-bom",
247
250
  "use-isnan",
248
251
  "valid-typeof",
252
+ "vars-on-top",
253
+ "wrap-iife",
249
254
  "yoda",
250
255
  "import/default",
251
256
  "import/export",
package/index.js CHANGED
@@ -95,6 +95,7 @@ const BUILTIN_RULE_IDS = [
95
95
  "eol-last",
96
96
  "eqeqeq",
97
97
  "for-direction",
98
+ "func-names",
98
99
  "getter-return",
99
100
  "guard-for-in",
100
101
  "linebreak-style",
@@ -235,6 +236,7 @@ const BUILTIN_RULE_IDS = [
235
236
  "prefer-destructuring",
236
237
  "prefer-exponentiation-operator",
237
238
  "prefer-numeric-literals",
239
+ "prefer-object-has-own",
238
240
  "prefer-object-spread",
239
241
  "prefer-promise-reject-errors",
240
242
  "prefer-regex-literals",
@@ -242,6 +244,7 @@ const BUILTIN_RULE_IDS = [
242
244
  "prefer-spread",
243
245
  "prefer-template",
244
246
  "radix",
247
+ "require-await",
245
248
  "require-atomic-updates",
246
249
  "require-yield",
247
250
  "spaced-comment",
@@ -249,6 +252,8 @@ const BUILTIN_RULE_IDS = [
249
252
  "unicode-bom",
250
253
  "use-isnan",
251
254
  "valid-typeof",
255
+ "vars-on-top",
256
+ "wrap-iife",
252
257
  "yoda",
253
258
  "import/default",
254
259
  "import/export",
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@utoo/lint",
3
- "version": "0.0.3",
3
+ "version": "0.0.4",
4
4
  "description": "Experimental JavaScript and TypeScript linter powered by Yuku",
5
5
  "license": "MIT",
6
6
  "repository": {
@@ -50,6 +50,7 @@
50
50
  "utoo-lint": "./bin/utoo-lint.js"
51
51
  },
52
52
  "files": [
53
+ "assets",
53
54
  "bin",
54
55
  "config.cjs",
55
56
  "config.d.ts",
@@ -59,6 +60,7 @@
59
60
  "index.d.ts",
60
61
  "index.js",
61
62
  "lib",
63
+ "README.md",
62
64
  "schema.json",
63
65
  "universal.cjs",
64
66
  "universal.d.ts",
@@ -68,11 +70,11 @@
68
70
  "use-at-your-own-risk.js"
69
71
  ],
70
72
  "optionalDependencies": {
71
- "@utoo/lint-darwin-arm64": "0.0.3",
72
- "@utoo/lint-darwin-x64": "0.0.3",
73
- "@utoo/lint-linux-arm64": "0.0.3",
74
- "@utoo/lint-linux-x64": "0.0.3",
75
- "@utoo/lint-win32-x64": "0.0.3"
73
+ "@utoo/lint-darwin-arm64": "0.0.4",
74
+ "@utoo/lint-darwin-x64": "0.0.4",
75
+ "@utoo/lint-linux-arm64": "0.0.4",
76
+ "@utoo/lint-linux-x64": "0.0.4",
77
+ "@utoo/lint-win32-x64": "0.0.4"
76
78
  },
77
79
  "publishConfig": {
78
80
  "access": "public",