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

khalid/precommit hooks #5171

Merged
merged 26 commits into from
Apr 26, 2022
Merged

Conversation

khalid-deriv
Copy link
Contributor

Changes:

Please include a summary of the change and which issue is fixed below:

  • Added a precommit hook to run prettier on all staged files
  • Added a precommint hook to run eslint checks on staged .js, .jsx, .ts, .tsx files
  • Added a precommit hook to run stylelint checks on staged .css and .scss files

When you need to add unit test

  • If this change disrupt current flow
  • If this change is adding new flow

When you need to add integration test

  • If components from external libraries are being used to define the flow, e.g. @deriv/components
  • If it relies on a very specific set of props with no default behavior for the current component.

Test coverage checklist (for reviewer)

  • Ensure utility / function has a test case
  • Ensure all the tests are passing

Type of change

  • Bug fix
  • New feature
  • Update feature
  • Refactor code
  • Translation to code
  • Translation to crowdin
  • Script configuration
  • Improve performance
  • Style only
  • Dependency update
  • Documentation update
  • Release

@vercel
Copy link

vercel bot commented Apr 8, 2022

This pull request is being automatically deployed with Vercel (learn more).
To see the status of your deployment, click below or on the icon next to each commit.

🔍 Inspect: https://vercel.com/deriv/deriv-app/7R49qn2rL6rt3kovdDUf4Tq1Xqhn
✅ Preview: https://deriv-app-git-fork-khalid-deriv-precommit-hooks.binary.sx

@codecov-commenter
Copy link

codecov-commenter commented Apr 8, 2022

Codecov Report

Merging #5171 (9af16fb) into master (3310ac0) will not change coverage.
The diff coverage is n/a.

@@           Coverage Diff           @@
##           master    #5171   +/-   ##
=======================================
  Coverage   13.33%   13.33%           
=======================================
  Files        1282     1282           
  Lines       29020    29020           
  Branches     4895     4895           
=======================================
  Hits         3870     3870           
  Misses      24912    24912           
  Partials      238      238           

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 3310ac0...9af16fb. Read the comment docs.

Copy link
Contributor

@niloofar-deriv niloofar-deriv left a comment

Choose a reason for hiding this comment

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

Can we have only one global config for all packages? (Instead of installing @babel/eslint-parser for every packages)

Instead of this everything LGTM

@khalid-deriv
Copy link
Contributor Author

khalid-deriv commented Apr 11, 2022

Can we have only one global config for all packages? (Instead of installing @babel/eslint-parser for every packages)

@niloo-fs unfortunately it didn't work that way. Apparently it uses the @babel/eslint-parser within the package.json for each individual package 😕

.eslintrc.js Outdated Show resolved Hide resolved
@niloofar-deriv
Copy link
Contributor

Can we have only one global config for all packages? (Instead of installing @babel/eslint-parser for every packages)

@niloo-fs unfortunately it didn't work that way. Apparently it uses the @babel/eslint-parser within the package.json for each individual package confused

Oh I see. I checked the rest of the things and it was ok

niloofar-deriv
niloofar-deriv previously approved these changes Apr 11, 2022
@vercel
Copy link

vercel bot commented Apr 22, 2022

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Updated
deriv-app ✅ Ready (Inspect) Visit Preview Apr 26, 2022 at 5:16AM (UTC)

Copy link
Contributor

@carolsachdeva carolsachdeva left a comment

Choose a reason for hiding this comment

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

LGTM 🚀

@carolsachdeva carolsachdeva merged commit 5041008 into binary-com:master Apr 26, 2022
@sonarcloud
Copy link

sonarcloud bot commented Apr 26, 2022

Kudos, SonarCloud Quality Gate passed!    Quality Gate passed

Bug A 0 Bugs
Vulnerability A 0 Vulnerabilities
Security Hotspot A 0 Security Hotspots
Code Smell A 0 Code Smells

No Coverage information No Coverage information
2.8% 2.8% Duplication

matin-deriv added a commit that referenced this pull request Apr 26, 2022
matin-deriv added a commit that referenced this pull request Apr 27, 2022
sandeep-deriv pushed a commit to sandeep-deriv/deriv-app that referenced this pull request Apr 29, 2022
* fixing dependency conflicts

* test linting on core package

* test linting on bot package

* test linting on bot-ui package

* test linting on account package

* test linting on appstore package

* test linting on ts file

* test linting on jsx file and cashier package

* test linting on components package

* test linting on indicators package

* test linting on p2p package

* test linting on sass files

* test linting on publisher package

* test linting on shared package

* test linting on trader package

* cleanup

* remove depracated babel-eslint

* testing without babel-eslint

* testing with added overrides

* fix dependancy version conflicts

* fix eslintrc to load babel plugins

* test

* allow empty commits

* test

Co-authored-by: Carol Sachdeva <58209918+carol-binary@users.noreply.github.com>
sandeep-deriv pushed a commit to sandeep-deriv/deriv-app that referenced this pull request Apr 29, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

8 participants