Reputation: 1913
I'm using a Vue template project that uses ESLint. I'd like to turn it off, so I followed these instructions and made a file with
**/*.js
called .eslintignore
inside of my project root. However, I'm still getting the same eslint error messages. What am I doing wrong?
Upvotes: 21
Views: 39211
Reputation: 876
For my configuration - I needed to add the "ignorePatterns" property in .eslintrc:
"ignorePatterns": "**/*.d.ts"
Upvotes: 9
Reputation: 15475
If you're using the vscode-eslint
plugin, the .eslintignore
file may need to be placed at the root of the workspace folder, in order to be recognized by the vscode plugin.
Upvotes: 9
Reputation: 16495
You should use **/*
instead of **/*.js
as the first will ignore both .js
and .vue
files.
Alternatively you can comment this whole block in your build/webpack.base.conf.js
{
test: /\.(js|vue)$/,
loader: 'eslint-loader',
enforce: "pre",
include: [resolve('src'), resolve('test')],
options: {
formatter: require('eslint-friendly-formatter')
}
}
Upvotes: 3
Reputation:
I love ESLint but sometimes you want it to completely ignore a whole file. Add this to the top of your file:
/* eslint-disable */
It needs to be in /* this kind */
of comment, not //
this kind.
And ESLint won't complain about your file any more!
Upvotes: 3