Common Eslint and Prettier config for my projects ✨
A setup for Eslint and Prettier that I've come to use quite frequently. This is just to organize everything in one place, so I can get started quickly in the future. Also has my setup for Husky and lint-staged.
For JavaScript, I extend the Airbnb style guide. For TypeScript, I'm still using Eslint via typescript-eslint and setup using this guide.
My code style can be summed up as:
- Indent lines with spaces, not tabs
- Use single quotes, not double
- Spaces between brackets in object literals
- Semi-colons at the end of statements
- No trailing commas
- Don't include parenthesis around a sole arrow function parameter
Clone the repo (or alternatively, just download a zip from Github):
git clone [email protected]:melanieseltzer/lint-config.git
Choose your flavor (JavaScript or TypeScript), and follow the instructions in the individual readmes.