Install eslint-config-prettier
npm install --save-dev eslint-config-prettier
-
Add
'prettier'
to.eslintrc.js
module.exports = { ... extends: [ 'eslint:recommended', 'plugin:@typescript-eslint/recommended', + 'prettier', ], }
Run
npm run lint
Run
npm run format
git add -u
git commit -m 'install eslint-config-prettier'
Links
- https://github.com/prettier/eslint-config-prettier#installation
- https://vueschool.io/articles/vuejs-tutorials/eslint-and-prettier-with-vite-and-vue-js-3/
Top comments (0)