Skip to content

Commit 9b1b1a4

Browse files
committed
Lint fixes
1 parent 7743dab commit 9b1b1a4

File tree

7 files changed

+14
-14
lines changed

7 files changed

+14
-14
lines changed

Diff for: .eslintrc

+11-4
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,16 @@
11
{
2-
extends: "lob",
3-
globals: {
4-
expect: false
2+
"env": {
3+
"node": true,
4+
"es6": true
55
},
6-
rules: {
6+
"parserOptions": {
7+
"ecmaVersion": 2020
8+
},
9+
"extends": "lob",
10+
"globals": {
11+
"expect": false
12+
},
13+
"rules": {
714
"no-extra-parens": 0
815
}
916
}

Diff for: lib/counter.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ exports.count = (Model, request, Redis, key, ttlFn) => {
1616
.then(async (count) => {
1717
if (Redis) {
1818
const seconds = ttlFn(count);
19-
await Redis.set(key, count, {EX: seconds});
19+
await Redis.set(key, count, { EX: seconds });
2020
}
2121
return count;
2222
});

Diff for: lib/index.js

+1-3
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,5 @@
11
'use strict';
22

3-
const Joi = require('joi');
4-
53
const ApproximateCountValidator = require('./validators/approximate-count');
64
const Counter = require('./counter');
75
const Key = require('./key');
@@ -55,7 +53,7 @@ function register (server, options) {
5553
request.response.source.total_count = count;
5654
}
5755
return h.continue;
58-
}).catch(err => {
56+
}).catch((err) => {
5957
throw err;
6058
});
6159
});

Diff for: test/index.test.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ describe('plugin', () => {
2929
// replaces hapi-qs
3030
return QS.parse(query);
3131
}
32-
},
32+
}
3333
});
3434

3535
await server.register([

Diff for: test/setup.js

-1
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,6 @@
33
const Chai = require('chai');
44
const Knex = require('./helpers/knex');
55
const Redis = require('./helpers/redis');
6-
const rimraf = require('rimraf');
76

87
global.expect = Chai.expect;
98

Diff for: test/validators/approximate-count.test.js

-2
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,5 @@
11
'use strict';
22

3-
const Joi = require('joi');
4-
53
const Validator = require('../../lib/validators/approximate-count');
64

75
describe('approximate count validator', () => {

Diff for: test/validators/total-count.test.js

-2
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,5 @@
11
'use strict';
22

3-
const Joi = require('joi');
4-
53
const Validator = require('../../lib/validators/total-count');
64

75
describe('total count validator', () => {

0 commit comments

Comments
 (0)