chore(lint): vendor anti-slop oxlint plugin and add batched cleanup pipeline
Vendor the anti-slop Oxlint plugin at tools/oxlint/anti-slop and register it in oxlint.config.ts, with Oxlint's own rule categories disabled so ESLint stays the general-purpose linter. Add scripts/anti-slop.mjs (bun run deslop) mirroring the React Doctor batch interface: next-batch, check-batch, active, release, top, file. Batch handoff directories now double as file claims shared across clones via ~/.openchamber/maintenance-claims, so concurrent maintenance batches from either pipeline never select the same file. Harden both scheduled maintenance flows: stop on a dirty worktree, stop on NO BATCH AVAILABLE, validate per package instead of workspace-wide, and pin react-doctor to 0.9.12. The anti-slop task command documents concrete good and bad fixes and forbids laundering types to satisfy a rule.
This commit is contained in:
@@ -0,0 +1,41 @@
|
||||
import { eslintCompatPlugin } from "@oxlint/plugins";
|
||||
|
||||
import { noChainedTypeAssertionsRule } from "./rules/no-chained-type-assertions.ts";
|
||||
import { noConditionalEmptyObjectSpreadRule } from "./rules/no-conditional-empty-object-spread.ts";
|
||||
import { noKnownValueWideningRule } from "./rules/no-known-value-widening.ts";
|
||||
import { noModuleMockingRule } from "./rules/no-module-mocking.ts";
|
||||
import { noObjectParametersRule } from "./rules/no-object-parameters.ts";
|
||||
import { noReflectApplyRule } from "./rules/no-reflect-apply.ts";
|
||||
import { noReflectGetRule } from "./rules/no-reflect-get.ts";
|
||||
import { noRuntimeTypeofRule } from "./rules/no-runtime-typeof.ts";
|
||||
import { noForbiddenTermInSymbolNamesRule } from "./rules/no-shape-in-symbol-names.ts";
|
||||
import { noUnknownParametersRule } from "./rules/no-unknown-parameters.ts";
|
||||
import { noUnknownReturnsRule } from "./rules/no-unknown-returns.ts";
|
||||
import { noUnknownTypeAliasesRule } from "./rules/no-unknown-type-aliases.ts";
|
||||
import { noUnsafeDictionaryTypeRule } from "./rules/no-unsafe-dictionary-type.ts";
|
||||
import { noWidenThenAssertRule } from "./rules/no-widen-then-assert.ts";
|
||||
import { requireSafetyCommentForTypeAssertionRule } from "./rules/require-safety-comment-for-type-assertion.ts";
|
||||
|
||||
/** Generic Oxlint rules that reject low-evidence and low-signal implementation patterns. */
|
||||
const antiSlopPlugin = eslintCompatPlugin({
|
||||
meta: { name: "anti-slop" },
|
||||
rules: {
|
||||
"no-chained-type-assertions": noChainedTypeAssertionsRule,
|
||||
"no-conditional-empty-object-spread": noConditionalEmptyObjectSpreadRule,
|
||||
"no-known-value-widening": noKnownValueWideningRule,
|
||||
"no-module-mocking": noModuleMockingRule,
|
||||
"no-object-parameters": noObjectParametersRule,
|
||||
"no-reflect-apply": noReflectApplyRule,
|
||||
"no-reflect-get": noReflectGetRule,
|
||||
"no-runtime-typeof": noRuntimeTypeofRule,
|
||||
"no-unsafe-dictionary-type": noUnsafeDictionaryTypeRule,
|
||||
"no-shape-in-symbol-names": noForbiddenTermInSymbolNamesRule,
|
||||
"no-unknown-parameters": noUnknownParametersRule,
|
||||
"no-unknown-returns": noUnknownReturnsRule,
|
||||
"no-unknown-type-aliases": noUnknownTypeAliasesRule,
|
||||
"no-widen-then-assert": noWidenThenAssertRule,
|
||||
"require-safety-comment-for-type-assertion": requireSafetyCommentForTypeAssertionRule,
|
||||
},
|
||||
});
|
||||
|
||||
export default antiSlopPlugin;
|
||||
Reference in New Issue
Block a user