Allow extending config used in eslint-loader (#7036)

This commit is contained in:
Brody McKee
2019-07-16 12:17:52 +03:00
committed by GitHub
parent 3a9b87b223
commit 3495286f8f
5 changed files with 71 additions and 18 deletions

View File

@@ -239,10 +239,12 @@ inquirer
};
// Add ESlint config
console.log(` Adding ${cyan('ESLint')} configuration`);
appPackage.eslintConfig = {
extends: 'react-app',
};
if (!appPackage.eslintConfig) {
console.log(` Adding ${cyan('ESLint')} configuration`);
appPackage.eslintConfig = {
extends: 'react-app',
};
}
fs.writeFileSync(
path.join(appPath, 'package.json'),