Skip to content

Commit

Permalink
Upgrade 'standard' (#709)
Browse files Browse the repository at this point in the history
I have fixed the following error.

```
  node-fs-extra/lib/ensure/symlink-paths.js:37:9: Unnecessarily quoted property 'toCwd' found.
  node-fs-extra/lib/ensure/symlink-paths.js:38:9: Unnecessarily quoted property 'toDst' found.
  node-fs-extra/lib/ensure/symlink-paths.js:48:11: Unnecessarily quoted property 'toCwd' found.
  node-fs-extra/lib/ensure/symlink-paths.js:49:11: Unnecessarily quoted property 'toDst' found.
  node-fs-extra/lib/ensure/symlink-paths.js:58:13: Unnecessarily quoted property 'toCwd' found.
  node-fs-extra/lib/ensure/symlink-paths.js:59:13: Unnecessarily quoted property 'toDst' found.
  node-fs-extra/lib/ensure/symlink-paths.js:73:7: Unnecessarily quoted property 'toCwd' found.
  node-fs-extra/lib/ensure/symlink-paths.js:74:7: Unnecessarily quoted property 'toDst' found.
  node-fs-extra/lib/ensure/symlink-paths.js:82:9: Unnecessarily quoted property 'toCwd' found.
  node-fs-extra/lib/ensure/symlink-paths.js:83:9: Unnecessarily quoted property 'toDst' found.
  node-fs-extra/lib/ensure/symlink-paths.js:89:9: Unnecessarily quoted property 'toCwd' found.
  node-fs-extra/lib/ensure/symlink-paths.js:90:9: Unnecessarily quoted property 'toDst' found.
  node-fs-extra/lib/mkdirs/__tests__/clobber.test.js:22:18: There should be no space after '['.
  node-fs-extra/lib/mkdirs/__tests__/clobber.test.js:22:29: There should be no space before ']'.
  node-fs-extra/lib/mkdirs/__tests__/race.test.js:24:18: There should be no space after '['.
  node-fs-extra/lib/mkdirs/__tests__/race.test.js:24:29: There should be no space before ']'.
```
  • Loading branch information
abetomo authored and RyanZim committed Jul 11, 2019
1 parent b7df7cc commit ca58cbc
Show file tree
Hide file tree
Showing 4 changed files with 15 additions and 15 deletions.
24 changes: 12 additions & 12 deletions lib/ensure/symlink-paths.js
Original file line number Diff line number Diff line change
Expand Up @@ -34,8 +34,8 @@ function symlinkPaths (srcpath, dstpath, callback) {
return callback(err)
}
return callback(null, {
'toCwd': srcpath,
'toDst': srcpath
toCwd: srcpath,
toDst: srcpath
})
})
} else {
Expand All @@ -45,8 +45,8 @@ function symlinkPaths (srcpath, dstpath, callback) {
if (err) return callback(err)
if (exists) {
return callback(null, {
'toCwd': relativeToDst,
'toDst': srcpath
toCwd: relativeToDst,
toDst: srcpath
})
} else {
return fs.lstat(srcpath, (err) => {
Expand All @@ -55,8 +55,8 @@ function symlinkPaths (srcpath, dstpath, callback) {
return callback(err)
}
return callback(null, {
'toCwd': srcpath,
'toDst': path.relative(dstdir, srcpath)
toCwd: srcpath,
toDst: path.relative(dstdir, srcpath)
})
})
}
Expand All @@ -70,24 +70,24 @@ function symlinkPathsSync (srcpath, dstpath) {
exists = fs.existsSync(srcpath)
if (!exists) throw new Error('absolute srcpath does not exist')
return {
'toCwd': srcpath,
'toDst': srcpath
toCwd: srcpath,
toDst: srcpath
}
} else {
const dstdir = path.dirname(dstpath)
const relativeToDst = path.join(dstdir, srcpath)
exists = fs.existsSync(relativeToDst)
if (exists) {
return {
'toCwd': relativeToDst,
'toDst': srcpath
toCwd: relativeToDst,
toDst: srcpath
}
} else {
exists = fs.existsSync(srcpath)
if (!exists) throw new Error('relative srcpath does not exist')
return {
'toCwd': srcpath,
'toDst': path.relative(dstdir, srcpath)
toCwd: srcpath,
toDst: path.relative(dstdir, srcpath)
}
}
}
Expand Down
2 changes: 1 addition & 1 deletion lib/mkdirs/__tests__/clobber.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ describe('mkdirp / clobber', () => {
fse.emptyDir(TEST_DIR, err => {
assert.ifError(err)

const ps = [ TEST_DIR ]
const ps = [TEST_DIR]

for (let i = 0; i < 15; i++) {
const dir = Math.floor(Math.random() * Math.pow(16, 4)).toString(16)
Expand Down
2 changes: 1 addition & 1 deletion lib/mkdirs/__tests__/race.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ describe('mkdirp / race', () => {
fse.emptyDir(TEST_DIR, err => {
assert.ifError(err)

const ps = [ TEST_DIR ]
const ps = [TEST_DIR]

for (let i = 0; i < 15; i++) {
const dir = Math.floor(Math.random() * Math.pow(16, 4)).toString(16)
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@
"proxyquire": "^2.0.1",
"read-dir-files": "^0.1.1",
"semver": "^5.3.0",
"standard": "^12.0.1"
"standard": "^13.0.0"
},
"main": "./lib/index.js",
"files": [
Expand Down

0 comments on commit ca58cbc

Please sign in to comment.