dist ignored from eslint and documentation added (#1083)

This commit is contained in:
aashna27
2019-05-27 17:47:13 +05:30
committed by Jeffrey Warren
parent a7fe5edb4b
commit ca73a4115e
2 changed files with 19 additions and 1 deletions

1
.eslintignore Normal file
View File

@@ -0,0 +1 @@
dist/*

View File

@@ -370,7 +370,24 @@ module.exports =
## Linting ## Linting
We are now using `eslint` and `husky` to help lint and format our code each time we commit. If we want `husky` to not verify the commit and push it, it's possible to use `git commit -m "message" --no-verify.` We are now using `eslint` and `husky` to help lint and format our code each time we commit. Eslint defines coding standards and helps in cleaning up the code. To run eslint for checking errors globally or within a specific file run:
```
npx eslint .
npx eslint <file path>
```
And to fix those errors globally or in a file, run these in your terminal:
```
npx eslint . --fix
npx eslint <file path> --fix
```
Be sure to not include the angular brackets(<>).
Husky ensures automation of the above steps with git-hooks(eg. git add,git commit..). However we don't want to check and fix changes of the entire codebase with each commit and that the fixes made by eslint appear unstaged and require us to commit them again and that is where lint-staged helps.
If we want `husky` to not verify the commit and push it anyway, use `git commit -m "message" --no-verify.`
## Grunt Tasks ## Grunt Tasks