Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/ugurkellecioglu/prettier-eslint-husky-template


https://github.com/ugurkellecioglu/prettier-eslint-husky-template

Last synced: about 1 month ago
JSON representation

Awesome Lists containing this project

README

        

# Prettier Eslint Husky Template

This repository is dedicated to my post on the medium.
Required packages added to the project (prettier, eslint, husky) and their configurations.

The project was created with create-react-app, and after installation, test files, public files etc. from cra-template. has not been changed.

So if you type npx create-react-app prettier-eslint-husky-template and install it, it is with the files created, the only difference is that our pre-commit hook is installed.

## Installation

Install prettier-eslint-husky-template with npm

```bash
npm i prettier-eslint-husky-template
cd prettier-eslint-husky-template
```

## Documentation
2. run npm install or yarn as you wish
3. Open App.js file
4. If ESLint shows you bunch of errors, it means everything is fine
![image](https://user-images.githubusercontent.com/51965140/180928929-5b451d6f-0751-468b-aa6e-4139e7ad464b.png)

5. You can run our prettier and eslint scripts by npm run precommit, If you'd like.
6. So that prettier will format the code and eslint is going to show you the errors.
7. First task you have is dealing with the errors.
8. Don't be lazybone, you will be dealing with eslint errors all the time.
9. Keep that in mind, the main idea was creating a standard for our code base.

## Contribute

Contributes are welcome!

Clone the project, checkout to a new branch, make your changes, create a pull request.

## References

- [Prettier](https://github.com/prettier/prettier)
- [Eslint](https://github.com/eslint/eslint)
- [Husky](https://github.com/typicode/husky)