Repository navigation
chore(lint): enable typescript/no-invalid-void-type - #2167
Conversation
jbeckwith-oai
left a comment
There was a problem hiding this comment.
ReturnType<() => void> is only an indirect spelling of void, so this enables the lint rule by obscuring otherwise clear public/type-test signatures without improving the contract. Please keep the compatibility exception (or configure the rule to permit these intentional void uses) and retain the direct void types rather than encoding them through a function-type alias.
52ec58c to
7a3736e
Compare
jbeckwith-oai
left a comment
There was a problem hiding this comment.
Re-review complete on the force-updated head. The public and type-test contracts remain direct void, and the rule is now enabled with a narrow, documented exact-file compatibility override for the intentional cases. The full stacked diff is maintainable and behavior-preserving; diff checks and the available CI lint, build, test, examples, breaking-change, and CodeQL checks are green.
- [x] I understand that this repository is auto-generated and my pull request may not be merged ## Changes being requested - Remove the `promise/param-names` compatibility exception from `oxlint.config.ts`. - Rename four Promise executor parameters to the configured resolve/reject names. - Baseline count: 4 diagnostics. ## Additional context & links - Oxlint cleanup stack, part 76; stacked on #2165. - Preserves generated-file exclusions and repository-specific import policy. ### Validation - `pnpm lint` - `pnpm exec tsc --pretty false` - `NODE_NO_WARNINGS=1 pnpm exec vitest run --config vitest.config.mts --update=none` ## Stack #2166 👈 this PR #2167 #2168 #2169 #2170 #2171 #2172 #2173 #2174 #2175 #2176 #2177 #2178 #2179 #2180 #2181 #2182 #2183 #2184 #2185
7a3736e to
6368790
Compare
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 6368790886
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
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".
| 'tests/responses.test.ts', | ||
| ], | ||
| rules: { | ||
| 'typescript/no-invalid-void-type': 'off', |
There was a problem hiding this comment.
Narrow the void-rule exemption to the intentional types
When an invalid void type is added anywhere else in these four files, lint will silently accept it because the rule is disabled for each entire file, including the large EventStream.ts implementation and all future response type tests. This means the rule is not actually enforced on those files beyond the four existing intentional cases; use line-scoped suppressions or an equivalent type spelling for only those cases so later violations remain detectable.
Useful? React with 👍 / 👎.
- [x] I understand that this repository is auto-generated and my pull request may not be merged ## Changes being requested - Remove the `unicorn/no-useless-switch-case` compatibility exception from `oxlint.config.ts`. - Remove four redundant switch labels while retaining catch-all defaults. - Baseline count: 4 diagnostics. ## Additional context & links - Oxlint cleanup stack, part 78; stacked on #2167. - Preserves generated-file exclusions and repository-specific import policy. ### Validation - `pnpm lint` - `pnpm exec tsc --pretty false` - `NODE_NO_WARNINGS=1 pnpm exec vitest run --config vitest.config.mts --update=none` ## Stack #2166 #2167 #2168 👈 this PR #2169 #2170 #2171 #2172 #2173 #2174 #2175 #2176 #2177 #2178 #2179 #2180 #2181 #2182 #2183 #2184 #2185
- [x] I understand that this repository is auto-generated and my pull request may not be merged ## Changes being requested - Remove the `unicorn/prefer-query-selector` compatibility exception from `oxlint.config.ts`. - Use `querySelector()` for four fixed-ID ecosystem fixture lookups. - Baseline count: 4 diagnostics. ## Additional context & links - Oxlint cleanup stack, part 79; stacked on #2168. - Preserves generated-file exclusions and repository-specific import policy. ### Validation - `pnpm lint` - `pnpm exec tsc --pretty false` - `NODE_NO_WARNINGS=1 pnpm exec vitest run --config vitest.config.mts --update=none` ## Stack #2166 #2167 #2168 #2169 👈 this PR #2170 #2171 #2172 #2173 #2174 #2175 #2176 #2177 #2178 #2179 #2180 #2181 #2182 #2183 #2184 #2185
- [x] I understand that this repository is auto-generated and my pull request may not be merged ## Changes being requested - Remove the `unicorn/require-module-specifiers` compatibility exception from `oxlint.config.ts`. - Localize four intentional empty module-marker exports with explanations. - Baseline count: 4 diagnostics. ## Additional context & links - Oxlint cleanup stack, part 80; stacked on #2169. - Preserves generated-file exclusions and repository-specific import policy. ### Validation - `pnpm lint` - `pnpm exec tsc --pretty false` - `NODE_NO_WARNINGS=1 pnpm exec vitest run --config vitest.config.mts --update=none` ## Stack #2166 #2167 #2168 #2169 #2170 👈 this PR #2171 #2172 #2173 #2174 #2175 #2176 #2177 #2178 #2179 #2180 #2181 #2182 #2183 #2184 #2185
- [x] I understand that this repository is auto-generated and my pull request may not be merged ## Changes being requested - Remove the `no-useless-concat` compatibility exception from `oxlint.config.ts`. - Collapse adjacent literal concatenations without changing emitted bytes. - Baseline count: 5 diagnostics. ## Additional context & links - Oxlint cleanup stack, part 81; stacked on #2170. - Preserves generated-file exclusions and repository-specific import policy. ### Validation - `pnpm lint` - `pnpm exec tsc --pretty false` - `NODE_NO_WARNINGS=1 pnpm exec vitest run --config vitest.config.mts --update=none` ## Stack #2166 #2167 #2168 #2169 #2170 #2171 👈 this PR #2172 #2173 #2174 #2175 #2176 #2177 #2178 #2179 #2180 #2181 #2182 #2183 #2184 #2185
- [x] I understand that this repository is auto-generated and my pull request may not be merged ## Changes being requested - Remove the `unicorn/no-lonely-if` compatibility exception from `oxlint.config.ts`. - Combine five nested predicates while preserving short-circuit behavior. - Baseline count: 5 diagnostics. ## Additional context & links - Oxlint cleanup stack, part 82; stacked on #2171. - Preserves generated-file exclusions and repository-specific import policy. ### Validation - `pnpm lint` - `pnpm exec tsc --pretty false` - `NODE_NO_WARNINGS=1 pnpm exec vitest run --config vitest.config.mts --update=none` ## Stack #2166 #2167 #2168 #2169 #2170 #2171 #2172 👈 this PR #2173 #2174 #2175 #2176 #2177 #2178 #2179 #2180 #2181 #2182 #2183 #2184 #2185
- [x] I understand that this repository is auto-generated and my pull request may not be merged ## Changes being requested - Remove the `unicorn/prefer-code-point` compatibility exception from `oxlint.config.ts`. - Use code-point APIs where safe and document three intentional UTF-16 code-unit sites. - Baseline count: 5 diagnostics. ## Additional context & links - Oxlint cleanup stack, part 83; stacked on #2172. - Preserves generated-file exclusions and repository-specific import policy. ### Validation - `pnpm lint` - `pnpm exec tsc --pretty false` - `NODE_NO_WARNINGS=1 pnpm exec vitest run --config vitest.config.mts --update=none` ## Stack #2166 #2167 #2168 #2169 #2170 #2171 #2172 #2173 👈 this PR #2174 #2175 #2176 #2177 #2178 #2179 #2180 #2181 #2182 #2183 #2184 #2185
- [x] I understand that this repository is auto-generated and my pull request may not be merged ## Changes being requested - Remove the `import/newline-after-import` compatibility exception from `oxlint.config.ts`. - Add the six required import-boundary blank lines. - Baseline count: 6 diagnostics. ## Additional context & links - Oxlint cleanup stack, part 84; stacked on #2173. - Preserves generated-file exclusions and repository-specific import policy. ### Validation - `pnpm lint` - `pnpm exec tsc --pretty false` - `NODE_NO_WARNINGS=1 pnpm exec vitest run --config vitest.config.mts --update=none` ## Stack #2166 #2167 #2168 #2169 #2170 #2171 #2172 #2173 #2174 👈 this PR #2175 #2176 #2177 #2178 #2179 #2180 #2181 #2182 #2183 #2184 #2185
- [x] I understand that this repository is auto-generated and my pull request may not be merged ## Changes being requested - Remove the `logical-assignment-operators` compatibility exception from `oxlint.config.ts`. - Use `||=` for six listener-array initializations while preserving falsy semantics. - Baseline count: 6 diagnostics. ## Additional context & links - Oxlint cleanup stack, part 85; stacked on #2174. - Preserves generated-file exclusions and repository-specific import policy. ### Validation - `pnpm lint` - `pnpm exec tsc --pretty false` - `NODE_NO_WARNINGS=1 pnpm exec vitest run --config vitest.config.mts --update=none` ## Stack #2166 #2167 #2168 #2169 #2170 #2171 #2172 #2173 #2174 #2175 👈 this PR #2176 #2177 #2178 #2179 #2180 #2181 #2182 #2183 #2184 #2185
- [x] I understand that this repository is auto-generated and my pull request may not be merged ## Changes being requested - Remove the `no-case-declarations` compatibility exception from `oxlint.config.ts`. - Brace five switch case bodies that contain lexical declarations. - Baseline count: 6 diagnostics. ## Additional context & links - Oxlint cleanup stack, part 86; stacked on #2175. - Preserves generated-file exclusions and repository-specific import policy. ### Validation - `pnpm lint` - `pnpm exec tsc --pretty false` - `NODE_NO_WARNINGS=1 pnpm exec vitest run --config vitest.config.mts --update=none` ## Stack #2166 #2167 #2168 #2169 #2170 #2171 #2172 #2173 #2174 #2175 #2176 👈 this PR #2177 #2178 #2179 #2180 #2181 #2182 #2183 #2184 #2185
- [x] I understand that this repository is auto-generated and my pull request may not be merged ## Changes being requested - Remove the `no-useless-return` compatibility exception from `oxlint.config.ts`. - Remove or make explicit six redundant bare returns without weakening typecheck control flow. - Baseline count: 6 diagnostics. ## Additional context & links - Oxlint cleanup stack, part 87; stacked on #2176. - Preserves generated-file exclusions and repository-specific import policy. ### Validation - `pnpm lint` - `pnpm exec tsc --pretty false` - `NODE_NO_WARNINGS=1 pnpm exec vitest run --config vitest.config.mts --update=none` ## Stack #2166 #2167 #2168 #2169 #2170 #2171 #2172 #2173 #2174 #2175 #2176 #2177 👈 this PR #2178 #2179 #2180 #2181 #2182 #2183 #2184 #2185
- [x] I understand that this repository is auto-generated and my pull request may not be merged ## Changes being requested - Remove the `typescript/no-wrapper-object-types` compatibility exception from `oxlint.config.ts`. - Replace wrapper object types with primitive `object` and `bigint` types. - Baseline count: 6 diagnostics. ## Additional context & links - Oxlint cleanup stack, part 88; stacked on #2177. - Preserves generated-file exclusions and repository-specific import policy. ### Validation - `pnpm lint` - `pnpm exec tsc --pretty false` - `NODE_NO_WARNINGS=1 pnpm exec vitest run --config vitest.config.mts --update=none` ## Stack #2166 #2167 #2168 #2169 #2170 #2171 #2172 #2173 #2174 #2175 #2176 #2177 #2178 👈 this PR #2179 #2180 #2181 #2182 #2183 #2184 #2185
- [x] I understand that this repository is auto-generated and my pull request may not be merged ## Changes being requested - Remove the `unicorn/custom-error-definition` compatibility exception from `oxlint.config.ts`. - Set Realtime error names and preserve two vendored exported class identities locally. - Baseline count: 6 diagnostics. ## Additional context & links - Oxlint cleanup stack, part 89; stacked on #2178. - Preserves generated-file exclusions and repository-specific import policy. ### Validation - `pnpm lint` - `pnpm exec tsc --pretty false` - `NODE_NO_WARNINGS=1 pnpm exec vitest run --config vitest.config.mts --update=none` ## Stack #2166 #2167 #2168 #2169 #2170 #2171 #2172 #2173 #2174 #2175 #2176 #2177 #2178 #2179 👈 this PR #2180 #2181 #2182 #2183 #2184 #2185
- [x] I understand that this repository is auto-generated and my pull request may not be merged ## Changes being requested - Remove the `unicorn/prefer-number-properties` compatibility exception from `oxlint.config.ts`. - Replace six safe global numeric references with `Number.*` equivalents. - Baseline count: 6 diagnostics. ## Additional context & links - Oxlint cleanup stack, part 90; stacked on #2179. - Preserves generated-file exclusions and repository-specific import policy. ### Validation - `pnpm lint` - `pnpm exec tsc --pretty false` - `NODE_NO_WARNINGS=1 pnpm exec vitest run --config vitest.config.mts --update=none` ## Stack #2166 #2167 #2168 #2169 #2170 #2171 #2172 #2173 #2174 #2175 #2176 #2177 #2178 #2179 #2180 👈 this PR #2181 #2182 #2183 #2184 #2185
- [x] I understand that this repository is auto-generated and my pull request may not be merged ## Changes being requested - Remove the `no-else-return` compatibility exception from `oxlint.config.ts`. - Flatten seven `else` branches that follow unconditional returns. - Baseline count: 7 diagnostics. ## Additional context & links - Oxlint cleanup stack, part 91; stacked on #2180. - Preserves generated-file exclusions and repository-specific import policy. ### Validation - `pnpm lint` - `pnpm exec tsc --pretty false` - `NODE_NO_WARNINGS=1 pnpm exec vitest run --config vitest.config.mts --update=none` ## Stack #2166 #2167 #2168 #2169 #2170 #2171 #2172 #2173 #2174 #2175 #2176 #2177 #2178 #2179 #2180 #2181 👈 this PR #2182 #2183 #2184 #2185
- [x] I understand that this repository is auto-generated and my pull request may not be merged ## Changes being requested - Remove the `no-unsafe-optional-chaining` compatibility exception from `oxlint.config.ts`. - Carry optionality or add explicit guards at seven unsafe chain uses. - Baseline count: 7 diagnostics. ## Additional context & links - Oxlint cleanup stack, part 92; stacked on #2181. - Preserves generated-file exclusions and repository-specific import policy. ### Validation - `pnpm lint` - `pnpm exec tsc --pretty false` - `NODE_NO_WARNINGS=1 pnpm exec vitest run --config vitest.config.mts --update=none` ## Stack #2166 #2167 #2168 #2169 #2170 #2171 #2172 #2173 #2174 #2175 #2176 #2177 #2178 #2179 #2180 #2181 #2182 👈 this PR #2183 #2184 #2185
- [x] I understand that this repository is auto-generated and my pull request may not be merged ## Changes being requested - Remove the `oxc/no-barrel-file` compatibility exception from `oxlint.config.ts`. - Enable the rule globally while scoping seven intentional public/vendor barrel entrypoints. - Baseline count: 7 diagnostics. ## Additional context & links - Oxlint cleanup stack, part 93; stacked on #2182. - Preserves generated-file exclusions and repository-specific import policy. ### Validation - `pnpm lint` - `pnpm exec tsc --pretty false` - `NODE_NO_WARNINGS=1 pnpm exec vitest run --config vitest.config.mts --update=none` ## Stack #2166 #2167 #2168 #2169 #2170 #2171 #2172 #2173 #2174 #2175 #2176 #2177 #2178 #2179 #2180 #2181 #2182 #2183 👈 this PR #2184 #2185
- [x] I understand that this repository is auto-generated and my pull request may not be merged ## Changes being requested - Remove the `typescript/no-empty-object-type` compatibility exception from `oxlint.config.ts`. - Replace seven empty object types with `object`-based equivalents. - Baseline count: 7 diagnostics. ## Additional context & links - Oxlint cleanup stack, part 94; stacked on #2183. - Preserves generated-file exclusions and repository-specific import policy. ### Validation - `pnpm lint` - `pnpm exec tsc --pretty false` - `NODE_NO_WARNINGS=1 pnpm exec vitest run --config vitest.config.mts --update=none` ## Stack #2166 #2167 #2168 #2169 #2170 #2171 #2172 #2173 #2174 #2175 #2176 #2177 #2178 #2179 #2180 #2181 #2182 #2183 #2184 👈 this PR #2185
- [x] I understand that this repository is auto-generated and my pull request may not be merged ## Changes being requested - Remove the `typescript/no-inferrable-types` compatibility exception from `oxlint.config.ts`. - Remove seven primitive annotations inferred from their initializers. - Baseline count: 7 diagnostics. ## Additional context & links - Oxlint cleanup stack, part 95; stacked on #2184. - Preserves generated-file exclusions and repository-specific import policy. ### Validation - `pnpm lint` - `pnpm exec tsc --pretty false` - `NODE_NO_WARNINGS=1 pnpm exec vitest run --config vitest.config.mts --update=none` ## Stack #2166 #2167 #2168 #2169 #2170 #2171 #2172 #2173 #2174 #2175 #2176 #2177 #2178 #2179 #2180 #2181 #2182 #2183 #2184 #2185 👈 this PR
Changes being requested
typescript/no-invalid-void-typecompatibility exception fromoxlint.config.ts.voidtype semantics throughReturnType<() => void>.Additional context & links
Validation
pnpm lintpnpm exec tsc --pretty falseNODE_NO_WARNINGS=1 pnpm exec vitest run --config vitest.config.mts --update=noneStack
#2166
#2167 👈 this PR
#2168
#2169
#2170
#2171
#2172
#2173
#2174
#2175
#2176
#2177
#2178
#2179
#2180
#2181
#2182
#2183
#2184
#2185