Skip to content

Commit

Permalink
Update eslint-config-xo-space to the latest version 🚀 (#100)
Browse files Browse the repository at this point in the history
* chore(package): update eslint-config-xo-space to version 0.18.0

* Fix linting issue
  • Loading branch information
greenkeeper[bot] authored and SBoudrias committed Feb 18, 2018
1 parent 3fee191 commit 9fe3ef6
Show file tree
Hide file tree
Showing 5 changed files with 8 additions and 6 deletions.
2 changes: 1 addition & 1 deletion __tests__/commit.js
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ describe('#commit()', () => {

let filter = through.obj(function (file, enc, cb) {
called++;
file.contents = new Buffer('modified');
file.contents = Buffer.from('modified');
this.push(file);
cb();
});
Expand Down
2 changes: 1 addition & 1 deletion __tests__/read.js
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ describe('#read()', () => {

it('returns defaults as Buffer if file does not exist and defaults is provided', () => {
const content = fs.read('file-who-does-not-exist.txt', {
defaults: new Buffer('foo\n'),
defaults: Buffer.from('foo\n'),
raw: true
});
expect(content).toBeInstanceOf(Buffer);
Expand Down
2 changes: 1 addition & 1 deletion __tests__/write.js
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ describe('#write()', () => {

it('write buffer to a new file', () => {
const filepath = path.join(__dirname, 'fixtures/does-not-exist.txt');
const contents = new Buffer('omg!', 'base64');
const contents = Buffer.from('omg!', 'base64');
fs.write(filepath, contents);
expect(fs.read(filepath)).toBe(contents.toString());
expect(fs.store.get(filepath).state).toBe('modified');
Expand Down
6 changes: 4 additions & 2 deletions lib/util.js
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,8 @@ exports.globify = function (filePath) {

if (glob.hasMagic(filePath)) {
return filePath;
} else if (!fs.existsSync(filePath)) {
}
if (!fs.existsSync(filePath)) {
// The target of a pattern who's not a glob and doesn't match an existing
// entity on the disk is ambiguous. As such, match both files and directories.
return [
Expand All @@ -47,7 +48,8 @@ exports.globify = function (filePath) {
var fsStats = fs.statSync(filePath);
if (fsStats.isFile()) {
return filePath;
} else if (fsStats.isDirectory()) {
}
if (fsStats.isDirectory()) {
return path.join(filePath, '**');
}
throw new Error('Only file path or directory path are supported.');
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@
"coveralls": "^3.0.0",
"escape-regexp": "0.0.1",
"eslint": "^4.1.0",
"eslint-config-xo-space": "^0.17.0",
"eslint-config-xo-space": "^0.18.0",
"jest": "^22.1.0",
"mem-fs": "^1.0.0",
"nsp": "^3.1.0",
Expand Down

0 comments on commit 9fe3ef6

Please sign in to comment.