Skip to content
This repository has been archived by the owner on Feb 18, 2024. It is now read-only.

Decide whether we should enable devServer.overlay #1131

Closed
edmorley opened this issue Sep 21, 2018 · 3 comments
Closed

Decide whether we should enable devServer.overlay #1131

edmorley opened this issue Sep 21, 2018 · 3 comments

Comments

@edmorley
Copy link
Member

This seems like it might be a DX win (eg CRA has an overlay, albeit a custom one):
https://webpack.js.org/configuration/dev-server/#devserver-overlay

@timkelty
Copy link
Contributor

Whoa I didn't even know about that! I'm a fan!

@edmorley
Copy link
Member Author

So I think it would be good to enable this, but perhaps only for errors and not warnings (ie: we should use overlay: true, which does exactly that). This would mean a compile not completing due to an error would at least result in a message being shown in the page content, rather than the blank page etc.

The only question is what we should do with issues found by eslint-loader. ESLint itself has concepts of "errors" and "warnings", but many presets (such as AirBnb) set most rules to "error". I think it's a bit too noisy to surface all of these in the devserver overlay - for example when prototyping a quick change it seems unhelpful to block the entire page view to warn about incorrect indentation.

So perhaps enabling the overlay needs to be blocked on also setting emitWarning: true (which forces all issues to be treated as warnings) in @neutrinojs/eslint when in development?

@timkelty
Copy link
Contributor

So perhaps enabling the overlay needs to be blocked on also setting emitWarning: true (which forces all issues to be treated as warnings) in @neutrinojs/eslint when in development?

Seems reasonable to me!

@edmorley edmorley self-assigned this Oct 11, 2018
edmorley added a commit that referenced this issue Nov 20, 2018
To reduce the noise in the webpack-dev-server overlay (which defaults
to showing errors only and is going to be enabled soon in #1131),
and to also ensure hot reloading isn't prevented.

See:
https://github.com/webpack-contrib/eslint-loader#options
edmorley added a commit that referenced this issue Nov 20, 2018
See:
https://webpack.js.org/configuration/dev-server/#devserver-overlay

Note this change 'relies' on #1216, in that without that change all
linter errors would be displayed in the overlay too, which is likely
too noisy (given that many rules are for stylistic issues that should
not block viewing the dev-server page output).

Fixes #1131.
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Development

No branches or pull requests

2 participants