Skip to content
Snippets Groups Projects
Commit ca073981 authored by CazSaa's avatar CazSaa
Browse files

ESLint: Add NuxtLink to single line html elements

parent 34efdc49
No related branches found
No related tags found
No related merge requests found
INLINE_ELEMENTS = ['a', 'abbr', 'audio', 'b', 'bdi', 'bdo', 'canvas', 'cite', 'code', 'data', 'del', 'dfn', 'em', 'i', 'iframe', 'ins', 'kbd', 'label', 'map', 'mark', 'noscript', 'object', 'output', 'picture', 'q', 'ruby', 's', 'samp', 'small', 'span', 'strong', 'sub', 'sup', 'svg', 'time', 'u', 'var', 'video']
module.exports = {
root: true,
env: {
......@@ -11,5 +13,11 @@ module.exports = {
plugins: [
],
// add your custom rules here
rules: {}
rules: {
'vue/singleline-html-element-content-newline': ['warn', {
ignoreWhenNoAttributes: true,
ignoreWhenEmpty: true,
ignores: ['pre', 'textarea', 'NuxtLink', ...INLINE_ELEMENTS]
}]
}
}
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment