/ .oxlintrc.json
.oxlintrc.json
  1  {
  2  	"$schema": "node_modules/oxlint/configuration_schema.json",
  3  	"ignorePatterns": [ "eslint.config.ts", "deno-deploy-serve.ts" ],
  4  	"env": { "builtin": true },
  5  	"options": {
  6  		"typeAware": true,
  7  		"typeCheck": true
  8  	},
  9  	"categories": {
 10  		"correctness": "error",
 11  		"suspicious": "error",
 12  		"pedantic": "warn",
 13  		"perf": "warn",
 14  		"style": "warn",
 15  		"restriction": "warn",
 16  		"nursery": "warn",
 17  	},
 18  	"plugins": [
 19  		"oxc",
 20  		"eslint",
 21  		"typescript",
 22  		"unicorn",
 23  		"import",
 24  		"react",
 25  		"react-perf",
 26  		"promise",
 27  		// "node",
 28  	],
 29  	"jsPlugins": [
 30  		{ "name": "react-hooks-js", "specifier": "eslint-plugin-react-hooks" },
 31  		{ "name": "react-compiler-js", "specifier": "eslint-plugin-react-compiler" },
 32  	],
 33  	"overrides": [
 34  		{
 35  			"files": [ "**/*.{js,jsx,ts,tsx}" ],
 36  			"env": { "browser": true },
 37  			"globals": {
 38  				"JSX": "readonly",
 39  				"process": "readonly"
 40  			},
 41  			"rules": {
 42  				"eslint/capitalized-comments": "off",
 43  				"eslint/complexity": [ "warn", 30 ],
 44  				"eslint/curly": "off",
 45  				"eslint/default-case": "off",
 46  				"eslint/eqeqeq": "off",
 47  				"eslint/func-style": "off",
 48  				"eslint/id-length": "off",
 49  				"eslint/init-declarations": "off",
 50  				"eslint/max-depth": [ "warn", 5 ],
 51  				"eslint/max-lines": [ "warn", { "max": 500, "skipComments": true, "skipBlankLines": true } ],
 52  				"eslint/max-lines-per-function": [ "warn", { "max": 250, "skipComments": true, "skipBlankLines": true } ],
 53  				"eslint/max-params": [ "warn", 6 ],
 54  				"eslint/max-statements": [ "warn", 50 ],
 55  				"eslint/no-bitwise": "off",
 56  				"eslint/no-console": "off",
 57  				"no-empty-function": "off",
 58  				"eslint/no-inline-comments": "off",
 59  				"eslint/no-magic-numbers": "off",
 60  				"eslint/no-negated-condition": "off",
 61  				"eslint/no-nested-ternary": "off",
 62  				"eslint/no-param-reassign": "off",
 63  				"eslint/no-plusplus": "off",
 64  				"eslint/no-shadow": "off",
 65  				"eslint/no-undefined": "off",
 66  				"eslint/no-use-before-define": "off",
 67  				"eslint/no-ternary": "off",
 68  				"eslint/no-void": [ "error", { "allowAsStatement": true } ],
 69  				"eslint/sort-imports": "off",
 70  				"eslint/sort-keys": "off",
 71  				"eslint/sort-vars": "off",
 72  				"oxc/no-async-await": "off",
 73  				"oxc/no-optional-chaining": "off",
 74  				"typescript/consistent-return": "off",
 75  				"typescript/consistent-type-definitions": [ "error", "type" ],
 76  				"typescript/explicit-function-return-type": "off",
 77  				"typescript/explicit-module-boundary-types": "off",
 78  				"typescript/no-confusing-void-expression": "off",
 79  				"typescript/no-non-null-assertion": "off",
 80  				"typescript/no-unsafe-type-assertion": "warn",
 81  				"typescript/prefer-readonly-parameter-types": "off",
 82  				"typescript/promise-function-async": "off",
 83  				"typescript/strict-boolean-expressions": "off",
 84  				"unicorn/catch-error-name": "off",
 85  				"unicorn/new-for-builtins": "off",
 86  				"unicorn/no-array-for-each": "off",
 87  				"unicorn/no-array-callback-reference": "off",
 88  				"unicorn/no-array-reduce": "off",
 89  				"unicorn/no-array-reverse": "off",
 90  				"unicorn/no-nested-ternary": "off",
 91  				"unicorn/prefer-add-event-listener": "off",
 92  				"unicorn/prefer-dom-node-dataset": "off",
 93  				"unicorn/prefer-number-properties": "off",
 94  				"unicorn/prefer-spread": "off",
 95  				"unicorn/prefer-ternary": [ "warn", "only-single-line" ],
 96  				"unicorn/switch-case-braces": "off",
 97  				"import/consistent-type-specifier-style": "off",
 98  				"import/exports-last": "off",
 99  				"import/group-exports": "off",
100  				"import/max-dependencies": [ "warn", { "max": 15, "ignoreTypeImports": true } ],
101  				"import/no-default-export": "off",
102  				"import/no-named-export": "off",
103  				"import/no-nodejs-modules": "off",
104  				"import/no-unassigned-import": [ "warn", { "allow": [ "**/*.css" ] } ],
105  				"promise/always-return": [ "warn", { "ignoreLastCallback": true } ],
106  				"react/button-has-type": "off",
107  				"react/exhaustive-deps": "off",
108  				"react/jsx-filename-extension": [ "warn", { "extensions": [ ".jsx", ".tsx" ] } ],
109  				"react/jsx-max-depth": [ "warn", { "max": 10 } ],
110  				"react/jsx-props-no-spreading": "off",
111  				"react/no-multi-comp": [ "off", { "ignoreStateless": true } ],
112  				"react/only-export-components": "off",
113  				"react/react-in-jsx-scope": "off",
114  				"react-perf/jsx-no-jsx-as-prop": "off",
115  				"react-perf/jsx-no-new-function-as-prop": "off",
116  				"react-perf/jsx-no-new-object-as-prop": "off",
117  				"react-compiler-js/react-compiler": "error",
118  			}
119  		}
120  	]
121  }