how to fix the eslint indent error in vscode?

2.5k Views Asked by At

sorry, my English is not good, but I need to know how to fix it.

I try to use every indent rules, it doesn't work...

I wish everything is well when I use Vetur formatter.

please tell me how to fix it, thanks

https://eslint.org/docs/rules/no-mixed-spaces-and-tabs#disallow-mixed-spaces-and-tabs-for-indentation-no-mixed-spaces-and-tabs

my question snippets

question description

my vscode setting.json

my eslint rules setting

1

There are 1 best solutions below

0
On

Try adding offsetTernaryExpressions to your ESLint indent rule config.

.eslintrc

rules: {
    'indent': [2, 2, {
        'SwitchCase': 1,
        'offsetTernaryExpressions': true
    }]
}

More information on this configuration option