brackt/.oxlintrc.json
Chris Parsons 13a36e6c41 Fix prefer-add-event-listener, no-unassigned-import, require-module-specifiers
Resolves all 9 remaining non-console lint warnings and promotes all
three rules to errors in .oxlintrc.json.

- prefer-add-event-listener: converted onchange/onclick/onload
  assignments to addEventListener in useDraftNotifications.ts and
  admin.data-sync.tsx; stored changeHandler ref for proper cleanup
  with removeEventListener
- no-unassigned-import: configured rule with allow list for legitimate
  side-effect imports (*.css, @testing-library/jest-dom,
  @testing-library/cypress/add-commands)
- require-module-specifiers: removed redundant `export {}` from
  cypress/support/e2e.ts (file already has an import)

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-03-21 10:51:21 -07:00

66 lines
1.7 KiB
JSON

{
"$schema": "./node_modules/oxlint/configuration_schema.json",
"plugins": ["react", "typescript", "vitest", "unicorn", "import"],
"env": {
"browser": true,
"node": true,
"es2022": true
},
"categories": {
"correctness": "error",
"suspicious": "warn"
},
"rules": {
"no-console": "warn",
"no-var": "error",
"prefer-const": "error",
"eqeqeq": ["error", "always"],
"no-unused-vars": "off",
"no-undef": "off",
"typescript/no-unused-vars": [
"error",
{ "argsIgnorePattern": "^_", "varsIgnorePattern": "^_" }
],
"typescript/no-explicit-any": "error",
"typescript/no-non-null-assertion": "error",
"typescript/consistent-type-imports": [
"error",
{ "prefer": "type-imports" }
],
"react/react-in-jsx-scope": "off",
"react/rules-of-hooks": "error",
"react/exhaustive-deps": "error",
"react/jsx-key": "error",
"react/no-array-index-key": "error",
"react/self-closing-comp": "warn",
"import/no-duplicates": "error",
"import/no-unassigned-import": ["error", {
"allow": ["**/*.css", "@testing-library/jest-dom", "@testing-library/cypress/add-commands"]
}],
"no-shadow": "error",
"unicorn/consistent-function-scoping": "error",
"unicorn/prefer-add-event-listener": "error",
"unicorn/require-module-specifiers": "error"
},
"overrides": [
{
"files": ["**/__tests__/**", "**/*.test.ts", "**/*.test.tsx", "cypress/**"],
"rules": {
"no-console": "off",
"typescript/no-explicit-any": "off"
}
}
],
"ignorePatterns": [
"build/**",
"dist/**",
"node_modules/**",
"drizzle/**",
".react-router/**",
"cypress/fixtures/**"
]
}