Skip to content

Commit

Permalink
Add eslint-plugin-ie11 (#1666)
Browse files Browse the repository at this point in the history
This would have prevented the failing build in master that occurred
after merging #1661, which would have allowed the author to fix it.
  • Loading branch information
mroderick authored and mantoni committed Jan 21, 2018
1 parent 5063c33 commit 1503cce
Show file tree
Hide file tree
Showing 5 changed files with 195 additions and 3 deletions.
185 changes: 184 additions & 1 deletion package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,7 @@
"dependency-check": "^2.9.1",
"eslint": "^4.6.1",
"eslint-config-sinon": "^1.0.0",
"eslint-plugin-ie11": "^1.0.0",
"eslint-plugin-mocha": "^4.2.0",
"husky": "^0.14.2",
"lint-staged": "^6.0.0",
Expand Down
6 changes: 6 additions & 0 deletions test/.eslintrc
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ env:
mocha: true

plugins:
- ie11
- mocha

rules:
Expand All @@ -20,3 +21,8 @@ rules:
mocha/no-sibling-hooks: error
mocha/no-skipped-tests: warn
mocha/no-top-level-hooks: error

ie11/no-collection-args: error
ie11/no-for-in-const: error
ie11/no-loop-func: warn
ie11/no-weak-collections: error
3 changes: 2 additions & 1 deletion test/collection-test.js
Original file line number Diff line number Diff line change
Expand Up @@ -102,7 +102,8 @@ describe("collection", function () {

for (var i = 0; i < types.length; i++) {
// yes, it's silly to create functions in a loop, it's also a test
assert.exception(function () { // eslint-disable-line no-loop-func
// eslint-disable-next-line no-loop-func ie11/no-loop-func
assert.exception(function () {
this.collection.createStubInstance(types[i]);
});
}
Expand Down
3 changes: 2 additions & 1 deletion test/stub-test.js
Original file line number Diff line number Diff line change
Expand Up @@ -2451,7 +2451,8 @@ describe("stub", function () {

for (var i = 0; i < types.length; i++) {
// yes, it's silly to create functions in a loop, it's also a test
assert.exception(function () { // eslint-disable-line no-loop-func
// eslint-disable-next-line no-loop-func ie11/no-loop-func
assert.exception(function () {
createStubInstance(types[i]);
});
}
Expand Down

0 comments on commit 1503cce

Please sign in to comment.