Skip to content

Commit

Permalink
Rules Dir
Browse files Browse the repository at this point in the history
  • Loading branch information
casesandberg committed Jul 30, 2016
1 parent a4d21a4 commit 0e344fe
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 0 deletions.
6 changes: 6 additions & 0 deletions scripts/eject.js
Original file line number Diff line number Diff line change
Expand Up @@ -104,6 +104,12 @@ 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',
rulesdir: './config/rules',
};

console.log('Writing package.json');
fs.writeFileSync(
path.join(hostPath, 'package.json'),
Expand Down
6 changes: 6 additions & 0 deletions scripts/init.js
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,12 @@ 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',
rulesdir: './config/rules',
};

fs.writeFileSync(
path.join(hostPath, 'package.json'),
JSON.stringify(hostPackage, null, 2)
Expand Down

0 comments on commit 0e344fe

Please sign in to comment.