Closed
Description
Tell us about your environment
- ESLint version: 6.6.0
- eslint-plugin-vue version: 5.2.3
- Node version: 12.10.0
Please show your full configuration:
module.exports = {
root: true,
parserOptions: {
parser: 'babel-eslint',
sourceType: 'module',
ecmaVersion: 2017,
},
env: {
browser: true,
},
plugins: [
'vue',
],
extends: [
'standard',
'plugin:vue/recommended',
],
rules: {
// 'semi': ['error', 'always'],
'comma-dangle': ['error', 'always-multiline'],
'no-console': process.env.NODE_ENV === 'production' ? 'error' : 'off',
'no-debugger': process.env.NODE_ENV === 'production' ? 'error' : 'off',
'camelcase': ['off'],
'indent': ['error', 2],
'vue/max-attributes-per-line': ['error', {
'singleline': 5,
'multiline': {
'max': 2,
'allowFirstLine': false,
},
}],
'vue/singleline-html-element-content-newline': ['off'],
'vue/html-self-closing': ['off'],
'prefer-const': ['off'],
'quote-props': ['off'],
'vue/html-indent': [
'error',
2,
{ 'ignores': ['VElement[name=CodeBlock].children'] },
],
},
}
What did you do?
<template>
<div>
<CodeBlock>
function foo () {
return true // this line reports: Expected indentation of 6 spaces but found 8 space
}
</CodeBlock>
</div>
</template>
What did you expect to happen?
I found an existing issue: #365 , took configuration code from the comment and change pre
to CodeBlock
, but still does not work.
I tried on the online playground, and find that, it works with kebab-case components, but not with PascalCase components. <code-block>
works, but <CodeBlock>
not.
I'm not sure if this is a bug or by design. If it is by design, what is the correct way to make it work with PascalCase component?
Metadata
Metadata
Assignees
Labels
No labels