@jetlint/cli 0.0.0 → 0.1.2

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/LICENSE ADDED
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2026 Tommy Morgan
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.
package/README.md CHANGED
@@ -1,9 +1,30 @@
1
1
  # @jetlint/cli
2
2
 
3
- **Bootstrap placeholder. Do not install.**
3
+ Fast, type-aware TypeScript 7 linter. Drop-in compatible with typescript-eslint.
4
4
 
5
- This version exists only to create a settings page on npmjs.com so the
6
- real jetlint release workflow can be bound to it as a trusted publisher.
7
- It will be deprecated immediately after publish.
5
+ ```bash
6
+ npm install --save-dev @jetlint/cli
7
+ # or: pnpm add -D @jetlint/cli
8
+ # or: yarn add --dev @jetlint/cli
9
+ # or: bun add -d @jetlint/cli
8
10
 
9
- Real release: https://github.com/jetlint/jetlint
11
+ npx jetlint --project ./tsconfig.json
12
+ ```
13
+
14
+ This package is a thin Node.js wrapper that selects the correct prebuilt binary
15
+ for your platform via npm's `optionalDependencies` mechanism. The binaries
16
+ themselves live in the per-platform packages:
17
+
18
+ - `@jetlint/linux-x64`
19
+ - `@jetlint/linux-arm64`
20
+ - `@jetlint/darwin-x64`
21
+ - `@jetlint/darwin-arm64`
22
+ - `@jetlint/win32-x64`
23
+
24
+ If your platform isn't listed, install Go 1.26+ and run
25
+ `go install github.com/jetlint/jetlint/cmd/jetlint@latest`.
26
+
27
+ **Site & docs:** https://jetlint.github.io
28
+ **Source:** https://github.com/jetlint/jetlint
29
+
30
+ Licensed under MIT.
package/bin/jetlint.js ADDED
@@ -0,0 +1,65 @@
1
+ #!/usr/bin/env node
2
+ "use strict";
3
+
4
+ const { spawnSync } = require("node:child_process");
5
+
6
+ const SUPPORTED = new Set([
7
+ "linux-x64",
8
+ "linux-arm64",
9
+ "darwin-x64",
10
+ "darwin-arm64",
11
+ "win32-x64",
12
+ ]);
13
+
14
+ function platformKey() {
15
+ return `${process.platform}-${process.arch}`;
16
+ }
17
+
18
+ function resolveBinary() {
19
+ const key = platformKey();
20
+ if (!SUPPORTED.has(key)) {
21
+ throw new Error(
22
+ `jetlint: no prebuilt binary for ${key}. Supported: ${[...SUPPORTED].join(", ")}. ` +
23
+ `Build from source (Go 1.26+): go install github.com/jetlint/jetlint/cmd/jetlint@latest`,
24
+ );
25
+ }
26
+ const pkg = `@jetlint/${key}`;
27
+ const exe = process.platform === "win32" ? "jetlint.exe" : "jetlint";
28
+ try {
29
+ return require.resolve(`${pkg}/bin/${exe}`);
30
+ } catch (err) {
31
+ throw new Error(
32
+ `jetlint: cannot locate ${pkg}/bin/${exe}. The optional platform package ` +
33
+ `was not installed. Reinstall with: npm install --force jetlint (root cause: ${err.message})`,
34
+ );
35
+ }
36
+ }
37
+
38
+ function main() {
39
+ let binary;
40
+ try {
41
+ binary = resolveBinary();
42
+ } catch (err) {
43
+ process.stderr.write(`${err.message}\n`);
44
+ process.exit(1);
45
+ }
46
+
47
+ const result = spawnSync(binary, process.argv.slice(2), {
48
+ stdio: "inherit",
49
+ windowsHide: true,
50
+ });
51
+
52
+ if (result.error) {
53
+ process.stderr.write(`jetlint: failed to execute ${binary}: ${result.error.message}\n`);
54
+ process.exit(1);
55
+ }
56
+ if (typeof result.status === "number") {
57
+ process.exit(result.status);
58
+ }
59
+ if (result.signal) {
60
+ process.kill(process.pid, result.signal);
61
+ }
62
+ process.exit(1);
63
+ }
64
+
65
+ main();
package/package.json CHANGED
@@ -1,18 +1,43 @@
1
1
  {
2
2
  "name": "@jetlint/cli",
3
- "version": "0.0.0",
4
- "description": "Bootstrap placeholder for jetlint. Do not install. See https://github.com/jetlint/jetlint.",
3
+ "version": "0.1.2",
4
+ "description": "Fast, type-aware TypeScript 7 linter. Drop-in compatible with typescript-eslint.",
5
+ "keywords": [
6
+ "lint",
7
+ "linter",
8
+ "typescript",
9
+ "typescript-eslint",
10
+ "type-aware",
11
+ "static-analysis"
12
+ ],
5
13
  "homepage": "https://jetlint.github.io",
14
+ "bugs": "https://github.com/jetlint/jetlint/issues",
6
15
  "repository": {
7
16
  "type": "git",
8
17
  "url": "git+https://github.com/jetlint/jetlint.git",
9
18
  "directory": "npm/jetlint"
10
19
  },
11
20
  "license": "MIT",
21
+ "bin": {
22
+ "jetlint": "bin/jetlint.js"
23
+ },
24
+ "files": [
25
+ "bin/jetlint.js",
26
+ "README.md",
27
+ "LICENSE"
28
+ ],
12
29
  "engines": {
13
30
  "node": ">=20"
14
31
  },
15
32
  "publishConfig": {
16
- "access": "public"
33
+ "access": "public",
34
+ "provenance": true
35
+ },
36
+ "optionalDependencies": {
37
+ "@jetlint/linux-x64": "0.1.2",
38
+ "@jetlint/linux-arm64": "0.1.2",
39
+ "@jetlint/darwin-x64": "0.1.2",
40
+ "@jetlint/darwin-arm64": "0.1.2",
41
+ "@jetlint/win32-x64": "0.1.2"
17
42
  }
18
43
  }