Skip to content

chore: enable eslint cache #403

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

Merged
merged 2 commits into from
Feb 10, 2022
Merged

Conversation

pkuczynski
Copy link
Member

@pkuczynski pkuczynski commented Feb 2, 2022

This significantly speeds up subsequent eslint runs

@pkuczynski pkuczynski requested a review from a team as a code owner February 2, 2022 10:33
@pkuczynski pkuczynski added the c: chore PR that doesn't affect the runtime behavior label Feb 2, 2022
ST-DDT
ST-DDT previously approved these changes Feb 2, 2022
@ST-DDT ST-DDT requested a review from a team February 2, 2022 10:38
@ST-DDT
Copy link
Member

ST-DDT commented Feb 2, 2022

This works really nice. Where does it store the cache if I want to delete it?

@pkuczynski
Copy link
Member Author

This works really nice. Where does it store the cache if I want to delete it?

Root of the project. Its already gitignored.

@Shinigami92 Shinigami92 self-requested a review February 2, 2022 14:10
prisis
prisis previously approved these changes Feb 2, 2022
clarkerican
clarkerican previously approved these changes Feb 6, 2022
@codecov
Copy link

codecov bot commented Feb 6, 2022

Codecov Report

Merging #403 (3ca30ac) into main (bed7182) will increase coverage by 0.00%.
The diff coverage is n/a.

@@           Coverage Diff           @@
##             main     #403   +/-   ##
=======================================
  Coverage   99.32%   99.32%           
=======================================
  Files        1920     1920           
  Lines      174272   174272           
  Branches      893      893           
=======================================
+ Hits       173099   173100    +1     
+ Misses       1117     1116    -1     
  Partials       56       56           
Impacted Files Coverage Δ
src/helpers.ts 99.47% <0.00%> (+0.17%) ⬆️

@Shinigami92
Copy link
Member

Tested it locally and seems to work
Just asking myself why this is not the default behavior of eslint 🤔
Should we also clean the cache-file on pnpm run clean?

Copy link
Member

@Shinigami92 Shinigami92 left a comment

Choose a reason for hiding this comment

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

If we encounter any problems in the future, we can revert it

@Shinigami92
Copy link
Member

@pkuczynski uhm... sry, but
How will this behave when having a dependency-update? Or something similar.
So e.g. the eslint rule itself changed in behavior but the file did not change?

So maybe we should really add it to the clean statement 😬

@ST-DDT
Copy link
Member

ST-DDT commented Feb 10, 2022

Is it based on the content of the file itself?
What if you change the api in your method and that causes a warning in another (untouched) file?
( Is that even possible? 🤔 )

@pkuczynski
Copy link
Member Author

pkuczynski commented Feb 10, 2022

I honestly never had a problem with that :) And I keep my dependencies up to date on a weekly basis. In the worse case scenario CI would caught the issue as it does not have the cache enabled

@Shinigami92
Copy link
Member

In the worse case scenario CI would caught the issue as it does not have the cache enabled

Okay 👍

@Shinigami92 Shinigami92 requested a review from prisis February 10, 2022 19:54
@Shinigami92 Shinigami92 requested a review from a team February 10, 2022 19:54
@Shinigami92
Copy link
Member

We await approval from @prisis (or a third maintainer)
So give it some minutes

@Shinigami92 Shinigami92 merged commit 3901123 into faker-js:main Feb 10, 2022
@pkuczynski pkuczynski deleted the eslint-cache branch February 10, 2022 19:58
demipel8 pushed a commit to demipel8/faker that referenced this pull request Mar 11, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
c: chore PR that doesn't affect the runtime behavior
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants