diff --git a/.oxfmtrc.json b/.oxfmtrc.json index 20bac1bf8..f107839d8 100644 --- a/.oxfmtrc.json +++ b/.oxfmtrc.json @@ -2,5 +2,13 @@ "$schema": "./node_modules/oxfmt/configuration_schema.json", "printWidth": 80, "sortPackageJson": false, - "ignorePatterns": ["pnpm-lock.yaml", "node_modules", "dist"] + "ignorePatterns": [ + "pnpm-lock.yaml", + "node_modules", + "dist", + ".agents", + ".claude", + "agent-workspace", + "tools/oxlint/anti-slop" + ] } diff --git a/.oxlintrc.json b/.oxlintrc.json index dd0df610e..35da51cd6 100644 --- a/.oxlintrc.json +++ b/.oxlintrc.json @@ -1,6 +1,22 @@ { "$schema": "./node_modules/oxlint/configuration_schema.json", + "ignorePatterns": [ + ".agent/**", + ".agents/**", + ".claude/**", + ".codex/**", + ".continue/**", + ".cursor/**", + ".gemini/**", + ".opencode/**", + ".pi/**", + ".roo/**", + ".windsurf/**", + "agent-workspace/**", + "tools/oxlint/anti-slop/**" + ], "plugins": [ + "oxc", "eslint", "import", "jsdoc", @@ -13,7 +29,8 @@ ], "jsPlugins": [ "eslint-plugin-storybook", - "eslint-plugin-element-call" + "eslint-plugin-element-call", + { "name": "anti-slop", "specifier": "./tools/oxlint/anti-slop/index.ts" } // TODO: Re-enable once oxlint supports lint rules that rely on TypeScript type-awareness. // "eslint-plugin-rxjs" ], @@ -36,6 +53,25 @@ "element-call/no-observablescope-leak": "error", "element-call/no-top-level-logger-get-child": "error", "element-call/sdk-import-boundary": "error", + "oxc/no-accumulating-spread": "error", + "anti-slop/no-array-filter-map": "error", + "anti-slop/no-reduce-accumulator-copy": "error", + "anti-slop/no-chained-type-assertions": "error", + "anti-slop/no-conditional-empty-object-spread": "error", + "anti-slop/no-known-value-widening": "error", + "anti-slop/no-module-mocking": "error", + "anti-slop/no-object-parameters": "error", + "anti-slop/no-reflect-apply": "error", + "anti-slop/no-reflect-get": "error", + "anti-slop/no-runtime-typeof": "error", + "anti-slop/no-shape-in-symbol-names": "error", + "anti-slop/no-unknown-parameters": "error", + "anti-slop/no-unknown-returns": "error", + "anti-slop/no-unknown-type-aliases": "error", + "anti-slop/no-unsafe-dictionary-type": "error", + "anti-slop/no-widen-then-assert": "error", + "anti-slop/require-readable-spacing": "error", + "anti-slop/require-safety-comment-for-type-assertion": "error", "jsdoc/empty-tags": "error", "jsdoc/check-property-names": "error", "jsdoc/require-param-description": "warn", diff --git a/knip.ts b/knip.ts index fc3f240e5..a2bb13149 100644 --- a/knip.ts +++ b/knip.ts @@ -19,7 +19,12 @@ export default { "vite-component-dev.config.ts", ], }, - entry: ["src/main.tsx", "eslint/index.js", "i18next.config.ts"], + entry: [ + "src/main.tsx", + "eslint/index.js", + "tools/oxlint/anti-slop/index.ts", + "i18next.config.ts", + ], ignoreBinaries: [ // This is deprecated, so Knip doesn't actually recognize it as a globally // installed binary. TODO We should switch to Compose v2: @@ -33,7 +38,14 @@ export default { // Deliberately added prior to any component or business logic // implementation "src/state/ServiceInterruptionsViewModel.ts", + // Agent skills installed by the skills CLI, not project source + ".agents/**", ], + ignoreIssues: { + // Vendored anti-slop plugin: upstream owns its exports, and effect/ stays + // unregistered until this repo depends on effect + "tools/oxlint/anti-slop/**": ["files", "exports", "types"], + }, ignoreDependencies: [ // Used in CSS "normalize.css", diff --git a/package.json b/package.json index 089ed4b5a..e495cc5b4 100644 --- a/package.json +++ b/package.json @@ -60,6 +60,7 @@ "@livekit/components-react": "^2.0.0", "@livekit/track-processors": "^0.7.1", "@mediapipe/tasks-vision": "^0.10.18", + "@oxlint/plugins": "1.81.0", "@playwright/test": "^1.60.0", "@radix-ui/react-dialog": "^1.0.4", "@radix-ui/react-slider": "^1.1.2", diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index cc0d93beb..6e275b7e4 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -49,6 +49,9 @@ importers: '@mediapipe/tasks-vision': specifier: ^0.10.18 version: 0.10.35 + '@oxlint/plugins': + specifier: 1.81.0 + version: 1.81.0 '@playwright/test': specifier: ^1.60.0 version: 1.62.1 @@ -1899,6 +1902,10 @@ packages: cpu: [x64] os: [win32] + '@oxlint/plugins@1.81.0': + resolution: {integrity: sha512-HhD8kd3r6XpelZkhxhRty/po8V6yK1VV63Eq4kSsOS2IoHUywG3DV2EX+z/ZHw46aLI74Y6aA604NRiAqLKW9w==} + engines: {node: ^12.22.0 || ^14.17.0 || >=16.0.0} + '@parcel/watcher-android-arm64@2.6.0': resolution: {integrity: sha512-trgpLSCKRC/huFjXX/Smh+0sWe4+YtKfktIToiMl59ghz7z+qkH6kMvNnUbLyRs9N11t8l4svSCs1+5B3rOAhA==} engines: {node: '>= 10.0.0'} @@ -7513,6 +7520,8 @@ snapshots: '@oxlint/binding-win32-x64-msvc@1.81.0': optional: true + '@oxlint/plugins@1.81.0': {} + '@parcel/watcher-android-arm64@2.6.0': optional: true