diff --git a/src/build-from-oxlint-config.spec.ts b/src/build-from-oxlint-config.spec.ts index dcedd91..d07cdbb 100644 --- a/src/build-from-oxlint-config.spec.ts +++ b/src/build-from-oxlint-config.spec.ts @@ -318,7 +318,7 @@ describe('integration test with oxlint', () => { { categories: { correctness: 'warn', - nursery: 'off', // enable after oxc-project/oxc#7073 + nursery: 'warn', pedantic: 'warn', perf: 'warn', restriction: 'warn', @@ -341,7 +341,6 @@ describe('integration test with oxlint', () => { 'promise', 'jest', 'vitest', - 'tree_shaking', ], }, // everything on @@ -359,11 +358,10 @@ describe('integration test with oxlint', () => { 'promise', 'jest', 'vitest', - 'tree_shaking', ], categories: { correctness: 'warn', - nursery: 'off', // enable after oxc-project/oxc#7073 + nursery: 'off', // ToDo: something with the import plugin pedantic: 'warn', perf: 'warn', restriction: 'warn', diff --git a/src/build-from-oxlint-config.ts b/src/build-from-oxlint-config.ts index 5d00f85..01c348c 100644 --- a/src/build-from-oxlint-config.ts +++ b/src/build-from-oxlint-config.ts @@ -240,6 +240,12 @@ export const buildFromOxlintConfig = ( // it is not a plugin but it is activated by default plugins.push('eslint'); + // oxc handles "react-hooks" rules inside "react" plugin + // our generator split them into own plugins + if (plugins.includes('react')) { + plugins.push('react-hooks'); + } + handleCategoriesScope( plugins, readCategoriesFromConfig(config) ?? defaultCategories,