|
| 1 | +{ |
| 2 | + "$schema": "./node_modules/oxlint/configuration_schema.json", |
| 3 | + "plugins": [ |
| 4 | + "node", |
| 5 | + "jsdoc", |
| 6 | + "import", |
| 7 | + "unicorn" |
| 8 | + ], |
| 9 | + "categories": { |
| 10 | + "correctness": "off" |
| 11 | + }, |
| 12 | + "env": { |
| 13 | + "builtin": true, |
| 14 | + "es2024": true, |
| 15 | + "node": true |
| 16 | + }, |
| 17 | + "ignorePatterns": [ |
| 18 | + "**/node_modules", |
| 19 | + "**/out", |
| 20 | + "**/dist", |
| 21 | + "**/*.tgz", |
| 22 | + "**/coverage", |
| 23 | + "**/*.lcov", |
| 24 | + "**/logs", |
| 25 | + "**/*.log", |
| 26 | + "**/report.[0-9]*.[0-9]*.[0-9]*.[0-9]*.json", |
| 27 | + "**/.env", |
| 28 | + "**/.env.development.local", |
| 29 | + "**/.env.test.local", |
| 30 | + "**/.env.production.local", |
| 31 | + "**/.env.local", |
| 32 | + "**/.eslintcache", |
| 33 | + "**/.cache", |
| 34 | + "**/*.tsbuildinfo", |
| 35 | + "**/.idea", |
| 36 | + "**/.DS_Store", |
| 37 | + "**/package-lock.json", |
| 38 | + "**/yarn.lock", |
| 39 | + "**/pnpm-lock.yaml", |
| 40 | + "**/bun.lockb", |
| 41 | + "**/output", |
| 42 | + "**/temp", |
| 43 | + "**/.temp", |
| 44 | + "**/tmp", |
| 45 | + "**/.tmp", |
| 46 | + "**/.history", |
| 47 | + "**/.vitepress/cache", |
| 48 | + "**/.nuxt", |
| 49 | + "**/.next", |
| 50 | + "**/.svelte-kit", |
| 51 | + "**/.vercel", |
| 52 | + "**/.changeset", |
| 53 | + "**/.output", |
| 54 | + "**/.vite-inspect", |
| 55 | + "**/.yarn", |
| 56 | + "**/vite.config.*.timestamp-*", |
| 57 | + "**/CHANGELOG*.md", |
| 58 | + "**/*.min.*", |
| 59 | + "**/LICENSE*", |
| 60 | + "**/__snapshots__", |
| 61 | + "**/auto-import?(s).d.ts", |
| 62 | + "**/components.d.ts", |
| 63 | + "apps", |
| 64 | + "packages", |
| 65 | + "docs", |
| 66 | + ".claude/settings.local.json" |
| 67 | + ], |
| 68 | + "rules": { |
| 69 | + "array-callback-return": "error", |
| 70 | + "block-scoped-var": "error", |
| 71 | + "default-case-last": "error", |
| 72 | + "eqeqeq": [ |
| 73 | + "error", |
| 74 | + "always", |
| 75 | + { |
| 76 | + "null": "ignore" |
| 77 | + } |
| 78 | + ], |
| 79 | + "new-cap": [ |
| 80 | + "error", |
| 81 | + { |
| 82 | + "capIsNew": false, |
| 83 | + "newIsCap": true, |
| 84 | + "properties": true |
| 85 | + } |
| 86 | + ], |
| 87 | + "no-alert": "error", |
| 88 | + "no-array-constructor": "error", |
| 89 | + "no-async-promise-executor": "error", |
| 90 | + "no-caller": "error", |
| 91 | + "no-case-declarations": "error", |
| 92 | + "no-class-assign": "error", |
| 93 | + "no-compare-neg-zero": "error", |
| 94 | + "no-cond-assign": [ |
| 95 | + "error", |
| 96 | + "always" |
| 97 | + ], |
| 98 | + "no-console": [ |
| 99 | + "error", |
| 100 | + { |
| 101 | + "allow": [ |
| 102 | + "warn", |
| 103 | + "error" |
| 104 | + ] |
| 105 | + } |
| 106 | + ], |
| 107 | + "no-const-assign": "error", |
| 108 | + "no-control-regex": "error", |
| 109 | + "no-debugger": "error", |
| 110 | + "no-delete-var": "error", |
| 111 | + "no-dupe-class-members": "error", |
| 112 | + "no-dupe-keys": "error", |
| 113 | + "no-duplicate-case": "error", |
| 114 | + "no-empty": [ |
| 115 | + "error", |
| 116 | + { |
| 117 | + "allowEmptyCatch": true |
| 118 | + } |
| 119 | + ], |
| 120 | + "no-empty-pattern": "error", |
| 121 | + "no-eval": "error", |
| 122 | + "no-ex-assign": "error", |
| 123 | + "no-extend-native": "error", |
| 124 | + "no-extra-bind": "error", |
| 125 | + "no-extra-boolean-cast": "error", |
| 126 | + "no-fallthrough": "error", |
| 127 | + "no-func-assign": "error", |
| 128 | + "no-global-assign": "error", |
| 129 | + "no-import-assign": "error", |
| 130 | + "no-irregular-whitespace": "error", |
| 131 | + "no-iterator": "error", |
| 132 | + "no-labels": [ |
| 133 | + "error", |
| 134 | + { |
| 135 | + "allowLoop": false, |
| 136 | + "allowSwitch": false |
| 137 | + } |
| 138 | + ], |
| 139 | + "no-lone-blocks": "error", |
| 140 | + "no-loss-of-precision": "error", |
| 141 | + "no-multi-str": "error", |
| 142 | + "no-new": "error", |
| 143 | + "no-new-func": "error", |
| 144 | + "no-new-native-nonconstructor": "error", |
| 145 | + "no-new-wrappers": "error", |
| 146 | + "no-obj-calls": "error", |
| 147 | + "no-proto": "error", |
| 148 | + "no-prototype-builtins": "error", |
| 149 | + "no-redeclare": [ |
| 150 | + "error", |
| 151 | + { |
| 152 | + "builtinGlobals": false |
| 153 | + } |
| 154 | + ], |
| 155 | + "no-regex-spaces": "error", |
| 156 | + "no-restricted-globals": [ |
| 157 | + "error", |
| 158 | + { |
| 159 | + "message": "Use `globalThis` instead.", |
| 160 | + "name": "global" |
| 161 | + }, |
| 162 | + { |
| 163 | + "message": "Use `globalThis` instead.", |
| 164 | + "name": "self" |
| 165 | + } |
| 166 | + ], |
| 167 | + "no-self-assign": [ |
| 168 | + "error", |
| 169 | + { |
| 170 | + "props": true |
| 171 | + } |
| 172 | + ], |
| 173 | + "no-self-compare": "error", |
| 174 | + "no-shadow-restricted-names": "error", |
| 175 | + "no-sparse-arrays": "error", |
| 176 | + "no-template-curly-in-string": "error", |
| 177 | + "no-this-before-super": "error", |
| 178 | + "no-throw-literal": "error", |
| 179 | + "no-unexpected-multiline": "error", |
| 180 | + "no-unneeded-ternary": [ |
| 181 | + "error", |
| 182 | + { |
| 183 | + "defaultAssignment": false |
| 184 | + } |
| 185 | + ], |
| 186 | + "no-unsafe-finally": "error", |
| 187 | + "no-unsafe-negation": "error", |
| 188 | + "no-unused-expressions": [ |
| 189 | + "error", |
| 190 | + { |
| 191 | + "allowShortCircuit": true, |
| 192 | + "allowTaggedTemplates": true, |
| 193 | + "allowTernary": true |
| 194 | + } |
| 195 | + ], |
| 196 | + "no-unused-vars": [ |
| 197 | + "error", |
| 198 | + { |
| 199 | + "args": "none", |
| 200 | + "caughtErrors": "none", |
| 201 | + "ignoreRestSiblings": true, |
| 202 | + "vars": "all" |
| 203 | + } |
| 204 | + ], |
| 205 | + "no-useless-call": "error", |
| 206 | + "no-useless-catch": "error", |
| 207 | + "no-useless-computed-key": "error", |
| 208 | + "no-useless-constructor": "error", |
| 209 | + "no-useless-rename": "error", |
| 210 | + "no-useless-return": "error", |
| 211 | + "no-var": "error", |
| 212 | + "no-with": "error", |
| 213 | + "prefer-exponentiation-operator": "error", |
| 214 | + "prefer-promise-reject-errors": "error", |
| 215 | + "prefer-rest-params": "error", |
| 216 | + "prefer-spread": "error", |
| 217 | + "prefer-template": "error", |
| 218 | + "symbol-description": "error", |
| 219 | + "unicode-bom": [ |
| 220 | + "error", |
| 221 | + "never" |
| 222 | + ], |
| 223 | + "use-isnan": [ |
| 224 | + "error", |
| 225 | + { |
| 226 | + "enforceForIndexOf": true, |
| 227 | + "enforceForSwitchCase": true |
| 228 | + } |
| 229 | + ], |
| 230 | + "valid-typeof": [ |
| 231 | + "error", |
| 232 | + { |
| 233 | + "requireStringLiterals": true |
| 234 | + } |
| 235 | + ], |
| 236 | + "vars-on-top": "error", |
| 237 | + "yoda": [ |
| 238 | + "error", |
| 239 | + "never" |
| 240 | + ], |
| 241 | + "node/no-exports-assign": "error", |
| 242 | + "node/no-new-require": "error", |
| 243 | + "jsdoc/check-access": "warn", |
| 244 | + "jsdoc/check-property-names": "warn", |
| 245 | + "jsdoc/empty-tags": "warn", |
| 246 | + "jsdoc/implements-on-classes": "warn", |
| 247 | + "jsdoc/no-defaults": "warn", |
| 248 | + "jsdoc/require-param-name": "warn", |
| 249 | + "jsdoc/require-property": "warn", |
| 250 | + "jsdoc/require-property-description": "warn", |
| 251 | + "jsdoc/require-property-name": "warn", |
| 252 | + "jsdoc/require-returns-description": "warn", |
| 253 | + "import/consistent-type-specifier-style": [ |
| 254 | + "error", |
| 255 | + "top-level" |
| 256 | + ], |
| 257 | + "import/first": "error", |
| 258 | + "import/no-duplicates": "error", |
| 259 | + "import/no-mutable-exports": "error", |
| 260 | + "import/no-named-default": "error", |
| 261 | + "unicorn/consistent-empty-array-spread": "error", |
| 262 | + "unicorn/error-message": "error", |
| 263 | + "unicorn/escape-case": "error", |
| 264 | + "unicorn/new-for-builtins": "error", |
| 265 | + "unicorn/no-instanceof-builtins": "error", |
| 266 | + "unicorn/no-new-array": "error", |
| 267 | + "unicorn/no-new-buffer": "error", |
| 268 | + "unicorn/number-literal-case": "error", |
| 269 | + "unicorn/prefer-dom-node-text-content": "error", |
| 270 | + "unicorn/prefer-includes": "error", |
| 271 | + "unicorn/prefer-node-protocol": "error", |
| 272 | + "unicorn/prefer-number-properties": "error", |
| 273 | + "unicorn/prefer-string-starts-ends-with": "error", |
| 274 | + "unicorn/prefer-type-error": "error", |
| 275 | + "unicorn/throw-new-error": "error", |
| 276 | + "curly": [ |
| 277 | + "error", |
| 278 | + "all" |
| 279 | + ] |
| 280 | + }, |
| 281 | + "overrides": [ |
| 282 | + { |
| 283 | + "files": [ |
| 284 | + "**/*.?([cm])ts", |
| 285 | + "**/*.?([cm])tsx" |
| 286 | + ], |
| 287 | + "rules": { |
| 288 | + "no-class-assign": "off", |
| 289 | + "no-const-assign": "off", |
| 290 | + "no-dupe-class-members": "off", |
| 291 | + "no-dupe-keys": "off", |
| 292 | + "no-func-assign": "off", |
| 293 | + "no-import-assign": "off", |
| 294 | + "no-new-native-nonconstructor": "off", |
| 295 | + "no-obj-calls": "off", |
| 296 | + "no-redeclare": "off", |
| 297 | + "no-setter-return": "off", |
| 298 | + "no-this-before-super": "off", |
| 299 | + "no-unsafe-negation": "off", |
| 300 | + "no-with": "off", |
| 301 | + "no-array-constructor": "off", |
| 302 | + "no-unused-expressions": "off", |
| 303 | + "no-unused-vars": "off", |
| 304 | + "no-useless-constructor": "off" |
| 305 | + } |
| 306 | + }, |
| 307 | + { |
| 308 | + "files": [ |
| 309 | + "**/__tests__/**/*.?([cm])[jt]s?(x)", |
| 310 | + "**/*.spec.?([cm])[jt]s?(x)", |
| 311 | + "**/*.test.?([cm])[jt]s?(x)", |
| 312 | + "**/*.bench.?([cm])[jt]s?(x)", |
| 313 | + "**/*.benchmark.?([cm])[jt]s?(x)" |
| 314 | + ], |
| 315 | + "rules": { |
| 316 | + "no-unused-expressions": "off" |
| 317 | + } |
| 318 | + }, |
| 319 | + { |
| 320 | + "files": [ |
| 321 | + "**/*.md/**/*.?([cm])[jt]s?(x)" |
| 322 | + ], |
| 323 | + "rules": { |
| 324 | + "no-alert": "off", |
| 325 | + "no-console": "off", |
| 326 | + "no-labels": "off", |
| 327 | + "no-lone-blocks": "off", |
| 328 | + "no-unused-expressions": "off", |
| 329 | + "no-unused-labels": "off", |
| 330 | + "no-unused-vars": "off", |
| 331 | + "unicode-bom": "off" |
| 332 | + } |
| 333 | + }, |
| 334 | + { |
| 335 | + "files": [ |
| 336 | + "**/scripts/**/*.?([cm])[jt]s?(x)", |
| 337 | + "**/cli/**/*.?([cm])[jt]s?(x)", |
| 338 | + "**/cli.?([cm])[jt]s?(x)", |
| 339 | + "**/*.config.?([cm])[jt]s?(x)", |
| 340 | + "**/*.config.*.?([cm])[jt]s?(x)" |
| 341 | + ], |
| 342 | + "rules": { |
| 343 | + "no-console": "off" |
| 344 | + } |
| 345 | + }, |
| 346 | + { |
| 347 | + "files": [ |
| 348 | + "examples/**/*.?([cm])[jt]s?(x)" |
| 349 | + ], |
| 350 | + "rules": { |
| 351 | + "no-console": "off" |
| 352 | + } |
| 353 | + } |
| 354 | + ] |
| 355 | +} |
0 commit comments