diff --git a/.changeset/fluffy-emus-burn.md b/.changeset/fluffy-emus-burn.md new file mode 100644 index 00000000..0513f7ea --- /dev/null +++ b/.changeset/fluffy-emus-burn.md @@ -0,0 +1,5 @@ +--- +'@mheob/eslint-config': patch +--- + +deactivate `react/no-leaked-conditional-rendering` rule for now; should be added again after the `parserOptions` issue is done diff --git a/packages/eslint-config/src/configs/javascript.ts b/packages/eslint-config/src/configs/javascript.ts index 44e8ade8..63e55d22 100644 --- a/packages/eslint-config/src/configs/javascript.ts +++ b/packages/eslint-config/src/configs/javascript.ts @@ -54,7 +54,7 @@ export async function javascript( 'no-class-assign': 'error', 'no-compare-neg-zero': 'error', 'no-cond-assign': ['error', 'always'], - 'no-console': ['warn', { allow: ['warn', 'error'] }], + 'no-console': ['warn', { allow: ['info', 'warn', 'error'] }], 'no-const-assign': 'error', 'no-control-regex': 'error', 'no-debugger': 'error', diff --git a/packages/eslint-config/src/configs/react.ts b/packages/eslint-config/src/configs/react.ts index 0dc9a98d..4e514fc4 100644 --- a/packages/eslint-config/src/configs/react.ts +++ b/packages/eslint-config/src/configs/react.ts @@ -169,7 +169,7 @@ export async function react( 'react/no-duplicate-key': 'warn', 'react/no-forward-ref': 'warn', 'react/no-implicit-key': 'warn', - 'react/no-leaked-conditional-rendering': 'warn', + // 'react/no-leaked-conditional-rendering': 'warn', // deactivated because it is not working (parserOptions issue) 'react/no-missing-key': 'error', 'react/no-misused-capture-owner-stack': 'error', 'react/no-nested-component-definitions': 'error', diff --git a/packages/eslint-config/src/factory.ts b/packages/eslint-config/src/factory.ts index 215e057a..c2ac4a5a 100644 --- a/packages/eslint-config/src/factory.ts +++ b/packages/eslint-config/src/factory.ts @@ -107,8 +107,7 @@ export function mheob( if (isInEditor == null) { isInEditor = isInEditorEnv(); if (isInEditor) - // eslint-disable-next-line no-console - console.log('[@mheob/eslint-config] Detected running in editor, some rules are disabled.'); + console.info('[@mheob/eslint-config] Detected running in editor, some rules are disabled.'); } const configs: Awaitable[] = []; @@ -182,6 +181,7 @@ export function mheob( if (options.react ?? false) { configs.push( react({ + ...typescriptOptions, overrides: getOverrides(options, 'react'), tsconfigPath, }),