Skip to content

Commit

Permalink
feat(eslint-config): add Nuxt-aware `vue/multiline-html-element-conte…
Browse files Browse the repository at this point in the history
…nt-newline` rule
  • Loading branch information
DamianGlowala committed Apr 11, 2024
1 parent 05a0b39 commit 81cc09a
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions packages/eslint-config/src/flat/configs/vue.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
import * as parserVue from 'vue-eslint-parser'
import parserTs from '@typescript-eslint/parser'
import INLINE_ELEMENTS from 'eslint-plugin-vue/lib/utils/inline-non-void-elements.json' with { type: 'json' }

// @ts-expect-error missing types
import pluginVue from 'eslint-plugin-vue'
Expand Down Expand Up @@ -111,6 +112,11 @@ export default function vue(options: NuxtESLintConfigOptions): FlatConfigItem[]
'vue/require-default-prop': 'off',
'vue/space-in-parens': ['error', 'never'],
'vue/template-curly-spacing': 'error',
'vue/multiline-html-element-content-newline': ['error', {
ignoreWhenEmpty: true,
ignores: ['pre', 'textarea', 'router-link', 'RouterLink', 'nuxt-link', 'NuxtLink', ...INLINE_ELEMENTS],
allowEmptyLines: false,
}]
}
: {
// Disable Vue's default stylistic rules when stylistic is not enabled
Expand Down

0 comments on commit 81cc09a

Please sign in to comment.