hasura / gatsby-gitbook-starter

Generate GitBook style modern docs/tutorial websites using Gatsby + MDX
https://hasura.io/learn/graphql/react/introduction/
MIT License
983 stars 378 forks source link

Prettier + ESLint Setup for the project. #61

Closed lastnamearya closed 4 years ago

lastnamearya commented 4 years ago

I also configured two additional scripts in the package.json file for auto-formatting the codebase and lint errors.

"format": "prettier --write \"src/**/*.{js,jsx,css,json}\"",

"lint": "eslint --fix \"src/**/*.{js,jsx}\""

Strajk commented 4 years ago

@lastnamearya Hi, it seems to be that both npm format & npm lint are reformatting the code (as lint executes eslint --fix), so which is preferable to use, please?

lastnamearya commented 4 years ago

Hi @Strajk I'll suggest to use lint