I have a .Net Core Web Application
and I use vue
on the clinet side. I have configured .eslintrtc
file with desired rules but it seems that the editor ignores .vue
files. Please se below my configuration
module.exports = {
root: true,
env: {
node: true
},
extends: [
'plugin:vue/essential',
'@vue/standard'
],
rules: {
eqeqeq: 'off', // off
'no-console': process.env.NODE_ENV === 'production' ? 'error' : 'off',
'no-debugger': process.env.NODE_ENV === 'production' ? 'error' : 'off',
'no-extend-native': [2, { exceptions: ['Object', 'Array', 'String', 'Number', 'Date'] }],
indent: ['error', 4, { SwitchCase: 1 }],
'vue/script-indent': ['error', 4, {
baseIndent: 1,
switchCase: 1,
ignores: []
}],
semi: ['error', 'always'],
'space-before-function-paren': ['error', {
anonymous: 'always',
named: 'never',
asyncArrow: 'always'
}],
'prefer-const': 0,
'no-case-declarations': 0,
'no-empty-pattern': 0,
'no-mixed-operators': 0
},
parserOptions: {
parser: 'babel-eslint'
},
overrides: [
{
files: [
'**/__tests__/*.{j,t}s?(x)'
],
env: {
mocha: true
}
},
{
files: ['*.vue'],
rules: {
indent: 'off'
}
}
]
};
And below are listed the package.json dev dependencies
"devDependencies": {
"@vue/cli-plugin-babel": "^4.1.0",
"@vue/cli-plugin-eslint": "^4.1.0",
"@vue/cli-plugin-router": "^4.5.7",
"@vue/cli-service": "^4.1.0",
"@vue/eslint-config-standard": "^5.1.2",
"babel-eslint": "^10.0.3",
"eslint": "^5.16.0",
"eslint-plugin-import": "^2.22.1",
"eslint-plugin-node": "^11.1.0",
"eslint-plugin-promise": "^4.2.1",
"eslint-plugin-standard": "^4.0.1",
"eslint-plugin-vue": "^5.0.0",
"sass": "^1.18.0",
"sass-loader": "^10.0.3",
"vue-template-compiler": "^2.6.12"
}
How can I configure Visual Studio 2019
to automatically linting .vue
files?
I mention that in Visual studio Code
works (but I need to work Visual Studio 2019
)