import { defineConfig, type OxlintConfig } from "oxlint"; export const oxcConfig: OxlintConfig = defineConfig({ plugins: ["oxc"], rules: { "oxc/approx-constant": "error", "oxc/bad-array-method-on-arguments": "error", "oxc/bad-bitwise-operator": "error", "oxc/bad-char-at-comparison": "error", "oxc/bad-comparison-sequence": "error", "oxc/bad-match-all-arg": "error", "oxc/bad-min-max-func": "error", "oxc/bad-object-literal-comparison": "error", "oxc/bad-replace-all-arg": "error", "oxc/branches-sharing-code": "error", "oxc/const-comparisons": "error", "oxc/double-comparisons": "error", "oxc/erasing-op": "error", "oxc/misrefactored-assign-op": "error", "oxc/missing-throw": "error", "oxc/no-accumulating-spread": "error", // Modern async functions are preferred. "oxc/no-async-await": "off", // The shared config does not assume Hono endpoints. "oxc/no-async-endpoint-handlers": "off", "oxc/no-barrel-file": "error", "oxc/no-const-enum": "error", "oxc/no-map-spread": "error", // Modern optional chaining is preferred. "oxc/no-optional-chaining": "off", // Modern object rest and spread syntax is preferred. "oxc/no-rest-spread-properties": "off", "oxc/no-this-in-exported-function": "error", "oxc/number-arg-out-of-range": "error", "oxc/only-used-in-recursion": "error", "oxc/uninvoked-array-callback": "error", }, });