Open
Description
i removed .eslintrc
in favor of .eslintrc.js
but eslint ignores my relaxed semicolon config
the config propagates to node_modules/eslint/lib/rules/semi.js
where options.omitLastInOneLineBlock
is true
but still, it has no effect,
or there is a second pass of eslint that ignores my config
im stuck, please help : /
// .eslintrc.js
// debug
console.log('hello from .eslintrc.js');
module.exports = {
rules: {
// relaxed semicolon config
semi: ["error", "always", { omitLastInOneLineBlock: true }],
}
}
this .eslintrc
is also ignored:
{
"rules": {
"semi": ["error", "always", { "omitLastInOneLineBlock": true }]
}
}
// src/scripts/index.js
console.log('hello')
// ^ eslint error
console.log('world')
// ^ eslint error
cd /tmp
git clone --depth=1 https://github.com/wbkd/webpack-starter.git
cd webpack-starter
npm install
rm .eslintrc
cp /tmp/.eslintrc.js .
cp /tmp/index.js src/scripts/index.js
npm run start
> [email protected] start /tmp/webpack-starter
> webpack-dev-server --open --config webpack/webpack.config.dev.js
ℹ 「wds」: Project is running at http://localhost:8081/
ℹ 「wds」: webpack output is served from /
ℹ 「wds」: Content not from webpack is served from /tmp/webpack-starter
hello from .eslintrc.js
ℹ 「wdm」: wait until bundle finished: /
⚠ 「wdm」: Hash: db6471af805096a10c6e
Version: webpack 4.41.4
Time: 3418ms
Built at: 12/25/2019 3:47:05 PM
Asset Size Chunks Chunk Names
index.html 382 bytes [emitted]
js/0.chunk.js 904 KiB 0 [emitted]
js/app.js 14.2 KiB app [emitted] app
public/.gitkeep 0 bytes [emitted]
Entrypoint app = js/0.chunk.js js/app.js
[0] multi (webpack)-dev-server/client?http://localhost:8081 ./src/scripts/index.js 40 bytes {app} [built]
[.... modules built ....]
+ 22 hidden modules
WARNING in ./src/scripts/index.js
Module Warning (from ./node_modules/eslint-loader/dist/cjs.js):
/tmp/webpack-starter/src/scripts/index.js
5:21 error Missing semicolon semi
6:21 error Missing semicolon semi
✖ 2 problems (2 errors, 0 warnings)
2 errors and 0 warnings potentially fixable with the `--fix` option.
Child HtmlWebpackCompiler:
1 asset
Entrypoint HtmlWebpackPlugin_0 = __child-HtmlWebpackPlugin_0
[./node_modules/html-webpack-plugin/lib/loader.js!./src/index.html] 552 bytes {HtmlWebpackPlugin_0} [built]
ℹ 「wdm」: Compiled with warnings.
Metadata
Metadata
Assignees
Labels
No labels