|
| 1 | +{ |
| 2 | + "$schema": "./node_modules/oxlint/configuration_schema.json", |
| 3 | + // Type-aware rules (no-floating-promises, no-misused-promises, |
| 4 | + // no-unsafe-type-assertion) stay on tsc until oxlint can honor them. |
| 5 | + "plugins": ["eslint", "typescript"], |
| 6 | + "jsPlugins": ["./scripts/oxlint-plugin-corbits.js"], |
| 7 | + "categories": { |
| 8 | + "correctness": "error" |
| 9 | + }, |
| 10 | + "ignorePatterns": [ |
| 11 | + "dist/**", |
| 12 | + "vendor/**", |
| 13 | + ".worktrees/**", |
| 14 | + "**/.worktrees/**", |
| 15 | + ".scratch/**", |
| 16 | + "**/.scratch/**", |
| 17 | + "scratch/**", |
| 18 | + "**/scratch/**", |
| 19 | + "tmp/**", |
| 20 | + "**/tmp/**", |
| 21 | + ".claude/**", |
| 22 | + "**/.claude/**", |
| 23 | + ".tmp/**", |
| 24 | + "**/.tmp/**", |
| 25 | + "node_modules/**", |
| 26 | + "**/node_modules/**" |
| 27 | + ], |
| 28 | + "options": { |
| 29 | + "reportUnusedDisableDirectives": "error" |
| 30 | + }, |
| 31 | + "rules": { |
| 32 | + "no-console": "error", |
| 33 | + "no-unused-vars": [ |
| 34 | + "error", |
| 35 | + { |
| 36 | + "args": "all", |
| 37 | + "argsIgnorePattern": "^_", |
| 38 | + "varsIgnorePattern": "^_", |
| 39 | + "caughtErrorsIgnorePattern": "^_" |
| 40 | + } |
| 41 | + ], |
| 42 | + "no-unused-expressions": ["error", { "allowTaggedTemplates": true }], |
| 43 | + "typescript/adjacent-overload-signatures": "error", |
| 44 | + "typescript/array-type": "error", |
| 45 | + "typescript/ban-ts-comment": "error", |
| 46 | + "typescript/ban-tslint-comment": "error", |
| 47 | + "typescript/class-literal-property-style": "error", |
| 48 | + "typescript/consistent-generic-constructors": "error", |
| 49 | + "typescript/consistent-indexed-object-style": "error", |
| 50 | + "typescript/consistent-type-assertions": "error", |
| 51 | + "typescript/consistent-type-definitions": "off", |
| 52 | + "typescript/no-confusing-non-null-assertion": "error", |
| 53 | + "typescript/no-duplicate-enum-values": "error", |
| 54 | + "typescript/no-dynamic-delete": "error", |
| 55 | + "typescript/no-empty-interface": "error", |
| 56 | + "typescript/no-empty-object-type": "error", |
| 57 | + "typescript/no-explicit-any": "error", |
| 58 | + "typescript/no-extra-non-null-assertion": "error", |
| 59 | + "typescript/no-extraneous-class": "error", |
| 60 | + "typescript/no-inferrable-types": "error", |
| 61 | + "typescript/no-invalid-void-type": "error", |
| 62 | + "typescript/no-misused-new": "error", |
| 63 | + "typescript/no-namespace": "error", |
| 64 | + "typescript/no-non-null-asserted-nullish-coalescing": "error", |
| 65 | + "typescript/no-non-null-asserted-optional-chain": "error", |
| 66 | + "typescript/no-non-null-assertion": "error", |
| 67 | + "typescript/no-this-alias": "error", |
| 68 | + "typescript/no-unnecessary-type-constraint": "error", |
| 69 | + "typescript/no-unsafe-declaration-merging": "error", |
| 70 | + "typescript/no-unsafe-function-type": "error", |
| 71 | + "typescript/no-wrapper-object-types": "error", |
| 72 | + "typescript/prefer-as-const": "error", |
| 73 | + "typescript/prefer-for-of": "error", |
| 74 | + "typescript/prefer-function-type": "error", |
| 75 | + "typescript/prefer-literal-enum-member": "error", |
| 76 | + "typescript/prefer-namespace-keyword": "error", |
| 77 | + "typescript/unified-signatures": "error", |
| 78 | + "no-empty-function": "error" |
| 79 | + }, |
| 80 | + "overrides": [ |
| 81 | + { |
| 82 | + "files": ["src/util/control-char-strip.ts"], |
| 83 | + "rules": { |
| 84 | + "no-control-regex": "off" |
| 85 | + } |
| 86 | + }, |
| 87 | + { |
| 88 | + "files": ["scripts/**"], |
| 89 | + "rules": { |
| 90 | + "no-console": "off" |
| 91 | + } |
| 92 | + }, |
| 93 | + { |
| 94 | + "files": ["src/tui/smoke.ts", "src/tui/demo.ts"], |
| 95 | + "rules": { |
| 96 | + "no-console": "off" |
| 97 | + } |
| 98 | + }, |
| 99 | + { |
| 100 | + "files": ["**/*.test.ts"], |
| 101 | + "rules": { |
| 102 | + "corbits/no-bare-mock-module": "error" |
| 103 | + } |
| 104 | + } |
| 105 | + ] |
| 106 | +} |
0 commit comments