From 2c188904f8181ab760496d2849977dddee9900d1 Mon Sep 17 00:00:00 2001 From: titanism <101466223+titanism@users.noreply.github.com> Date: Tue, 26 Apr 2022 18:22:36 -0500 Subject: [PATCH] chore: fixed linting --- package.json | 11 +- src/client.js | 36 +++--- src/node/index.js | 12 +- src/node/parsers/json.js | 4 +- src/request-base.js | 14 +-- test/basic.js | 8 +- test/client/request.js | 2 +- test/node/multipart.js | 6 +- test/node/pipe.js | 16 +-- test/node/query.js | 4 +- test/node/toError.js | 2 +- test/request.js | 6 +- test/retry.js | 4 +- test/support/express/index.js | 4 +- test/support/express/requestDecorator.js | 2 +- yarn.lock | 148 +++++++++-------------- 16 files changed, 132 insertions(+), 147 deletions(-) diff --git a/package.json b/package.json index 6a5a3b137..3afe5d96f 100644 --- a/package.json +++ b/package.json @@ -71,7 +71,7 @@ "should": "^13.2.3", "should-http": "^0.1.1", "tinyify": "^3.0.0", - "xo": "0.47.0", + "xo": "^0.48.0", "zuul": "^3.12.0" }, "engines": { @@ -223,7 +223,11 @@ { "replacements": { "res": false, - "args": false + "args": false, + "fn": false, + "err": false, + "e": false, + "i": false } } ], @@ -234,7 +238,8 @@ "unicorn/no-this-assignment": "warn", "unicorn/prefer-spread": "warn", "unicorn/catch-error-name": "warn", - "unicorn/prefer-code-point": "warn" + "unicorn/prefer-code-point": "warn", + "node/no-unsupported-features": ["error", {"version": 8, "ignores": ["syntax"]}] }, "globals": [ "ActiveXObject" diff --git a/src/client.js b/src/client.js index 6bcae71ea..57a15436c 100644 --- a/src/client.js +++ b/src/client.js @@ -71,19 +71,27 @@ request.getXHR = () => { try { return new ActiveXObject('Microsoft.XMLHTTP'); - } catch {/**/} + } catch { + /**/ + } try { return new ActiveXObject('Msxml2.XMLHTTP.6.0'); - } catch {/**/} + } catch { + /**/ + } try { return new ActiveXObject('Msxml2.XMLHTTP.3.0'); - } catch {/**/} + } catch { + /**/ + } try { return new ActiveXObject('Msxml2.XMLHTTP'); - } catch {/**/} + } catch { + /**/ + } throw new Error('Browser-only version of superagent could not find XHR'); }; @@ -436,10 +444,10 @@ function Request(method, url) { try { res = new Response(self); - } catch (error_) { + } catch (err) { error = new Error('Parser is unable to parse the response'); error.parse = true; - error.original = error_; + error.original = err; // issue #675: return the raw response if the response parsing fails if (self.xhr) { // ie9 doesn't have 'response' property @@ -568,15 +576,15 @@ Request.prototype.auth = function (user, pass, options) { }; } - const encoder = - options.encoder || - (string) => { - if (typeof btoa === 'function') { - return btoa(string); - } + const encoder = options.encoder + ? options.encoder + : (string) => { + if (typeof btoa === 'function') { + return btoa(string); + } - throw new Error('Cannot use basic auth, btoa is not a function'); - }; + throw new Error('Cannot use basic auth, btoa is not a function'); + }; return this._auth(user, pass, options, encoder); }; diff --git a/src/node/index.js b/src/node/index.js index 0787f156d..a2d1bd25e 100644 --- a/src/node/index.js +++ b/src/node/index.js @@ -799,12 +799,12 @@ Request.prototype.request = function () { } // initiate request - const mod = this._enableHttp2 + const module_ = this._enableHttp2 ? exports.protocols['http2:'].setProtocol(url.protocol) : exports.protocols[url.protocol]; // request - this.req = mod.request(options); + this.req = module_.request(options); const { req } = this; // set tcp no delay @@ -900,8 +900,8 @@ Request.prototype.callback = function (error, res) { error = new Error(message); error.status = res ? res.status : undefined; } - } catch (error_) { - error = error_; + } catch (err) { + error = err; } } @@ -1195,7 +1195,7 @@ Request.prototype._end = function () { let loaded = 0; const progress = new Stream.Transform(); - progress._transform = (chunk, encoding, cb) => { + progress._transform = (chunk, encoding, callback) => { loaded += chunk.length; this.emit('progress', { direction: 'upload', @@ -1203,7 +1203,7 @@ Request.prototype._end = function () { loaded, total }); - cb(null, chunk); + callback(null, chunk); }; return progress; diff --git a/src/node/parsers/json.js b/src/node/parsers/json.js index 8902c72a0..8938b6a2b 100644 --- a/src/node/parsers/json.js +++ b/src/node/parsers/json.js @@ -9,8 +9,8 @@ module.exports = function (res, fn) { let error; try { body = res.text && JSON.parse(res.text); - } catch (error_) { - error = error_; + } catch (err) { + error = err; // issue #675: return the raw response if the response parsing fails error.rawResponse = res.text || null; // issue #876: return the http status code if the response parsing fails diff --git a/src/request-base.js b/src/request-base.js index 6dca906c9..dc564a2d6 100644 --- a/src/request-base.js +++ b/src/request-base.js @@ -199,8 +199,8 @@ RequestBase.prototype._shouldRetry = function (error, res) { if (override === true) return true; if (override === false) return false; // undefined falls back to defaults - } catch (error_) { - console.error(error_); + } catch (err) { + console.error(err); } } @@ -292,8 +292,8 @@ RequestBase.prototype.then = function (resolve, reject) { return this._fullfilledPromise.then(resolve, reject); }; -RequestBase.prototype.catch = function (cb) { - return this.then(undefined, cb); +RequestBase.prototype.catch = function (callback) { + return this.then(undefined, callback); }; /** @@ -305,9 +305,9 @@ RequestBase.prototype.use = function (fn) { return this; }; -RequestBase.prototype.ok = function (cb) { - if (typeof cb !== 'function') throw new Error('Callback required'); - this._okCallback = cb; +RequestBase.prototype.ok = function (callback) { + if (typeof callback !== 'function') throw new Error('Callback required'); + this._okCallback = callback; return this; }; diff --git a/test/basic.js b/test/basic.js index 7c2467514..8babeba8f 100644 --- a/test/basic.js +++ b/test/basic.js @@ -591,8 +591,8 @@ describe('request', function () { request_.end((error, res) => { try { assert(false, 'should not complete the request'); - } catch (error_) { - done(error_); + } catch (err) { + done(err); } }); @@ -625,8 +625,8 @@ describe('request', function () { request_.end((error, res) => { try { assert(false, 'should not complete the request'); - } catch (error_) { - done(error_); + } catch (err) { + done(err); } }); diff --git a/test/client/request.js b/test/client/request.js index 3263bddb7..e6ba25954 100644 --- a/test/client/request.js +++ b/test/client/request.js @@ -55,7 +55,7 @@ describe('request', function () { try { var file = new File([''], 'image.jpg', { type: 'image/jpeg' }); - } catch (err) { + } catch { // Skip if file constructor not supported. return next(); } diff --git a/test/node/multipart.js b/test/node/multipart.js index f319a8def..042d87ca5 100644 --- a/test/node/multipart.js +++ b/test/node/multipart.js @@ -12,10 +12,12 @@ const IS_WINDOWS = require('os').platform() === 'win32'; function read(file) { return fs.readFileSync(file, 'utf8'); } + function getFullPath(filename) { if (!IS_WINDOWS) { return filename; } + const fullPath = path.join(__dirname, '../../', filename); return fullPath.charAt(0).toLowerCase() + fullPath.slice(1); } @@ -188,7 +190,9 @@ describe('Multipart', () => { .end((error, res) => { assert.ok(Boolean(error), 'Request should have failed.'); error.code.should.equal('ENOENT'); - error.path.should.equal(getFullPath('test/node/fixtures/non-existent-file.ext')); + error.path.should.equal( + getFullPath('test/node/fixtures/non-existent-file.ext') + ); done(); }); }); diff --git a/test/node/pipe.js b/test/node/pipe.js index ed261732a..649977a5a 100644 --- a/test/node/pipe.js +++ b/test/node/pipe.js @@ -47,10 +47,10 @@ before(function listen(done) { }); describe('request pipe', () => { - const destPath = 'test/node/fixtures/tmp.json'; + const destinationPath = 'test/node/fixtures/tmp.json'; after(function removeTmpfile(done) { - fs.unlink(destPath, done); + fs.unlink(destinationPath, done); }); it('should act as a writable stream', (done) => { @@ -68,7 +68,7 @@ describe('request pipe', () => { }); it('end() stops piping', (done) => { - const stream = fs.createWriteStream(destPath); + const stream = fs.createWriteStream(destinationPath); request.get(base).end((error, res) => { try { res.pipe(stream); @@ -82,7 +82,7 @@ describe('request pipe', () => { }); it('should act as a readable stream', (done) => { - const stream = fs.createWriteStream(destPath); + const stream = fs.createWriteStream(destinationPath); let responseCalled = false; const request_ = request.get(base); @@ -93,7 +93,7 @@ describe('request pipe', () => { responseCalled = true; }); stream.on('finish', () => { - JSON.parse(fs.readFileSync(destPath, 'utf8')).should.eql({ + JSON.parse(fs.readFileSync(destinationPath)).should.eql({ name: 'tobi' }); responseCalled.should.be.true(); @@ -103,7 +103,7 @@ describe('request pipe', () => { }); it('should follow redirects', (done) => { - const stream = fs.createWriteStream(destPath); + const stream = fs.createWriteStream(destinationPath); let responseCalled = false; const request_ = request.get(base + '/redirect'); @@ -114,7 +114,7 @@ describe('request pipe', () => { responseCalled = true; }); stream.on('finish', () => { - JSON.parse(fs.readFileSync(destPath, 'utf8')).should.eql({ + JSON.parse(fs.readFileSync(destinationPath)).should.eql({ name: 'tobi' }); responseCalled.should.be.true(); @@ -124,7 +124,7 @@ describe('request pipe', () => { }); it('should not throw on bad redirects', (done) => { - const stream = fs.createWriteStream(destPath); + const stream = fs.createWriteStream(destinationPath); let responseCalled = false; let errorCalled = false; diff --git a/test/node/query.js b/test/node/query.js index 72751c204..ec614a35b 100644 --- a/test/node/query.js +++ b/test/node/query.js @@ -200,7 +200,7 @@ describe('req.query(Object)', () => { }); }); - it('query-string should be sent on pipe', function(done) { + it('query-string should be sent on pipe', function (done) { this.timeout(15_000); const request_ = request.put(`${base}/?name=tobi`); const stream = fs.createReadStream('test/node/fixtures/user.json'); @@ -213,7 +213,7 @@ describe('req.query(Object)', () => { done(err); }); - stream.on('error', function(err) { + stream.on('error', function (err) { done(err); }); stream.pipe(request_); diff --git a/test/node/toError.js b/test/node/toError.js index 80c9abaf6..300100fdf 100644 --- a/test/node/toError.js +++ b/test/node/toError.js @@ -27,7 +27,7 @@ before(function listen(done) { describe('res.toError()', () => { it('should return an Error', (done) => { request.get(base).end((err, res) => { - var error = res.toError(); + const error = res.toError(); assert.equal(error.status, 400); assert.equal(error.method, 'GET'); assert.equal(error.path, '/'); diff --git a/test/request.js b/test/request.js index 29f10dffd..ed31e2113 100644 --- a/test/request.js +++ b/test/request.js @@ -958,9 +958,9 @@ describe('request', function () { it('req.toJSON()', (next) => { request.get(`${uri}/ok`).end((error, res) => { try { - const j = (res.request || res.req).toJSON(); - for (const prop of ['url', 'method', 'data', 'headers']) { - assert(j.hasOwnProperty(prop)); + const index = (res.request || res.req).toJSON(); + for (const property of ['url', 'method', 'data', 'headers']) { + assert(index.hasOwnProperty(property)); } next(); diff --git a/test/retry.js b/test/retry.js index 50613b6ef..52c023418 100644 --- a/test/retry.js +++ b/test/retry.js @@ -211,8 +211,8 @@ describe('.retry(count)', function () { request_.end((error, res) => { try { assert(false, 'should not complete the request'); - } catch (error_) { - done(error_); + } catch (err) { + done(err); } }); diff --git a/test/support/express/index.js b/test/support/express/index.js index 3a032b461..fed7e8632 100644 --- a/test/support/express/index.js +++ b/test/support/express/index.js @@ -5,9 +5,9 @@ let http2Request; let http2Res; if (process.env.HTTP2_TEST) { const http2 = require('http2'); - const reqDecorator = require('./requestDecorator'); + const requestDecorator = require('./requestDecorator'); const resDecorator = require('./responseDecorator'); - http2Request = reqDecorator( + http2Request = requestDecorator( Object.create(http2.Http2ServerRequest.prototype) ); http2Res = resDecorator(Object.create(http2.Http2ServerResponse.prototype)); diff --git a/test/support/express/requestDecorator.js b/test/support/express/requestDecorator.js index 971be697f..196406b9c 100644 --- a/test/support/express/requestDecorator.js +++ b/test/support/express/requestDecorator.js @@ -255,7 +255,7 @@ function setMethods(request) { // support flattened arguments if (!Array.isArray(types)) { - array = new Array(arguments.length); + array = Array.from({ length: arguments.length }); for (let i = 0; i < array.length; i++) { array[i] = arguments[i]; } diff --git a/yarn.lock b/yarn.lock index 7dca2f730..002664931 100644 --- a/yarn.lock +++ b/yarn.lock @@ -38,7 +38,7 @@ resolved "https://registry.yarnpkg.com/@babel/compat-data/-/compat-data-7.17.7.tgz#078d8b833fbbcc95286613be8c716cef2b519fa2" integrity sha512-p8pdE6j0a29TNGebNm7NzYZWB3xVZJBZ7XGs42uAKzQo8VQ3F0By/cQCtUEABwIqw5zo6WA4NbmxsfzADzMKnQ== -"@babel/core@^7.12.16", "@babel/core@^7.17.9", "@babel/core@^7.7.5": +"@babel/core@^7.17.9", "@babel/core@^7.7.5": version "7.17.9" resolved "https://registry.yarnpkg.com/@babel/core/-/core-7.17.9.tgz#6bae81a06d95f4d0dec5bb9d74bbc1f58babdcfe" integrity sha512-5ug+SfZCpDAkVp9SFIZAzlW18rlzsOcJGaetCjkySnrXXDUw9AR8cDUm1iByTmdWM6yxX6/zycaV76w3YTF2gw== @@ -59,15 +59,6 @@ json5 "^2.2.1" semver "^6.3.0" -"@babel/eslint-parser@^7.12.16": - version "7.17.0" - resolved "https://registry.yarnpkg.com/@babel/eslint-parser/-/eslint-parser-7.17.0.tgz#eabb24ad9f0afa80e5849f8240d0e5facc2d90d6" - integrity sha512-PUEJ7ZBXbRkbq3qqM/jZ2nIuakUBqCYc7Qf52Lj7dlZ6zERnqisdHioL0l4wwQZnmskMeasqUNzLBFKs3nylXA== - dependencies: - eslint-scope "^5.1.1" - eslint-visitor-keys "^2.1.0" - semver "^6.3.0" - "@babel/generator@^7.17.9": version "7.17.9" resolved "https://registry.yarnpkg.com/@babel/generator/-/generator-7.17.9.tgz#f4af9fd38fa8de143c29fce3f71852406fc1e2fc" @@ -247,7 +238,7 @@ dependencies: "@babel/types" "^7.16.7" -"@babel/helper-validator-identifier@^7.14.9", "@babel/helper-validator-identifier@^7.16.7": +"@babel/helper-validator-identifier@^7.15.7", "@babel/helper-validator-identifier@^7.16.7": version "7.16.7" resolved "https://registry.yarnpkg.com/@babel/helper-validator-identifier/-/helper-validator-identifier-7.16.7.tgz#e8c602438c4a8195751243da9031d1607d247cad" integrity sha512-hsEnFemeiW4D08A5gUAZxLBTXpZ39P+a+DGDsHw1yxqyQ/jzFEnxf5uTEGp+3bzAbNOxU1paTgYS4ECU/IgfDw== @@ -1089,7 +1080,7 @@ dependencies: "@cspotcode/source-map-consumer" "0.8.0" -"@eslint/eslintrc@^1.0.4", "@eslint/eslintrc@^1.2.2": +"@eslint/eslintrc@^1.0.5", "@eslint/eslintrc@^1.2.2": version "1.2.2" resolved "https://registry.yarnpkg.com/@eslint/eslintrc/-/eslintrc-1.2.2.tgz#4989b9e8c0216747ee7cca314ae73791bb281aae" integrity sha512-lTVWHs7O2hjBFZunXTZYnYqtB9GakA1lnxIf+gKq2nY5gxkkNi/lQvveW6t8gFdOHTg6nG50Xs95PrLqVpcaLg== @@ -1774,11 +1765,6 @@ array-union@^2.1.0: resolved "https://registry.yarnpkg.com/array-union/-/array-union-2.1.0.tgz#b798420adbeb1de828d84acd8a2e23d3efe85e8d" integrity sha512-HGyxoOTYUyCM6stUe6EJgnd4EoewAI7zMdfqO+kGjnlZmBDz/cR5pf8r/cR4Wq60sL/p0IkcjUEEPwS3GFrIyw== -array-union@^3.0.1: - version "3.0.1" - resolved "https://registry.yarnpkg.com/array-union/-/array-union-3.0.1.tgz#da52630d327f8b88cfbfb57728e2af5cd9b6b975" - integrity sha512-1OvF9IbWwaeiM9VhzYXVQacMibxpXOMYVNIvMtKRyX9SImBXpKcFr8XvFDeEslCyuH/t6KRt7HEO94AlP8Iatw== - array-uniq@~1.0.2: version "1.0.3" resolved "https://registry.yarnpkg.com/array-uniq/-/array-uniq-1.0.3.tgz#af6ac877a25cc7f74e058894753858dfdb24fdb6" @@ -2719,7 +2705,7 @@ chokidar@^3.0.0, chokidar@^3.4.0: optionalDependencies: fsevents "~2.3.2" -ci-info@^3.2.0: +ci-info@^3.3.0: version "3.3.0" resolved "https://registry.yarnpkg.com/ci-info/-/ci-info-3.3.0.tgz#b4ed1fb6818dea4803a55c623041f9165d2066b2" integrity sha512-riT/3vI5YpVH6/qomlDnJow6TBee2PBKSEpx3O32EGPYbWGIRsIlGRms3Sm74wYE1JMo8RnO04Hb12+v1J5ICw== @@ -3019,10 +3005,10 @@ concat-stream@~1.5.0, concat-stream@~1.5.1: readable-stream "~2.0.0" typedarray "~0.0.5" -confusing-browser-globals@1.0.10: - version "1.0.10" - resolved "https://registry.yarnpkg.com/confusing-browser-globals/-/confusing-browser-globals-1.0.10.tgz#30d1e7f3d1b882b25ec4933d1d1adac353d20a59" - integrity sha512-gNld/3lySHwuhaVluJUKLePYirM3QNCKzVxqAdhJII9/WXKVX5PURzMVJspS1jTslSqjeuG4KMVTSouit5YPHA== +confusing-browser-globals@1.0.11: + version "1.0.11" + resolved "https://registry.yarnpkg.com/confusing-browser-globals/-/confusing-browser-globals-1.0.11.tgz#ae40e9b57cdd3915408a2805ebd3a5585608dc81" + integrity sha512-JsPKdmh8ZkmnHxDk55FZ1TqVLvEQTvoByJZRN9jzI0UjxK/QgAmsphz7PGtqgPieQZ/CQcHWXCR7ATDNhGe+YA== connect@2.12.0: version "2.12.0" @@ -3945,12 +3931,12 @@ eslint-config-xo-typescript@*: resolved "https://registry.yarnpkg.com/eslint-config-xo-typescript/-/eslint-config-xo-typescript-0.50.0.tgz#59a0a704fbd667592ca3ddcc599b9f8c855e4ebe" integrity sha512-Ru2tXB8y2w9fFHLm4v2AVfY6P81UbfEuDZuxEpeXlfV65Ezlk0xO4nBaT899ojIFkWfr60rP9Ye4CdVUUT1UYg== -eslint-config-xo@^0.39.0: - version "0.39.0" - resolved "https://registry.yarnpkg.com/eslint-config-xo/-/eslint-config-xo-0.39.0.tgz#a76074270d5ecaa6655a740cbdc86eba621590b7" - integrity sha512-QX+ZnQgzy/UtgF8dksIiIBzpYoEKmiL0CmZ8O0Gnby7rGXg8Cny1CXirmHp1zKYIpO7BuTmtWj8eUYOsGr0IGQ== +eslint-config-xo@^0.40.0: + version "0.40.0" + resolved "https://registry.yarnpkg.com/eslint-config-xo/-/eslint-config-xo-0.40.0.tgz#a95ba5e38de6d1b7563b0dcd48f8435055a629d5" + integrity sha512-msI1O0JGxeK2bbExg3U6EGaWKcjhOFzEjwzObywG/DC5GSNZTOyJT+b2l9MZGBeZsVdxfIGwdXTNeWXl8cN9iw== dependencies: - confusing-browser-globals "1.0.10" + confusing-browser-globals "1.0.11" eslint-formatter-pretty@^4.1.0: version "4.1.0" @@ -3999,7 +3985,7 @@ eslint-module-utils@^2.7.3: debug "^3.2.7" find-up "^2.1.0" -eslint-plugin-ava@^13.1.0: +eslint-plugin-ava@^13.2.0: version "13.2.0" resolved "https://registry.yarnpkg.com/eslint-plugin-ava/-/eslint-plugin-ava-13.2.0.tgz#a8e88fe62a259e11e0744d74aaff83f8ec4dbbe0" integrity sha512-i5B5izsEdERKQLruk1nIWzTTE7C26/ju8qQf7JeyRv32XT2lRMW0zMFZNhIrEf5/5VvpSz2rqrV7UcjClGbKsw== @@ -4043,7 +4029,7 @@ eslint-plugin-eslint-comments@^3.2.0: escape-string-regexp "^1.0.5" ignore "^5.0.5" -eslint-plugin-import@^2.25.3: +eslint-plugin-import@^2.25.4: version "2.26.0" resolved "https://registry.yarnpkg.com/eslint-plugin-import/-/eslint-plugin-import-2.26.0.tgz#f812dc47be4f2b72b478a021605a59fc6fe8b88b" integrity sha512-hYfi3FXaM8WPLf4S1cikh/r4IxnO6zrhZbEGz2b660EJRbuxgpDS5gkCuYgGWg2xxh2rBuIr4Pvhve/7c31koA== @@ -4091,23 +4077,22 @@ eslint-plugin-prettier@^4.0.0: dependencies: prettier-linter-helpers "^1.0.0" -eslint-plugin-unicorn@^39.0.0: - version "39.0.0" - resolved "https://registry.yarnpkg.com/eslint-plugin-unicorn/-/eslint-plugin-unicorn-39.0.0.tgz#ee76d4f3bf37c605d89fa449d5e7c0c44c54b0cc" - integrity sha512-fd5RK2FtYjGcIx3wra7csIE/wkkmBo22T1gZtRTsLr1Mb+KsFKJ+JOdSqhHXQUrI/JTs/Mon64cEYzTgSCbltw== +eslint-plugin-unicorn@^40.1.0: + version "40.1.0" + resolved "https://registry.yarnpkg.com/eslint-plugin-unicorn/-/eslint-plugin-unicorn-40.1.0.tgz#48975360e39d23df726e4b33e8dd5d650e184832" + integrity sha512-y5doK2DF9Sr5AqKEHbHxjFllJ167nKDRU01HDcWyv4Tnmaoe9iNxMrBnaybZvWZUaE3OC5Unu0lNIevYamloig== dependencies: - "@babel/helper-validator-identifier" "^7.14.9" - ci-info "^3.2.0" + "@babel/helper-validator-identifier" "^7.15.7" + ci-info "^3.3.0" clean-regexp "^1.0.0" - eslint-template-visitor "^2.3.2" eslint-utils "^3.0.0" esquery "^1.4.0" - indent-string "4" + indent-string "^4.0.0" is-builtin-module "^3.1.0" lodash "^4.17.21" pluralize "^8.0.0" read-pkg-up "^7.0.1" - regexp-tree "^0.1.23" + regexp-tree "^0.1.24" safe-regex "^2.1.1" semver "^7.3.5" strip-indent "^3.0.0" @@ -4133,17 +4118,6 @@ eslint-scope@^7.1.1: esrecurse "^4.3.0" estraverse "^5.2.0" -eslint-template-visitor@^2.3.2: - version "2.3.2" - resolved "https://registry.yarnpkg.com/eslint-template-visitor/-/eslint-template-visitor-2.3.2.tgz#b52f96ff311e773a345d79053ccc78275bbc463d" - integrity sha512-3ydhqFpuV7x1M9EK52BPNj6V0Kwu0KKkcIAfpUhwHbR8ocRln/oUHgfxQupY8O1h4Qv/POHDumb/BwwNfxbtnA== - dependencies: - "@babel/core" "^7.12.16" - "@babel/eslint-parser" "^7.12.16" - eslint-visitor-keys "^2.0.0" - esquery "^1.3.1" - multimap "^1.1.0" - eslint-utils@^2.0.0: version "2.1.0" resolved "https://registry.yarnpkg.com/eslint-utils/-/eslint-utils-2.1.0.tgz#d2de5e03424e707dc10c74068ddedae708741b27" @@ -4163,7 +4137,7 @@ eslint-visitor-keys@^1.1.0: resolved "https://registry.yarnpkg.com/eslint-visitor-keys/-/eslint-visitor-keys-1.3.0.tgz#30ebd1ef7c2fdff01c3a4f151044af25fab0523e" integrity sha512-6J72N8UNa462wa/KFODt/PJ3IU60SDpC3QXC1Hjc1BXXpfL2C9R5+AU7jhe0F6GREqVMh4Juu+NY7xn+6dipUQ== -eslint-visitor-keys@^2.0.0, eslint-visitor-keys@^2.1.0: +eslint-visitor-keys@^2.0.0: version "2.1.0" resolved "https://registry.yarnpkg.com/eslint-visitor-keys/-/eslint-visitor-keys-2.1.0.tgz#f65328259305927392c938ed44eb0a5c9b2bd303" integrity sha512-0rSmRBzXgDzIsD6mGdJgevzgezI534Cer5L/vyMX0kHzT/jiB43jRhd9YUlMGYLQy2zprNmoT8qasCGtY+QaKw== @@ -4173,7 +4147,7 @@ eslint-visitor-keys@^3.0.0, eslint-visitor-keys@^3.3.0: resolved "https://registry.yarnpkg.com/eslint-visitor-keys/-/eslint-visitor-keys-3.3.0.tgz#f6480fa6b1f30efe2d1968aa8ac745b862469826" integrity sha512-mQ+suqKJVyeuwGYHAdjMFqjCyfl8+Ldnxuyp3ldiMBFKkvytrXUZWaiPCEav8qDHKty44bD+qV1IP4T+w+xXRA== -eslint@^8.14.0, eslint@^8.3.0: +eslint@^8.14.0, eslint@^8.8.0: version "8.14.0" resolved "https://registry.yarnpkg.com/eslint/-/eslint-8.14.0.tgz#62741f159d9eb4a79695b28ec4989fcdec623239" integrity sha512-3/CE4aJX7LNEiE3i6FeodHmI/38GZtWCsAtsymScmzYapx8q1nVVb+eLcLSzATmCPXw5pT4TqVs1E0OmxAd9tw== @@ -4214,7 +4188,7 @@ eslint@^8.14.0, eslint@^8.3.0: text-table "^0.2.0" v8-compile-cache "^2.0.3" -esm-utils@^2.0.0: +esm-utils@^2.0.1: version "2.2.0" resolved "https://registry.yarnpkg.com/esm-utils/-/esm-utils-2.2.0.tgz#c950c0f3ea191f3830f0187f246b0cf2620c1e66" integrity sha512-kYj4yNRo4W3by0f1mj4AfRh1nsRTTpQG921Ik3AfyUq6upGlkI1fnMLypHn6XtFzZPdCYH1k9mtQA5MyZF9m+w== @@ -4253,7 +4227,7 @@ espurify@^2.0.0, espurify@^2.0.1, espurify@^2.1.1: resolved "https://registry.yarnpkg.com/espurify/-/espurify-2.1.1.tgz#afb043f22fac908d991dd25f7bf40bcf03935b9c" integrity sha512-zttWvnkhcDyGOhSH4vO2qCBILpdCMv/MX8lp4cqgRkQoDRGK2oZxi2GfWhlP2dIXmk7BaKeOTuzbHhyC68o8XQ== -esquery@^1.3.1, esquery@^1.4.0: +esquery@^1.4.0: version "1.4.0" resolved "https://registry.yarnpkg.com/esquery/-/esquery-1.4.0.tgz#2148ffc38b82e8c7057dfed48425b3e61f0f24a5" integrity sha512-cCDispWt5vHHtwMY2YrAQ4ibFkAL8RbH5YGBnZBc90MolvvfkkQcJro/aZiAQUlQ3qgrYS6D6v8Gc5G5CQsc9w== @@ -4544,7 +4518,7 @@ fast-diff@^1.1.2: resolved "https://registry.yarnpkg.com/fast-diff/-/fast-diff-1.2.0.tgz#73ee11982d86caaf7959828d519cfe927fac5f03" integrity sha512-xJuoT5+L99XlZ8twedaRf6Ax2TgQVxvgZOYoPKqZufmJib0tL2tegPBOZb1pVNgIhlqDlA0eO0c3wBvQcmzx4w== -fast-glob@^3.2.7, fast-glob@^3.2.9: +fast-glob@^3.2.11, fast-glob@^3.2.9: version "3.2.11" resolved "https://registry.yarnpkg.com/fast-glob/-/fast-glob-3.2.11.tgz#a1172ad95ceb8a16e20caa5c5e56480e5129c1d9" integrity sha512-xrO3+1bxSo3ZVHAnqzyuewYT6aMFHRAd4Kcs92MAonjwQZLsK9d0SF1IyQ3k5PoirxTW0Oe/RqFgMQ6TcNE5Ew== @@ -4724,7 +4698,7 @@ find-up@^5.0.0: locate-path "^6.0.0" path-exists "^4.0.0" -find-up@^6.2.0: +find-up@^6.3.0: version "6.3.0" resolved "https://registry.yarnpkg.com/find-up/-/find-up-6.3.0.tgz#2abab3d3280b2dc7ac10199ef324c4e002c8c790" integrity sha512-v2ZsoEuVHYy8ZIlYqwPe/39Cy+cFDzp4dXPaxNvkEuouymu+2Jbz0PxpKarJHYJTmv2HWT3O382qY8l4jMWthw== @@ -5175,15 +5149,14 @@ globby@^11.0.4: merge2 "^1.4.1" slash "^3.0.0" -globby@^12.0.2: - version "12.2.0" - resolved "https://registry.yarnpkg.com/globby/-/globby-12.2.0.tgz#2ab8046b4fba4ff6eede835b29f678f90e3d3c22" - integrity sha512-wiSuFQLZ+urS9x2gGPl1H5drc5twabmm4m2gTR27XDFyjUHJUNsS8o/2aKyIF6IoBaR630atdher0XJ5g6OMmA== +globby@^13.1.1: + version "13.1.1" + resolved "https://registry.yarnpkg.com/globby/-/globby-13.1.1.tgz#7c44a93869b0b7612e38f22ed532bfe37b25ea6f" + integrity sha512-XMzoDZbGZ37tufiv7g0N4F/zp3zkwdFtVbV3EHsVl1KQr4RPLfNoT068/97RPshz2J5xYNEjLKKBKaGHifBd3Q== dependencies: - array-union "^3.0.1" dir-glob "^3.0.1" - fast-glob "^3.2.7" - ignore "^5.1.9" + fast-glob "^3.2.11" + ignore "^5.2.0" merge2 "^1.4.1" slash "^4.0.0" @@ -5525,7 +5498,7 @@ ignore-walk@3.0.4: dependencies: minimatch "^3.0.4" -ignore@^5.0.0, ignore@^5.0.5, ignore@^5.1.1, ignore@^5.1.8, ignore@^5.1.9, ignore@^5.2.0: +ignore@^5.0.0, ignore@^5.0.5, ignore@^5.1.1, ignore@^5.1.8, ignore@^5.2.0: version "5.2.0" resolved "https://registry.yarnpkg.com/ignore/-/ignore-5.2.0.tgz#6d3bac8fa7fe0d45d9f9be7bac2fc279577e345a" integrity sha512-CmxgYGiEPCLhfLnpPp1MoRmifwEIOgjcHXxOBjv7mY96c+eWScsOP9c112ZyLdWHi0FxHjI+4uVhKYp/gcdRmQ== @@ -5555,7 +5528,7 @@ imurmurhash@^0.1.4: resolved "https://registry.yarnpkg.com/imurmurhash/-/imurmurhash-0.1.4.tgz#9218b9b2b928a238b13dc4fb6b6d576f231453ea" integrity sha1-khi5srkoojixPcT7a21XbyMUU+o= -indent-string@4, indent-string@^4.0.0: +indent-string@^4.0.0: version "4.0.0" resolved "https://registry.yarnpkg.com/indent-string/-/indent-string-4.0.0.tgz#624f8f4497d619b2d9768531d58f4122854d7251" integrity sha512-EdDDZu4A2OyIK7Lr/2zG+w5jmbuk1DVBnEwREQvBzspBJkCEbRa8GxU1lghYcaGJCnRWibjDXlq779X1/y5xwg== @@ -7606,11 +7579,6 @@ multi-stage-sourcemap@^0.2.1: dependencies: source-map "^0.1.34" -multimap@^1.1.0: - version "1.1.0" - resolved "https://registry.yarnpkg.com/multimap/-/multimap-1.1.0.tgz#5263febc085a1791c33b59bb3afc6a76a2a10ca8" - integrity sha512-0ZIR9PasPxGXmRsEF8jsDzndzHDj7tIav+JUmvIFB/WHswliFnquxECT/De7GR4yg99ky/NlRKJT82G1y271bw== - multiparty@2.2.0: version "2.2.0" resolved "https://registry.yarnpkg.com/multiparty/-/multiparty-2.2.0.tgz#a567c2af000ad22dc8f2a653d91978ae1f5316f4" @@ -8430,7 +8398,7 @@ prettier-linter-helpers@^1.0.0: dependencies: fast-diff "^1.1.2" -prettier@^2.5.0: +prettier@^2.5.1: version "2.6.2" resolved "https://registry.yarnpkg.com/prettier/-/prettier-2.6.2.tgz#e26d71a18a74c3d0f0597f55f01fb6c06c206032" integrity sha512-PkUpF+qoXTqhOeWL9fu7As8LXsIUZ1WYaJiY/a7McAQzxjk82OF0tibkFXVCDImZtWxbvojFjerkiLb0/q8mew== @@ -8833,7 +8801,7 @@ regex-not@^1.0.0, regex-not@^1.0.2: extend-shallow "^3.0.2" safe-regex "^1.1.0" -regexp-tree@^0.1.23, regexp-tree@~0.1.1: +regexp-tree@^0.1.24, regexp-tree@~0.1.1: version "0.1.24" resolved "https://registry.yarnpkg.com/regexp-tree/-/regexp-tree-0.1.24.tgz#3d6fa238450a4d66e5bc9c4c14bb720e2196829d" integrity sha512-s2aEVuLhvnVJW6s/iPgEGK6R+/xngd2jNQ+xy4bXNDKxZKJH6jpPHY6kVeVv1IeLCHgswRj+Kl3ELaDjG6V1iw== @@ -11078,7 +11046,7 @@ typedarray@^0.0.6, typedarray@~0.0.5: resolved "https://registry.yarnpkg.com/typedarray/-/typedarray-0.0.6.tgz#867ac74e3864187b1d3d47d996a78ec5c8830777" integrity sha1-hnrHTjhkGHsdPUfZlqeOxciDB3c= -typescript@^4.4.3, typescript@^4.5.2: +typescript@^4.4.3, typescript@^4.5.5: version "4.6.3" resolved "https://registry.yarnpkg.com/typescript/-/typescript-4.6.3.tgz#eefeafa6afdd31d725584c67a0eaba80f6fc6c6c" integrity sha512-yNIatDa5iaofVozS/uQJEl3JRWLKKGJKh6Yaiv0GLGSuhpFJe7P3SbHZ8/yjAHRQwKRoA6YZqlfjXWmVzoVSMw== @@ -11842,35 +11810,35 @@ xmlbuilder@~11.0.0: resolved "https://registry.yarnpkg.com/xmlbuilder/-/xmlbuilder-11.0.1.tgz#be9bae1c8a046e76b31127726347d0ad7002beb3" integrity sha512-fDlsI/kFEx7gLvbecc0/ohLG50fugQp8ryHzMTuW9vSa1GJ0XYWKnhsUx7oie3G98+r56aTQIUB4kht42R3JvA== -xo@0.47.0: - version "0.47.0" - resolved "https://registry.yarnpkg.com/xo/-/xo-0.47.0.tgz#6653bb3693c786e3b409e7271e9522bf9ff6c765" - integrity sha512-QHRIpaPSG7tK7PX4K4fqe0V4EH1u2IkM7Pr356u1fKcVsZskw7i9gfEqyBLsnnc4e4Y8gnLtIqasLJsGPqM8sA== +xo@^0.48.0: + version "0.48.0" + resolved "https://registry.yarnpkg.com/xo/-/xo-0.48.0.tgz#02e26fedfdb00f389db05ecd4698eb679ba721a0" + integrity sha512-f0sbQGJoML3nwOLG7EIAJroBypmLokoGJqTPN+bI/oogKLMciqWBEiFh9Vpxnfwxafq1AkHoWrQZQWSflDCG1w== dependencies: - "@eslint/eslintrc" "^1.0.4" - "@typescript-eslint/eslint-plugin" "^5.4.0" - "@typescript-eslint/parser" "^5.4.0" + "@eslint/eslintrc" "^1.0.5" + "@typescript-eslint/eslint-plugin" "^5.11.0" + "@typescript-eslint/parser" "^5.11.0" arrify "^3.0.0" cosmiconfig "^7.0.1" define-lazy-prop "^3.0.0" - eslint "^8.3.0" + eslint "^8.8.0" eslint-config-prettier "^8.3.0" - eslint-config-xo "^0.39.0" - eslint-config-xo-typescript "^0.47.1" + eslint-config-xo "^0.40.0" + eslint-config-xo-typescript "^0.50.0" eslint-formatter-pretty "^4.1.0" eslint-import-resolver-webpack "^0.13.2" - eslint-plugin-ava "^13.1.0" + eslint-plugin-ava "^13.2.0" eslint-plugin-eslint-comments "^3.2.0" - eslint-plugin-import "^2.25.3" + eslint-plugin-import "^2.25.4" eslint-plugin-no-use-extend-native "^0.5.0" eslint-plugin-node "^11.1.0" eslint-plugin-prettier "^4.0.0" - eslint-plugin-unicorn "^39.0.0" - esm-utils "^2.0.0" + eslint-plugin-unicorn "^40.1.0" + esm-utils "^2.0.1" find-cache-dir "^3.3.2" - find-up "^6.2.0" + find-up "^6.3.0" get-stdin "^9.0.0" - globby "^12.0.2" + globby "^13.1.1" imurmurhash "^0.1.4" json-stable-stringify-without-jsonify "^1.0.1" json5 "^2.2.0" @@ -11878,11 +11846,11 @@ xo@0.47.0: meow "^10.1.2" micromatch "^4.0.4" open-editor "^4.0.0" - prettier "^2.5.0" + prettier "^2.5.1" semver "^7.3.5" slash "^4.0.0" to-absolute-glob "^2.0.2" - typescript "^4.5.2" + typescript "^4.5.5" xtend@2.1.2: version "2.1.2"