Repository navigation
Conversation
✅ Deploy Preview for fedify-json-schema canceled.
|
|
Important Review skippedToo many files! This PR contains 232 files, which is 82 over the limit of 150. To get a review, reduce the PR to 150 files or fewer by splitting it into smaller PRs or changing its base branch. Upgrade to a paid plan to raise the limit. This review couldn't start because sufficient usage credits or metered capacity aren't available. Add credits or update usage-based reviews in the billing tab, then retry.
|
Codex Review SummaryThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
2b4d01f to
b16306b
Compare
The generated vocabulary classes rely on a Deno-specific file-level suppression header. Add an equivalent Oxlint directive while keeping the Deno header so generated code remains lintable under both tools during the migration. The Oxlint header disables the three rules the generator currently triggers: no-explicit-any, no-unused-vars, and prefer-const. Line-level Oxlint directives are deliberately omitted because the file-level disable already covers them. Changelog: none Assisted-by: OpenCode:deepseek-flash
Add a root Oxlint configuration that explicitly lists the Deno recommended rule set instead of relying on Oxlint's default categories. The config also mirrors Deno's rule options for comment directives, unused variables, empty interfaces, JSX, and constant conditions. Pin Oxlint to 1.90.0 in the pnpm catalog and add it as a root development dependency. The default lint task is not switched yet; that happens in the following commit together with the suppression translation. Changelog: none Assisted-by: Claude Code:claude-fable-5-1 Assisted-by: OpenCode:gpt-6-astra Assisted-by: OpenCode:deepseek-flash
Switch the default lint tasks to Oxlint and translate the existing deno-lint-ignore comments to oxlint-disable directives. Small rule-semantics differences are fixed or suppressed with explicit reasons; Oxlint's unused-directive reporting keeps the remaining suppressions honest. Remove deno lint segments from the package and example Deno tasks, drop dead lint configuration, and add a directive audit so a bare oxlint-disable cannot silently disable every rule. Update contributor documentation and editor settings: Oxlint now owns lint diagnostics while Deno remains the formatter until the Oxfmt migration. The generated vocabulary file keeps its Deno suppression header and gains an Oxlint file-level directive. It is gitignored, so the lint tasks name it explicitly. Changelog: none Assisted-by: OpenCode:kimi-k3.1-pro Assisted-by: Claude Code:claude-fable-5-1 Assisted-by: OpenCode:gpt-6-astra Assisted-by: OpenCode:deepseek-flash
Enable `no-await-in-loop` as a warning to surface sequential awaits that could be parallelized. Existing code intentionally awaits in loops in tests and protocol code, so the rule stays advisory rather than blocking the default gate. Keep `check:lint` and `check-each` quiet so the warning set does not flood CI and pre-commit output; `mise run lint` still shows warnings for local work and editors. Changelog: none Assisted-by: OpenCode:kimi-for-coding Assisted-by: OpenCode:deepseek-flash
Git pre-commit hooks export GIT_DIR, GIT_WORK_TREE, GIT_INDEX_FILE, and GIT_PREFIX. The directive audit and its temporary-repository tests inherited those variables, so a test `git add` could stage a file in the parent repository's index. Strip the four repository-location variables before invoking Git in both the audit and its tests. The tests still create isolated repositories and now behave the same inside and outside hooks. Changelog: none Assisted-by: OpenCode:deepseek-flash
Enable `no-console` as a warning for library, script, and example code, while turning it off for `@fedify/cli`, where console output is the user interface. Keep the one intentional init warning with an explicit suppression and explanation. The default gate stays quiet, so these warnings surface in `mise run lint` and editors without flooding CI. Changelog: none Assisted-by: OpenCode:deepseek-flash
Copy the upstream anti-slop plugin into tools/oxlint/anti-slop with the upstream MIT license and a provenance record. Pin @oxlint/plugins to the same exact version as oxlint. Enable the generic rules that currently pass: accumulating-spread, array-filter-map, module-mocking, reduce-accumulator-copy, reflect-apply, reflect-get, unknown-type-aliases, and widen-then-assert. Rewrite the filter/map chains to flatMap and keep the deliberate Proxy reflection sites with reasoned suppressions. The remaining anti-slop rules and require-readable-spacing stay disabled until their type or formatting refactors are handled separately. Exclude the vendored directory from Oxlint, Deno formatting, and Hongdown. Changelog: none Assisted-by: OpenCode:deepseek-flash
Oxlint honors both `oxlint-*` and `eslint-*` suppression comments. The directive audit only inspected the former, so a bare `eslint-disable` could still silence every rule. Match both prefixes and normalize `@typescript-eslint/...` names to the corresponding Oxlint namespace. Skip the generated Cloudflare Workers declaration file, which Oxlint already ignores, and add regression coverage for the ESLint forms. Changelog: none Assisted-by: OpenCode:gpt-6-astra Assisted-by: OpenCode:deepseek-flash
Flatten the nested promise chains using async callbacks or an async IIFE. Resolution values, rejection behavior, and ordering are preserved, and the rule now rejects new nested promise chains. Rebasing onto the outbound observation work takes the upstream async forwarding implementation. Fix the new upstream lint findings there and in the observation tests: merge duplicate LogTape imports, suppress the intentional internal and Proxy `Reflect.get` accesses, and throw an Error object in the observer failure test. Changelog: none Assisted-by: OpenCode:deepseek-flash
Rewrite the timeout document-loader fixture to throw inside an async callback instead of returning Promise.reject. The rejection value and timing stay the same, and the rule now rejects unnecessary promise wrapping. Changelog: none Assisted-by: OpenCode:deepseek-flash
Turn on the rule and keep the four error classes' `throw()` methods, which intentionally throw the receiver instance. Each site carries a reasoned suppression. Changelog: none Assisted-by: OpenCode:deepseek-flash
Widen the casts in four test assertions and use optional indexing so a missing value fails the assertion instead of throwing a TypeError. The rule now rejects new unsafe optional-chain indexing. Changelog: none Assisted-by: OpenCode:deepseek-flash
Fix the two nodeinfo service-length checks where `??` and `>` were mis-parenthesized, so the expression compared the length with a boolean instead of zero. The corrected checks preserve the intended behavior and the rule prevents the same mistake elsewhere. Changelog: none Assisted-by: OpenCode:deepseek-flash
Remove identity escapes from regular expressions and template literals where they add no meaning. Match results and emitted text are unchanged, and the rule now flags new unnecessary escapes. Changelog: none Assisted-by: OpenCode:deepseek-flash
Use the `node:` prefix for Node.js built-in imports in the Next.js 15 example config, and enable the rule to keep new built-in imports unambiguous. Changelog: none Assisted-by: OpenCode:deepseek-flash
Replace the alphabet membership indexOf check with includes, and enable the rule to prefer the clearer existence check. Changelog: none Assisted-by: OpenCode:deepseek-flash
Give the remaining Error and AggregateError constructions descriptive messages. Tests that only inspect stack traces or error kinds keep their behavior, and the rule now requires a message for new errors. Changelog: none Assisted-by: OpenCode:deepseek-flash
The pnpm catalog moved to Oxlint 1.90.0, but the Deno import map still pinned 1.66.0. Deno then relinked node_modules to the old version, causing `pnpm exec oxlint` to run a different linter than the lockfile and making newer rules unavailable. Update the Deno import map and example task specifiers to 1.90.0 and refresh deno.lock. Changelog: none Assisted-by: OpenCode:deepseek-flash
Replace the remaining forEach calls with for...of loops. Header iteration uses the Headers tuple order, and the example store keeps the original filter-before-insert batch semantics. Changelog: none Assisted-by: OpenCode:deepseek-flash
Use `import type` in three examples so TypeScript elides the imports entirely instead of leaving an empty side-effect import. The runtime module graph stays the same. Changelog: none Assisted-by: OpenCode:deepseek-flash
Convert simple index loops to for...of, except the URI-template matcher, which must count UTF-16 code units so surrogate halves split across tokens cancel correctly. That loop keeps a reasoned suppression. Changelog: none Assisted-by: OpenCode:deepseek-flash
Keep the NestJS dynamic-module class, which is a static factory by framework convention, with a reasoned suppression. The rule now flags new classes that only hold static members. Changelog: none Assisted-by: OpenCode:deepseek-flash
Register @logtape/lint and enable its recommended rules: no-message-interpolation and no-unawaited-log as errors, and prefer-lazy-evaluation and require-meta-sink as warnings. Align @logtape/file, @logtape/logtape, and @logtape/lint on 2.4.2 in the pnpm catalog, Deno import maps, and the initializer dependency list. Rewrite the benchmark-mode warning as a structured LogTape template and update its test to assert both the raw template and the summary property. Changelog: none Assisted-by: OpenCode:deepseek-flash
b16306b to
7e6f446
Compare
Oxlint's getter-return rule does not report TypeScript getters that return nothing, although Deno lint does. Document the gap and enable no-useless-return to catch the common bare-return form. Remove the redundant returns it found. fedify-dev#1358 (comment) Changelog: none Assisted-by: OpenCode:deepseek-flash
|
@codex review |
|
Codex Review: Didn't find any major issues. Keep them coming! Reviewed commit: ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
If Codex has suggestions, it will comment; otherwise it will react with 👍. Codex can also answer questions or update the PR. Try commenting "@codex address that feedback". |
Closes #1286, part of #1281.
Why
Deno is no longer the right default for repository tooling, but Fedify still needs Deno and JSR compatibility. This change moves the default lint path to Oxlint without replacing the formatter, changing type checking, or altering published package behavior. Keeping those concerns separate avoids a large formatting diff and leaves Oxfmt to #1285.
How
The root .oxlintrc.json disables every Oxlint category and lists the rules explicitly. That keeps the migration tied to the Deno
recommendedset instead of silently adopting Oxlint's broader defaults. LINTING.md documents non-obvious mappings, option differences, and accepted gaps, including the omitted Fresh rules.Existing
deno-lint-ignorecomments are translated to named Oxlint directives. A small audit script rejects bareoxlint-disableandeslint-disablecomments, unknown rule names, and directives outside the configured set. The generated vocabulary file is gitignored, so the lint task names it explicitly.Additional Oxlint rules land one per commit. This pull request includes only the first-tier rules agreed in the issue;
react,jsx-a11y,vitest, tier 2 and tier 3 rules, and type-aware rules are deferred.no-await-in-loopandno-consolestay at warning level, with the CLI exempted fromno-console.All direct
@logtape/*packages are aligned on 2.4.2, and@logtape/lintis wired into Oxlint with its recommended rule set. Anti-slop is vendored under tools/oxlint/anti-slop/ with its license and provenance; only the rules that already pass are enabled, and the rest are tracked as follow-ups.Editor settings disable
deno.lintand recommend the Oxc extension, so Deno keeps formatting and type diagnostics while Oxlint owns lint diagnostics.Enabled rules
Deno parity
typescript/adjacent-overload-signatureserrorrecommendedrule.typescript/ban-ts-commenterrorban-ts-comment, including description requirements.typescript/no-wrapper-object-typeserrorban-types.typescript/no-unsafe-function-typeerrorFunctionhalf of Deno'sban-types.eslint/constructor-supererrorrecommendedrule.eslint/for-directionerrorrecommendedrule.eslint/getter-returnerrorrecommendedrule.react/jsx-boolean-valueerrorrecommendedrule.react/button-has-typeerrorrecommendedrule.react/jsx-curly-brace-presenceerrorrecommendedrule.react/jsx-keyerrorrecommendedrule.react/no-children-properrorrecommendedrule.react/jsx-no-comment-textnodeserrorrecommendedrule.react/jsx-no-duplicate-propserrorrecommendedrule.react/no-unescaped-entitieserrorrecommendedrule.react/jsx-no-useless-fragmenterrorrecommendedrule.react/jsx-props-no-spread-multierrorrecommendedrule.react/void-dom-elements-no-childrenerrorrecommendedrule.eslint/no-array-constructorerrorrecommendedrule.eslint/no-async-promise-executorerrorrecommendedrule.eslint/no-case-declarationserrorrecommendedrule.eslint/no-class-assignerrorrecommendedrule.eslint/no-compare-neg-zeroerrorrecommendedrule.eslint/no-cond-assignerrorrecommendedrule.eslint/no-const-assignerrorrecommendedrule.eslint/no-constant-conditionerroreslint/no-control-regexerrorrecommendedrule.eslint/no-debuggererrorrecommendedrule.eslint/no-delete-varerrorrecommendedrule.eslint/no-dupe-class-memberserrorrecommendedrule.eslint/no-dupe-else-iferrorrecommendedrule.eslint/no-dupe-keyserrorrecommendedrule.eslint/no-duplicate-caseerrorrecommendedrule.eslint/no-emptyerrorrecommendedrule.eslint/no-empty-character-classerrorrecommendedrule.typescript/no-empty-interfaceerrorno-empty-interfaceand allows single-base empty interfaces.typescript/no-empty-object-typeerrorban-typesfor{}; empty interfaces are handled separately.eslint/no-empty-patternerrorrecommendedrule.eslint/no-ex-assignerrorrecommendedrule.typescript/no-explicit-anyerrorno-explicit-any.eslint/no-extra-boolean-casterrorrecommendedrule.typescript/no-extra-non-null-assertionerrorrecommendedrule.eslint/no-fallthrougherrorrecommendedrule.eslint/no-func-assignerrorrecommendedrule.eslint/no-global-assignerrorrecommendedrule.eslint/no-import-assignerrorrecommendedrule.eslint/no-inner-declarationserrorrecommendedrule.eslint/no-invalid-regexperrorrecommendedrule.eslint/no-irregular-whitespaceerrorrecommendedrule.typescript/no-misused-newerrorrecommendedrule.typescript/no-namespaceerrorrecommendedrule.eslint/no-new-native-nonconstructorerrorno-new-symbolandBigInt.eslint/no-obj-callserrorrecommendedrule.eslint/no-prototype-builtinserrorrecommendedrule.eslint/no-redeclareerrorrecommendedrule.eslint/no-regex-spaceserrorrecommendedrule.eslint/no-self-assignerrorrecommendedrule.eslint/no-setter-returnerrorrecommendedrule.eslint/no-shadow-restricted-nameserrorrecommendedrule.typescript/no-this-aliaserrorrecommendedrule.eslint/no-this-before-supererrorrecommendedrule.eslint/no-unreachableerrorrecommendedrule.eslint/no-unsafe-finallyerrorrecommendedrule.eslint/no-unsafe-negationerrorrecommendedrule.eslint/no-unused-labelserrorrecommendedrule.eslint/no-unused-varserrorno-unused-varswith_ignore patterns.eslint/no-varerrorrecommendedrule.eslint/no-witherrorrecommendedrule.typescript/prefer-as-consterrorrecommendedrule.eslint/prefer-consterrortypescript/prefer-namespace-keyworderrorrecommendedrule.eslint/require-awaiterrorrecommendedrule.eslint/require-yielderrorrecommendedrule.eslint/use-isnanerrorrecommendedrule.eslint/valid-typeoferrorrecommendedrule.react/no-dangererrorfreshtag for the Fresh examples.react/no-danger-with-childrenerrorfreshtag for the Fresh examples.react/rules-of-hookserrorfreshtag for the Fresh examples.Additional Oxlint rules
eslint/no-await-in-loopwarneslint/no-consolewarn@fedify/cli, where console output is the user interface.import/no-duplicateserrorpromise/no-nestingerrorpromise/no-return-wraperrorPromise.resolve()andreject()wrapping.eslint/no-throw-literalerrorthrow thiswith suppressions.eslint/no-unsafe-optional-chainingerroreslint/no-self-compareerror??and>precedence bugs in nodeinfo.eslint/no-useless-escapeerrorunicorn/prefer-node-protocolerrorunicorn/prefer-includeserrorincludes()for membership checks.unicorn/error-messageerrorErrorandAggregateError.unicorn/no-array-for-eacherrorfor...ofand preserves batch filter semantics.typescript/no-import-type-side-effectserrortypescript/prefer-for-oferrortypescript/no-extraneous-classerrorAnti-slop rules
oxc/no-accumulating-spreaderroranti-slop/no-module-mockingerroranti-slop/no-reduce-accumulator-copyerroranti-slop/no-unknown-type-aliaseserrorunknown.anti-slop/no-widen-then-asserterroranti-slop/no-array-filter-maperroranti-slop/no-reflect-geterroranti-slop/no-reflect-applyerrorLogTape rules
@logtape/no-message-interpolationerror@logtape/prefer-lazy-evaluationwarn@logtape/no-unawaited-logerror@logtape/require-meta-sinkwarnFollow-ups
Type-aware linting, the deferred anti-slop rules, and the remaining Oxlint rule tiers are intentionally out of scope. Oxfmt remains #1285.