0

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>
0

1 Answer 1

2

Do $(npm bin)/eslint . --ext .vue

The eslint command checks only .js files by default. You have to specify additional extensions by --ext option.

Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.