Eslint

  1. mkdir eslint
  2. cd eslint
  3. npm init -y
  1. yarn add -D eslint
  2. npx eslint --init

image.png

  1. module.exports = {
  2. env: {
  3. browser: true,
  4. es2021: true,
  5. },
  6. extends: [
  7. "eslint:recommended",
  8. "plugin:vue/vue3-essential",
  9. "plugin:@typescript-eslint/recommended",
  10. ],
  11. parserOptions: {
  12. ecmaVersion: "latest",
  13. parser: "@typescript-eslint/parser",
  14. sourceType: "module",
  15. },
  16. plugins: ["vue", "@typescript-eslint"],
  17. rules: {
  18. indent: ["error", 4],
  19. "linebreak-style": ["error", "unix"],
  20. quotes: ["error", "single"],
  21. semi: ["error", "never"],
  22. },
  23. };

Prettier