0

I have vue class component like this

export default class MyText extends Vue {
    @Prop({ type: String, default: 'id-rt' })
    id!: string; // ERROR: Expected indentation of 8 spaces but found 4  indent
}

Should't the @Props and id! have the same indentention???

my eslint.cjs file

"extends": [
    "plugin:vue/essential",
    "eslint:recommended",
    "@vue/eslint-config-typescript/recommended",
],

Whats causing that issue?

Note: If I remove @vue/eslint-config-typescript/recommended from extends then it worked. But I don't want to remove it, only want to disable the indentation issue for @Props

coure2011
  • 40,286
  • 83
  • 216
  • 349
  • Does this answer your question? [eslint indent rule indents decorated members](https://stackoverflow.com/questions/70642350/eslint-indent-rule-indents-decorated-members) – Estus Flask Sep 02 '22 at 13:33

1 Answers1

0

You can disable checking for the indentation for the next line with:

// eslint-disable-next-line indent

Or for the whole file:

// eslint-disable indent
stanko
  • 71
  • 3