I had tried hours to setup eslint-plugin-vue
, but the lint output is always empty (no stdout and stderr), I must have missed something very basic?
Commands
$ node --version # v9.4.0
$ npm install
$ $(npm bin)/eslint . # Empty output
File structure
Foo
├── .eslintrc.js
├── main.vue
└── package.json
.eslintrc.js
module.exports = {
"extends": [
"plugin:vue/recommended"
]
}
package.json
{
"name": "Foo",
"version": "0.1.0",
"devDependencies": {
"eslint": "^4.17.0",
"eslint-plugin-vue": "^4.2.2"
}
}
main.vue
<template>
</template>
<script>
!@#$%^UIYTHRE
</script>
Do $(npm bin)/eslint . --ext .vue
$(npm bin)/eslint . --ext .vue
The eslint
command checks only .js
files by default. You have to specify additional extensions by --ext
option.
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.