Skip to content
This repository was archived by the owner on Jun 24, 2024. It is now read-only.

Commit 1af1f9b

Browse files
committed
Fixes from PR feedback
1 parent a8452b0 commit 1af1f9b

File tree

5 files changed

+7
-14
lines changed

5 files changed

+7
-14
lines changed

.eslintignore

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1 @@
1-
node_modules
2-
node_modules/**/*
3-
.DS_Store
4-
tmp/**/*
5-
.idea
6-
.idea/**/*
7-
*.iml
8-
*.log
91
coverage

.eslintrc

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@
55
},
66
"extends": ["finn", "finn/node"],
77
"env": {
8-
"node": true
8+
"node": true,
9+
"jest": true
910
}
1011
}

lib/writer.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ module.exports = class Writer extends Readable {
1313

1414
assert(
1515
Array.isArray(files) || typeof files === 'string',
16-
`Expected 'files' to be of type 'Array' or a 'string', instead got '${typeof this.files}'`
16+
`Expected 'files' to be of type 'Array' or a 'string', instead got '${typeof files}'`
1717
);
1818
this.files = Array.isArray(files) ? files : [files];
1919
for (const file of this.files) {

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@
3636
},
3737
"scripts": {
3838
"format":
39-
"prettier --write --single-quote --tab-width=4 lib/**/*.js test/**/*.js",
39+
"prettier --write --single-quote --trailing-comma=all --tab-width=4 lib/**/*.js test/**/*.js",
4040
"lint": "eslint .",
4141
"test": "jest --coverage"
4242
},

test/__snapshots__/writer.test.js.snap

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,12 @@
11
// Jest Snapshot v1, https://goo.gl/fbAQLP
22

3-
exports[`new Writer([filePath]) ensures filePath is not an object 1`] = `"Expected 'files' to be of type 'Array' or a 'string', instead got 'undefined'"`;
3+
exports[`new Writer([filePath]) ensures filePath is not an object 1`] = `"Expected 'files' to be of type 'Array' or a 'string', instead got 'object'"`;
44

55
exports[`new Writer([filePath]) ensures filePath[] is an array of strings 1`] = `"Expected 'file' (null) to be of type 'string', instead got 'object'"`;
66

7-
exports[`new Writer([filePath]) ensures filePath[] is not a number 1`] = `"Expected 'files' to be of type 'Array' or a 'string', instead got 'undefined'"`;
7+
exports[`new Writer([filePath]) ensures filePath[] is not a number 1`] = `"Expected 'files' to be of type 'Array' or a 'string', instead got 'number'"`;
88

9-
exports[`new Writer([filePath]) ensures filePath[] is not null 1`] = `"Expected 'files' to be of type 'Array' or a 'string', instead got 'undefined'"`;
9+
exports[`new Writer([filePath]) ensures filePath[] is not null 1`] = `"Expected 'files' to be of type 'Array' or a 'string', instead got 'object'"`;
1010

1111
exports[`new Writer([filePath]) ensures valid filePath provided 1`] = `"Expected 'file' (fake.css) to be an absolute path to a file but it was not"`;
1212

0 commit comments

Comments
 (0)