Skip to content

Instantly share code, notes, and snippets.

@otakustay
Last active December 4, 2025 07:35
Show Gist options
  • Select an option

  • Save otakustay/71eec33b68ef77ced429bffdbe466f4e to your computer and use it in GitHub Desktop.

Select an option

Save otakustay/71eec33b68ef77ced429bffdbe466f4e to your computer and use it in GitHub Desktop.
Oxlint Configuration
{
"plugins": ["react", "unicorn", "typescript", "import"],
"env": {
"browser": true,
"es2021": true,
"node": true
},
"rules": {
"for-direction": "warn",
"no-async-promise-executor": "warn",
"no-caller": "off",
"no-class-assign": "off",
"no-compare-neg-zero": "off",
"no-cond-assign": "off",
"no-const-assign": "off",
"no-constant-binary-expression": "warn",
"no-constant-condition": "warn",
"no-control-regex": "off",
"no-debugger": "error",
"no-delete-var": "warn",
"no-dupe-class-members": "off",
"no-dupe-else-if": "error",
"no-dupe-keys": "off",
"no-duplicate-case": "error",
"no-empty-character-class": "error",
"no-empty-pattern": "error",
"no-empty-static-block": "off",
"no-eval": "warn",
"no-ex-assign": "error",
"no-extra-boolean-cast": "warn",
"no-func-assign": "off",
"no-global-assign": "error",
"no-import-assign": "off",
"no-invalid-regexp": "error",
"no-irregular-whitespace": "warn",
"no-loss-of-precision": "off",
"no-new-native-nonconstructor": "error",
"no-nonoctal-decimal-escape": "off",
"no-obj-calls": "off",
"no-self-assign": "error",
"no-setter-return": "off",
"no-shadow-restricted-names": "error",
"no-sparse-arrays": "error",
"no-this-before-super": "off",
"no-unsafe-finally": "error",
"no-unsafe-negation": "off",
"no-unsafe-optional-chaining": "error",
"no-unused-labels": "error",
"no-unused-private-class-members": "error",
"no-unused-vars": "error",
"no-useless-backreference": "warn",
"no-useless-catch": "warn",
"no-useless-escape": "error",
"no-useless-rename": "error",
"no-with": "off",
"require-yield": "off",
"use-isnan": "error",
"valid-typeof": "error",
"no-alert": "warn",
"no-console": "off",
"no-empty": "off",
"no-empty-function": "off",
"no-iterator": "error",
"no-proto": "error",
"no-regex-spaces": "error",
"no-undefined": "off",
"no-var": "warn",
"no-void": "off",
"unicode-bom": "warn",
"no-extend-native": "error",
"no-extra-bind": "warn",
"no-new": "error",
"no-unexpected-multiline": "error",
"no-unneeded-ternary": "error",
"no-useless-concat": "warn",
"no-useless-constructor": "error",
"array-callback-return": "error",
"eqeqeq": ["error", "always", {"null": "ignore"}],
"max-classes-per-file": "off",
"max-depth": "warn",
"max-lines": "warn",
"max-lines-per-function": "off",
"max-nested-callbacks": "warn",
"no-array-constructor": "error",
"no-case-declarations": "off",
"no-constructor-return": "error",
"no-else-return": "warn",
"no-fallthrough": "error",
"no-inner-declarations": "error",
"no-lonely-if": "error",
"no-negated-condition": "warn",
"no-new-wrappers": "error",
"no-object-constructor": "off",
"no-prototype-builtins": "off",
"no-redeclare": "off",
"no-self-compare": "error",
"no-throw-literal": "error",
"radix": "error",
"require-await": "off",
"symbol-description": "warn",
"arrow-body-style": "off",
"curly": "error",
"default-case-last": "error",
"default-param-last": "off",
"func-names": "warn",
"func-style": "off",
"grouped-accessor-pairs": "off",
"guard-for-in": "warn",
"id-length": "off",
"init-declarations": "off",
"max-params": ["warn", 4],
"new-cap": "error",
"no-continue": "off",
"no-duplicate-imports": "off",
"no-extra-label": "off",
"no-label-var": "warn",
"no-labels": "warn",
"no-lone-blocks": "warn",
"no-magic-numbers": "off",
"no-multi-assign": "off",
"no-multi-str": "warn",
"no-nested-ternary": "off",
"no-new-func": "error",
"no-return-assign": "error",
"no-script-url": "warn",
"no-template-curly-in-string": "off",
"no-ternary": "off",
"no-useless-computed-key": "error",
"operator-assignment": "off",
"prefer-destructuring": "off",
"prefer-exponentiation-operator": "off",
"prefer-numeric-literals": "error",
"prefer-object-has-own": "off",
"prefer-object-spread": "off",
"prefer-promise-reject-errors": "error",
"prefer-rest-params": "error",
"prefer-spread": "warn",
"prefer-template": "off",
"sort-imports": "off",
"sort-keys": "off",
"vars-on-top": "off",
"yoda": "warn",
"react/jsx-key": "error",
"react/jsx-no-duplicate-props": "error",
"react/jsx-no-undef": "error",
"react/jsx-props-no-spread-multi": "error",
"react/no-children-prop": "error",
"react/no-danger-with-children": "error",
"react/no-direct-mutation-state": "off",
"react/no-find-dom-node": "off",
"react/no-is-mounted": "off",
"react/no-render-return-value": "error",
"react/no-string-refs": "off",
"react/void-dom-elements-no-children": "error",
"react/exhaustive-deps": "error",
"react/forward-ref-uses-ref": "off",
"react/button-has-type": "off",
"react/jsx-no-comment-textnodes": "warn",
"react/jsx-no-script-url": "warn",
"react/jsx-no-target-blank": "error",
"react/jsx-no-useless-fragment": "error",
"react/no-array-index-key": "error",
"react/no-danger": "warn",
"react/no-unescaped-entities": "error",
"react/no-unknown-property": "error",
"react/no-unstable-nested-components": "error",
"react/style-prop-object": "error",
"typescript/await-thenable": "warn",
"typescript/no-array-delete": "error",
"typescript/no-duplicate-enum-values": "off",
"typescript/no-duplicate-type-constituents": "warn",
"typescript/no-extra-non-null-assertion": "error",
"typescript/no-floating-promises": "error",
"typescript/no-for-in-array": "error",
"typescript/no-implied-eval": "warn",
"typescript/no-misused-new": "error",
"typescript/no-misused-spread": "error",
"typescript/no-non-null-asserted-optional-chain": "warn",
"typescript/no-redundant-type-constituents": "warn",
"typescript/no-this-alias": "error",
"typescript/no-unsafe-declaration-merging": "error",
"typescript/no-unsafe-unary-minus": "error",
"typescript/no-useless-empty-export": "off",
"typescript/no-wrapper-object-types": "off",
"typescript/prefer-as-const": "error",
"typescript/triple-slash-reference": "error",
"typescript/adjacent-overload-signatures": "error",
"typescript/array-type": ["error", {"default": "array-simple"}],
"typescript/ban-ts-comment": "warn",
"typescript/consistent-generic-constructors": "error",
"typescript/consistent-type-assertions": "error",
"typescript/consistent-type-definitions": "error",
"typescript/consistent-type-exports": "error",
"typescript/consistent-type-imports": "error",
"typescript/explicit-member-accessibility": "error",
"typescript/no-confusing-non-null-assertion": "off",
"typescript/no-empty-interface": "warn",
"typescript/no-empty-object-type": "warn",
"typescript/no-explicit-any": "off",
"typescript/no-extraneous-class": "error",
"typescript/no-import-type-side-effects": "error",
"typescript/no-namespace": "error",
"typescript/no-non-null-assertion": "error",
"typescript/no-require-imports": "error",
"typescript/no-var-requires": "error",
"typescript/prefer-enum-initializers": "error",
"typescript/prefer-for-of": "error",
"typescript/prefer-function-type": "error",
"typescript/prefer-literal-enum-member": "off",
"typescript/prefer-namespace-keyword": "error",
"typescript/prefer-ts-expect-error": "error",
"typescript/no-unsafe-argument": "error",
"typescript/no-unsafe-assignment": "error",
"typescript/no-unsafe-call": "error",
"typescript/no-unsafe-function-type": "off",
"typescript/no-unsafe-member-access": "off",
"typescript/no-unsafe-return": "error",
"typescript/only-throw-error": "error",
"typescript/prefer-promise-reject-errors": "error",
"typescript/restrict-plus-operands": "error",
"typescript/switch-exhaustiveness-check": "error",
"typescript/no-unnecessary-type-assertion": "error",
"typescript/no-unnecessary-type-constraint": "error",
"unicorn/prefer-string-starts-ends-with": "warn",
"no-unassigned-vars": "error",
"no-unused-expressions": "warn",
"no-await-in-loop": "off",
"no-useless-call": "warn",
"class-methods-use-this": "off",
"no-bitwise": "off",
"no-div-regex": "off",
"no-eq-null": "off",
"no-param-reassign": "off",
"no-plusplus": "off",
"no-restricted-globals": "off",
"no-restricted-imports": "off",
"block-scoped-var": "warn",
"no-warning-comments": "off",
"sort-vars": "off",
"constructor-super": "off",
"getter-return": "off",
"no-misleading-character-class": "error",
"no-unreachable": "off",
"import/first": "off",
"react/checked-requires-onchange-or-readonly": "off",
"react/rules-of-hooks": "error",
"react/jsx-boolean-value": "error",
"react/jsx-curly-brace-presence": "off",
"react/jsx-fragments": "error",
"react/jsx-handler-names": "off",
"react/jsx-pascal-case": "off",
"react/no-set-state": "off",
"react/prefer-es6-class": "off",
"react/self-closing-comp": "off",
"react/state-in-constructor": "off",
"react/iframe-missing-sandbox": "off",
"react/react-in-jsx-scope": "off",
"typescript/no-confusing-void-expression": "off",
"typescript/no-deprecated": "warn",
"typescript/no-misused-promises": "off",
"typescript/no-mixed-enums": "error",
"typescript/related-getter-setter-pairs": "off",
"typescript/return-await": "off",
"typescript/strict-boolean-expressions": "off",
"typescript/ban-tslint-comment": "off",
"typescript/consistent-indexed-object-style": "off",
"typescript/no-inferrable-types": "off",
"typescript/prefer-reduce-type-parameter": "off",
"typescript/prefer-return-this-type": "warn",
"typescript/no-unnecessary-boolean-literal-compare": "error",
"typescript/no-unnecessary-template-expression": "error",
"typescript/no-unnecessary-type-arguments": "warn",
"typescript/no-unsafe-enum-comparison": "error",
"typescript/no-unsafe-type-assertion": "off",
"typescript/no-dynamic-delete": "off",
"typescript/no-non-null-asserted-nullish-coalescing": "error",
"typescript/non-nullable-type-assertion-style": "error",
"typescript/promise-function-async": "off",
"typescript/use-unknown-in-catch-callback-variable": "error",
"typescript/explicit-function-return-type": "off",
"typescript/explicit-module-boundary-types": "off",
"unicorn/prefer-includes": "warn",
"approx-constant": "warn",
"bad-array-method-on-arguments": "error",
"bad-bitwise-operator": "error",
"bad-char-at-comparison": "error",
"bad-comparison-sequence": "error",
"bad-min-max-func": "error",
"bad-object-literal-comparison": "error",
"bad-replace-all-arg": "error",
"branches-sharing-code": "warn",
"const-comparisons": "error",
"default-case": "error",
"double-comparisons": "error",
"erasing-op": "error",
"import/consistent-type-specifier-style": ["error", "prefer-top-level"],
"import/default": "off",
"import/export": "off",
"import/exports-last": "off",
"import/extensions": "off",
"import/group-exports": "off",
"import/max-dependencies": "off",
"import/named": "off",
"import/namespace": "off",
"import/no-absolute-path": "error",
"import/no-amd": "error",
"import/no-anonymous-default-export": "warn",
"import/no-commonjs": "error",
"import/no-cycle": "off",
"import/no-default-export": "off",
"import/no-duplicates": "error",
"import/no-dynamic-require": "warn",
"import/no-empty-named-blocks": "error",
"import/no-mutable-exports": "warn",
"import/no-named-as-default": "warn",
"import/no-named-as-default-member": "error",
"import/no-named-default": "error",
"import/no-named-export": "off",
"import/no-namespace": "warn",
"import/no-self-import": "error",
"import/no-unassigned-import": "off",
"import/no-webpack-loader-syntax": "error",
"import/prefer-default-export": "off",
"import/unambiguous": "off",
"misrefactored-assign-op": "warn",
"missing-throw": "error",
"no-accumulating-spread": "off",
"no-async-await": "off",
"no-async-endpoint-handlers": "off",
"no-barrel-file": "off",
"no-const-enum": "error",
"no-map-spread": "off",
"no-optional-chaining": "off",
"no-rest-spread-properties": "off",
"no-undef": "error",
"number-arg-out-of-range": "error",
"only-used-in-recursion": "warn",
"preserve-caught-error": "warn",
"promise/always-return": "off",
"promise/avoid-new": "off",
"promise/catch-or-return": "error",
"promise/no-callback-in-promise": "error",
"promise/no-multiple-resolved": "error",
"promise/no-nesting": "error",
"promise/no-new-statics": "error",
"promise/no-promise-in-callback": "error",
"promise/no-return-in-finally": "error",
"promise/no-return-wrap": "error",
"promise/param-names": "error",
"promise/prefer-await-to-callbacks": "error",
"promise/prefer-await-to-then": "error",
"promise/prefer-catch": "off",
"promise/spec-only": "warn",
"promise/valid-params": "error",
"react/forbid-dom-props": "off",
"react/forbid-elements": "off",
"react/jsx-filename-extension": "off",
"react/no-namespace": "error",
"react/only-export-components": "off",
"react/require-render-return": "error",
"typescript/ban-types": "off",
"typescript/no-base-to-string": "off",
"typescript/no-meaningless-void-operator": "off",
"typescript/no-unnecessary-parameter-property-assignment": "off",
"typescript/require-array-sort-compare": "off",
"typescript/require-await": "off",
"typescript/restrict-template-expressions": "off",
"typescript/unbound-method": "off",
"unicorn/catch-error-name": ["warn", { "name": "ex" }],
"unicorn/consistent-assert": "error",
"unicorn/consistent-date-clone": "error",
"unicorn/consistent-empty-array-spread": "error",
"unicorn/consistent-existence-index-check": "off",
"unicorn/consistent-function-scoping": "warn",
"unicorn/empty-brace-spaces": "error",
"unicorn/error-message": "error",
"unicorn/escape-case": "error",
"unicorn/explicit-length-check": "off",
"unicorn/filename-case": "off",
"unicorn/new-for-builtins": "error",
"unicorn/no-abusive-eslint-disable": "error",
"unicorn/no-accessor-recursion": "warn",
"unicorn/no-anonymous-default-export": "warn",
"unicorn/no-array-callback-reference": "off",
"unicorn/no-array-for-each": "warn",
"unicorn/no-array-method-this-argument": "error",
"unicorn/no-array-reduce": "off",
"unicorn/no-array-reverse": "warn",
"unicorn/no-array-sort": "warn",
"unicorn/no-await-expression-member": "warn",
"unicorn/no-await-in-promise-methods": "error",
"unicorn/no-console-spaces": "warn",
"unicorn/no-document-cookie": "error",
"unicorn/no-empty-file": "off",
"unicorn/no-hex-escape": "error",
"unicorn/no-instanceof-array": "error",
"unicorn/no-instanceof-builtins": "warn",
"unicorn/no-invalid-fetch-options": "error",
"unicorn/no-invalid-remove-event-listener": "error",
"unicorn/no-length-as-slice-end": "error",
"unicorn/no-lonely-if": "error",
"unicorn/no-magic-array-flat-depth": "error",
"unicorn/no-negation-in-equality-check": "error",
"unicorn/no-nested-ternary": "error",
"unicorn/no-new-array": "error",
"unicorn/no-new-buffer": "error",
"unicorn/no-null": "off",
"unicorn/no-object-as-default-parameter": "warn",
"unicorn/no-process-exit": "off",
"unicorn/no-single-promise-in-promise-methods": "error",
"unicorn/no-static-only-class": "error",
"unicorn/no-thenable": "error",
"unicorn/no-this-assignment": "error",
"unicorn/no-typeof-undefined": "error",
"unicorn/no-unnecessary-array-flat-depth": "error",
"unicorn/no-unnecessary-array-splice-count": "error",
"unicorn/no-unnecessary-await": "error",
"unicorn/no-unnecessary-slice-end": "error",
"unicorn/no-unreadable-array-destructuring": "error",
"unicorn/no-unreadable-iife": "warn",
"unicorn/no-useless-collection-argument": "error",
"unicorn/no-useless-error-capture-stack-trace": "error",
"unicorn/no-useless-fallback-in-spread": "error",
"unicorn/no-useless-length-check": "error",
"unicorn/no-useless-promise-resolve-reject": "error",
"unicorn/no-useless-spread": "error",
"unicorn/no-useless-switch-case": "error",
"unicorn/no-useless-undefined": "off",
"unicorn/no-zero-fractions": "error",
"unicorn/number-literal-case": "warn",
"unicorn/numeric-separators-style": "warn",
"unicorn/prefer-add-event-listener": "warn",
"unicorn/prefer-array-find": "warn",
"unicorn/prefer-array-flat": "warn",
"unicorn/prefer-array-flat-map": "warn",
"unicorn/prefer-array-index-of": "warn",
"unicorn/prefer-array-some": "warn",
"unicorn/prefer-at": "off",
"unicorn/prefer-blob-reading-methods": "warn",
"unicorn/prefer-class-fields": "warn",
"unicorn/prefer-classlist-toggle": "warn",
"unicorn/prefer-code-point": "warn",
"unicorn/prefer-date-now": "warn",
"unicorn/prefer-dom-node-append": "warn",
"unicorn/prefer-dom-node-dataset": "warn",
"unicorn/prefer-dom-node-remove": "warn",
"unicorn/prefer-dom-node-text-content": "warn",
"unicorn/prefer-event-target": "warn",
"unicorn/prefer-global-this": "off",
"unicorn/prefer-logical-operator-over-ternary": "warn",
"unicorn/prefer-math-min-max": "warn",
"unicorn/prefer-math-trunc": "warn",
"unicorn/prefer-modern-dom-apis": "warn",
"unicorn/prefer-modern-math-apis": "warn",
"unicorn/prefer-native-coercion-functions": "error",
"unicorn/prefer-negative-index": "error",
"unicorn/prefer-node-protocol": "error",
"unicorn/prefer-number-properties": "warn",
"unicorn/prefer-object-from-entries": "warn",
"unicorn/prefer-optional-catch-binding": "error",
"unicorn/prefer-prototype-methods": "off",
"unicorn/prefer-query-selector": "warn",
"unicorn/prefer-reflect-apply": "off",
"unicorn/prefer-regexp-test": "error",
"unicorn/prefer-response-static-json": "warn",
"unicorn/prefer-set-has": "warn",
"unicorn/prefer-set-size": "error",
"unicorn/prefer-spread": "error",
"unicorn/prefer-string-raw": "error",
"unicorn/prefer-string-replace-all": "error",
"unicorn/prefer-string-slice": "error",
"unicorn/prefer-string-trim-start-end": "error",
"unicorn/prefer-structured-clone": "off",
"unicorn/prefer-top-level-await": "off",
"unicorn/prefer-type-error": "warn",
"unicorn/require-array-join-separator": "error",
"unicorn/require-module-specifiers": "error",
"unicorn/require-number-to-fixed-digits-argument": "error",
"unicorn/require-post-message-target-origin": "off",
"unicorn/switch-case-braces": ["error", "avoid"],
"unicorn/text-encoding-identifier-case": "warn",
"unicorn/throw-new-error": "error",
"uninvoked-array-callback": "error",
"vitest/no-conditional-tests": "error",
"vitest/no-import-node-test": "error",
"vitest/prefer-to-be-falsy": "off",
"vitest/prefer-to-be-object": "error",
"vitest/prefer-to-be-truthy": "off",
"vitest/require-local-test-context-for-concurrent-snapshots": "error"
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment