Skip to content

Instantly share code, notes, and snippets.

@chalkygames123
Created April 23, 2026 08:45
Show Gist options
  • Select an option

  • Save chalkygames123/fad131dd7ff35704cc434e16e399f1e2 to your computer and use it in GitHub Desktop.

Select an option

Save chalkygames123/fad131dd7ff35704cc434e16e399f1e2 to your computer and use it in GitHub Desktop.
import globals from 'globals';
import { defineConfig } from 'oxlint';
export default defineConfig({
categories: {
correctness: 'deny',
nursery: 'warn',
pedantic: 'allow',
perf: 'warn',
restriction: 'deny',
style: 'warn',
suspicious: 'deny',
},
globals: Object.fromEntries(
Object.entries({ ...globals.node, ...globals.browser }).map(([k, v]) => [k, v ? 'writable' : 'readonly'] as const),
),
ignorePatterns: ['**/*.gen.d.ts', '**/*.gen.ts'],
options: {
typeAware: true,
typeCheck: true,
},
plugins: [
'import',
'jsdoc',
'jsx-a11y',
'node',
'oxc',
'promise',
'react',
'react-perf',
'typescript',
'unicorn',
'vitest',
],
rules: {
'func-style': [
'deny',
'declaration',
{
allowArrowFunctions: true,
},
],
'id-length': 'allow',
'import/no-default-export': 'allow',
'import/no-named-export': 'allow',
'import/no-nodejs-modules': 'allow',
'import/no-unassigned-import': [
'deny',
{
allow: ['**/*.css'],
},
],
'import/prefer-default-export': 'allow',
'max-lines-per-function': 'allow',
'max-statements': 'allow',
'no-console': 'allow',
'no-magic-numbers': 'allow',
'no-nested-ternary': 'allow',
'no-ternary': 'allow',
'no-undefined': 'allow',
'oxc/no-async-await': 'allow',
'oxc/no-rest-spread-properties': 'allow',
'oxc/no-optional-chaining': 'allow',
'react_perf/jsx-no-new-array-as-prop': 'allow',
'react_perf/jsx-no-new-object-as-prop': 'allow',
'react_perf/jsx-no-jsx-as-prop': 'allow',
'react/jsx-filename-extension': [
'deny',
{
allow: 'as-needed',
extensions: ['.tsx'],
},
],
'react/jsx-max-depth': 'allow',
'react/no-multi-comp': 'allow',
'react/react-in-jsx-scope': 'allow',
'sort-imports': 'allow',
'sort-keys': 'allow',
'typescript/explicit-function-return-type': [
'deny',
{
allowFunctionsWithoutTypeParameters: true,
},
],
'typescript/prefer-readonly-parameter-types': [
'deny',
{
ignoreInferredTypes: true,
treatMethodsAsReadonly: true,
},
],
'unicorn/no-nested-ternary': 'allow',
},
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment