Skip to content

Commit

Permalink
Explicitly specify ESLint config path for editor plugins in package.j…
Browse files Browse the repository at this point in the history
…son (#149)

* explicitly specify ESLint config path for editor plugins

* changed to use single quote
  • Loading branch information
keyz authored and gaearon committed Jul 24, 2016
1 parent d335950 commit 76935de
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 0 deletions.
5 changes: 5 additions & 0 deletions scripts/eject.js
Original file line number Diff line number Diff line change
Expand Up @@ -104,6 +104,11 @@ prompt('Are you sure you want to eject? This action is permanent. [y/N]', functi
});
delete hostPackage.scripts['eject'];

// explicitly specify ESLint config path for editor plugins
hostPackage.eslintConfig = {
extends: './config/eslint.js',
};

console.log('Writing package.json');
fs.writeFileSync(
path.join(hostPath, 'package.json'),
Expand Down
5 changes: 5 additions & 0 deletions scripts/init.js
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,11 @@ module.exports = function(hostPath, appName, verbose) {
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(
path.join(hostPath, 'package.json'),
JSON.stringify(hostPackage, null, 2)
Expand Down

0 comments on commit 76935de

Please sign in to comment.