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 eslint-plugin-ie11 #1666

Merged
merged 1 commit into from
Jan 21, 2018
Merged

Conversation

mroderick
Copy link
Member

This PR adds eslint-plugin-ie11, which would have prevented me from merging #1661, which caused a failing build (and more work for me). Instead, the author would have seen the error and fixed it.

Background

In IE11 Map and Set constructors do not accept arguments, but instead of throwing an error, they fail silently, and just produce the empty state.

// works in modern browsers, not in IE11
new Set([1, 2]);

How to verify - mandatory

  1. Check out this branch
  2. npm install
  3. Add the code above to any linted JS file, save it
  4. npm run lint
  5. Observe the failure

This would have prevented the failing build in master that occurred
after merging sinonjs#1661, which would have allowed the author to fix it.
@mantoni mantoni merged commit 1503cce into sinonjs:master Jan 21, 2018
@mantoni
Copy link
Member

mantoni commented Jan 21, 2018

For this type of issues we cannot have enough automation. Thank for digging out the plugin. I didn't know about it 👍

@mroderick
Copy link
Member Author

Thanks.

I also looked into eslint-plugin-compat (which I use elsewhere), but that doesn't catch this specific issue.

@mroderick mroderick deleted the eslint-plugin-ie11 branch January 21, 2018 21:15
@mroderick
Copy link
Member Author

I'll update the other projects to add this

franck-romano pushed a commit to franck-romano/sinon that referenced this pull request Oct 1, 2019
This would have prevented the failing build in master that occurred
after merging sinonjs#1661, which would have allowed the author to fix it.
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.

2 participants