diff --git a/.eslintrc b/.eslintrc index fef84354e..54438a888 100644 --- a/.eslintrc +++ b/.eslintrc @@ -11,6 +11,7 @@ "no-unused-vars": "warn", "unicorn/no-null": "off", "unicorn/prefer-module": "off", - "unicorn/prevent-abbreviations": "off" + "unicorn/prevent-abbreviations": "off", + "unicorn/prefer-top-level-await": "off" } } diff --git a/bin/generate-fixtures.js b/bin/generate-fixtures.js index 5d45e6fad..734382352 100755 --- a/bin/generate-fixtures.js +++ b/bin/generate-fixtures.js @@ -1,7 +1,7 @@ #!/usr/bin/env node -const fs = require('fs') -const path = require('path') +const fs = require('node:fs') +const path = require('node:path') const fetch = require('node-fetch') const { findCommitsWithAssociatedPullRequestsQuery, diff --git a/bin/generate-schema.js b/bin/generate-schema.js index 6bfe6622e..5ecea69e2 100644 --- a/bin/generate-schema.js +++ b/bin/generate-schema.js @@ -1,6 +1,6 @@ // joi-to-json-schema currently does not support v16 of Joi (https://github.com/lightsofapollo/joi-to-json-schema/issues/57) const { convert } = require('@koa-lite/joi-schema') -const fs = require('fs') +const fs = require('node:fs') const { schema } = require('../lib/schema') const inputArguments = process.argv.slice(2) || [] diff --git a/package.json b/package.json index 2718356f5..5e66a97de 100644 --- a/package.json +++ b/package.json @@ -40,7 +40,7 @@ "eslint": "8.20.0", "eslint-config-prettier": "8.5.0", "eslint-plugin-prettier": "4.2.1", - "eslint-plugin-unicorn": "^42.0.0", + "eslint-plugin-unicorn": "^43.0.2", "husky": "8.0.1", "jest": "28.1.3", "lint-staged": "13.0.3", diff --git a/test/helpers/config-mock.js b/test/helpers/config-mock.js index af858cab6..4163e2856 100644 --- a/test/helpers/config-mock.js +++ b/test/helpers/config-mock.js @@ -1,4 +1,4 @@ -const fs = require('fs') +const fs = require('node:fs') const nock = require('nock') function configFixture(fileName = 'config.yml') { diff --git a/yarn.lock b/yarn.lock index 2c0ae3132..418997bee 100644 --- a/yarn.lock +++ b/yarn.lock @@ -220,10 +220,10 @@ dependencies: "@babel/types" "^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== +"@babel/helper-validator-identifier@^7.16.7", "@babel/helper-validator-identifier@^7.18.6": + version "7.18.6" + resolved "https://registry.yarnpkg.com/@babel/helper-validator-identifier/-/helper-validator-identifier-7.18.6.tgz#9c97e30d31b2b8c72a1d08984f2ca9b574d7a076" + integrity sha512-MmetCkz9ej86nJQV+sFCxoGGrUbU3q02kgLciwkrt9QqEB7cP39oKEY0PakknEO0Gu20SskMRi+AYZ3b1TpN9g== "@babel/helper-validator-option@^7.16.7": version "7.16.7" @@ -1637,10 +1637,10 @@ check-more-types@2.24.0: resolved "https://registry.yarnpkg.com/check-more-types/-/check-more-types-2.24.0.tgz#1420ffb10fd444dcfc79b43891bbfffd32a84600" integrity sha1-FCD/sQ/URNz8ebQ4kbv//TKoRgA= -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== +ci-info@^3.2.0, ci-info@^3.3.2: + version "3.3.2" + resolved "https://registry.yarnpkg.com/ci-info/-/ci-info-3.3.2.tgz#6d2967ffa407466481c6c90b6e16b3098f080128" + integrity sha512-xmDt/QIAdeZ9+nfdPsaBCpMvHNLFiLdjj59qjqn+6iPe6YmHGQ35sBnQ8uslRBXFmXkiZQOJRjvQeoGppoTjjg== cjs-module-lexer@^1.0.0: version "1.2.2" @@ -1988,13 +1988,13 @@ eslint-plugin-prettier@4.2.1: dependencies: prettier-linter-helpers "^1.0.0" -eslint-plugin-unicorn@^42.0.0: - version "42.0.0" - resolved "https://registry.yarnpkg.com/eslint-plugin-unicorn/-/eslint-plugin-unicorn-42.0.0.tgz#47d60c00c263ad743403b052db689e39acbacff1" - integrity sha512-ixBsbhgWuxVaNlPTT8AyfJMlhyC5flCJFjyK3oKE8TRrwBnaHvUbuIkCM1lqg8ryYrFStL/T557zfKzX4GKSlg== +eslint-plugin-unicorn@^43.0.2: + version "43.0.2" + resolved "https://registry.yarnpkg.com/eslint-plugin-unicorn/-/eslint-plugin-unicorn-43.0.2.tgz#b189d58494c8a0985a4b89dba5dbfde3ad7575a5" + integrity sha512-DtqZ5mf/GMlfWoz1abIjq5jZfaFuHzGBZYIeuJfEoKKGWRHr2JiJR+ea+BF7Wx2N1PPRoT/2fwgiK1NnmNE3Hg== dependencies: - "@babel/helper-validator-identifier" "^7.15.7" - ci-info "^3.3.0" + "@babel/helper-validator-identifier" "^7.18.6" + ci-info "^3.3.2" clean-regexp "^1.0.0" eslint-utils "^3.0.0" esquery "^1.4.0" @@ -2005,7 +2005,7 @@ eslint-plugin-unicorn@^42.0.0: read-pkg-up "^7.0.1" regexp-tree "^0.1.24" safe-regex "^2.1.1" - semver "^7.3.5" + semver "^7.3.7" strip-indent "^3.0.0" eslint-scope@^7.1.1: @@ -4067,7 +4067,7 @@ safe-regex@^2.1.1: resolved "https://registry.yarnpkg.com/semver/-/semver-5.7.1.tgz#a954f931aeba508d307bbf069eff0c01c96116f7" integrity sha512-sauaDf/PZdVgrLTNYHRtpXa1iRiKcaebiKQ1BJdpQlWH2lCvexQdX55snPFyK7QzpudqbCI0qXFfOasHdyNDGQ== -semver@7.3.7, semver@^7.3.4, semver@^7.3.5: +semver@7.3.7, semver@^7.3.4, semver@^7.3.5, semver@^7.3.7: version "7.3.7" resolved "https://registry.yarnpkg.com/semver/-/semver-7.3.7.tgz#12c5b649afdbf9049707796e22a4028814ce523f" integrity sha512-QlYTucUYOews+WeEujDoEGziz4K6c47V/Bd+LjSSYcA94p+DmINdf7ncaUinThfvZyu13lN9OY1XDxt8C0Tw0g==