|
| 1 | +{ |
| 2 | + "$schema": "./node_modules/oxlint/configuration_schema.json", |
| 3 | + "plugins": ["typescript", "unicorn", "oxc", "import", "promise", "node"], |
| 4 | + "categories": { |
| 5 | + "correctness": "error", |
| 6 | + "suspicious": "error", |
| 7 | + "perf": "warn", |
| 8 | + "pedantic": "warn", |
| 9 | + "style": "warn" |
| 10 | + }, |
| 11 | + "options": { |
| 12 | + "typeAware": true |
| 13 | + }, |
| 14 | + "rules": { |
| 15 | + "sort-imports": "off", |
| 16 | + "new-cap": "off", |
| 17 | + "no-ternary": "off", |
| 18 | + "no-negated-condition": "off", |
| 19 | + "max-classes-per-file": "off", |
| 20 | + "import/no-named-export": "off", |
| 21 | + "import/group-exports": "off", |
| 22 | + "import/no-namespace": "off", |
| 23 | + "import/no-unassigned-import": "off", |
| 24 | + "promise/prefer-await-to-callbacks": "off", |
| 25 | + "promise/prefer-await-to-then": "off", |
| 26 | + "unicorn/prefer-top-level-await": "off", |
| 27 | + "unicorn/no-useless-undefined": "off", |
| 28 | + "no-magic-numbers": "off", |
| 29 | + "id-length": [ |
| 30 | + "warn", |
| 31 | + { "min": 1, "exceptions": ["e", "m", "i", "j", "k", "_"] } |
| 32 | + ], |
| 33 | + "unicorn/no-null": "warn", |
| 34 | + "no-console": "warn", |
| 35 | + "eqeqeq": "error", |
| 36 | + "no-var": "error", |
| 37 | + "import/no-cycle": "error", |
| 38 | + "typescript/no-explicit-any": "error", |
| 39 | + "typescript/no-non-null-assertion": "warn", |
| 40 | + "typescript/consistent-type-imports": [ |
| 41 | + "error", |
| 42 | + { |
| 43 | + "prefer": "type-imports", |
| 44 | + "fixStyle": "inline-type-imports", |
| 45 | + "disallowTypeAnnotations": false |
| 46 | + } |
| 47 | + ], |
| 48 | + "import/consistent-type-specifier-style": ["error", "prefer-inline"], |
| 49 | + "no-restricted-imports": [ |
| 50 | + "error", |
| 51 | + { |
| 52 | + "paths": [ |
| 53 | + { |
| 54 | + "name": "effect", |
| 55 | + "allowImportNames": [ |
| 56 | + // Utilities with no deep-path equivalent |
| 57 | + "pipe", |
| 58 | + "flow", |
| 59 | + "identity", |
| 60 | + "absurd", |
| 61 | + "hole", |
| 62 | + "satisfies", |
| 63 | + "tuple", |
| 64 | + "constTrue", |
| 65 | + "constFalse", |
| 66 | + "constNull", |
| 67 | + "constUndefined", |
| 68 | + "constVoid" |
| 69 | + ], |
| 70 | + "message": "Use deep namespace import instead, e.g. `import * as Effect from 'effect/Effect'`" |
| 71 | + } |
| 72 | + ] |
| 73 | + } |
| 74 | + ] |
| 75 | + }, |
| 76 | + "ignorePatterns": ["dist/**", "node_modules/**", ".svelte-kit/**"], |
| 77 | + "overrides": [ |
| 78 | + { |
| 79 | + "files": ["**/src/lib/index.ts"], |
| 80 | + "rules": { |
| 81 | + "unicorn/no-empty-file": "off" |
| 82 | + } |
| 83 | + }, |
| 84 | + { |
| 85 | + "files": [ |
| 86 | + "**/*.config.ts", |
| 87 | + "**/*.config.js", |
| 88 | + "**/setupTests.ts", |
| 89 | + "**/setup-tests.ts" |
| 90 | + ], |
| 91 | + "rules": { |
| 92 | + "import/no-nodejs-modules": "off", |
| 93 | + "import/no-namespace": "off", |
| 94 | + "typescript/no-unsafe-call": "off", |
| 95 | + "typescript/no-unsafe-member-access": "off" |
| 96 | + } |
| 97 | + }, |
| 98 | + { |
| 99 | + "files": ["**/*.svelte"], |
| 100 | + "rules": { |
| 101 | + "prefer-const": "off", |
| 102 | + "no-unused-vars": "off", |
| 103 | + "no-undef": "off" |
| 104 | + } |
| 105 | + }, |
| 106 | + { |
| 107 | + "files": ["**/*.test.ts", "**/*.spec.ts", "**/test/**/*.ts"], |
| 108 | + "rules": { |
| 109 | + "typescript/no-explicit-any": "off", |
| 110 | + "no-console": "off" |
| 111 | + } |
| 112 | + }, |
| 113 | + { |
| 114 | + "files": ["**/*.config.ts", "**/*.config.js"], |
| 115 | + "rules": { |
| 116 | + "no-restricted-imports": "off" |
| 117 | + } |
| 118 | + } |
| 119 | + ] |
| 120 | +} |
0 commit comments