Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

lint: add browser compat check #23763

Merged
merged 3 commits into from
Mar 22, 2022
Merged

Conversation

CodyJasonBennett
Copy link
Contributor

@CodyJasonBennett CodyJasonBennett commented Mar 22, 2022

Related issue: #23480

Description

Adds eslint-plugin-compat to lint syntax usage in compliance with browser/environment support.

I have this configured via browserslist according to the babel config I shared in #23480 (comment). This can be fine-tuned for Safari, Node, etc.

Console output

image

GitHub annotations

image

CodyJasonBennett added a commit to CodyJasonBennett/three.js that referenced this pull request Mar 22, 2022
@donmccurdy
Copy link
Collaborator

donmccurdy commented Mar 22, 2022

Awesome, thanks! Maybe we could put WebGL2RenderingContext (or other globals) into config.settings.polyfills if we've already decided to use them.

@mrdoob mrdoob added this to the r139 milestone Mar 22, 2022
@mrdoob mrdoob merged commit 1c06b8d into mrdoob:dev Mar 22, 2022
@mrdoob
Copy link
Owner

mrdoob commented Mar 22, 2022

Thanks!

@CodyJasonBennett CodyJasonBennett deleted the lint-browser-compat branch March 22, 2022 19:51
@CodyJasonBennett CodyJasonBennett restored the lint-browser-compat branch March 22, 2022 19:51
@CodyJasonBennett CodyJasonBennett deleted the lint-browser-compat branch March 22, 2022 19:51
@CodyJasonBennett CodyJasonBennett restored the lint-browser-compat branch March 22, 2022 19:51
abernier pushed a commit to abernier/three.js that referenced this pull request Sep 16, 2022
* lint: add browser compat check

* WebGLTextures: disable compat warning for OffscreenCanvas

* WebGL: disable compat warning for WebGL2 capabilities
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants