Closed
Description
Tell us about your environment
- ESLint version: 6.6.0
- eslint-plugin-vue version: 6.0.1
- Node version: v12.13.0
Please show your full configuration:
{
"extends": [
"plugin:vue/recommended",
"eslint:all",
"@vue/typescript",
"plugin:@typescript-eslint/recommended"
],
"parser": "vue-eslint-parser",
"parserOptions": {
"parser": "@typescript-eslint/parser",
"sourceType": "module"
},
"rules": {
"indent": [
"error",
2
],
"init-declarations": "off",
"one-var": "off",
"no-plusplus": "off",
"vue/script-indent": ["error", 2, { "baseIndent": 0 }],
"quote-props": ["error", "as-needed"],
"no-ternary": "off",
"multiline-ternary": "off",
"new-cap": ["error", {"capIsNewExceptions": ["Module", "Component", "Prop", "Ref", "Emit"]}],
"space-before-function-paren": ["error", "never"],
"array-element-newline": ["error", "consistent"],
"comma-dangle": ["error", "always-multiline"],
"function-call-argument-newline": ["error", "consistent"],
"max-len": ["error", { "code": 120 }],
"import/no-unresolved": "off",
"padded-blocks": ["error", "never"],
"vue/html-self-closing": [
"error",
{
"html": {
"void": "always",
"normal": "always",
"component": "always"
}
}
]
},
"settings": {
"overrides": [
{
"files": ["*.vue"],
"rules": {
"indent": "off"
}
}
]
}
}
What did you do?
<template>
<div>
</div>
</template>
<script lang="ts">
import {Component, Prop, Vue} from "vue-property-decorator";
@Component
export default class UserComp extends Vue {
private id = "UserComp"; // it doesn't matter how many spaces there are private readonly user!: User;
}
</script>
What did you expect to happen?
Since we ban indent
rule there's no way of check nested spacing. I would expect vue/script-idnent
to warn about incorrect spacing in the same way how would indent
rule warn me if it was .ts
file
What actually happened?
No warnings are present
Reproduce:
- git checkout https://github.com/akoidan/vue-webpack-typescript
- yarn install
- yarn start
- play with vue files, trying to mess with indent, and nothing will happen in nested indents. This means that:
class A { // this 2 indent before class would produce error
}
class B {
a = 3; // but this won't!
}