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

Add browser support linting #2789

Closed
wants to merge 3 commits into from
Closed

Add browser support linting #2789

wants to merge 3 commits into from

Conversation

varholak-peter
Copy link
Contributor

Description

Adds a way to check whether the functionality is compatible with specified browserlist.

Aproach taken

I used the eslint-plugin-builtin-compat in order to check for functionality not supported by browsers specified in browserlist.
I did not include it in the current lint command as it serves a bit different purpose in my opinion, so I created a separate .eslintrc config for it.
I also added npm run supportedbrowsers to list minimum version of all supported browsers.

Disclaimer

The browser list specified is not a final be all end all that I decided is the minimal version Svelte will support. Instead, it is the minimal config that currently passes the check and can be improved by various polyfills.

Closes #558
Closes #2788

@maxmilton
Copy link
Contributor

One big issue I see with the eslint-plugin-builtin-compat package is it's not maintained. One of its dependencies is mdn-browser-compat-data with a pinned version which is very out of date.

@Conduitry
Copy link
Member

Which code is it that this is checking for compatibility with specific browsers?

@Conduitry Conduitry closed this Jun 12, 2019
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.

Browser support Add browserslist constraint
3 participants