I am trying to get eslint to ignore a file I'm importing globally using webpack.ProvidePlugin
, yet the file is still being linted.
//file arrangement
- vendor
`- google.js
- ...
- webpack.config.js
//relevant webpack configurations
resolve: {
extensions: ['.js', '.json'],
alias: {
'google': path.resolve(__dirname, './vendor/google.js')
}
},
....
plugins: [
new webpack.ProvidePlugin({
'google': 'google'
})
]
/*google is successfully available globally*/
//.eslintrc.json
{
"extends": ["standard", "standard-react"],
"globals": {
"google": true
}
}
//package.json script
"dev": "webpack-dev-server --port 5888",
...
"lint": "eslint js/**/*.js webpack.config.js"
And yet I am still getting hundreds of linting errors from google.js. It's minified but the webpack docs say that though that's preferred it probably isn't necessary and also the eslint docs don't mention it at all.
I've also tried the comment style of ignoring mentioned in the docs //google.js /global google:true/
Why is ESLint still giving me all of these linting errors?
via 1252748
No comments:
Post a Comment