Created
March 22, 2025 10:11
-
-
Save khanghh/5c3ac8789e4865b85a5f6528e46ff398 to your computer and use it in GitHub Desktop.
Nuxtjs eslint config
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
import { createConfigForNuxt } from '@nuxt/eslint-config/flat' | |
export default createConfigForNuxt( | |
{ | |
features: { | |
stylistic: { | |
semi: false, | |
indent: 2, | |
quotes: 'single', | |
}, | |
}, | |
}, | |
{ | |
languageOptions: { | |
...globals.builtin, | |
...globals.browser, | |
...globals.node, | |
defineNuxtConfig: 'readonly', | |
defineEventHandler: 'readonly', | |
} | |
}, | |
).override('nuxt/vue/rules', { | |
rules: { | |
'@typescript-eslint/no-unused-vars': 'off', | |
'vue/html-closing-bracket-newline': 'off', | |
'vue/max-attributes-per-line': 'off', | |
'vue/first-attribute-linebreak': 'off', | |
'vue/multi-word-component-names': 'off', | |
'vue/html-self-closing': 'off', | |
'vue/v-on-event-hyphenation': 'off', | |
'vue/html-indent': ['error', 2, { alignAttributesVertically: false }], | |
'vue/multiline-html-element-content-newline': ['error', { | |
ignoreWhenEmpty: false, | |
ignores: ['pre', 'textarea'], | |
allowEmptyLines: false, | |
}], | |
}, | |
}) |
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
npx nuxi module add eslint |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment