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
Show file tree
Hide file tree
Changes from 2 commits
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
2 changes: 1 addition & 1 deletion packages/react-scripts/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@
"dotenv": "2.0.0",
"eslint": "3.8.1",
"eslint-config-react-app": "^0.5.1",
"eslint-loader": "1.6.1",
"eslint-loader": "1.6.3",
"eslint-plugin-flowtype": "2.21.0",
"eslint-plugin-import": "2.0.1",
"eslint-plugin-jsx-a11y": "2.2.3",
Expand Down