Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Enable eslint caching in development #1578

Merged
merged 3 commits into from
Feb 24, 2017
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion packages/react-scripts/config/webpack.config.dev.js
Original file line number Diff line number Diff line change
Expand Up @@ -118,7 +118,8 @@ module.exports = {
// Point ESLint to our predefined config.
options: {
configFile: path.join(__dirname, '../.eslintrc'),
useEslintrc: false
useEslintrc: false,
cache: true
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We probably don't want this specific setting to be inside of // @remove-on-eject block.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We'll likely want for this to get merged first: webpack-contrib/eslint-loader#151. Or it will be confusing to ejected users who change the rules.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Babel falls back to OS tmp dir. Does eslint-loader, too? We should probably use consistent mechanisms. If eslint-loader doesn't, we should send a PR.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for the comments! I realized that i'm searching the cache issues in eslint repo rather than eslint-loader repo. I've sent a pr on tmp dir fallback on eslint-loader repo on webpack-contrib/eslint-loader#154. And yup, I think we should wait until webpack-contrib/eslint-loader#151 merged first.

We probably don't want this specific setting to be inside of // @remove-on-eject block.

So, should we move the // @remove-on-eject block. to the inside of the options?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

So, should we move the // @remove-on-eject block. to the inside of the options?

Yes I think so.

},
// @remove-on-eject-end
loader: 'eslint-loader'
Expand Down