Created
September 7, 2024 21:12
-
-
Save AloisSeckar/918db61abe16cbaf74a52d2972a8c540 to your computer and use it in GitHub Desktop.
Configuration for ESLint module in Nuxt
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// current config for ESLint module in Nuxt | |
// using https://www.npmjs.com/package/@nuxt/eslint 0.5.0^ | |
// last review: 2024-09-07 | |
// 1) create eslint.config.mjs in your root and copy this | |
// 2) add https://www.npmjs.com/package/typescript dependency into package.json | |
// 3) run pnpm dev (or npm run dev) to re-initialize default Nuxt ESLint config | |
// 4) enjoy ESLinting in your Nuxt project | |
import withNuxt from './.nuxt/eslint.config.mjs' | |
// config is being passed as an array of separate objects | |
// as suggested here: https://github.com/nuxt/eslint/discussions/413 | |
export default withNuxt([ | |
// what files will be linted | |
{ files: ['**/*.js', '**/*.ts', '**/*.vue'] }, | |
// `rules` section can follow, where you can change default eslint behaviour if needed | |
// you can adjust or even turn off some rules if you cannot or don't want to satisfy them | |
{ | |
rules: { | |
}, | |
}, | |
]) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment