No issues here. “npm create vite@latest”…and everything worked out of the box. Can’t be much easier than that. Answer from Goingone on reddit.com
🌐
Vue School
vueschool.io › home › news › eslint and prettier with vite and vue.js 3
ESLint and Prettier with Vite and Vue.js 3 - Vue School Articles
July 28, 2025 - Set up ESLint and Prettier with Vite and Vue.js 3 for clean, consistent code. Learn how to integrate vite-plugin-eslint in Vue Apps.
🌐
eslint-plugin-vue
eslint.vuejs.org › user-guide
User Guide | eslint-plugin-vue
Make sure you are using the shareable config provided by eslint-plugin-vue. If you are having issues with configuring editor, please read editor integrations · Use eslint-config-prettier for Prettier not to conflict with the shareable config provided by this plugin.
🌐
npm
npmjs.com › package › eslint-plugin-prettier-vue
eslint-plugin-prettier-vue - npm
ESLint plugin for Prettier formatting, which is better for Vue SFC. Latest version: 5.0.0, last published: 2 years ago. Start using eslint-plugin-prettier-vue in your project by running `npm i eslint-plugin-prettier-vue`. There are 29 other ...
      » npm install eslint-plugin-prettier-vue
    
Published   Aug 25, 2023
Version   5.0.0
Author   meteorlxy
🌐
npm
npmjs.com › package › @vue › eslint-config-prettier
vue/eslint-config-prettier
It disables all rules that are unnecessary or might conflict with Prettier. It also enables the eslint-plugin-prettier plugin, which runs Prettier as an ESLint rule and reports differences as individual ESLint issues.
      » npm install @vue/eslint-config-prettier
    
Published   Jan 18, 2025
Version   10.2.0
Author   Evan You
🌐
GitHub
github.com › vuejs › eslint-config-prettier
GitHub - vuejs/eslint-config-prettier: `eslint-config-prettier` for `create-vue` setups
It disables all rules that are unnecessary or might conflict with Prettier. It also enables the eslint-plugin-prettier plugin, which runs Prettier as an ESLint rule and reports differences as individual ESLint issues.
Starred by 82 users
Forked by 7 users
Languages   JavaScript
🌐
Reddit
reddit.com › r/vuejs › starting new projects: why is vue with prettier / eslint / typescript so shite?
r/vuejs on Reddit: Starting new projects: Why is Vue with Prettier / Eslint / Typescript so shite?
December 23, 2024 -

Getting a new project set up, and then immediately having ESlint / Prettier yell at you about conflicting things.

Then Typescript complains

Then Eslint complains about Typescript

Then Prettier is fairly certain its not supposed to be <template> 'cause that's not a thing.

Is there really no "run this template and get set up without issues immediately"?

Top answer
1 of 2
9

Can you try this repo I've just created? Looks like it's working great from what I've tested.

https://github.com/kissu/stackoverflow-eslint-standard-prettier-config

Notes

  • I created 2 projects and dumped the configuration of the standard one into the Prettier one
  • CLI's current version of @vue/eslint-config-standard is throwing an error (Environment key "es2021" is unknown) because it requires ESlint 7 to work, as shown in this changelog
  • bumping ESlint to the latest version 7.29.0, fixed the issue
  • to check your project's current version of ESlint, you can run npx eslint --version
  • of course, you need to have the ESlint extension enabled and Prettier one disabled (if using VScode), otherwise it may conflict

I've tried to remove @vue/prettier from

extends: ['plugin:vue/essential', 'eslint:recommended', '@vue/standard', '@vue/prettier']

and see if it's successfully removes any ; and it does!

The errors are indeed coming from ESlint (if we do remove @vue/prettier), and they're fixed by ESlint only upon save (after an ESlint server + VScode restart)!

Putting Prettier back works fine of course.


Luckly, I had a new PC, hence had the opportunity to try a whole fresh config with VScode. I had to install ESlint only and have those settings into my settings.json

{
  "editor.codeActionsOnSave": {
      "source.organizeImports": false,
      "source.fixAll": true,
      "source.fixAll.eslint": true,
      "source.fixAll.stylelint": true
    }
}

The formatting works perfectly and nothing more is required.

2 of 2
0

I have eslint 7.8.1 with Vue Prettier on and i don't have any problem, maybe the version of eslint that you have is not compatible with Prettier or maybe your eslint have some errors?

In each way i will put my eslint configuration and maybe it will help you!

module.exports = {
    env: {
        'browser': true,
        'es6': true,
        'node': true
    },
    parserOptions: {
        'parser': 'babel-eslint'
    },
    extends: [
        '@vue/standard',
        'plugin:vue/recommended'
    ],
    rules: {
        "vue/html-indent": ["error", 4, {
            "attribute": 1,
            "closeBracket": 0,
            "switchCase": 0,
            "ignores": []
        }],

        "vue/max-attributes-per-line": [2, {
            "singleline": 10,
            "multiline": {
              "max": 1,
              "allowFirstLine": false
            }
          }],
        'indent': ['error', 4],
        'vue/component-name-in-template-casing': ['error', 'kebab-case'],
        'vue/script-indent': [
            'error',
            4,
            { 'baseIndent': 1 }
        ],
        'space-before-function-paren': ['error', 'never'],
        'semi': [2, "never"],
        'vue/singleline-html-element-content-newline': 'off',
        'vue/multiline-html-element-content-newline': 'off'
    },
    overrides: [
        {
            'files': ['*.vue'],
            'rules': {
                'indent': 'off'
            }
        }
    ]
}

Also maybe you have forgot some of the devDependecies on package.json, those are mine

"eslint": "^7.8.1",
"eslint-plugin-import": "^2.22.0",
"eslint-plugin-node": "^11.1.0",
"eslint-plugin-promise": "^4.2.1",
"eslint-plugin-standard": "^4.0.1",
"eslint-plugin-vue": "^6.2.2"

Hope that those will help you !

🌐
DEV Community
dev.to › devidev › setting-up-eslint-9130-with-prettier-typescript-vuejs-and-vscode-autosave-autoformat-n0
Vue3 + ESLint 9.13.0 + Prettier +TypeScript and VSCode Autoformat on Save - DEV Community
November 6, 2024 - This guide will walk you through configuring a Vue.js project with ESLint 9.13.0, Prettier, and TypeScript, to enable automatic code formatting and linting on save in Visual Studio Code.
Find elsewhere
🌐
GitHub
github.com › vuejs › eslint-config-prettier › releases
Releases · vuejs/eslint-config-prettier
eslint:recommended is no longer included in the default configuration. Users of old versions need to update their extends to use @vue/prettier/recommended, or ['eslint:recommended', '@vue/prettier].
Author   vuejs
🌐
DigitalOcean
digitalocean.com › community › tutorials › vuejs-vue-eslint-prettier
How To Configure ESLint and Prettier for Vue.js | DigitalOcean
July 23, 2021 - If you’re using a project created with @vue/cli, you’ll find the ESLint config inside package.json under the eslintConfig property. Add "plugin:prettier/recommended", to the extends sub-property after "plugin:vue/essential",, to enable Prettier support in ESLint with the default settings:
🌐
GitHub
github.com › meteorlxy › eslint-plugin-prettier-vue
GitHub - meteorlxy/eslint-plugin-prettier-vue: :ok_hand: ESLint plugin for Prettier formatting, which is better for Vue SFC
Includes all functions of eslint-plugin-prettier. Provides the ability for prettier to process custom blocks of Vue SFCs.
Starred by 119 users
Forked by 9 users
Languages   TypeScript 82.0% | Vue 12.8% | JavaScript 4.7% | Shell 0.5%
🌐
Redberry
redberry.international › setting-up-eslint-prettier-in-a-vue-js-project
Setting Up ESLint & Prettier In A Vue.js Project - Redberry
April 7, 2025 - When creating a new project with Vue CLI, if you choose a "Default" option (see the picture below), you will already have ESLint in your project. However, if you also want to add Prettier, you should choose - the "Manually select features" option.
🌐
GitHub
gist.github.com › onlime › 37cac1471fd33d8d6661187cd7b18d3a
ESLint/Prettier config for Vue 3 in VS Code · GitHub
ESLint/Prettier config for Vue 3 in VS Code. GitHub Gist: instantly share code, notes, and snippets.
🌐
Sebastian Weber
doppelmutzi.github.io › efficient-eslint-prettier-vue-workflow
Efficient Code Analyzing and Formatting (for Vue.js) with ESLint and Prettier
January 28, 2018 - Now, we have everything in place to use ESLint with Prettier and even with *.vue files on the command-line by npm scripts. We have a robust linting and formatting workflow running, which is also capable to auto-fix issues and can prevent committing in case of linting issues.
🌐
DEV Community
dev.to › pipzgutz › eslint-prettier-vue-3-163i
ESLint + Prettier (Vue 3) - DEV Community
January 15, 2023 - module.exports = { root: true, env: { node: true, browser: true }, extends: [ "plugin:vue/recommended", "eslint:recommended", "plugin:prettier/recommended" ], rules: { "prettier/prettier": "error", "vue/component-name-in-template-casing": ["error", "PascalCase"], "no-console": process.env.NODE_ENV === "production" ?
🌐
Medium
jdmendozar.medium.com › how-to-setup-vuejs-3-with-vite-unocss-and-eslint-prettier-5f53d0265233
How to setup VueJS 3 with Vite, UnoCSS and ESLint/Prettier | by J. David Mendoza | Medium
November 22, 2024 - ESLint will look into your JavaScript for patterns that are not good practice and point it out so you know that you shouldn’t do that. Prettier on the other hand (as the name implies) is used to format your code so it looks, well, prettier.
Top answer
1 of 2
14

According to a blog post I found [1] these steps should make it sure it works:

  1. Download the ESLint and Prettier extensions for VSCode.

  2. Install the ESLint and Prettier libraries into our project. In your project’s root directory, you will want to run:

npm install -D eslint prettier
  1. Install the Airbnb config. If you’re using npm 5+, you can run this shortcut to install the config and all of its dependencies:
npx install-peerdeps --dev eslint-config-airbnb
  1. Install eslint-config-prettier (disables formatting for ESLint) and eslint-plugin-prettier (allows ESLint to show formatting errors as we type)
npm install -D eslint-config-prettier eslint-plugin-prettier
  1. Create .eslintrc.json file in your project’s root directory:
{
  "extends": ["airbnb", "prettier"],
  "plugins": ["prettier"],
  "rules": {
    "prettier/prettier": ["error"]
  },
}
  1. Create .prettierrc file in your project’s root directory. This will be where you configure your formatting settings. I have added a few of my own preferences below, but I urge you to read more about the Prettier config file
{
  "printWidth": 100,
  "singleQuote": true
}
  1. The last step is to make sure Prettier formats on save. Insert "editor.formatOnSave": true into your User Settings in VSCode.

[1] https://blog.echobind.com/integrating-prettier-eslint-airbnb-style-guide-in-vscode-47f07b5d7d6a

2 of 2
1

Currently, I don't think Vetur works with SFC (single file components) to provide typed completion for props. This is why we're using JSX + Typescript + Vue + Eslint + AirBnB at work.

(I messaged you in Vue's #tooling Discord channel as well)

Top answer
1 of 1
2

vue/script-indent (ESLint rule)

From the eslint-plugin-vue docs:

Create .eslintrc.* file to configure rules. See also: http://eslint.org/docs/user-guide/configuring.

Example .eslintrc.js:

module.exports = {
  extends: [
    // add more generic rulesets here, such as:
    // 'eslint:recommended',
    'plugin:vue/essential'
  ],
  rules: {
    // override/add rules settings here, such as:
    // 'vue/no-unused-vars': 'error'
  }
}

So in your .eslintrc.js, add the script-indent rule to the rules property. Note the eslint-plugin-vue rule names are all prefixed with vue/, so use "vue/script-indent" in the rules property below:

module.exports = {
  extends: [
    'plugin:vue/essential',
  ],
  rules: {
    'vue/script-indent': ['error', 2, {
      baseIndent: 0,
      switchCase: 0,
      ignores: []
    }]
  }
}

Finally, ensure you have the ESLint VS Code extension installed to enable formatting from the IDE.

Prettier

Your workspace settings point to Prettier, so make sure your Prettier options align with the vue/script-indent rule. That is, the tabWidth value in Prettier should match the tab width in vue/script-indent.

For example, to require a 4-space tab width, create .prettierrc in the root of your project with the following JSON:

// .prettierrc
{             
  "tabWidth": 4
}

...and update .eslintrc.js to match:

// .eslintrc.js
module.exports = {
  rules: {                         
    'vue/script-indent': ['error', 4, {
      baseIndent: 0,
      switchCase: 0,
      ignores: []
    }]
  }
}

Also ensure you have the Prettier VS Code extension installed to enable formatting from the IDE.

🌐
Technicallyfletch
technicallyfletch.com › how-to-setup-eslint-and-prettier-with-vscode-and-vuejs
How to setup ESLint and Prettier with VS Code and VueJS
technicallyfletch.com is your first and best source for all of the information you’re looking for. From general topics to more of what you would expect to find here, technicallyfletch.com has it all. We hope you find what you are searching for!
🌐
Medium
medium.com › @jodavid › configure-eslint-with-typescript-prettier-and-vue-js-3-902aae3d1440
Configure eslint with Typescript, Prettier and Vue.js 3 | by Jo David | Medium
February 10, 2023 - Choose a name, then select “Vue” and then “TypeScript” from the list and finally install the dependencies. Create a new file and call it .editorconfig. Add the following to the file. Prettier will use the indentation and end of line settings it finds in an .editorconfig file. Add prettier to the project pnpm install prettier -D, create a file, call it .prettierrc and add the following settings (opinionated). Now add ESLint and its necessary configs and plugins to the project: