🔧 AI Nachrichten Major AI platforms go down in unprecedented simultaneous outage(03.09.2026 um 17:34 Uhr)
🔧 AI Nachrichten ChatGPT, Claude, and Grok Down? Users Report Widespread Outages(03.09.2026 um 19:14 Uhr)
🔧 AI Nachrichten OpenAI Launches GPT-6 Astra, Says We May Have Entered the AGI Era(03.09.2026 um 22:08 Uhr)
🔧 AI Nachrichten Claude Comes to CarPlay as Fifth Major AI Chatbot App(05.09.2026 um 05:31 Uhr)
🔧 AI Nachrichten OpenAI’s GPT-6 Astra Is AGI, Says NVIDIA CEO Jensen Huang(07.09.2026 um 06:31 Uhr)
🔧 AI Nachrichten Blame AI companies for Mac mini and Mac Studio shortage(31.08.2026 um 10:32 Uhr)
🔧 AI Nachrichten Major AI platforms go down in unprecedented simultaneous outage(03.09.2026 um 17:34 Uhr)
🔧 AI Nachrichten ChatGPT, Claude, and Grok Down? Users Report Widespread Outages(03.09.2026 um 19:14 Uhr)
🔧 AI Nachrichten OpenAI Launches GPT-6 Astra, Says We May Have Entered the AGI Era(03.09.2026 um 22:08 Uhr)
🔧 AI Nachrichten Claude Comes to CarPlay as Fifth Major AI Chatbot App(05.09.2026 um 05:31 Uhr)
🔧 AI Nachrichten OpenAI’s GPT-6 Astra Is AGI, Says NVIDIA CEO Jensen Huang(07.09.2026 um 06:31 Uhr)
🔧 AI Nachrichten Blame AI companies for Mac mini and Mac Studio shortage(31.08.2026 um 10:32 Uhr)

🔧 Programmierung 🕛 kürzlich 3 Min Lesezeit
0

Setting Up ESLint 9.13.0 with Prettier, TypeScript, Vue.js, and VSCode Autosave Autoformat

↗ Quelle (dev.to)
🗣️ Stimme:
📑 Inhaltsübersicht

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.






1. Create a New Vue Project



Start by creating a new Vue project:




CODE
npm create vue@latest






Navigate into the project directory:




CODE
cd your-project-directory









2. Install and Update Dependencies



Install the project dependencies:




CODE
npm install






Then, use ncu (Node Check Updates) to update the project dependencies:




CODE
npx ncu -u
npm install









3. Prerequisites Add ESLint, Prettier, and TypeScript Packages



This configuration requires the following NPM packages to be installed either locally or globally:




CODE
prettier
eslint prettier-eslint
@typescript-eslint/parser
typescript
vue-eslint-parser
@vue/eslint-config-typescript
@vue/eslint-config-prettier







Install the necessary development dependencies with pnpm or npm:




CODE
pnpm install -D prettier eslint prettier-eslint @typescript-eslint/parser typescript vue-eslint-parser @vue/eslint-config-typescript @vue/eslint-config-prettier









4. Initialize ESLint Configuration



Run the following command to set up your ESLint configuration:




CODE
npm init @eslint/config@latest






When prompted, make the following selections to configure ESLint:





  • How would you like to use ESLint?: To check syntax and find problems.


  • What type of modules does your project use?: CommonJS (require/exports).


  • Which framework does your project use?: Vue.js.


  • Does your project use TypeScript?: Yes.


  • Where does your code run?: Browser.

  • When asked if you'd like to install dependencies (eslint, globals, @eslint/js, @typescript-eslint, eslint-plugin-vue), choose Yes and use npm as the package manager.






5. Add ESLint Flat Config



To ensure ESLint works with the new Flat Config format, make sure to include the necessary configuration in your eslint.config.mjs file. Adjustments for this might depend on your specific setup.




CODE
import globals from 'globals';
import pluginJs from '@eslint/js';
import tseslint from 'typescript-eslint';
import pluginVue from 'eslint-plugin-vue';
import prettier from 'eslint-plugin-prettier/recommended';
import vueConfigTypescript from '@vue/eslint-config-typescript';
import vueConfigPrettier from '@vue/eslint-config-prettier';

/** @type {import('eslint').Linter.Config[]} */
export default [
{
languageOptions: {
globals: {
...globals.browser,
...globals.node,
},
},
},
// js
pluginJs.configs.recommended,
{
rules: {
'no-unused-vars': 'off',
'no-undef': 'off',
},
},
// ts
...tseslint.configs.recommended,
{
rules: {
'@typescript-eslint/no-unused-vars': 'warn',
'@typescript-eslint/no-explicit-any': 'warn',
},
},
// vue
...pluginVue.configs['flat/recommended'],
{
files: ['*.vue', '**/*.vue'],
languageOptions: {
parserOptions: {
parser: tseslint.parser,
},
},
},
{
rules: {
...vueConfigTypescript.rules,
...vueConfigPrettier.rules,
'prettier/prettier': [
'warn',
{
singleQuote: true,
},
],
'vue/multi-word-component-names': 'off',
'vue/attribute-hyphenation': 'off',
'vue/no-v-html': 'off',
'vue/v-on-event-hyphenation': 'off',
'@typescript-eslint/ban-ts-comment': 'off',
'@typescript-eslint/no-require-imports': 'off',
'@typescript-eslint/no-explicit-any': 'off',
},
},
{
ignores: ['node_modules', '.nuxt', '.output', 'dist'],
},
// prettier
prettier,
{
rules: {
'prettier/prettier': ['warn', { singleQuote: true }],
},
},
];










6. Install VSCode Extension for Prettier-ESLint Integration



To enable auto-formatting on save with Prettier and ESLint, install the following Visual Studio Code extension:








7. Add Extension Recommendations



To recommend the extension for your project, add it to the .vscode/extensions.json file:




CODE
{
"recommendations": [
"rvest.vs-code-prettier-eslint"
]
}









8. Restart VSCode



After configuring your project and installing the extension, restart Visual Studio Code to ensure that autosave and autoformat work as expected.






Summary



Your project should now be set up with:




  • ESLint 9.13.0 with TypeScript and Vue.js support

  • Prettier integration for consistent code formatting

  • Autoformatting on save in VSCode using the Prettier ESLint extension

Vollständiger Original-Bericht
Ausführliche Details, Code-Beispiele & Hersteller-Stellungnahme auf dev.to.
↗ Original-Artikel auf dev.to lesen
Wie bewertest du diesen Beitrag?
1 Klick Feedback
Teilen mit Netzwerk & Team:

Community-Analysen & Experten-Meinungen 0

Verfasse deine eigene Analyse, teile Workarounds oder diskutiere diesen Vorfall im Blog.
Noch keine Community-Analyse verfasst. Markiere einen Textabschnitt oder klicke oben auf Eigene Analyse verfassen“!
Community Pulse: Relevanz-Einschätzung
1 Klick Experten-Votum
🔴 Akute Relevanz 0%
🟡 In Evaluierung 0%
🟢 Keine Auswirkung 0%
Spannende Innovation 0%
Verwandte Story-Cluster & Quellen (Vektor-KI)
Port 8095 Engine
3 Quellen
GPT-6 Astra Release Today? OpenAI’s Next Major AI Model Is Almost Here
1 Quelle
Apple accuses OpenAI of destroying evidence as trade-secrets fight intensifies
1 Quelle
Major AI platforms go down in unprecedented simultaneous outage
Ähnliche Beiträge
🔍 Verwandte News

Auch interessante Nachrichten Setting Up ESLint 9.13.0 with Prettier, TypeScript, Vue.js, and VSCode Autosave Autoformat

Thematisch verwandte Begriffe: Setting, ESLint, 9130, with · 6 Treffer

Laden...

Videos werden geladen ...

Laden...

Beiträge werden geladen ...

Laden...

Videos werden geladen ...

Laden...

Beiträge werden geladen ...

Laden...

Videos werden geladen ...

Laden...

Beiträge werden geladen ...

Laden...

Videos werden geladen ...

Laden...

Beiträge werden geladen ...

Laden...

Videos werden geladen ...