Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
21 changes: 21 additions & 0 deletions .oxlintrc.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
{
"$schema": "./node_modules/oxlint/configuration_schema.json",
"plugins": ["eslint", "oxc", "typescript", "import", "jsdoc"],
"ignorePatterns": [
"**/coverage/",
"**/dist/",
"**/types/",
"**/build/",
"**/static/",
"**/*.d.ts"
],
"categories": {
"correctness": "error",
"suspicious": "error"
},
"rules": {
"no-console": ["error", { "allow": ["warn", "error"] }],
"typescript/no-unsafe-type-assertion": "off",
"typescript/require-await": "error"
}
}
2 changes: 1 addition & 1 deletion dist/cjs/rules/no-unused-deps.cjs
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
'use strict';

/**
* @fileoverview Rule to check unused dependencies in React Hooks
* Rule to check unused dependencies in React Hooks
* @author Zheng Song
*/

Expand Down
27 changes: 0 additions & 27 deletions eslint.config.mjs

This file was deleted.

15 changes: 15 additions & 0 deletions examples/.oxlintrc.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
{
"$schema": "./node_modules/oxlint/configuration_schema.json",
"plugins": ["eslint", "oxc", "import", "jsdoc", "vitest", "react"],
"jsPlugins": ["eslint-plugin-react-hooks-addons"],
"categories": {
"correctness": "error",
"suspicious": "error"
},
"rules": {
"react/react-in-jsx-scope": "off",
"react-hooks/rules-of-hooks": "error",
"react-hooks/exhaustive-deps": "error",
"react-hooks-addons/no-unused-deps": "error"
}
}
14 changes: 7 additions & 7 deletions examples/eslint.config.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -3,15 +3,15 @@
import eslint from '@eslint/js';
import globals from 'globals';
import prettier from 'eslint-config-prettier';
import reactHooks from 'eslint-plugin-react-hooks';
// import reactHooks from 'eslint-plugin-react-hooks';
import reactHooksAddons from 'eslint-plugin-react-hooks-addons';

/**
* @type {import('eslint').Linter.Config[]}
*/
export default [
eslint.configs.recommended,
reactHooks.configs.flat.recommended,
// reactHooks.configs.flat.recommended,
reactHooksAddons.configs.recommended,
prettier,
{
Expand All @@ -20,11 +20,11 @@ export default [
globals: {
...globals.browser
}
},
rules: {
'react-hooks/rules-of-hooks': 'error',
'react-hooks/exhaustive-deps': 'error',
'react-hooks/set-state-in-effect': 'off'
}
// rules: {
// 'react-hooks/rules-of-hooks': 'error',
// 'react-hooks/exhaustive-deps': 'error',
// 'react-hooks/set-state-in-effect': 'off'
// }
}
];
Loading