Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Save lensanag/e959d0f83c44fb43344be2b2216a7590 to your computer and use it in GitHub Desktop.
Save lensanag/e959d0f83c44fb43344be2b2216a7590 to your computer and use it in GitHub Desktop.
- pnpm create vite project-name --template template-name
- pnpm dlx eslint --init
- To check syntax, find problems, and enforce code style - JavaScript modules (import/export)
- (select type of project)
- Does your project use TypeScript?
- Where does your code run?
- How would you like to define a style for your project? - Which style guide do you want to follow?
- What format do you want your config file to be in?
- Would you like to install them now?
- Which package manager do you want to use?
- pnpm i -D eslint-config-prettier prettier
- touch .prettierrc.cjs:
```js
module.exports = {
semi: false,
singleQuote: true,
}
```
- update file .eslintrc.cjs:
```js
extends: [
'plugin:react/recommended',
'standard',
'prettier', // add this line
]
```
- pnpm i -D lint-staged
- edit (add at the end) package.json:
```json
"lint-staged": {
"*.{js,ts}": "eslint --cache --fix",
"*.{js,css,md}": "prettier --write"
}
```
- pnpm i -D husky
- pnpm dlx husky install
- npm pkg set scripts.prepare "husky install"
- pnpm dlx husky add .husky/pre-commit "pnpm dlx lint-staged"
- pnpm i -D postcss autoprefixer tailwindcss
- pnpm dlx tailwindcss init
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment