Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion src/layouts/Base.astro
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ interface Props {

const {
title,
description = 'A fast, type-aware TypeScript 7 linter. Drop-in compatible with typescript-eslint.',
description = 'A fast, type-aware TypeScript 7 linter. Rule-compatible with typescript-eslint.',
} = Astro.props;

const fullTitle = title === 'jetlint' ? title : `${title} · jetlint`;
Expand Down
68 changes: 61 additions & 7 deletions src/pages/config.md
Original file line number Diff line number Diff line change
Expand Up @@ -33,14 +33,14 @@ A rule entry can be a string for severity or an array of `[severity, options]`:
{
"rules": {
"no-floating-promises": "error",
"prefer-nullish-coalescing": "warn",
"prefer-nullish-coalescing": "warning",
"no-unused-vars": "off",
"only-throw-error": ["error", { "allowThrowingAny": false }]
}
}
```

Valid severities: `"error"`, `"warn"`, `"off"`.
Valid severities: `"error"`, `"warning"`, `"off"`.

## Per-rule options

Expand Down Expand Up @@ -75,23 +75,77 @@ project/
jetlint resolves files using your `tsconfig.json`'s `include` / `exclude`.
Pass `--project ./tsconfig.json` to point at a specific config file.

## Ignoring files

`ignorePatterns` is a list of gitignore-flavored doublestar globs that
suppress diagnostics for matching files. Matched files stay part of the
TypeScript program — their type information is still available to
importers — only diagnostic emission is suppressed.

```json
{
"ignorePatterns": [
"**/generated/**",
"packages/*/lib/**/*.gen.ts",
"!packages/keep/lib/api/keep.gen.ts"
]
}
```

- A leading `!` un-ignores.
- Patterns resolve relative to the directory of the `.jetlintrc.json`
that contains them.
- In a multi-config cascade, negation patterns from inner configs apply
across the cascade so a child can subtract from a parent's positive
ignore.

Unknown top-level keys (e.g. `ignoreFiles` instead of `ignorePatterns`)
exit with code `2` and a structured error so typos can't quietly
disable a feature.

Available from `@jetlint/cli@0.1.6`.

## Limiting diagnostic output

`--max-diagnostics N` caps the number of error diagnostics the human
formatter renders, and short-circuits the lint walk once the threshold
is hit. On large projects this turns a full multi-second lint into a
sub-second “is anything broken?” answer.

```bash
# Bail out after the first 20 errors. Default is 20.
jetlint --max-diagnostics 20

# No cap: visit every node, render every diagnostic.
jetlint --max-diagnostics 0
```

The cap only applies to the human formatter. Machine formats (`json`,
`sarif`, `github`, `junit`, `rdjson`) always return the full diagnostic
set so downstream tools aren't silently truncated. Warning-severity
diagnostics (including the engine's own `jetlint/rule-panic`
recoveries) don't consume the cap, so a buggy rule can't stop you
seeing real findings.

Available from `@jetlint/cli@0.1.7`.

## Editor and CI configs

The same `.jetlintrc.json` is used everywhere. For CI-specific overrides
(e.g. promoting `warn` to `error`), launch jetlint with `--strict`. That
treats every `warn` as `error` for that run.
The same `.jetlintrc.json` is used everywhere. CI invocations typically
pair `--max-diagnostics 0` (to see every finding) with `--format json`
or `--format sarif` (so downstream tools can parse the diagnostics).

## Coming next: category-level severity

Rules are already grouped into [seven categories](/rules/#all-rules-by-category)
Rules are already grouped into [eight categories](/rules/#all-rules-by-category)
internally. A future release will let you set severity per category in
addition to per rule:

```json
{
"categories": {
"correctness": "error",
"performance": "warn",
"performance": "warning",
"style": "off"
},
"rules": {
Expand Down
38 changes: 21 additions & 17 deletions src/pages/index.astro
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,9 @@ import Base from '../layouts/Base.astro';
<div class="hero-eyebrow">jetlint · pre-1.0</div>
<h1>Type-aware TypeScript&nbsp;7 linting.<br />Without the wait.</h1>
<p class="hero-lead">
A fast, type-aware linter for the TypeScript&nbsp;7 native (Go) toolchain. Drop-in
compatible with typescript-eslint: the rules you already configure, reporting in
a fraction of the time.
A fast, type-aware linter for the TypeScript&nbsp;7 native (Go) toolchain.
Rule-compatible with typescript-eslint &mdash; the rule names and options you
already use, reporting in a fraction of the time.
</p>
<div class="hero-cta">
<a class="btn btn-primary" href="/install/">Get started</a>
Expand All @@ -20,8 +20,8 @@ import Base from '../layouts/Base.astro';
<div class="compat">
<div class="compat-pct">100%</div>
<p class="compat-text">
<strong>10598 / 10598 upstream fixtures pass</strong> across 182 rules
(61 typescript-eslint ports + 112 biome / oxlint ports), plus hand-written tests
<strong>11652 / 11652 upstream fixtures pass</strong> across 373 rules
(61 typescript-eslint ports + 303 biome / oxlint ports), plus hand-written tests
for 9 ESLint-core rules without upstream fixture data.
<small>Same diagnostics as the upstream tools, byte-for-byte against their published test suites.</small>
</p>
Expand All @@ -32,11 +32,12 @@ import Base from '../layouts/Base.astro';
<h2>Type-aware linting at native speed.</h2>
<div class="features">
<div class="feature">
<h3>Interactive speed</h3>
<h3>Fail-fast lints</h3>
<p>
Re-lints reuse a warm TypeScript program. The first lint pays for the load;
every lint after that returns in milliseconds, fast enough to sit inside an
edit-feedback loop.
Use <code>--max-diagnostics N</code> to bail out of the lint walk after the
first N errors. On a real project, capping at 20 turns a 80&thinsp;s full
lint into a 0.4&thinsp;s answer for &ldquo;does this branch have any
violations?&rdquo;
</p>
</div>
<div class="feature">
Expand All @@ -50,8 +51,8 @@ import Base from '../layouts/Base.astro';
<h3>Faithful compatibility</h3>
<p>
Every rule is verified against upstream fixtures: 6193 typescript-eslint cases
and 4405 biome / oxlint cases, plus hand-written tests for 9 ESLint-core rules
without upstream fixtures. 100% match across all 182 rules. Switch over
and 5459 biome / oxlint cases, plus hand-written tests for 9 ESLint-core rules
without upstream fixtures. 100% match across all 373 rules. Switch over
without re-learning your config.
</p>
</div>
Expand Down Expand Up @@ -80,12 +81,13 @@ import Base from '../layouts/Base.astro';
</section>

<div class="categories">
<p class="categories-heading">182 rules, organized into 7 categories.</p>
<p class="categories-heading">373 rules, organized into 8 categories.</p>
<ul class="category-chips">
<li class="category-chip">correctness <span class="category-chip-count">105</span></li>
<li class="category-chip">suspicious <span class="category-chip-count">31</span></li>
<li class="category-chip">complexity <span class="category-chip-count">17</span></li>
<li class="category-chip">style <span class="category-chip-count">7</span></li>
<li class="category-chip">suspicious <span class="category-chip-count">97</span></li>
<li class="category-chip">style <span class="category-chip-count">61</span></li>
<li class="category-chip">complexity <span class="category-chip-count">52</span></li>
<li class="category-chip">a11y <span class="category-chip-count">36</span></li>
<li class="category-chip">performance <span class="category-chip-count">16</span></li>
<li class="category-chip">security <span class="category-chip-count">6</span></li>
<li class="category-chip">nursery <span class="category-chip-count">0</span></li>
Expand Down Expand Up @@ -134,7 +136,8 @@ npx jetlint --project ./tsconfig.json`}</code></pre>
in seconds-to-minutes, which is too slow to sit inside an inner loop. With the
TypeScript&nbsp;7 native toolchain landing, the checker itself is finally fast enough
that a thin linter on top can return type-aware diagnostics at interactive speed,
especially when a daemon keeps the program warm between runs.
and a <code>--max-diagnostics</code> bail-out turns the &ldquo;is anything broken?&rdquo;
question into a sub-second answer even on big projects.
</p>

<h2 style="margin-top:2rem">Standing on other peoples&apos; shoulders.</h2>
Expand All @@ -143,7 +146,8 @@ npx jetlint --project ./tsconfig.json`}</code></pre>
problems (what the rules should mean, how the checker should answer type queries,
how a linter should be structured) have already been solved well elsewhere.
jetlint&apos;s contribution is wiring them together for the TS&nbsp;7 native checker
with a daemon in front.
and exposing the ergonomic switches (fast bail-out, predictable config) that make
it useful in an inner loop.
</p>
<ul>
<li>
Expand Down
2 changes: 1 addition & 1 deletion src/pages/install.md
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ jetlint --project ./tsconfig.json
```

By default, jetlint applies the **5 recommended rules** at `error` severity. The other
**177 rules** ship `off`; see [Config](/config/) to opt in.
**368 rules** ship `off`; see [Config](/config/) to opt in.

## Run as a daemon

Expand Down
2 changes: 1 addition & 1 deletion src/pages/roadmap.md
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ from correctness.
### [suspicious](https://github.com/jetlint/jetlint/milestone/2)

Code that smells. Usually wrong, occasionally intentional. The author
should justify or fix. Default severity is `warn`.
should justify or fix. Default severity is `warning`.

### [security](https://github.com/jetlint/jetlint/milestone/3)

Expand Down
Loading