ESLing ver - ^4.19.1
node ver - 6.0.0
eslint-plugin-vue - 5.0.0-beta.3
Rule:
module.exports = {
root: true,
env: {
browser: true,
node: true
},
globals: {
__static: true
},
extends: [
'plugin:vue/essential'
],
rules: {
'indent': 'off',
'vue/html-quotes': ["error", 'double'],
'vue/no-unused-vars': 'error',
"vue/html-indent": ["error", 4, {
"attribute": 1,
"closeBracket": 0,
"alignAttributesVertically": true,
"ignores": []
}],
'vue/script-indent': ["error", 4, {
"baseIndent": 1,
}],
"vue/max-attributes-per-line": ["error", {
"singleline": 1,
"multiline": 1,
}],
"vue/name-property-casing": ["error", "PascalCase"],
'vue/mustache-interpolation-spacing': ["error", 'never'],
'vue/no-duplicate-attributes': ["error", {
'allowCoexistClass': true,
'allowCoexistStyle': true,
}],
"vue/singleline-html-element-content-newline": ["error", {
"ignoreWhenNoAttributes": true,
"ignores": ["pre", "textarea"]
}],
"vue/html-closing-bracket-spacing": ["error", {
"startTag": "never",
"endTag": "never",
"selfClosingTag": "always"
}],
"vue/component-name-in-template-casing": ["error",
"PascalCase|kebab-case"
],
'arrow-parens': 0,
'generator-star-spacing': 0,
'no-debugger': process.env.NODE_ENV === 'production' ? 2 : 0,
'comma-dangle': ['error', {
'arrays': 'always-multiline',
'objects': 'always-multiline',
'imports': 'always-multiline',
'exports': 'always-multiline',
'functions': 'always-multiline'
}],
'linebreak-style': ['error', 'unix'],
'no-multiple-empty-lines': ['error', {
'max': 1
}]
},
"settings": {
"html/html-extensions": [".html"],
}
}
Component:
<template>
<Tab
:items="objects"
:value.sync="correctTab"
:slotMod="tabOptions.slotMod">
<Photos slot="Photos" :type="userType" :overlay="isOverlay" :open="true" />
</Tab>
</template>
All-time take error with - Definition for rule 'vue/singleline-html-element-content-newline' was not found. How can I fix it ?
vue/singleline-html-element-content-newline is a rule added in v5.0.0-beta.3.
If you want to use this rule please use v5.0.0-beta.3.
sorry. I made a mistake. You used v5.0.0-beta.3.
I did a test according to your settings, but it worked fine.
https://github.com/ota-meshi/eslint-plugin-vue-test
https://travis-ci.org/ota-meshi/eslint-plugin-vue-test/builds/423102253
6:31 error Attribute "bind" should be on a new line vue/max-attributes-per-line
6:48 error Attribute "bind" should be on a new line vue/max-attributes-per-line
6:69 error Attribute "bind" should be on a new line vue/max-attributes-per-line
Please tell me if there is a difference between this repository and your environment.
Oh! I think I know what the problem might be here.
You probably use @vue/plugin-eslint aren't you @selinAnt0n ?
And when you run vue-cli-service lint it might try to use it's own version of eslint-plugin-vue, which is different than the beta you want to use know.
While you play with beta version of eslint-plugin-vue you might want to slightly change the lint script:
"lint": "eslint src --ext .js,.vue"
And in the meanwhile I'll also consider fixing @vue/plugin-eslint so it can properly resolve the right package.
I hope this will help you @selinAnt0n :)
Most helpful comment
Oh! I think I know what the problem might be here.
You probably use
@vue/plugin-eslintaren't you @selinAnt0n ?And when you run
vue-cli-service lintit might try to use it's own version ofeslint-plugin-vue, which is different than the beta you want to use know.While you play with beta version of
eslint-plugin-vueyou might want to slightly change the lint script:And in the meanwhile I'll also consider fixing
@vue/plugin-eslintso it can properly resolve the right package.I hope this will help you @selinAnt0n :)