mirror of
https://github.com/nuxt/nuxt.git
synced 2024-11-26 23:52:06 +00:00
1.1 KiB
1.1 KiB
title | description |
---|---|
Code Style | Nuxt supports ESLint out of the box |
ESLint
The recommended approach for Nuxt is to enable ESLint support using the @nuxt/eslint
module, that will setup project-aware ESLint configuration for you.
:::callout{icon="i-ph-lightbulb-duotone"} The module is designed for the new ESLint flat config format with is the default format since ESLint v9.
If you are using the legacy .eslintrc
config, you will need to configure manually with @nuxt/eslint-config
. We highly recommend you to migrate over the flat config to be future-proof.
:::
Quick Setup
npx nuxi module add eslint
Start your Nuxt app, a eslint.config.mjs
file will be generated under your project root. You can customize it as needed.
You can learn more about the module and customizations in Nuxt ESLint's documentation.