Skip to content

Commit 830e413

Browse files
committed
fix(eslint): do not output warning about react on non-react projects
1 parent cf6718c commit 830e413

File tree

1 file changed

+6
-2
lines changed

1 file changed

+6
-2
lines changed

src/createEslintConfig.ts

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,14 +16,18 @@ export function createEslintConfig({
1616
}: CreateEslintConfigArgs): CLIEngine.Options['baseConfig'] {
1717
const isReactLibrary = Boolean(getReactVersion(pkg));
1818

19-
console.log(isReactLibrary);
20-
2119
const config = {
2220
extends: [
2321
'react-app',
2422
'prettier/@typescript-eslint',
2523
'plugin:prettier/recommended',
2624
],
25+
settings: {
26+
react: {
27+
// Fix for https://github.com/jaredpalmer/tsdx/issues/279
28+
version: !isReactLibrary ? '999.999.999' : undefined,
29+
},
30+
},
2731
};
2832

2933
if (writeFile) {

0 commit comments

Comments
 (0)