Skip to content

Commit 4f207e9

Browse files
committed
Add linter
1 parent ab98a26 commit 4f207e9

File tree

5 files changed

+1157
-36
lines changed

5 files changed

+1157
-36
lines changed

.eslintrc.json

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
{
2+
"env": {
3+
"node": true
4+
},
5+
"extends": ["standard"],
6+
"rules": {
7+
"comma-dangle": ["error", "always-multiline"],
8+
"eqeqeq": "error",
9+
"no-extra-semi": "error",
10+
"object-curly-spacing": ["error", "never"]
11+
}
12+
}

.prettierrc

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,11 +4,11 @@
44
"semi": false,
55
"singleQuote": true,
66
"printWidth": 80,
7-
"trailingComma": "es5",
7+
"trailingComma": "all",
88
"overrides": [
99
{
1010
"files": ["*.json", ".prettierrc", ".babelrc"],
11-
"options": { "parser": "json" }
11+
"options": {"parser": "json"}
1212
}
1313
]
1414
}

index.js

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -78,7 +78,7 @@ const createOnRequestHandler = ({
7878
const createOnSendHandler = ({ttl, additionalCondition: {headers}}) => async (
7979
req,
8080
res,
81-
payload
81+
payload,
8282
) => {
8383
if (!isCacheableRequest(req)) {
8484
return
@@ -92,14 +92,14 @@ const createOnSendHandler = ({ttl, additionalCondition: {headers}}) => async (
9292
statusCode: res.statusCode,
9393
payload,
9494
}),
95-
ttl
95+
ttl,
9696
)
9797
}
9898

9999
const responseCachingPlugin = (
100100
instance,
101101
{ttl = 1000, additionalCondition = {}},
102-
next
102+
next,
103103
) => {
104104
const headers = additionalCondition.headers || []
105105
const opts = {ttl, additionalCondition: {headers}}

0 commit comments

Comments
 (0)