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

perf: enable cache by default #213

Merged
merged 4 commits into from Apr 10, 2023
Merged

perf: enable cache by default #213

merged 4 commits into from Apr 10, 2023

Conversation

ricardogobbosouza
Copy link
Collaborator

@ricardogobbosouza ricardogobbosouza commented Mar 21, 2023

Resolve #210

This PR contains a:

  • bugfix
  • new feature
  • code refactor
  • test update
  • typo fix
  • metadata update

Motivation / Use-Case

Enabling the cache by default the execution time decreases dastrically

Breaking Changes

No

Additional Info

The cache localtion is set to node_modules/.cache/.eslintcache so no need to add it in .gitignore

@codecov
Copy link

codecov bot commented Mar 21, 2023

Codecov Report

Patch and project coverage have no change.

Comparison is base (e623766) 100.00% compared to head (42a6f37) 100.00%.

Additional details and impacted files
@@            Coverage Diff            @@
##            master      #213   +/-   ##
=========================================
  Coverage   100.00%   100.00%           
=========================================
  Files            7         7           
  Lines          282       282           
  Branches        78        78           
=========================================
  Hits           282       282           
Impacted Files Coverage Δ
src/options.js 100.00% <ø> (ø)

Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here.

☔ View full report in Codecov by Sentry.
📢 Do you have feedback about the report comment? Let us know in this issue.

src/options.js Outdated
@@ -47,6 +47,8 @@ const schema = require('./options.json');
*/
function getOptions(pluginOptions) {
const options = {
cache: true,
cacheLocation: 'node_modules/.cache/.eslintcache',
Copy link
Member

Choose a reason for hiding this comment

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

Do you think it is make a sense to provide it by default, because eslint does the same

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

The eslint places the file in the root of the project.
I think it would be more convenient to put it inside node_modules, so there's no need to add it to .gitignore

Copy link
Member

Choose a reason for hiding this comment

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

let's use node_modules/.cache/eslint-webpack-plugin/.eslintcache, because we should always use vendor prefix to avoid overlapping with other tools

@ricardogobbosouza ricardogobbosouza merged commit f6b4b66 into master Apr 10, 2023
29 checks passed
@ricardogobbosouza ricardogobbosouza deleted the perf-enable-cache branch April 10, 2023 19:18
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Enable cache eslint
2 participants