Skip to content

Commit b2e5428

Browse files
pvdlgsindresorhus
authored andcommitted
Update eslint-plugin-unicorn (#287)
1 parent 8ef54e0 commit b2e5428

4 files changed

Lines changed: 5 additions & 5 deletions

File tree

lib/open-report.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -33,9 +33,9 @@ const resultToFile = result => {
3333
};
3434

3535
const files = (report, predicate) => report.results
36-
.filter(predicate)
36+
.filter(result => predicate(result))
3737
.sort(sortResults)
38-
.map(resultToFile);
38+
.map(result => resultToFile(result));
3939

4040
module.exports = report => {
4141
if (report.errorCount > 0) {

lib/options-manager.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -241,7 +241,7 @@ const findApplicableOverrides = (path, overrides) => {
241241
};
242242

243243
const mergeApplicableOverrides = (baseOptions, applicableOverrides) => {
244-
applicableOverrides = applicableOverrides.map(normalizeOpts);
244+
applicableOverrides = applicableOverrides.map(override => normalizeOpts(override));
245245
const overrides = [emptyOptions(), baseOptions].concat(applicableOverrides, mergeFn);
246246
return mergeWith.apply(null, overrides);
247247
};

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -82,7 +82,7 @@
8282
"eslint-plugin-node": "^5.2.1",
8383
"eslint-plugin-prettier": "^2.3.1",
8484
"eslint-plugin-promise": "^3.6.0",
85-
"eslint-plugin-unicorn": "^2.1.0",
85+
"eslint-plugin-unicorn": "^3.0.1",
8686
"get-stdin": "^5.0.0",
8787
"globby": "^7.1.1",
8888
"has-flag": "^2.0.0",

test/main.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,7 @@ test('ignore files in .gitignore', async t => {
5757
const reports = JSON.parse(err.stdout);
5858
const files = reports
5959
.map(report => path.relative(cwd, report.filePath))
60-
.map(slash);
60+
.map(report => slash(report));
6161
t.deepEqual(files, ['index.js', 'test/bar.js']);
6262
});
6363

0 commit comments

Comments
 (0)