Skip to content

Commit 0a8fc9f

Browse files
committed
[Dev Deps] update eslint, @ljharb/eslint-config, object-keys, tape
1 parent c8aa967 commit 0a8fc9f

File tree

6 files changed

+15
-14
lines changed

6 files changed

+15
-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": 1,
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
@@ -60,10 +60,10 @@ module.exports = function resolve(x, options, callback) {
6060
}
6161
var res;
6262
function validBasedir() {
63-
if (/^(?:\.\.?(?:\/|$)|\/|([A-Za-z]:)?[/\\])/.test(x)) {
63+
if ((/^(?:\.\.?(?:\/|$)|\/|([A-Za-z]:)?[/\\])/).test(x)) {
6464
res = path.resolve(basedir, x);
6565
if (x === '..' || x.slice(-1) === '/') res += '/';
66-
if (/\/$/.test(x) && res === basedir) {
66+
if ((/\/$/).test(x) && res === basedir) {
6767
loadAsDirectory(res, opts.package, onfile);
6868
} else loadAsFile(res, opts.package, onfile);
6969
} else loadNodeModules(x, basedir, function (err, n, pkg) {
@@ -139,7 +139,7 @@ module.exports = function resolve(x, options, callback) {
139139
if (process.platform === 'win32' && (/^\w:[/\\]*$/).test(dir)) {
140140
return cb(null);
141141
}
142-
if (/[/\\]node_modules[/\\]*$/.test(dir)) return cb(null);
142+
if ((/[/\\]node_modules[/\\]*$/).test(dir)) return cb(null);
143143

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

lib/node-modules-paths.js

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -7,8 +7,7 @@ module.exports = function nodeModulesPaths(start, opts) {
77
? [].concat(opts.moduleDirectory)
88
: ['node_modules'];
99

10-
// ensure that `start` is an absolute path at this point,
11-
// resolving against the process' current working directory
10+
// ensure that `start` is an absolute path at this point, resolving against the process' current working directory
1211
var absoluteStart = path.resolve(start);
1312

1413
if (!opts || !opts.preserveSymlinks) {
@@ -22,9 +21,9 @@ module.exports = function nodeModulesPaths(start, opts) {
2221
}
2322

2423
var prefix = '/';
25-
if (/^([A-Za-z]:)/.test(absoluteStart)) {
24+
if ((/^([A-Za-z]:)/).test(absoluteStart)) {
2625
prefix = '';
27-
} else if (/^\\\\/.test(absoluteStart)) {
26+
} else if ((/^\\\\/).test(absoluteStart)) {
2827
prefix = '\\\\';
2928
}
3029

lib/sync.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@ module.exports = function (x, options) {
4343
throw new TypeError('Provided basedir "' + opts.basedir + '" is not a directory');
4444
}
4545

46-
if (/^(?:\.\.?(?:\/|$)|\/|([A-Za-z]:)?[/\\])/.test(x)) {
46+
if ((/^(?:\.\.?(?:\/|$)|\/|([A-Za-z]:)?[/\\])/).test(x)) {
4747
var res = path.resolve(basedir, x);
4848
if (x === '..' || x.slice(-1) === '/') res += '/';
4949
var m = loadAsFileSync(res) || loadAsDirectorySync(res);
@@ -89,7 +89,7 @@ module.exports = function (x, options) {
8989
if (process.platform === 'win32' && (/^\w:[/\\]*$/).test(dir)) {
9090
return;
9191
}
92-
if (/[/\\]node_modules[/\\]*$/.test(dir)) return;
92+
if ((/[/\\]node_modules[/\\]*$/).test(dir)) return;
9393

9494
var pkgfile = path.join(dir, 'package.json');
9595

package.json

Lines changed: 4 additions & 4 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",
24+
"@ljharb/eslint-config": "^13.0.0",
25+
"eslint": "^5.2.0",
26+
"object-keys": "^1.0.12",
2727
"safe-publish-latest": "^1.1.1",
2828
"tap": "0.4.13",
29-
"tape": "^4.9.0"
29+
"tape": "^4.9.1"
3030
},
3131
"license": "MIT",
3232
"author": {

test/.eslintrc

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
{
22
"rules": {
3-
"max-lines": 0
3+
"max-lines": 0,
4+
"max-lines-per-function": 0,
45
}
56
}

0 commit comments

Comments
 (0)