Repository navigation
Description
One shared Oxlint config for every TypeScript repo in uinaf, altaywtf and putdotio: @uinaf/oxlint-config, built on @cloudflare/oxlint-config and adding our own rules.
Decisions
| Decision | Evidence |
|---|---|
Base: @cloudflare/oxlint-config 0.2.0, pinned exactly, bumped by Renovate |
It extends @nkzw/oxlint-config 4.1.0 with ~25 stricter rules (no-unsafe-*, no-non-null-assertion, no-unsafe-type-assertion, consistent-type-imports, switch-exhaustiveness-check). Those match our rules on casts and non-null assertions. uinaf/infra and altaywtf/dotfiles already run it with no-comments |
Package home: a new repo, uinaf/oxlint-config, published to npm as @uinaf/oxlint-config |
No repo owns a shared lint config today. This plugin repo tracks the plan until that repo exists; a config package needs its own release cycle |
Our layer: @uinaf/oxlint-plugin-no-comments, plus the anti-slop rules nkzw lacks, plus an Effect entry |
nkzw already ships 12 of anti-slop's 18 generic rules as quality/*. Still missing: no-module-mocking, no-runtime-typeof, no-shape-in-symbol-names, no-unknown-parameters, require-readable-spacing, require-safety-comment-for-type-assertion, and the 5 anti-slop-effect/* rules. no-comments already accepts SAFETY: comments |
Entry points: plain Oxlint (oxlint.config.ts) and Vite+ (lint in vite.config.ts) |
Both upstreams ship a /vite-plus entry; most of our repos lint through vp |
Export env, ignorePatterns and options for repos to spread |
Oxlint reads these only from the root config, so they drop out through extends |
Load plugins with import.meta.resolve |
Same as nkzw; works under strict pnpm without consumer peer installs |
| Rollout: switch failing rules off in one commit, then re-enable them one rule per commit | The migration path both upstreams document; keeps each repo's PR reviewable |
Repo lifecycle
stateDiagram-v2
[*] --> Ready: Vite+ 1.7+ or Oxlint 1.94+, config in oxlint.config.ts or vite.config.ts
Ready --> Adopted: extends @uinaf/oxlint-config, failing rules off
Adopted --> Tightened: failing rules re-enabled one per commit
Tightened --> Done: no local rule overrides except documented exceptions
Ready --> Blocked: needs work outside lint (e.g. Renovate never runs)
Blocked --> Ready
Parts
| Part | Owner | Done when |
|---|---|---|
[x] Create uinaf/oxlint-config: Cloudflare base, no-comments, ported anti-slop rules, Effect entry, both entry points |
uinaf | Published as @uinaf/oxlint-config (1.0.4 since uinaf/oxlint-config#13, with no-comments 1.2.0 from #32) with provenance, released by CI through npm trusted publishing (pnpm publish since 1.0.4, so catalog: specifiers resolve); its CI lints itself with it |
Renovate: group @uinaf/oxlint-config and @cloudflare/oxlint-config with the Oxlint toolchain |
uinaf/.github | A base bump and an Oxlint bump arrive in one PR |
| Wave 1, uinaf: infra, design, altay-dot-wtf, mirel-guvenlik, react-json-logic, skillcheck, uinaf-dot-dev, workspace-kit, oxlint-plugin-no-comments | uinaf | Each repo is Done in the lifecycle above |
Wave 2, altaywtf: dotfiles Tightened (altaywtf/dotfiles#627), off: no-unknown-parameters, no-runtime-typeof (pre-install converge code can't use Schema); puterminator Tightened (altaywtf/puterminator#51), off: no-unsafe-*, no-explicit-any, no-instanceof (need payload schemas), curly (no formatter), consistent-function-scoping, prefer-structured-clone (JSON round-trips intended), no-misused-spread, unbound-method. Both on 1.0.4 (altaywtf/dotfiles#630, altaywtf/puterminator#53) |
altaywtf | Each repo is Done |
Wave 3, put.io libraries: putio-cli, putio-mcp, putio-sdk-typescript, pas-js, putio-sockjs, rokit, taizn (replace vendored anti-slop; keep @effect/tsgo presets) |
put.io | Each repo is Done; vendored anti-slop deleted. Part B: putio-sockjs Done (putdotio/putio-sockjs#130; file-scoped exceptions for the untyped socket payload, public Custom.value and smoke-script output); rokit Tightened (putdotio/rokit#140) and taizn Tightened (putdotio/taizn#152): decoder rules (no-runtime-typeof, unknown-input, no-unsafe-*), no-instanceof and anti-slop-effect/* stay off (need schemas or non-equivalent refactors). None of the three vendored anti-slop or used tsgo. Part A: putio-sdk-typescript Done (putdotio/putio-sdk-typescript#306; file-scoped exceptions: no-empty-object-type in exported response types, no-unsafe-type-assertion and no-misused-promises in the type-erased operation tree, no-unsafe-call in public isErrorLocalizer, no-instanceof for a private class and Web API bodies, no-namespace in specs, no-console in scripts, catch-error-name where it conflicts with no-unknown-parameters); putio-cli Done (putdotio/putio-cli#201; file-scoped no-unsafe-type-assertion for SAFETY casts, no-instanceof for platform bodies and state.ts until #202, no-console in scripts, only-throw-error in the smoke script, one no-unsafe-argument disable in src/cli.ts); pas-js Done (putdotio/pas-js#111; file-scoped decoder rules and type assertions in cookie and retry-queue code, no-unsafe-dictionary-type on public properties, no-console in scripts). Vendored anti-slop deleted from the SDK and CLI |
Wave 4, put.io apps: putio-web (keeps @shadcn/lint; Tightened, #1738, #1739; #1740 open with runtime fixes; off: React Compiler rules (no compiler; findings sit in the video players), no-instanceof (DOM, event and Response narrowing), type-assertion, unknown-input and no-unsafe-* rules (need API schemas); no-console off only in scripts, e2e, configs and three logging sinks), putio-tv-legacy (Tightened, #168 open: merging deploys tv.put.io), putio-tv-native-legacy (Tightened, #173) |
put.io | Each repo is Done; React Compiler, instanceof and no-console findings fixed or documented |
Wave 1 status
| Repo | State | PR | Rules still off |
|---|---|---|---|
| infra | Done | uinaf/infra#969 | no-runtime-typeof in workloads/executor/oauth-compat.mjs only: untyped OAuth query values, no schema library |
| oxlint-plugin-no-comments | Done | #23 | unknown-input rules in src/rules/no-comments.ts (rule options) and test/no-comments.test.ts (AST walk) only |
| workspace-kit | Adopted | uinaf/workspace-kit#129 | curly (drops line coverage under the 90% gate); unknown-input, no-unsafe-* and type-assertion rules (need config and JSON schemas) |
| design | Adopted | uinaf/design#204, #205, #207 | type-assertion, unknown-input, no-runtime-typeof and no-unsafe-dictionary-type (need JSON and CSS schemas); no-known-value-widening (countByRule is published API); consistent-function-scoping (15 nested helpers) |
| altay-dot-wtf | Adopted | uinaf/altay-dot-wtf#116, #118, #120 | type-assertion, unknown-input, no-runtime-typeof, no-unsafe-*, no-explicit-any, no-chained-type-assertions, no-object-parameters (need front matter, X API and satori types); no-console (Worker's X fallback signal); no-floating-promises off in node:test files |
| uinaf-dot-dev | Adopted | uinaf/uinaf-dot-dev#172, #174, #176 | type-assertion, unknown-input and no-runtime-typeof (need GitHub API and Astro props schemas); no-floating-promises off in node:test files; no-console off in scripts/** |
Wave 1 repo states:
| Repo | State | Rules still off |
|---|---|---|
| mirel-guvenlik | Done | none; anti-slop/no-runtime-typeof runs with allowInTypeGuards for the locale walker |
| react-json-logic, #153 | Tightened | no-console, react/refs, exported-type rules, decoder rules |
| skillcheck | Tightened | no-console (CLI), decoder rules (no-runtime-typeof, no-unsafe-*, type assertions, unknown params/returns), named-contract rules |
All wave 1 repos run 1.0.4, pinned exactly: infra#974, design#210, altay-dot-wtf#122, mirel-guvenlik#120, react-json-logic#155, skillcheck#145, uinaf-dot-dev#178, workspace-kit#132, #33. Their minimumReleaseAgeExclude names both packages without a version. None repeats the vite-plus jsPlugin or prefer-vite-plus-imports; the shared /vite-plus entry carries both.
Removable on 1.0.2
| Repo | Workaround to delete |
|---|---|
| putdotio/putio-web | no-comments allow for ^@jsxImportSource and ^webpack[A-Z][A-Za-z]*: |
| putdotio/putio-tv-legacy, putdotio/putio-tv-native-legacy | no-comments allow for ^gitleaks:allow$ |
| altaywtf/puterminator | catch-error-name ignore: ["^cause$"]; root react-hooks/rules-of-hooks off |
| putdotio/putio-sdk-typescript | catch-error-name off |
| putdotio/taizn | array-callback-return and unicorn/prefer-top-level-await off |
| altaywtf/dotfiles | no-comments allow for ^trufflehog:ignore$; no-manual-tagged-construction off in the PlatformError.systemError test |
unicorn/catch-error-nameis off in the base until Vite+ bundles Oxlint 1.95: uinaf/oxlint-config#11.
Removable on 1.0.3
1.0.3 turns react/rules-of-hooks off in test and e2e files (uinaf/oxlint-config#12): **/*.{test,spec,integration,e2e}.*, **/__tests__/**, **/e2e/**.
| Repo | Workaround to delete |
|---|---|
| putdotio/putio-tv-legacy | react/rules-of-hooks off in e2e/** |
| putdotio/putio-tv-native-legacy | react/rules-of-hooks off in src/lib/sentry/diagnostics.test.ts |
- putio-web turns
react/rules-of-hooksoff at the root. 1.0.3 covers its e2e fixtures; the root off stays until app code passes. - put.io runs 1.0.3 everywhere: putio-sdk-typescript#307, putio-cli#203, pas-js#112, putio-sockjs#131, rokit#141, taizn#153, putio-web#1741, putio-tv-legacy#172, putio-tv-native-legacy#174.
- The tv repos' all-files overrides moved into root
rules. putio-web keeps its**/*.{ts,tsx,mts,cts}override: rootprefer-rest-paramsandtypescript/only-throw-erroroff still lose to the base there.
Changed in 1.0.4
vp lint --fixno longer changes runtime behavior. Off:unicorn/prefer-at,unicorn/prefer-dom-node-append,unicorn/prefer-single-call,unicorn/no-useless-spread,unicorn/text-encoding-identifier-case,import/consistent-type-specifier-style.object-shorthandchecks properties only.no-unused-varsoffers unused-import removal as a suggestion.- Still on with a behavior-changing fix:
preserve-caught-error(adds{ cause }) anduse-isnan(rewritesx === NaN). - no-comments 1.2.0 keeps a comment that starts with
SAFETY:anywhere, plus the//lines right below it. It also keepsbiome-ignore*,oxfmt-ignore,dprint-ignore*,/* global(s) */,/* eslint-env */and@preserveheaders. Repos can restore SAFETY comments that 1.1.x fixes deleted. - Restored as
SAFETY:comments where they record an invariant nothing enforces: chore(lint): restore SAFETY comments and bump @uinaf/oxlint-config design#210, chore(lint): restore SAFETY comments and bump @uinaf/oxlint-config skillcheck#145, chore(lint): restore SAFETY comments and bump @uinaf/oxlint-config workspace-kit#132, uinaf/altay-dot-wtf#122, uinaf/uinaf-dot-dev#178, chore(lint): restore SAFETY comments and bump @uinaf/oxlint-config react-json-logic#155. infra, mirel-guvenlik, dotfiles, puterminator and this repo lost none. uinaf/mirel-guvenlik#119 (open, runtime) restores the null-leaf guard uinaf/mirel-guvenlik#115 dropped. - put.io runs 1.0.4 with restored
SAFETY:comments: taizn#154 (tar staging, mkdtemp, dangling links), rokit#142 (Roku OS 11 freeze, PNG decoder limits), putio-sockjs#132 (retry budget), pas-js#113 (referrer privacy), putio-tv-native-legacy#175 (Metro platform files, Apple TV URL cache), putio-tv-legacy#173 (Chrome 38 build, auth-token race, player firmware quirks), putio-web#1743 (webOS 22, NAT-IP ban, AppPassword auth, token-leaking logs, PostHoginnerGraph, CloudFront invalidation). putio-sdk-typescript#308 and putio-cli#205 lost none. - putio-web#1743 also restores the
errkey on four Redux error actions that #1739'scatch-error-namefix renamed. putio-tv-legacy#173 scopesno-consolein the Shaka player back to oneoxlint-disable-next-line. rokit#142 drops the pinned@uinaf/skillcheck@0.4.0release-age exclude.
Consumer config
Vite+ (vite.config.ts):
import uinaf, { env, ignorePatterns } from "@uinaf/oxlint-config/vite-plus";
import { defineConfig } from "vite-plus";
export default defineConfig({
lint: { extends: [uinaf], env, ignorePatterns },
});Plain Oxlint (oxlint.config.ts; install oxlint and tsrs):
import uinaf, { env, ignorePatterns, options } from "@uinaf/oxlint-config";
import { defineConfig } from "oxlint";
export default defineConfig({ extends: [uinaf], env, ignorePatterns, options });Effect: import @uinaf/oxlint-config/effect/vite-plus or @uinaf/oxlint-config/effect instead; the rest is the same.
Open checks
- Does Vite+'s
lint.extendspass the base'soptions(type-aware) through? Yes, on Vite+ 1.8.0; repos need not restate them. Proof:test/consumer.test.tslints a floating promise throughextendsalone and expectstypescript/no-floating-promises. Controls: the same file stays silent with the rule on and notypeAware, and with the config'soptionsemptied. Plain Oxlint still needsoptionsat the root. - How many findings does the Cloudflare base raise per repo? Measure on infra, putio-cli and putio-web before wave 1 to size the work.
- putio-mcp has never had a Renovate run and is on Vite+ 1.5.x; it stays Blocked until the app runs there.
- Cloudflare pins nkzw exactly, so nkzw fixes arrive only when Cloudflare releases. Revisit if Cloudflare stalls; switching to nkzw directly costs about 89 lines.
- tsgo compatibility:
@effect/tsgo0.74.1 supports Oxlint 1.93–1.95 and Vite+ 1.8.0 bundles 1.94. Recheck on each Vite+ bump.
Schema rules still off, one tracking issue per repo: infra#980, design#214, altay-dot-wtf#127, react-json-logic#159, skillcheck#149, uinaf-dot-dev#182, workspace-kit#135, #37, dotfiles#634, puterminator#57, pas-js#116, putio-sockjs#135, rokit#144, taizn#158, putio-web#1746, putio-tv-legacy#176, putio-tv-native-legacy#178. putio-sdk-typescript, putio-cli and mirel-guvenlik have none.
Related: uinaf/.github#113, uinaf/.github#115, putdotio/.github#81
Activity