Commit 76935de8 authored by Keyan Zhang's avatar Keyan Zhang Committed by Dan Abramov
Browse files

Explicitly specify ESLint config path for editor plugins in package.json (#149)

* explicitly specify ESLint config path for editor plugins

* changed to use single quote
parent d3359507
Showing with 10 additions and 0 deletions
+10 -0
...@@ -104,6 +104,11 @@ prompt('Are you sure you want to eject? This action is permanent. [y/N]', functi ...@@ -104,6 +104,11 @@ prompt('Are you sure you want to eject? This action is permanent. [y/N]', functi
}); });
delete hostPackage.scripts['eject']; delete hostPackage.scripts['eject'];
// explicitly specify ESLint config path for editor plugins
hostPackage.eslintConfig = {
extends: './config/eslint.js',
};
console.log('Writing package.json'); console.log('Writing package.json');
fs.writeFileSync( fs.writeFileSync(
path.join(hostPath, 'package.json'), path.join(hostPath, 'package.json'),
......
...@@ -29,6 +29,11 @@ module.exports = function(hostPath, appName, verbose) { ...@@ -29,6 +29,11 @@ module.exports = function(hostPath, appName, verbose) {
hostPackage.scripts[command] = 'react-scripts ' + command; hostPackage.scripts[command] = 'react-scripts ' + command;
}); });
// explicitly specify ESLint config path for editor plugins
hostPackage.eslintConfig = {
extends: './node_modules/react-scripts/config/eslint.js',
};
fs.writeFileSync( fs.writeFileSync(
path.join(hostPath, 'package.json'), path.join(hostPath, 'package.json'),
JSON.stringify(hostPackage, null, 2) JSON.stringify(hostPackage, null, 2)
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment