Skip to content

Commit

Permalink
find and findIndex should not be compatible
Browse files Browse the repository at this point in the history
the second parameter could be an object (The `_.matches` iteratee shorthand)
  • Loading branch information
stevemao committed Oct 11, 2017
1 parent 89cb061 commit 2dde30a
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 3 deletions.
1 change: 1 addition & 0 deletions .travis.yml
Expand Up @@ -4,5 +4,6 @@ node_js:
- 5
- 6
- 7
- 8
after_success:
- npm run coveralls
4 changes: 2 additions & 2 deletions lib/rules/rules.json
Expand Up @@ -25,7 +25,7 @@
"ES6": true
},
"find": {
"compatible": true,
"compatible": false,
"alternative": "Array.prototype.find()",
"ES6": true
},
Expand All @@ -35,7 +35,7 @@
"ES6": true
},
"findIndex": {
"compatible": true,
"compatible": false,
"alternative": "Array.prototype.findIndex()",
"ES6": true
},
Expand Down
2 changes: 1 addition & 1 deletion tests/index.js
Expand Up @@ -8,6 +8,6 @@ assert.equal(plugin.configs['all-warn'].rules['you-dont-need-lodash-underscore/t
assert.equal(plugin.configs.all.rules['you-dont-need-lodash-underscore/every'], 2);
assert.equal(plugin.configs.all.rules['you-dont-need-lodash-underscore/keys'], 2);
assert.equal(plugin.configs['compatible-warn'].rules['you-dont-need-lodash-underscore/each'], undefined);
assert.equal(plugin.configs['compatible-warn'].rules['you-dont-need-lodash-underscore/find-index'], 1);
assert.equal(plugin.configs['compatible-warn'].rules['you-dont-need-lodash-underscore/last-index-of'], 1);
assert.equal(plugin.configs.compatible.rules['you-dont-need-lodash-underscore/for-each'], 1);
assert.equal(plugin.configs.compatible.rules['you-dont-need-lodash-underscore/is-nan'], 2);

0 comments on commit 2dde30a

Please sign in to comment.