Skip to content

Commit

Permalink
[Dev Deps] update eslint, @ljharb/eslint-config, tape
Browse files Browse the repository at this point in the history
  • Loading branch information
ljharb committed Dec 29, 2021
1 parent cdb85fe commit 9133ce1
Show file tree
Hide file tree
Showing 7 changed files with 18 additions and 16 deletions.
1 change: 0 additions & 1 deletion .eslintignore

This file was deleted.

18 changes: 10 additions & 8 deletions .eslintrc
Original file line number Diff line number Diff line change
@@ -1,11 +1,9 @@
{
"extends": "@ljharb",

"root": true,

"extends": "@ljharb",

"rules": {
"array-bracket-newline": 0,
"array-element-newline": 0,
"indent": [2, 4],
"strict": 0,
"complexity": 0,
Expand All @@ -14,22 +12,25 @@
"dot-notation": [2, { "allowKeywords": true }],
"func-name-matching": 0,
"func-style": 0,
"global-require": 0,
"global-require": 1,
"id-length": [2, { "min": 1, "max": 30 }],
"max-lines-per-function": 1,
"max-nested-callbacks": 0,
"max-params": 0,
"max-statements-per-line": [2, { "max": 2 }],
"max-statements": 0,
"no-magic-numbers": 0,
"no-console": 0,
"no-shadow": 0,
"no-unused-vars": [2, { "vars": "all", "args": "none" }],
"no-use-before-define": 0,
"object-curly-newline": 0,
"sort-keys": 0,
},
"overrides": [
{
"files": "example/**",
"rules": {
"no-console": 0,
},
},
{
"files": "test/resolver/nested_symlinks/mylib/*.js",
"rules": {
Expand All @@ -46,6 +47,7 @@
"dot-notation": [2, { "allowPattern": "throws" }],
"max-lines": 0,
"max-lines-per-function": 0,
"no-unused-vars": [2, { "vars": "all", "args": "none" }],
},
},
],
Expand Down
2 changes: 1 addition & 1 deletion lib/node-modules-paths.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
var path = require('path');
var parse = path.parse || require('path-parse');
var parse = path.parse || require('path-parse'); // eslint-disable-line global-require

var getNodeModulesDirs = function getNodeModulesDirs(absoluteStart, modules) {
var prefix = '/';
Expand Down
6 changes: 3 additions & 3 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -47,16 +47,16 @@
"test:multirepo": "cd ./test/resolver/multirepo && npm install && npm test"
},
"devDependencies": {
"@ljharb/eslint-config": "^20.0.0",
"@ljharb/eslint-config": "^20.1.0",
"array.prototype.map": "^1.0.4",
"aud": "^1.1.5",
"eclint": "^2.8.1",
"eslint": "^8.4.0",
"eslint": "^8.5.0",
"in-publish": "^2.0.1",
"object-keys": "^1.1.1",
"safe-publish-latest": "^2.0.0",
"tap": "0.4.13",
"tape": "^5.3.2"
"tape": "^5.4.0"
},
"license": "MIT",
"author": {
Expand Down
2 changes: 1 addition & 1 deletion test/node_path.js
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ test('$NODE_PATH', function (t) {
basedir: path.join(__dirname, 'node_path/x'),
isDirectory: isDir
}, function (err, res) {
var root = require('tap/package.json').main;
var root = require('tap/package.json').main; // eslint-disable-line global-require
t.error(err);
t.equal(res, path.resolve(__dirname, '..', 'node_modules/tap', root), 'tap resolves');
});
Expand Down
2 changes: 1 addition & 1 deletion test/resolver.js
Original file line number Diff line number Diff line change
Expand Up @@ -334,7 +334,7 @@ test('without basedir', function (t) {
t.plan(1);

var dir = path.join(__dirname, 'resolver/without_basedir');
var tester = require(path.join(dir, 'main.js'));
var tester = require(path.join(dir, 'main.js')); // eslint-disable-line global-require

tester(t, function (err, res, pkg) {
if (err) {
Expand Down
3 changes: 2 additions & 1 deletion test/resolver_sync.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
var path = require('path');
var fs = require('fs');
var test = require('tape');

var resolve = require('../');

test('foo', function (t) {
Expand Down Expand Up @@ -200,7 +202,6 @@ test('incorrect main', function (t) {
});

var stubStatSync = function stubStatSync(fn) {
var fs = require('fs');
var statSync = fs.statSync;
try {
fs.statSync = function () {
Expand Down

0 comments on commit 9133ce1

Please sign in to comment.