@utoo/lint 0.0.3 → 0.0.5

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
@@ -81,20 +81,27 @@ if (json === undefined) {
81
81
  process.stdout.write(json);
82
82
  `;
83
83
  const BUILTIN_RULE_IDS = [
84
+ "accessor-pairs",
84
85
  "array-callback-return",
85
86
  "block-scoped-var",
87
+ "capitalized-comments",
86
88
  "consistent-return",
87
89
  "constructor-super",
88
90
  "curly",
89
91
  "default-case",
90
92
  "default-case-last",
93
+ "default-param-last",
91
94
  "dot-notation",
92
95
  "eol-last",
93
96
  "eqeqeq",
94
97
  "for-direction",
98
+ "func-name-matching",
99
+ "func-names",
95
100
  "getter-return",
101
+ "grouped-accessor-pairs",
96
102
  "guard-for-in",
97
103
  "linebreak-style",
104
+ "logical-assignment-operators",
98
105
  "new-cap",
99
106
  "new-parens",
100
107
  "no-alert",
@@ -106,6 +113,7 @@ const BUILTIN_RULE_IDS = [
106
113
  "no-caller",
107
114
  "no-case-declarations",
108
115
  "no-class-assign",
116
+ "no-confusing-arrow",
109
117
  "no-comma-operator",
110
118
  "no-compare-neg-zero",
111
119
  "no-cond-assign",
@@ -206,6 +214,8 @@ const BUILTIN_RULE_IDS = [
206
214
  "no-trailing-spaces",
207
215
  "no-undef",
208
216
  "no-undef-init",
217
+ "no-underscore-dangle",
218
+ "no-undefined",
209
219
  "no-unneeded-ternary",
210
220
  "no-unreachable",
211
221
  "no-unsafe-finally",
@@ -232,6 +242,7 @@ const BUILTIN_RULE_IDS = [
232
242
  "prefer-destructuring",
233
243
  "prefer-exponentiation-operator",
234
244
  "prefer-numeric-literals",
245
+ "prefer-object-has-own",
235
246
  "prefer-object-spread",
236
247
  "prefer-promise-reject-errors",
237
248
  "prefer-regex-literals",
@@ -239,6 +250,7 @@ const BUILTIN_RULE_IDS = [
239
250
  "prefer-spread",
240
251
  "prefer-template",
241
252
  "radix",
253
+ "require-await",
242
254
  "require-atomic-updates",
243
255
  "require-yield",
244
256
  "spaced-comment",
@@ -246,6 +258,8 @@ const BUILTIN_RULE_IDS = [
246
258
  "unicode-bom",
247
259
  "use-isnan",
248
260
  "valid-typeof",
261
+ "vars-on-top",
262
+ "wrap-iife",
249
263
  "yoda",
250
264
  "import/default",
251
265
  "import/export",
package/index.js CHANGED
@@ -84,20 +84,27 @@ if (json === undefined) {
84
84
  process.stdout.write(json);
85
85
  `;
86
86
  const BUILTIN_RULE_IDS = [
87
+ "accessor-pairs",
87
88
  "array-callback-return",
88
89
  "block-scoped-var",
90
+ "capitalized-comments",
89
91
  "consistent-return",
90
92
  "constructor-super",
91
93
  "curly",
92
94
  "default-case",
93
95
  "default-case-last",
96
+ "default-param-last",
94
97
  "dot-notation",
95
98
  "eol-last",
96
99
  "eqeqeq",
97
100
  "for-direction",
101
+ "func-name-matching",
102
+ "func-names",
98
103
  "getter-return",
104
+ "grouped-accessor-pairs",
99
105
  "guard-for-in",
100
106
  "linebreak-style",
107
+ "logical-assignment-operators",
101
108
  "new-cap",
102
109
  "new-parens",
103
110
  "no-alert",
@@ -109,6 +116,7 @@ const BUILTIN_RULE_IDS = [
109
116
  "no-caller",
110
117
  "no-case-declarations",
111
118
  "no-class-assign",
119
+ "no-confusing-arrow",
112
120
  "no-comma-operator",
113
121
  "no-compare-neg-zero",
114
122
  "no-cond-assign",
@@ -209,6 +217,8 @@ const BUILTIN_RULE_IDS = [
209
217
  "no-trailing-spaces",
210
218
  "no-undef",
211
219
  "no-undef-init",
220
+ "no-underscore-dangle",
221
+ "no-undefined",
212
222
  "no-unneeded-ternary",
213
223
  "no-unreachable",
214
224
  "no-unsafe-finally",
@@ -235,6 +245,7 @@ const BUILTIN_RULE_IDS = [
235
245
  "prefer-destructuring",
236
246
  "prefer-exponentiation-operator",
237
247
  "prefer-numeric-literals",
248
+ "prefer-object-has-own",
238
249
  "prefer-object-spread",
239
250
  "prefer-promise-reject-errors",
240
251
  "prefer-regex-literals",
@@ -242,6 +253,7 @@ const BUILTIN_RULE_IDS = [
242
253
  "prefer-spread",
243
254
  "prefer-template",
244
255
  "radix",
256
+ "require-await",
245
257
  "require-atomic-updates",
246
258
  "require-yield",
247
259
  "spaced-comment",
@@ -249,6 +261,8 @@ const BUILTIN_RULE_IDS = [
249
261
  "unicode-bom",
250
262
  "use-isnan",
251
263
  "valid-typeof",
264
+ "vars-on-top",
265
+ "wrap-iife",
252
266
  "yoda",
253
267
  "import/default",
254
268
  "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.5",
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.5",
74
+ "@utoo/lint-darwin-x64": "0.0.5",
75
+ "@utoo/lint-linux-arm64": "0.0.5",
76
+ "@utoo/lint-linux-x64": "0.0.5",
77
+ "@utoo/lint-win32-x64": "0.0.5"
76
78
  },
77
79
  "publishConfig": {
78
80
  "access": "public",