85 lines
3.0 KiB
JSON
85 lines
3.0 KiB
JSON
{
|
|
"$schema": "https://raw.githubusercontent.com/oxc-project/oxc/main/npm/oxlint/configuration_schema.json",
|
|
"plugins": ["typescript", "import", "oxc", "eslint", "unicorn", "node"],
|
|
"categories": {
|
|
"correctness": "error",
|
|
"suspicious": "error",
|
|
"perf": "error"
|
|
},
|
|
"rules": {
|
|
// Effect custom rules
|
|
"effect/no-bigint-literals": "error",
|
|
"effect/no-import-from-barrel-package": ["error", {
|
|
"checkPatterns": [
|
|
"^effect$",
|
|
"^effect/(.+/)?[a-z][a-z0-9]*$",
|
|
"^@effect/[^/]+$",
|
|
"^@effect/[^/]+/(.+/)?[a-z][a-z0-9]*$"
|
|
],
|
|
"checkRelativeIndexImports": true
|
|
}],
|
|
"effect/no-js-extension-imports": "error",
|
|
"effect/no-opaque-instance-fields": "error",
|
|
"effect/no-unused-internal": "error",
|
|
"effect/jsdocs": "error",
|
|
// Tune native rules
|
|
// Import rules
|
|
"typescript/consistent-type-imports": ["error", {
|
|
"fixStyle": "inline-type-imports"
|
|
}],
|
|
"typescript/no-import-type-side-effects": "error",
|
|
"import/no-duplicates": "error",
|
|
"import/no-self-import": "error",
|
|
"import/no-empty-named-blocks": "error",
|
|
// TypeScript cleanup
|
|
"typescript/no-unnecessary-type-assertion": "error",
|
|
"typescript/no-unnecessary-type-constraint": "error",
|
|
"typescript/no-useless-empty-export": "error",
|
|
// Code quality
|
|
"eslint/no-console": "error",
|
|
"eslint/no-var": "error",
|
|
"eslint/no-useless-constructor": "error",
|
|
"unicorn/no-abusive-eslint-disable": "error",
|
|
"eslint/no-unneeded-ternary": "error",
|
|
"eslint/no-useless-concat": "error",
|
|
"oxc/misrefactored-assign-op": "error",
|
|
// Unicorn
|
|
"unicorn/prefer-array-flat-map": "error",
|
|
"unicorn/no-accessor-recursion": "error",
|
|
"oxc/no-map-spread": "off",
|
|
"eslint/object-shorthand": "off",
|
|
"eslint/no-shadow": "off",
|
|
"eslint/no-unused-vars": "off",
|
|
"eslint/require-yield": "off",
|
|
"eslint/no-fallthrough": "off",
|
|
"eslint/no-await-in-loop": "off",
|
|
"unicorn/no-new-array": "off",
|
|
"unicorn/consistent-function-scoping": "off",
|
|
"unicorn/no-array-sort": "off",
|
|
"unicorn/no-array-reverse": "off",
|
|
"unicorn/require-post-message-target-origin": "off",
|
|
"unicorn/prefer-add-event-listener": "off",
|
|
"unicorn/prefer-set-has": "off",
|
|
"no-dangling-underscore": "off",
|
|
"typescript/no-explicit-any": "off",
|
|
"typescript/no-empty-interface": "off",
|
|
"typescript/ban-ts-comment": "off",
|
|
"typescript/no-namespace": "off",
|
|
"typescript/no-non-null-assertion": "off",
|
|
"typescript/no-dynamic-delete": "off",
|
|
"typescript/no-invalid-void-type": "off",
|
|
"typescript/no-unsafe-function-type": "off",
|
|
"typescript/unified-signatures": "off",
|
|
"typescript/no-empty-object-type": "off",
|
|
"typescript/no-confusing-non-null-assertion": "off",
|
|
"typescript/array-type": ["error", {
|
|
"default": "generic",
|
|
"readonly": "generic"
|
|
}],
|
|
"typescript/no-unused-vars": ["error", {
|
|
"argsIgnorePattern": "^_",
|
|
"varsIgnorePattern": "^_"
|
|
}]
|
|
}
|
|
}
|