womenintech-chennai / womenintech-website

4 stars 18 forks source link

Added a pre-commit hook for linting and formatting js/jsx files #30

Closed Nikhil-Kumaran closed 5 years ago

Nikhil-Kumaran commented 5 years ago
  1. [ ] closes issue #xxxx (This is not an issue, it's an enhancement/best practices)
  2. [x] gatsby develop runs without errors
  3. [x] gatsby build runs without errors
  4. [x] Learning entry in Learning.md

@bhavaniravi Explanation: I have added a pre-commit hook to lint and format JS/JSX files using eslint and prettier on each commit. This will be useful because, multiple people use different coding styles(Single/Double quotes, spacing) or might make silly mistakes(declaring a variable and not using it) and we need to have a consistent coding style. So on each commit the formatting and linting will happen only on the changed files.

bhavaniravi commented 5 years ago

Hey, thank you so much for taking time to contribute. Everything looks good.

We make it mandatory for all contributors to update learning.md for other people to learn from the PR. Can you update that alone

Nikhil-Kumaran commented 5 years ago

@bhavaniravi Sure I'll add that.

Nikhil-Kumaran commented 5 years ago

@bhavaniravi Done

We make it mandatory for all contributors to update learning.md for other people to learn from the PR. Can you update that alone