Skip to content

Commit 5542700

Browse files
committed
[Dev Deps] update eslint, @ljharb/eslint-config, object-keys, safe-publish-latest, tape
1 parent 2b4f3a8 commit 5542700

File tree

6 files changed

+17
-14
lines changed

6 files changed

+17
-14
lines changed

.eslintrc

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@
1414
"func-style": 0,
1515
"global-require": 0,
1616
"id-length": [2, { "min": 1, "max": 30 }],
17+
"max-lines-per-function": 0,
1718
"max-nested-callbacks": 0,
1819
"max-params": 0,
1920
"max-statements-per-line": [2, { "max": 2 }],

lib/async.js

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -37,10 +37,10 @@ module.exports = function resolve(x, options, callback) {
3737

3838
opts.paths = opts.paths || [];
3939

40-
if (/^(?:\.\.?(?:\/|$)|\/|([A-Za-z]:)?[/\\])/.test(x)) {
40+
if ((/^(?:\.\.?(?:\/|$)|\/|([A-Za-z]:)?[/\\])/).test(x)) {
4141
var res = path.resolve(basedir, x);
4242
if (x === '..' || x.slice(-1) === '/') res += '/';
43-
if (/\/$/.test(x) && res === basedir) {
43+
if ((/\/$/).test(x) && res === basedir) {
4444
loadAsDirectory(res, opts.package, onfile);
4545
} else loadAsFile(res, opts.package, onfile);
4646
} else loadNodeModules(x, basedir, function (err, n, pkg) {
@@ -115,7 +115,7 @@ module.exports = function resolve(x, options, callback) {
115115
if (process.platform === 'win32' && (/^\w:[/\\]*$/).test(dir)) {
116116
return cb(null);
117117
}
118-
if (/[/\\]node_modules[/\\]*$/.test(dir)) return cb(null);
118+
if ((/[/\\]node_modules[/\\]*$/).test(dir)) return cb(null);
119119

120120
var pkgfile = path.join(dir, 'package.json');
121121
isFile(pkgfile, function (err, ex) {

lib/node-modules-paths.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -22,9 +22,9 @@ module.exports = function nodeModulesPaths(start, opts) {
2222
}
2323

2424
var prefix = '/';
25-
if (/^([A-Za-z]:)/.test(absoluteStart)) {
25+
if ((/^([A-Za-z]:)/).test(absoluteStart)) {
2626
prefix = '';
27-
} else if (/^\\\\/.test(absoluteStart)) {
27+
} else if ((/^\\\\/).test(absoluteStart)) {
2828
prefix = '\\\\';
2929
}
3030

lib/sync.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ module.exports = function (x, options) {
2828

2929
opts.paths = opts.paths || [];
3030

31-
if (/^(?:\.\.?(?:\/|$)|\/|([A-Za-z]:)?[/\\])/.test(x)) {
31+
if ((/^(?:\.\.?(?:\/|$)|\/|([A-Za-z]:)?[/\\])/).test(x)) {
3232
var res = path.resolve(basedir, x);
3333
if (x === '..' || x.slice(-1) === '/') res += '/';
3434
var m = loadAsFileSync(res) || loadAsDirectorySync(res);
@@ -72,7 +72,7 @@ module.exports = function (x, options) {
7272
if (process.platform === 'win32' && (/^\w:[/\\]*$/).test(dir)) {
7373
return;
7474
}
75-
if (/[/\\]node_modules[/\\]*$/.test(dir)) return;
75+
if ((/[/\\]node_modules[/\\]*$/).test(dir)) return;
7676

7777
var pkgfile = path.join(dir, 'package.json');
7878

package.json

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -21,12 +21,12 @@
2121
"test": "npm run --silent tests-only"
2222
},
2323
"devDependencies": {
24-
"@ljharb/eslint-config": "^12.2.1",
25-
"eslint": "^4.19.1",
26-
"object-keys": "^1.0.11",
27-
"safe-publish-latest": "^1.1.1",
24+
"@ljharb/eslint-config": "^13.0.0",
25+
"eslint": "^5.10.0",
26+
"object-keys": "^1.0.12",
27+
"safe-publish-latest": "^1.1.2",
2828
"tap": "0.4.13",
29-
"tape": "^4.9.0"
29+
"tape": "^4.9.1"
3030
},
3131
"license": "MIT",
3232
"author": {

test/node_path.js

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -35,8 +35,10 @@ test('$NODE_PATH', function (t) {
3535
t.equal(res, path.join(__dirname, '/node_path/x/ccc/index.js'));
3636
});
3737

38-
// ensure that relative paths still resolve against the
39-
// regular `node_modules` correctly
38+
/*
39+
* ensure that relative paths still resolve against the
40+
* regular `node_modules` correctly
41+
*/
4042
resolve('tap', {
4143
paths: [
4244
'node_path'

0 commit comments

Comments
 (0)