Skip to content
Myr

oxlint.config.ts

This file

Path

oxlint.config.ts

138 lines · 4.8 KiB · TypeScript

Last changed by

Merge build/comments-ops into mainoscabrielbefore adoptione4c407e

History of this file

Take it

The walk stopped after 200 commits: lines older than 678c8b8 point at it.

Merge build/614-env-service: deciders set write-only values for @sensitive items, the public sees the env shape, and checks see only placeholdersoscabrielbefore adoption678c8b8

lines 1–33why, one step back
1import { defineConfig } from "oxlint";
2import core from "ultracite/oxlint/core";3import react from "ultracite/oxlint/react";4import tanstack from "ultracite/oxlint/tanstack";5import vitest from "ultracite/oxlint/vitest";67const V3_OR_HOST_BOUND =8 "Effect v4 only: no v3 @effect/platform or @effect/cli, no effect/unstable/*, and no effect/workflow or effect/cluster (AGENTS.md principle 9).";910export default defineConfig({11 extends: [core, vitest],12 ignorePatterns: [13 ...(core.ignorePatterns ?? []),14 ".claude/**",15 ".codex/**",16 "tools/oxlint/anti-slop/**",17 "**/worker-configuration.d.ts",18 "examples/**",19 "apps/web/src/components/ui/**",20 "apps/web/src/routeTree.gen.ts",21 ],22 jsPlugins: [23 { name: "anti-slop", specifier: "./tools/oxlint/anti-slop/index.ts" },24 {25 name: "anti-slop-effect",26 specifier: "./tools/oxlint/anti-slop/effect/index.ts",27 },28 ],29 options: {30 typeAware: true,31 },32 overrides: [33 {

Merge build/comments-ops into mainoscabrielbefore adoptione4c407e

line 34why, one step back
34 // An override declares its plugins so its rule options stick.

Merge build/614-env-service: deciders set write-only values for @sensitive items, the public sees the env shape, and checks see only placeholdersoscabrielbefore adoption678c8b8

lines 35–46why, one step back
35 files: ["apps/web/**/*.{ts,tsx}"],
36 plugins: react.plugins ?? [],37 rules: {38 ...react.rules,39 ...tanstack.rules,40 },41 },42 ...(tanstack.overrides ?? []).map((override) => ({43 ...override,44 files: override.files.map((glob) => `apps/web/${glob}`),45 })),46 {

Merge build/comments-ops into mainoscabrielbefore adoptione4c407e

line 47why, one step back
47 // Without `plugins` here, oxlint keeps Ultracite's override options and drops ours.

Merge build/614-env-service: deciders set write-only values for @sensitive items, the public sees the env shape, and checks see only placeholdersoscabrielbefore adoption678c8b8

lines 48–138why, one step back
48 files: [
49 "**/*.{test,spec,test-d,spec-d}.{ts,tsx,js,jsx,mts,cts,mjs,cjs}",50 "**/__tests__/**/*.{ts,tsx,js,jsx,mts,cts,mjs,cjs}",51 ],52 plugins: ["vitest"],53 rules: {54 // `@effect/vitest` test blocks: `it.effect(…, () => Effect.gen(…))`.55 "vitest/no-standalone-expect": [56 "error",57 {58 additionalTestBlockFunctions: [59 "it.effect",60 "it.effect.each",61 "it.effect.only",62 "it.effect.skip",63 "it.flakyTest",64 "it.layer",65 "it.live",66 "it.live.each",67 "it.prop",68 "layer",69 ],70 },71 ],72 },73 },74 ],75 rules: {76 "anti-slop-effect/no-manual-effect-error-tag": "error",77 "anti-slop-effect/no-manual-tag-comparison": "error",78 "anti-slop-effect/no-manual-tagged-construction": "error",79 "anti-slop-effect/no-service-constructor-imports": "error",80 "anti-slop-effect/prefer-effect-match": "error",81 "anti-slop/no-array-filter-map": "error",82 "anti-slop/no-chained-type-assertions": "error",83 "anti-slop/no-conditional-empty-object-spread": "error",84 "anti-slop/no-known-value-widening": "error",85 "anti-slop/no-module-mocking": "error",86 "anti-slop/no-object-parameters": "error",87 "anti-slop/no-reduce-accumulator-copy": "error",88 "anti-slop/no-reflect-apply": "error",89 "anti-slop/no-reflect-get": "error",90 "anti-slop/no-runtime-typeof": "error",91 "anti-slop/no-shape-in-symbol-names": "error",92 "anti-slop/no-unknown-parameters": "error",93 "anti-slop/no-unknown-returns": "error",94 "anti-slop/no-unknown-type-aliases": "error",95 "anti-slop/no-unsafe-dictionary-type": "error",96 "anti-slop/no-widen-then-assert": "error",97 "anti-slop/require-readable-spacing": "error",98 "anti-slop/require-safety-comment-for-type-assertion": "error",99 // Effect: `Effect.gen(function* () {…})`; `Effect.fn("name")` names spans.100 "func-names": ["error", "always", { generators: "never" }],101 // Effect: Schema classes, tagged errors and services are all classes.102 "max-classes-per-file": "off",103 // Effect: `const X = Schema…` beside `type X = typeof X.Type`. tsc still104 // catches a real redeclaration.105 "no-redeclare": "off",106 "no-restricted-imports": [107 "error",108 {109 paths: [110 { message: V3_OR_HOST_BOUND, name: "@effect/platform" },111 { message: V3_OR_HOST_BOUND, name: "@effect/cli" },112 { message: V3_OR_HOST_BOUND, name: "effect/workflow" },113 { message: V3_OR_HOST_BOUND, name: "effect/cluster" },114 ],115 patterns: [116 {117 group: [118 "@effect/platform/*",119 "@effect/cli/*",120 "effect/unstable/*",121 "effect/workflow/*",122 "effect/cluster/*",123 ],124 message: V3_OR_HOST_BOUND,125 },126 ],127 },128 ],129 "oxc/no-accumulating-spread": "error",130 // Effect: its `asyncFunction` diagnostic bans `async`; promises appear only131 // where a library takes them, as plain promise-returning functions.132 "typescript/promise-function-async": "off",133 // Effect: `Effect.forEach(xs, f, { concurrency })` is not a `thisArg`.134 "unicorn/no-array-method-this-argument": "off",135 // Effect: `Schema.TaggedError<X>()(…)` returns a class, not an error.136 "unicorn/throw-new-error": "off",137 },138});