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

Add prettier and lint-staged deps to keep files inline with .editorconfig #529

Merged
merged 12 commits into from
Oct 1, 2023

Conversation

kelfish
Copy link
Contributor

@kelfish kelfish commented Sep 22, 2023

Changes

  • Add prettier as a dependency and config files
  • Add lint-staged and husky to run prettier and eslint on pre-commit
  • Bring all existing inline with .editorconfig and .prettierrc to ensure tabbing and layout is standard

NOTE: Some files were 2 spaces for indents, some where 4, but I stuck with the .editorconfig setup of 2. Also some discrepancies between ' and "

@codecov
Copy link

codecov bot commented Sep 22, 2023

Codecov Report

Merging #529 (4a2c5f6) into master (4318480) will not change coverage.
Report is 2 commits behind head on master.
The diff coverage is 100.00%.

@@            Coverage Diff            @@
##            master      #529   +/-   ##
=========================================
  Coverage   100.00%   100.00%           
=========================================
  Files            3         3           
  Lines           87        86    -1     
  Branches        16        16           
=========================================
- Hits            87        86    -1     
Files Coverage Δ
src/Config.ts 100.00% <100.00%> (ø)
src/factory.ts 100.00% <100.00%> (ø)
src/utils.ts 100.00% <100.00%> (ø)

📣 We’re building smart automated test selection to slash your CI/CD build times. Learn more

@de-luca
Copy link
Owner

de-luca commented Sep 23, 2023

Thank you for the PR.
However, for personal reasons, I wont take in husky.

@kelfish
Copy link
Contributor Author

kelfish commented Sep 24, 2023

I've replaced husky with simple-git-hooks. Does this work?

ref: https://github.com/toplenboren/simple-git-hooks

@de-luca
Copy link
Owner

de-luca commented Sep 25, 2023

I'm sorry, what I meant is that I'm against these tools that hijack workflows.
I prefer this to be either up to the devs and/or the CI

@kelfish
Copy link
Contributor Author

kelfish commented Sep 26, 2023

Understood, I flip flop between the two approaches, so I get it. Will remove the pre-commit automation...

@kelfish
Copy link
Contributor Author

kelfish commented Sep 26, 2023

I've removed the pre-commit git hook approach and added extra eslint rules so CI can flag anything that conflicts with editorconfig and prettier

@de-luca de-luca merged commit 109b78a into de-luca:master Oct 1, 2023
6 checks passed
@de-luca
Copy link
Owner

de-luca commented Oct 1, 2023

Thank you a lot!

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.

None yet

2 participants