.vue files are not linted
See original GitHub issueTell us about your environment
- ESLint Version: 4.9.0
- eslint-plugin-vue Version: 3.13.17
- Node Version: 6.11.3
Please show your full configuration:
module.exports = {
"env": {
"browser": true,
"es6": true
},
"extends": ["eslint:recommended", "plugin:vue/recommended"],
// required to lint *.vue files
plugins: [
"vue"
],
"parserOptions": {
"parser": "babel-eslint",
"ecmaVersion": 2017,
/*
"ecmaFeatures": {
"classes": true,
"experimentalObjectRestSpread": true,
"jsx": true
}, */
"sourceType": "module"
},
"rules": {
"indent": ["error", 4, { "SwitchCase": 1 } ],
"linebreak-style": [
"error",
"unix"
],
"quotes": [
"warn",
"single"
],
"semi": [
"warn",
"always"
],
"no-console": "warn",
"no-unused-vars": "warn",
'vue/valid-v-if': 'error'
}
};
What did you do? Please include the actual source code causing the issue.
<template>
<div v-bind:id='id' class='alert alert-primary' style='margin: 5px;'>
<p><b>{{ title }}:</b></p>
<p>{{ thisRecord.name }} only ({{ current.length }}):</p>
<p>
<ul class='bio-tags btsmall'>
<li v-bind:class=\"tagtype\" v-for='item in current'>
<a :href=\"searchLink(link, item)\" target='_blank'>
<span class='bio-icon-tag' style='padding-right: 5px'></span>
{{ item }}
</a>
</li>
</ul>
<div class='clearfix'></div>
</p>
<p><a v-bind:href=\"href\" target='_blank'>{{ otherRecord['name'] }}</a>
only ({{ other.length }}):</p>
<p>
<ul class='bio-tags btsmall'>
<li v-bind:class=\"tagtype\" v-for='item in other'>
<a v-bind:href=\"searchLink(link, item)\" target='_blank'>
<span class='bio-icon-tag' style='padding-right: 5px'></span>
{{ item }}
</a>
</li>
</ul>
<div class='clearfix'></div>
</p>
<p>Shared ({{ both.length }})</span>:</p>
<p>
<ul class='bio-tags btsmall'>
<li v-bind:class=\"tagtype\" v-for='item in both'>
<a :href=\"searchLink(link, item)\" target='_blank'>
<span class='bio-icon-tag' style='padding-right: 5px'></span>
{{ item }}
</a>
</li>
</ul>
<div class='clearfix'></div>
</p>
</div>
<div class='clearfix'></div>`
</template>
<script>
import Vue from 'vue';
import axios from 'axios';
import * as d3 from 'd3';
import * as venn from 'venn.js';
export default {
delimiters: ['[[', ']]'],
props: ['current', 'other', 'both', 'title', 'tagtype', 'count', 'id', 'href', 'link'],
el: '#comparison-area',
method: {
searchLink: function (url, item) {
const self = this;
if (url.includes('taxonomies') || url.includes('domains')) {
return '/search?q=&selected_facets=' + url + ':' + item
} else {
return '/' + self.recordIds[item];
}
}
}
};
</script>
What did you expect to happen? .vue file to be linted
What actually happened? Please include the actual, raw output from ESLint. .vue files are ignored by the linter, only .js files are linted. What am I doing wrong? Do I need to modify the configuration? Is the plugins:[“vue”] instruction needed? Nothing changes with or without it.
Thanks a lot for any suggestion
Issue Analytics
- State:
- Created 6 years ago
- Comments:9 (2 by maintainers)
Top Results From Across the Web
ESLint is ignoring .vue files · Issue #327 - GitHub
With this config, ESLint is linting only .js files on every save and that's my wanted behavior but also with .vue files in...
Read more >ESLint: linting is not enabled in .vue files : WEB-27868
I see. Currently, we run eslint in vue files only if user specified vue plugin in eslint config file (in json format), or...
Read more >1 - Stack Overflow
Linting not working eslint-plugin-vue for .vue with <script src="./TheAloha.js"> · javascript · vue.js · webpack · eslint · eslint-plugin-vue.
Read more >Linting - Vue Loader
The official eslint-plugin-vue supports linting both the template and script parts of Vue single file components. Make sure to use the plugin's included ......
Read more >How To Configure ESLint and Prettier for Vue.js - DigitalOcean
Learn how to add default Prettier linting to your Vue.js projects. ... due to a lack of support for Single-File Components ( .vue...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
How do you do to lint the file?
If you are using CLI,
eslint
command checks only.js
files by default. You have to specify the additional extension:If you are using editor integrations, most editors check only
.js
files by default. You have to specify the additional extension. For example, VSCode needs to configure like:This should really be included somewhere in the README.