I'm using airbnb's eslint with webpack like this:
.eslintrc
:
{
"extends": "airbnb"
}
webpack.config.js
:
...
module: {
rules: [
{
test: /\.js$/,
use: ['babel-loader', 'eslint-loader'],
include: path.join(__dirname, 'src')
},
...
]
}
...
This works, but all the eslint rules show up as errors, eg:
1:28 error Missing semicolon semi
2:45 error Missing semicolon semi
5:7 error Unexpected space before function parentheses space-before-function-paren
How can I set it up so that all the rules from airbnb's eslint are warnings instead of errors?
Approach #1 adjust specific rules in .eslintrc
:
{
"extends": "airbnb"
"rules": {
"camelcase": "warn",
...
}
}
Approach #2 adjust eslint-loader
to emit warnings instead of errors for all rules:
{
...
loader: "eslint-loader",
options: {
emitWarning: true,
}
}