Skip to content

Commit 76935de

Browse files
keyzgaearon
authored andcommitted
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
1 parent d335950 commit 76935de

File tree

2 files changed

+10
-0
lines changed

2 files changed

+10
-0
lines changed

scripts/eject.js

+5
Original file line numberDiff line numberDiff line change
@@ -104,6 +104,11 @@ prompt('Are you sure you want to eject? This action is permanent. [y/N]', functi
104104
});
105105
delete hostPackage.scripts['eject'];
106106

107+
// explicitly specify ESLint config path for editor plugins
108+
hostPackage.eslintConfig = {
109+
extends: './config/eslint.js',
110+
};
111+
107112
console.log('Writing package.json');
108113
fs.writeFileSync(
109114
path.join(hostPath, 'package.json'),

scripts/init.js

+5
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,11 @@ module.exports = function(hostPath, appName, verbose) {
2929
hostPackage.scripts[command] = 'react-scripts ' + command;
3030
});
3131

32+
// explicitly specify ESLint config path for editor plugins
33+
hostPackage.eslintConfig = {
34+
extends: './node_modules/react-scripts/config/eslint.js',
35+
};
36+
3237
fs.writeFileSync(
3338
path.join(hostPath, 'package.json'),
3439
JSON.stringify(hostPackage, null, 2)

0 commit comments

Comments
 (0)