Skip to content

Commit ba1c18f

Browse files
authored
Merge pull request #45 from paperhive/update-deps
fix linting
2 parents ff3de7d + d82bae3 commit ba1c18f

3 files changed

Lines changed: 8 additions & 8 deletions

File tree

package.json

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -34,12 +34,12 @@
3434
},
3535
"homepage": "https://github.com/paperhive/walter-whitelist#readme",
3636
"devDependencies": {
37-
"coveralls": "^2.11.6",
38-
"eslint": "^3.0.0",
37+
"coveralls": "^2.11.13",
38+
"eslint": "^3.5.0",
3939
"eslint-config-airbnb": "^11.0.0",
40-
"eslint-plugin-import": "^1.5.0",
40+
"eslint-plugin-import": "^1.15.0",
4141
"isparta": "^4.0.0",
42-
"mocha": "^3.0.0",
42+
"mocha": "^3.0.2",
4343
"should": "^11.1.0"
4444
},
4545
"dependencies": {

src/index.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@ function whitelist(src, allowed, _options, _path) {
4646
if (disallowedKeys.size) {
4747
throw new WhitelistError(
4848
`The following fields are not allowed: ${
49-
Array.from(disallowedKeys).map((key) => path + key).join(', ')
49+
Array.from(disallowedKeys).map(key => path + key).join(', ')
5050
}. Allowed fields: ${Array.from(allowedKeys).join(', ')}.`,
5151
disallowedKeys
5252
);
@@ -76,7 +76,7 @@ function whitelist(src, allowed, _options, _path) {
7676
});
7777

7878
// filter undefined values (if required by options)
79-
return options.omitUndefined ? _.pickBy(res, (v) => v !== undefined) : res;
79+
return options.omitUndefined ? _.pickBy(res, v => v !== undefined) : res;
8080
}
8181

8282
module.exports = whitelist.default = whitelist.whitelist = whitelist;

test/whitelist.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,11 +18,11 @@ describe('whitelist()', () => {
1818
it('should return a whitelisted object with functions', () => {
1919
whitelist(
2020
{name: 'Darth', age: 42},
21-
{name: true, age: (v) => (v < 50 ? v : undefined)}
21+
{name: true, age: v => (v < 50 ? v : undefined)}
2222
).should.eql({name: 'Darth', age: 42});
2323
whitelist(
2424
{name: 'Darth', age: 66},
25-
{name: true, age: (v) => (v < 50 ? v : undefined)}
25+
{name: true, age: v => (v < 50 ? v : undefined)}
2626
).should.eql({name: 'Darth', age: undefined});
2727
});
2828

0 commit comments

Comments
 (0)