From 983d65ee176fc750d0f45e14cc4ffcaa8a76fd51 Mon Sep 17 00:00:00 2001 From: Nitin Kumar Date: Sat, 27 Jan 2024 15:43:16 +0530 Subject: [PATCH] chore: update eslint-config-eslint --- .eleventy.js | 28 +- .stylelintrc.js | 48 +- eslint.config.js | 43 +- package-lock.json | 777 ++++++++++++++++-- package.json | 4 +- .../utils/codemirror-linter-extension.js | 24 +- tools/add-author.js | 6 +- tools/fetch-sponsors.js | 11 +- tools/fetch-stats.js | 14 +- tools/fetch-team-data.js | 11 +- tools/validate-links.js | 11 +- 11 files changed, 828 insertions(+), 149 deletions(-) diff --git a/.eleventy.js b/.eleventy.js index eb3afda84b..b6ef770022 100644 --- a/.eleventy.js +++ b/.eleventy.js @@ -50,9 +50,11 @@ module.exports = eleventyConfig => { throwOnUndefined: true }); - /** *************************************************************************************** + /** + * *************************************************************************************** * Filters - * ***************************************************************************************/ + * ************************************************************************************** + */ eleventyConfig.addFilter("limitTo", (arr, limit) => arr.slice(0, limit)); eleventyConfig.addFilter("jsonify", variable => JSON.stringify(variable)); @@ -133,9 +135,11 @@ module.exports = eleventyConfig => { eleventyConfig.addFilter("concat", (value1, value2) => value1.concat(value2)); - /** *************************************************************************************** + /** + * *************************************************************************************** * Plugins - * ***************************************************************************************/ + * ************************************************************************************** + */ eleventyConfig.addPlugin(eleventyNavigationPlugin); eleventyConfig.addPlugin(readingTime); eleventyConfig.addPlugin(syntaxHighlight, { @@ -163,9 +167,11 @@ module.exports = eleventyConfig => { eleventyConfig.addWatchTarget("./src/assets/"); eleventyConfig.addWatchTarget("./src/content/pages/"); - /** *************************************************************************************** + /** + * *************************************************************************************** * File PassThroughs - * ***************************************************************************************/ + * ************************************************************************************** + */ eleventyConfig.addPassthroughCopy({ "./src/static": "/" @@ -202,9 +208,11 @@ module.exports = eleventyConfig => { }); - /** *************************************************************************************** + /** + * *************************************************************************************** * Collections - * ***************************************************************************************/ + * ************************************************************************************** + */ eleventyConfig.addCollection( "blogposts", @@ -236,7 +244,7 @@ module.exports = eleventyConfig => { formats: ["webp", "jpeg"], urlPath: "/assets/images/", outputDir: "./_site/assets/images/", - filenameFormat: (id, source, width, format) => { + filenameFormat(id, source, width, format) { const extension = path.extname(source); const name = path.basename(source, extension); @@ -257,7 +265,7 @@ module.exports = eleventyConfig => { const fullSrc = getSRC(); // generate images - Image(fullSrc, options); // eslint-disable-line new-cap + Image(fullSrc, options); // eslint-disable-line new-cap -- Third-party code const imageAttributes = { alt, diff --git a/.stylelintrc.js b/.stylelintrc.js index 5180e40f74..c0a6f4a062 100644 --- a/.stylelintrc.js +++ b/.stylelintrc.js @@ -1,26 +1,26 @@ module.exports = { - extends: ["stylelint-config-standard-scss"], - rules: { - "alpha-value-notation": "number", - "at-rule-empty-line-before": null, - "color-function-notation": "legacy", - "color-hex-case": null, - "custom-property-empty-line-before": null, - "custom-property-pattern": null, - "declaration-block-no-duplicate-properties": [true, { - "ignore": ["consecutive-duplicates-with-different-values"] - }], - "declaration-block-no-redundant-longhand-properties": null, - "declaration-block-no-shorthand-property-overrides": null, - "hue-degree-notation": "number", - indentation: 4, - "max-line-length": null, - "no-descending-specificity": null, - "number-leading-zero": null, - "number-no-trailing-zeros": null, - "property-no-unknown": null, - "property-no-vendor-prefix": null, - "selector-class-pattern": null, - "value-keyword-case": null, - }, + extends: ["stylelint-config-standard-scss"], + rules: { + "alpha-value-notation": "number", + "at-rule-empty-line-before": null, + "color-function-notation": "legacy", + "color-hex-case": null, + "custom-property-empty-line-before": null, + "custom-property-pattern": null, + "declaration-block-no-duplicate-properties": [true, { + ignore: ["consecutive-duplicates-with-different-values"] + }], + "declaration-block-no-redundant-longhand-properties": null, + "declaration-block-no-shorthand-property-overrides": null, + "hue-degree-notation": "number", + indentation: 4, + "max-line-length": null, + "no-descending-specificity": null, + "number-leading-zero": null, + "number-no-trailing-zeros": null, + "property-no-unknown": null, + "property-no-vendor-prefix": null, + "selector-class-pattern": null, + "value-keyword-case": null + } }; diff --git a/eslint.config.js b/eslint.config.js index 1c588668e5..f2922697e4 100644 --- a/eslint.config.js +++ b/eslint.config.js @@ -2,8 +2,8 @@ const js = require("@eslint/js"); const { FlatCompat } = require("@eslint/eslintrc"); +const eslintConfigESLintCJS = require("eslint-config-eslint/cjs"); const globals = require("globals"); -const jsdoc = require("eslint-plugin-jsdoc"); const reactPlugin = require("eslint-plugin-react"); const reactRecommended = require("eslint-plugin-react/configs/recommended"); const jsxA11yPlugin = require("eslint-plugin-jsx-a11y"); @@ -22,14 +22,13 @@ module.exports = [ "_site/**", "src/assets/js/**", "src/_data/**", - "src/_11ty/**" + "src/_11ty/**", + ".stylelintrc.js" ] }, + ...eslintConfigESLintCJS, { files: ["**/*.js"], - plugins: { - jsdoc - }, languageOptions: { globals: { ...globals.node @@ -41,19 +40,19 @@ module.exports = [ // Disable eslint-plugin-node rules from eslint-config-eslint "no-process-exit": "off", "func-style": "off", - "node/no-deprecated-api": "off", - "node/no-extraneous-require": "off", - "node/no-missing-require": "off", - "node/no-unpublished-bin": "off", - "node/no-unpublished-require": "off", - "node/no-unsupported-features/es-builtins": "off", - "node/no-unsupported-features/es-syntax": "off", - "node/no-unsupported-features/node-builtins": "off", - "node/process-exit-as-throw": "off", - "node/shebang": "off", - "node/no-extraneous-import": "off", - "node/no-missing-import": "off", - "node/no-unpublished-import": "off", + "n/no-deprecated-api": "off", + "n/no-extraneous-require": "off", + "n/no-missing-require": "off", + "n/no-unpublished-bin": "off", + "n/no-unpublished-require": "off", + "n/no-unsupported-features/es-builtins": "off", + "n/no-unsupported-features/es-syntax": "off", + "n/no-unsupported-features/node-builtins": "off", + "n/process-exit-as-throw": "off", + "n/shebang": "off", + "n/no-extraneous-import": "off", + "n/no-missing-import": "off", + "n/no-unpublished-import": "off", // Disable rules that the codebase doesn't currently follow. "jsdoc/require-jsdoc": "off", @@ -62,6 +61,13 @@ module.exports = [ "jsdoc/require-param-type": "off" } }, + { + files: ["tools/**/*.js"], + rules: { + "no-console": "off", + "n/no-process-exit": "off" + } + }, { files: ["src/playground/**/*.{js,jsx}"], plugins: { @@ -80,6 +86,7 @@ module.exports = [ jsx: true } }, + sourceType: "module", globals: { ...globals.browser, ...globals.es2021 diff --git a/package-lock.json b/package-lock.json index 6e1499ebcc..e79f36a1f0 100644 --- a/package-lock.json +++ b/package-lock.json @@ -48,8 +48,8 @@ "eleventy-plugin-page-assets": "^0.3.0", "eleventy-plugin-reading-time": "^0.0.1", "eslint": "^8.56.0", - "eslint-config-eslint": "^7.0.0", - "eslint-plugin-jsdoc": "^48.0.3", + "eslint-config-eslint": "^9.0.0", + "eslint-plugin-jsdoc": "^48.0.4", "eslint-plugin-jsx-a11y": "^6.8.0", "eslint-plugin-node": "^11.1.0", "eslint-plugin-react": "^7.33.2", @@ -5331,6 +5331,15 @@ "integrity": "sha512-HpGFw18DgFWlncDfjTa2rcQ4W88O1mC8e8yZ2AvQY5KDaktSTwo+KRf6nHK6FRI5FyRyb/5T6+TSxfP7QyGsmQ==", "dev": true }, + "node_modules/builtins": { + "version": "5.0.1", + "resolved": "https://registry.npmjs.org/builtins/-/builtins-5.0.1.tgz", + "integrity": "sha512-qwVpFEHNfhYJIzNRBvd2C1kyo6jz3ZSMPyyuR47OPdiKWlbYnZNyDWuyR175qDnAJLiCo5fBBqPb3RiXgWlkOQ==", + "dev": true, + "dependencies": { + "semver": "^7.0.0" + } + }, "node_modules/cacheable-request": { "version": "2.1.4", "resolved": "https://registry.npmjs.org/cacheable-request/-/cacheable-request-2.1.4.tgz", @@ -5598,6 +5607,18 @@ "node": ">= 4.0" } }, + "node_modules/clean-regexp": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/clean-regexp/-/clean-regexp-1.0.0.tgz", + "integrity": "sha512-GfisEZEJvzKrmGWkvfhgzcz/BllN1USeqD2V6tg14OAOgaCD2Z/PUEuxnAZ/nPvmaHRG7a8y77p1T/IRQ4D1Hw==", + "dev": true, + "dependencies": { + "escape-string-regexp": "^1.0.5" + }, + "engines": { + "node": ">=4" + } + }, "node_modules/clean-stack": { "version": "2.2.0", "resolved": "https://registry.npmjs.org/clean-stack/-/clean-stack-2.2.0.tgz", @@ -7527,17 +7548,77 @@ "url": "https://opencollective.com/eslint" } }, + "node_modules/eslint-compat-utils": { + "version": "0.1.2", + "resolved": "https://registry.npmjs.org/eslint-compat-utils/-/eslint-compat-utils-0.1.2.tgz", + "integrity": "sha512-Jia4JDldWnFNIru1Ehx1H5s9/yxiRHY/TimCuUc0jNexew3cF1gI6CYZil1ociakfWO3rRqFjl1mskBblB3RYg==", + "dev": true, + "engines": { + "node": ">=12" + }, + "peerDependencies": { + "eslint": ">=6.0.0" + } + }, "node_modules/eslint-config-eslint": { - "version": "7.0.0", - "resolved": "https://registry.npmjs.org/eslint-config-eslint/-/eslint-config-eslint-7.0.0.tgz", - "integrity": "sha512-gxUttladfTQaJKmSh9jbrN4Qba27yYBVwp0YsaOqjEWtOZYtc+MOgoWFh2x4Ewxjqr8sZZS1yTguXgoktzXOvQ==", + "version": "9.0.0", + "resolved": "https://registry.npmjs.org/eslint-config-eslint/-/eslint-config-eslint-9.0.0.tgz", + "integrity": "sha512-91lXzIbVGN1u4eyaos0E0W49FzjZbwia8x8/vIbjGaTrQ5F9i0H2hbu8AvOmW6vzTIr2srwgrgPTMlJiC3J0Xg==", "dev": true, + "dependencies": { + "@eslint/js": "^8.42.0", + "eslint-plugin-eslint-comments": "^3.2.0", + "eslint-plugin-jsdoc": "^46.2.5", + "eslint-plugin-n": "^16.0.0", + "eslint-plugin-unicorn": "^42.0.0" + }, "engines": { - "node": "^10.12.0 || >=12.0.0" + "node": ">=16.0.0" + } + }, + "node_modules/eslint-config-eslint/node_modules/escape-string-regexp": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/escape-string-regexp/-/escape-string-regexp-4.0.0.tgz", + "integrity": "sha512-TtpcNJ3XAzx3Gq8sWRzJaVajRs0uVxA2YAkdb1jm2YkPz4G6egUFAyA3n5vtEIZefPk5Wa4UXbKuS5fKkJWdgA==", + "dev": true, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/eslint-config-eslint/node_modules/eslint-plugin-jsdoc": { + "version": "46.10.1", + "resolved": "https://registry.npmjs.org/eslint-plugin-jsdoc/-/eslint-plugin-jsdoc-46.10.1.tgz", + "integrity": "sha512-x8wxIpv00Y50NyweDUpa+58ffgSAI5sqe+zcZh33xphD0AVh+1kqr1ombaTRb7Fhpove1zfUuujlX9DWWBP5ag==", + "dev": true, + "dependencies": { + "@es-joy/jsdoccomment": "~0.41.0", + "are-docs-informative": "^0.0.2", + "comment-parser": "1.4.1", + "debug": "^4.3.4", + "escape-string-regexp": "^4.0.0", + "esquery": "^1.5.0", + "is-builtin-module": "^3.2.1", + "semver": "^7.5.4", + "spdx-expression-parse": "^4.0.0" + }, + "engines": { + "node": ">=16" }, "peerDependencies": { - "eslint-plugin-jsdoc": ">=22.1.0", - "eslint-plugin-node": ">=11.1.0" + "eslint": "^7.0.0 || ^8.0.0 || ^9.0.0" + } + }, + "node_modules/eslint-config-eslint/node_modules/spdx-expression-parse": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/spdx-expression-parse/-/spdx-expression-parse-4.0.0.tgz", + "integrity": "sha512-Clya5JIij/7C6bRR22+tnGXbc4VKlibKSVj2iHvVeX5iMW7s1SIQlqu699JkODJJIhh/pUu8L0/VLh8xflD+LQ==", + "dev": true, + "dependencies": { + "spdx-exceptions": "^2.1.0", + "spdx-license-ids": "^3.0.0" } }, "node_modules/eslint-plugin-es": { @@ -7559,6 +7640,26 @@ "eslint": ">=4.19.1" } }, + "node_modules/eslint-plugin-es-x": { + "version": "7.5.0", + "resolved": "https://registry.npmjs.org/eslint-plugin-es-x/-/eslint-plugin-es-x-7.5.0.tgz", + "integrity": "sha512-ODswlDSO0HJDzXU0XvgZ3lF3lS3XAZEossh15Q2UHjwrJggWeBoKqqEsLTZLXl+dh5eOAozG0zRcYtuE35oTuQ==", + "dev": true, + "dependencies": { + "@eslint-community/eslint-utils": "^4.1.2", + "@eslint-community/regexpp": "^4.6.0", + "eslint-compat-utils": "^0.1.2" + }, + "engines": { + "node": "^14.18.0 || >=16.0.0" + }, + "funding": { + "url": "https://github.com/sponsors/ota-meshi" + }, + "peerDependencies": { + "eslint": ">=8" + } + }, "node_modules/eslint-plugin-es/node_modules/eslint-utils": { "version": "2.1.0", "resolved": "https://registry.npmjs.org/eslint-utils/-/eslint-utils-2.1.0.tgz", @@ -7583,10 +7684,29 @@ "node": ">=4" } }, + "node_modules/eslint-plugin-eslint-comments": { + "version": "3.2.0", + "resolved": "https://registry.npmjs.org/eslint-plugin-eslint-comments/-/eslint-plugin-eslint-comments-3.2.0.tgz", + "integrity": "sha512-0jkOl0hfojIHHmEHgmNdqv4fmh7300NdpA9FFpF7zaoLvB/QeXOGNLIo86oAveJFrfB1p05kC8hpEMHM8DwWVQ==", + "dev": true, + "dependencies": { + "escape-string-regexp": "^1.0.5", + "ignore": "^5.0.5" + }, + "engines": { + "node": ">=6.5.0" + }, + "funding": { + "url": "https://github.com/sponsors/mysticatea" + }, + "peerDependencies": { + "eslint": ">=4.19.1" + } + }, "node_modules/eslint-plugin-jsdoc": { - "version": "48.0.3", - "resolved": "https://registry.npmjs.org/eslint-plugin-jsdoc/-/eslint-plugin-jsdoc-48.0.3.tgz", - "integrity": "sha512-+vQWLZ9QmT23yU+8yolfga6p9AtC6dUCwtVoJe4+DClvhnoGswKZcOqw+tMA/lkj5zbgr67PYWwgMvQftPx7Dw==", + "version": "48.0.4", + "resolved": "https://registry.npmjs.org/eslint-plugin-jsdoc/-/eslint-plugin-jsdoc-48.0.4.tgz", + "integrity": "sha512-A0cH+5svWPXzGZszBjXA1t0aAqVGS+/x3i02KFmb73rU0iMLnadEcVWcD/dGBZHIfAMKr3YpWh58f6wn4N909w==", "dev": true, "dependencies": { "@es-joy/jsdoccomment": "~0.41.0", @@ -7664,6 +7784,43 @@ "integrity": "sha512-L18DaJsXSUk2+42pv8mLs5jJT2hqFkFE4j21wOmgbUqsZ2hL72NsUU785g9RXgo3s0ZNgVl42TiHp3ZtOv/Vyg==", "dev": true }, + "node_modules/eslint-plugin-n": { + "version": "16.6.2", + "resolved": "https://registry.npmjs.org/eslint-plugin-n/-/eslint-plugin-n-16.6.2.tgz", + "integrity": "sha512-6TyDmZ1HXoFQXnhCTUjVFULReoBPOAjpuiKELMkeP40yffI/1ZRO+d9ug/VC6fqISo2WkuIBk3cvuRPALaWlOQ==", + "dev": true, + "dependencies": { + "@eslint-community/eslint-utils": "^4.4.0", + "builtins": "^5.0.1", + "eslint-plugin-es-x": "^7.5.0", + "get-tsconfig": "^4.7.0", + "globals": "^13.24.0", + "ignore": "^5.2.4", + "is-builtin-module": "^3.2.1", + "is-core-module": "^2.12.1", + "minimatch": "^3.1.2", + "resolve": "^1.22.2", + "semver": "^7.5.3" + }, + "engines": { + "node": ">=16.0.0" + }, + "funding": { + "url": "https://github.com/sponsors/mysticatea" + }, + "peerDependencies": { + "eslint": ">=7.0.0" + } + }, + "node_modules/eslint-plugin-n/node_modules/ignore": { + "version": "5.3.0", + "resolved": "https://registry.npmjs.org/ignore/-/ignore-5.3.0.tgz", + "integrity": "sha512-g7dmpshy+gD7mh88OC9NwSGTKoc3kyLAZQRU1mt53Aw/vnvfXnbC+F/7F7QoYVKbV+KNvJx8wArewKy1vXMtlg==", + "dev": true, + "engines": { + "node": ">= 4" + } + }, "node_modules/eslint-plugin-node": { "version": "11.1.0", "resolved": "https://registry.npmjs.org/eslint-plugin-node/-/eslint-plugin-node-11.1.0.tgz", @@ -7797,6 +7954,166 @@ "semver": "bin/semver.js" } }, + "node_modules/eslint-plugin-unicorn": { + "version": "42.0.0", + "resolved": "https://registry.npmjs.org/eslint-plugin-unicorn/-/eslint-plugin-unicorn-42.0.0.tgz", + "integrity": "sha512-ixBsbhgWuxVaNlPTT8AyfJMlhyC5flCJFjyK3oKE8TRrwBnaHvUbuIkCM1lqg8ryYrFStL/T557zfKzX4GKSlg==", + "dev": true, + "dependencies": { + "@babel/helper-validator-identifier": "^7.15.7", + "ci-info": "^3.3.0", + "clean-regexp": "^1.0.0", + "eslint-utils": "^3.0.0", + "esquery": "^1.4.0", + "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.24", + "safe-regex": "^2.1.1", + "semver": "^7.3.5", + "strip-indent": "^3.0.0" + }, + "engines": { + "node": ">=12" + }, + "funding": { + "url": "https://github.com/sindresorhus/eslint-plugin-unicorn?sponsor=1" + }, + "peerDependencies": { + "eslint": ">=8.8.0" + } + }, + "node_modules/eslint-plugin-unicorn/node_modules/ci-info": { + "version": "3.9.0", + "resolved": "https://registry.npmjs.org/ci-info/-/ci-info-3.9.0.tgz", + "integrity": "sha512-NIxF55hv4nSqQswkAeiOi1r83xy8JldOFDTWiug55KBu9Jnblncd2U6ViHmYgHf01TPZS77NJBhBMKdWj9HQMQ==", + "dev": true, + "funding": [ + { + "type": "github", + "url": "https://github.com/sponsors/sibiraj-s" + } + ], + "engines": { + "node": ">=8" + } + }, + "node_modules/eslint-plugin-unicorn/node_modules/find-up": { + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/find-up/-/find-up-4.1.0.tgz", + "integrity": "sha512-PpOwAdQ/YlXQ2vj8a3h8IipDuYRi3wceVQQGYWxNINccq40Anw7BlsEXCMbt1Zt+OLA6Fq9suIpIWD0OsnISlw==", + "dev": true, + "dependencies": { + "locate-path": "^5.0.0", + "path-exists": "^4.0.0" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/eslint-plugin-unicorn/node_modules/locate-path": { + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/locate-path/-/locate-path-5.0.0.tgz", + "integrity": "sha512-t7hw9pI+WvuwNJXwk5zVHpyhIqzg2qTlklJOf0mVxGSbe3Fp2VieZcduNYjaLDoy6p9uGpQEGWG87WpMKlNq8g==", + "dev": true, + "dependencies": { + "p-locate": "^4.1.0" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/eslint-plugin-unicorn/node_modules/p-limit": { + "version": "2.3.0", + "resolved": "https://registry.npmjs.org/p-limit/-/p-limit-2.3.0.tgz", + "integrity": "sha512-//88mFWSJx8lxCzwdAABTJL2MyWB12+eIY7MDL2SqLmAkeKU9qxRvWuSyTjm3FUmpBEMuFfckAIqEaVGUDxb6w==", + "dev": true, + "dependencies": { + "p-try": "^2.0.0" + }, + "engines": { + "node": ">=6" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/eslint-plugin-unicorn/node_modules/p-locate": { + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/p-locate/-/p-locate-4.1.0.tgz", + "integrity": "sha512-R79ZZ/0wAxKGu3oYMlz8jy/kbhsNrS7SKZ7PxEHBgJ5+F2mtFW2fK2cOtBh1cHYkQsbzFV7I+EoRKe6Yt0oK7A==", + "dev": true, + "dependencies": { + "p-limit": "^2.2.0" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/eslint-plugin-unicorn/node_modules/read-pkg": { + "version": "5.2.0", + "resolved": "https://registry.npmjs.org/read-pkg/-/read-pkg-5.2.0.tgz", + "integrity": "sha512-Ug69mNOpfvKDAc2Q8DRpMjjzdtrnv9HcSMX+4VsZxD1aZ6ZzrIE7rlzXBtWTyhULSMKg076AW6WR5iZpD0JiOg==", + "dev": true, + "dependencies": { + "@types/normalize-package-data": "^2.4.0", + "normalize-package-data": "^2.5.0", + "parse-json": "^5.0.0", + "type-fest": "^0.6.0" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/eslint-plugin-unicorn/node_modules/read-pkg-up": { + "version": "7.0.1", + "resolved": "https://registry.npmjs.org/read-pkg-up/-/read-pkg-up-7.0.1.tgz", + "integrity": "sha512-zK0TB7Xd6JpCLmlLmufqykGE+/TlOePD6qKClNW7hHDKFh/J7/7gCWGR7joEQEW1bKq3a3yUZSObOoWLFQ4ohg==", + "dev": true, + "dependencies": { + "find-up": "^4.1.0", + "read-pkg": "^5.2.0", + "type-fest": "^0.8.1" + }, + "engines": { + "node": ">=8" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/eslint-plugin-unicorn/node_modules/read-pkg/node_modules/type-fest": { + "version": "0.6.0", + "resolved": "https://registry.npmjs.org/type-fest/-/type-fest-0.6.0.tgz", + "integrity": "sha512-q+MB8nYR1KDLrgr4G5yemftpMC7/QLqVndBmEEdqzmNj5dcFOO4Oo8qlwZE3ULT3+Zim1F8Kq4cBnikNhlCMlg==", + "dev": true, + "engines": { + "node": ">=8" + } + }, + "node_modules/eslint-plugin-unicorn/node_modules/strip-indent": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/strip-indent/-/strip-indent-3.0.0.tgz", + "integrity": "sha512-laJTa3Jb+VQpaC6DseHhF7dXVqHTfJPCRDaEbid/drOhgitgYku/letMUqOXFoWV0zIIUbjpdH2t+tYj4bQMRQ==", + "dev": true, + "dependencies": { + "min-indent": "^1.0.0" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/eslint-plugin-unicorn/node_modules/type-fest": { + "version": "0.8.1", + "resolved": "https://registry.npmjs.org/type-fest/-/type-fest-0.8.1.tgz", + "integrity": "sha512-4dbzIzqvjtgiM5rw1k5rEHtBANKmdudhGyBEajN01fEyhaAIhsoKNy6y7+IN93IfpFtwY9iqi7kD+xwKhQsNJA==", + "dev": true, + "engines": { + "node": ">=8" + } + }, "node_modules/eslint-scope": { "version": "5.1.1", "resolved": "https://registry.npmjs.org/eslint-scope/-/eslint-scope-5.1.1.tgz", @@ -7819,6 +8136,33 @@ "node": ">=4.0" } }, + "node_modules/eslint-utils": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/eslint-utils/-/eslint-utils-3.0.0.tgz", + "integrity": "sha512-uuQC43IGctw68pJA1RgbQS8/NP7rch6Cwd4j3ZBtgo4/8Flj4eGE7ZYSZRN3iq5pVUv6GPdW5Z1RFleo84uLDA==", + "dev": true, + "dependencies": { + "eslint-visitor-keys": "^2.0.0" + }, + "engines": { + "node": "^10.0.0 || ^12.0.0 || >= 14.0.0" + }, + "funding": { + "url": "https://github.com/sponsors/mysticatea" + }, + "peerDependencies": { + "eslint": ">=5" + } + }, + "node_modules/eslint-utils/node_modules/eslint-visitor-keys": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/eslint-visitor-keys/-/eslint-visitor-keys-2.1.0.tgz", + "integrity": "sha512-0rSmRBzXgDzIsD6mGdJgevzgezI534Cer5L/vyMX0kHzT/jiB43jRhd9YUlMGYLQy2zprNmoT8qasCGtY+QaKw==", + "dev": true, + "engines": { + "node": ">=10" + } + }, "node_modules/eslint-visitor-keys": { "version": "3.4.3", "resolved": "https://registry.npmjs.org/eslint-visitor-keys/-/eslint-visitor-keys-3.4.3.tgz", @@ -8887,6 +9231,18 @@ "url": "https://github.com/sponsors/ljharb" } }, + "node_modules/get-tsconfig": { + "version": "4.7.2", + "resolved": "https://registry.npmjs.org/get-tsconfig/-/get-tsconfig-4.7.2.tgz", + "integrity": "sha512-wuMsz4leaj5hbGgg4IvDU0bqJagpftG5l5cXIAvo8uZrqn0NJqwtfupTN00VnkQJPcIRrxYrm1Ue24btpCha2A==", + "dev": true, + "dependencies": { + "resolve-pkg-maps": "^1.0.0" + }, + "funding": { + "url": "https://github.com/privatenumber/get-tsconfig?sponsor=1" + } + }, "node_modules/getpass": { "version": "0.1.7", "resolved": "https://registry.npmjs.org/getpass/-/getpass-0.1.7.tgz", @@ -9262,17 +9618,6 @@ "node": ">=6" } }, - "node_modules/has": { - "version": "1.0.3", - "resolved": "https://registry.npmjs.org/has/-/has-1.0.3.tgz", - "integrity": "sha512-f2dvO0VU6Oej7RkWJGrehjbzMAjFp5/VKPp5tTpWIV4JHHZK1/BxbFRtf/siA2SWTe09caDmVtYYzWEIbBS4zw==", - "dependencies": { - "function-bind": "^1.1.1" - }, - "engines": { - "node": ">= 0.4.0" - } - }, "node_modules/has-ansi": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/has-ansi/-/has-ansi-2.0.0.tgz", @@ -9447,7 +9792,6 @@ "version": "2.0.0", "resolved": "https://registry.npmjs.org/hasown/-/hasown-2.0.0.tgz", "integrity": "sha512-vUptKVTpIJhcczKBbgnS+RtcuYMB8+oNzPK2/Hp3hanz8JmpATdmmgLgSaadVREkDm+e2giHwY3ZRkyjSIDDFA==", - "dev": true, "dependencies": { "function-bind": "^1.1.2" }, @@ -10231,11 +10575,11 @@ } }, "node_modules/is-core-module": { - "version": "2.9.0", - "resolved": "https://registry.npmjs.org/is-core-module/-/is-core-module-2.9.0.tgz", - "integrity": "sha512-+5FPy5PnwmO3lvfMb0AsoPaBG+5KHUI0wYFXOtYPnVVVspTFUuMZNfNaNVRt3FZadstu2c8x23vykRW/NBoU6A==", + "version": "2.13.1", + "resolved": "https://registry.npmjs.org/is-core-module/-/is-core-module-2.13.1.tgz", + "integrity": "sha512-hHrIjvZsftOsvKSn2TRYl63zvxsgE0K+0mYMoH6gD4omR5IWB2KynivBQczo3+wF1cCkjzvptnI9Q0sPU66ilw==", "dependencies": { - "has": "^1.0.3" + "hasown": "^2.0.0" }, "funding": { "url": "https://github.com/sponsors/ljharb" @@ -14068,6 +14412,15 @@ "url": "https://github.com/sponsors/sindresorhus" } }, + "node_modules/pluralize": { + "version": "8.0.0", + "resolved": "https://registry.npmjs.org/pluralize/-/pluralize-8.0.0.tgz", + "integrity": "sha512-Nc3IT5yHzflTfbjgqWcCPpo7DaKy4FnpB0l/zCAW0Tc7jxAiuqSxHasntB3D7887LSrA93kDJ9IXovxJYxyLCA==", + "dev": true, + "engines": { + "node": ">=4" + } + }, "node_modules/postcss": { "version": "8.4.17", "resolved": "https://registry.npmjs.org/postcss/-/postcss-8.4.17.tgz", @@ -15482,6 +15835,15 @@ "@babel/runtime": "^7.8.4" } }, + "node_modules/regexp-tree": { + "version": "0.1.27", + "resolved": "https://registry.npmjs.org/regexp-tree/-/regexp-tree-0.1.27.tgz", + "integrity": "sha512-iETxpjK6YoRWJG5o6hXLwvjYAoW+FEZn9os0PD/b6AP6xQwsa/Y7lCVgIixBbUPMfhu+i2LtdeAqVTgGlQarfA==", + "dev": true, + "bin": { + "regexp-tree": "bin/regexp-tree" + } + }, "node_modules/regexp.prototype.flags": { "version": "1.5.1", "resolved": "https://registry.npmjs.org/regexp.prototype.flags/-/regexp.prototype.flags-1.5.1.tgz", @@ -15655,12 +16017,19 @@ } }, "node_modules/resolve": { - "version": "1.20.0", - "resolved": "https://registry.npmjs.org/resolve/-/resolve-1.20.0.tgz", - "integrity": "sha512-wENBPt4ySzg4ybFQW2TT1zMQucPK95HSh/nq2CFTZVOGut2+pQvSsgtda4d26YrYcr067wjbmzOG8byDPBX63A==", + "version": "1.22.8", + "resolved": "https://registry.npmjs.org/resolve/-/resolve-1.22.8.tgz", + "integrity": "sha512-oKWePCxqpd6FlLvGV1VU0x7bkPmmCNolxzjMf4NczoDnQcIWrAF+cPtZn5i6n+RfD2d9i0tzpKnG6Yk168yIyw==", "dependencies": { - "is-core-module": "^2.2.0", - "path-parse": "^1.0.6" + "is-core-module": "^2.13.0", + "path-parse": "^1.0.7", + "supports-preserve-symlinks-flag": "^1.0.0" + }, + "bin": { + "resolve": "bin/resolve" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" } }, "node_modules/resolve-cwd": { @@ -15692,6 +16061,15 @@ "node": ">=4" } }, + "node_modules/resolve-pkg-maps": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/resolve-pkg-maps/-/resolve-pkg-maps-1.0.0.tgz", + "integrity": "sha512-seS2Tj26TBVOC2NIc2rOe2y2ZO7efxITtLZcGSOnHHNOQ7CkiUBfw0Iw2ck6xkIhPwLhKNLS8BO+hEpngQlqzw==", + "dev": true, + "funding": { + "url": "https://github.com/privatenumber/resolve-pkg-maps?sponsor=1" + } + }, "node_modules/responselike": { "version": "1.0.2", "resolved": "https://registry.npmjs.org/responselike/-/responselike-1.0.2.tgz", @@ -15821,6 +16199,15 @@ "resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.1.2.tgz", "integrity": "sha512-Gd2UZBJDkXlY7GbJxfsE8/nvKkUEU1G38c1siN6QP6a9PT9MmHB8GnpscSmMJSoF8LOIrt8ud/wPtojys4G6+g==" }, + "node_modules/safe-regex": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/safe-regex/-/safe-regex-2.1.1.tgz", + "integrity": "sha512-rx+x8AMzKb5Q5lQ95Zoi6ZbJqwCLkqi3XuJXp5P3rT8OEc6sZCJG5AE5dU3lsgRr/F4Bs31jSlVN+j5KrsGu9A==", + "dev": true, + "dependencies": { + "regexp-tree": "~0.1.1" + } + }, "node_modules/safe-regex-test": { "version": "1.0.2", "resolved": "https://registry.npmjs.org/safe-regex-test/-/safe-regex-test-1.0.2.tgz", @@ -17505,7 +17892,6 @@ "version": "1.0.0", "resolved": "https://registry.npmjs.org/supports-preserve-symlinks-flag/-/supports-preserve-symlinks-flag-1.0.0.tgz", "integrity": "sha512-ot0WnXS9fgdkgIcePe6RHNk1WA8+muPa6cSjeR3V8K27q9BB1rTE3R1p7Hv0z1ZyAc8s6Vvv8DIyWf681MAt0w==", - "dev": true, "engines": { "node": ">= 0.4" }, @@ -23436,6 +23822,15 @@ "integrity": "sha512-HpGFw18DgFWlncDfjTa2rcQ4W88O1mC8e8yZ2AvQY5KDaktSTwo+KRf6nHK6FRI5FyRyb/5T6+TSxfP7QyGsmQ==", "dev": true }, + "builtins": { + "version": "5.0.1", + "resolved": "https://registry.npmjs.org/builtins/-/builtins-5.0.1.tgz", + "integrity": "sha512-qwVpFEHNfhYJIzNRBvd2C1kyo6jz3ZSMPyyuR47OPdiKWlbYnZNyDWuyR175qDnAJLiCo5fBBqPb3RiXgWlkOQ==", + "dev": true, + "requires": { + "semver": "^7.0.0" + } + }, "cacheable-request": { "version": "2.1.4", "resolved": "https://registry.npmjs.org/cacheable-request/-/cacheable-request-2.1.4.tgz", @@ -23642,6 +24037,15 @@ "source-map": "~0.6.0" } }, + "clean-regexp": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/clean-regexp/-/clean-regexp-1.0.0.tgz", + "integrity": "sha512-GfisEZEJvzKrmGWkvfhgzcz/BllN1USeqD2V6tg14OAOgaCD2Z/PUEuxnAZ/nPvmaHRG7a8y77p1T/IRQ4D1Hw==", + "dev": true, + "requires": { + "escape-string-regexp": "^1.0.5" + } + }, "clean-stack": { "version": "2.2.0", "resolved": "https://registry.npmjs.org/clean-stack/-/clean-stack-2.2.0.tgz", @@ -25341,13 +25745,61 @@ } } }, - "eslint-config-eslint": { - "version": "7.0.0", - "resolved": "https://registry.npmjs.org/eslint-config-eslint/-/eslint-config-eslint-7.0.0.tgz", - "integrity": "sha512-gxUttladfTQaJKmSh9jbrN4Qba27yYBVwp0YsaOqjEWtOZYtc+MOgoWFh2x4Ewxjqr8sZZS1yTguXgoktzXOvQ==", + "eslint-compat-utils": { + "version": "0.1.2", + "resolved": "https://registry.npmjs.org/eslint-compat-utils/-/eslint-compat-utils-0.1.2.tgz", + "integrity": "sha512-Jia4JDldWnFNIru1Ehx1H5s9/yxiRHY/TimCuUc0jNexew3cF1gI6CYZil1ociakfWO3rRqFjl1mskBblB3RYg==", "dev": true, "requires": {} }, + "eslint-config-eslint": { + "version": "9.0.0", + "resolved": "https://registry.npmjs.org/eslint-config-eslint/-/eslint-config-eslint-9.0.0.tgz", + "integrity": "sha512-91lXzIbVGN1u4eyaos0E0W49FzjZbwia8x8/vIbjGaTrQ5F9i0H2hbu8AvOmW6vzTIr2srwgrgPTMlJiC3J0Xg==", + "dev": true, + "requires": { + "@eslint/js": "^8.42.0", + "eslint-plugin-eslint-comments": "^3.2.0", + "eslint-plugin-jsdoc": "^46.2.5", + "eslint-plugin-n": "^16.0.0", + "eslint-plugin-unicorn": "^42.0.0" + }, + "dependencies": { + "escape-string-regexp": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/escape-string-regexp/-/escape-string-regexp-4.0.0.tgz", + "integrity": "sha512-TtpcNJ3XAzx3Gq8sWRzJaVajRs0uVxA2YAkdb1jm2YkPz4G6egUFAyA3n5vtEIZefPk5Wa4UXbKuS5fKkJWdgA==", + "dev": true + }, + "eslint-plugin-jsdoc": { + "version": "46.10.1", + "resolved": "https://registry.npmjs.org/eslint-plugin-jsdoc/-/eslint-plugin-jsdoc-46.10.1.tgz", + "integrity": "sha512-x8wxIpv00Y50NyweDUpa+58ffgSAI5sqe+zcZh33xphD0AVh+1kqr1ombaTRb7Fhpove1zfUuujlX9DWWBP5ag==", + "dev": true, + "requires": { + "@es-joy/jsdoccomment": "~0.41.0", + "are-docs-informative": "^0.0.2", + "comment-parser": "1.4.1", + "debug": "^4.3.4", + "escape-string-regexp": "^4.0.0", + "esquery": "^1.5.0", + "is-builtin-module": "^3.2.1", + "semver": "^7.5.4", + "spdx-expression-parse": "^4.0.0" + } + }, + "spdx-expression-parse": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/spdx-expression-parse/-/spdx-expression-parse-4.0.0.tgz", + "integrity": "sha512-Clya5JIij/7C6bRR22+tnGXbc4VKlibKSVj2iHvVeX5iMW7s1SIQlqu699JkODJJIhh/pUu8L0/VLh8xflD+LQ==", + "dev": true, + "requires": { + "spdx-exceptions": "^2.1.0", + "spdx-license-ids": "^3.0.0" + } + } + } + }, "eslint-plugin-es": { "version": "3.0.1", "resolved": "https://registry.npmjs.org/eslint-plugin-es/-/eslint-plugin-es-3.0.1.tgz", @@ -25375,10 +25827,31 @@ } } }, + "eslint-plugin-es-x": { + "version": "7.5.0", + "resolved": "https://registry.npmjs.org/eslint-plugin-es-x/-/eslint-plugin-es-x-7.5.0.tgz", + "integrity": "sha512-ODswlDSO0HJDzXU0XvgZ3lF3lS3XAZEossh15Q2UHjwrJggWeBoKqqEsLTZLXl+dh5eOAozG0zRcYtuE35oTuQ==", + "dev": true, + "requires": { + "@eslint-community/eslint-utils": "^4.1.2", + "@eslint-community/regexpp": "^4.6.0", + "eslint-compat-utils": "^0.1.2" + } + }, + "eslint-plugin-eslint-comments": { + "version": "3.2.0", + "resolved": "https://registry.npmjs.org/eslint-plugin-eslint-comments/-/eslint-plugin-eslint-comments-3.2.0.tgz", + "integrity": "sha512-0jkOl0hfojIHHmEHgmNdqv4fmh7300NdpA9FFpF7zaoLvB/QeXOGNLIo86oAveJFrfB1p05kC8hpEMHM8DwWVQ==", + "dev": true, + "requires": { + "escape-string-regexp": "^1.0.5", + "ignore": "^5.0.5" + } + }, "eslint-plugin-jsdoc": { - "version": "48.0.3", - "resolved": "https://registry.npmjs.org/eslint-plugin-jsdoc/-/eslint-plugin-jsdoc-48.0.3.tgz", - "integrity": "sha512-+vQWLZ9QmT23yU+8yolfga6p9AtC6dUCwtVoJe4+DClvhnoGswKZcOqw+tMA/lkj5zbgr67PYWwgMvQftPx7Dw==", + "version": "48.0.4", + "resolved": "https://registry.npmjs.org/eslint-plugin-jsdoc/-/eslint-plugin-jsdoc-48.0.4.tgz", + "integrity": "sha512-A0cH+5svWPXzGZszBjXA1t0aAqVGS+/x3i02KFmb73rU0iMLnadEcVWcD/dGBZHIfAMKr3YpWh58f6wn4N909w==", "dev": true, "requires": { "@es-joy/jsdoccomment": "~0.41.0", @@ -25442,6 +25915,33 @@ } } }, + "eslint-plugin-n": { + "version": "16.6.2", + "resolved": "https://registry.npmjs.org/eslint-plugin-n/-/eslint-plugin-n-16.6.2.tgz", + "integrity": "sha512-6TyDmZ1HXoFQXnhCTUjVFULReoBPOAjpuiKELMkeP40yffI/1ZRO+d9ug/VC6fqISo2WkuIBk3cvuRPALaWlOQ==", + "dev": true, + "requires": { + "@eslint-community/eslint-utils": "^4.4.0", + "builtins": "^5.0.1", + "eslint-plugin-es-x": "^7.5.0", + "get-tsconfig": "^4.7.0", + "globals": "^13.24.0", + "ignore": "^5.2.4", + "is-builtin-module": "^3.2.1", + "is-core-module": "^2.12.1", + "minimatch": "^3.1.2", + "resolve": "^1.22.2", + "semver": "^7.5.3" + }, + "dependencies": { + "ignore": { + "version": "5.3.0", + "resolved": "https://registry.npmjs.org/ignore/-/ignore-5.3.0.tgz", + "integrity": "sha512-g7dmpshy+gD7mh88OC9NwSGTKoc3kyLAZQRU1mt53Aw/vnvfXnbC+F/7F7QoYVKbV+KNvJx8wArewKy1vXMtlg==", + "dev": true + } + } + }, "eslint-plugin-node": { "version": "11.1.0", "resolved": "https://registry.npmjs.org/eslint-plugin-node/-/eslint-plugin-node-11.1.0.tgz", @@ -25538,6 +26038,119 @@ "dev": true, "requires": {} }, + "eslint-plugin-unicorn": { + "version": "42.0.0", + "resolved": "https://registry.npmjs.org/eslint-plugin-unicorn/-/eslint-plugin-unicorn-42.0.0.tgz", + "integrity": "sha512-ixBsbhgWuxVaNlPTT8AyfJMlhyC5flCJFjyK3oKE8TRrwBnaHvUbuIkCM1lqg8ryYrFStL/T557zfKzX4GKSlg==", + "dev": true, + "requires": { + "@babel/helper-validator-identifier": "^7.15.7", + "ci-info": "^3.3.0", + "clean-regexp": "^1.0.0", + "eslint-utils": "^3.0.0", + "esquery": "^1.4.0", + "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.24", + "safe-regex": "^2.1.1", + "semver": "^7.3.5", + "strip-indent": "^3.0.0" + }, + "dependencies": { + "ci-info": { + "version": "3.9.0", + "resolved": "https://registry.npmjs.org/ci-info/-/ci-info-3.9.0.tgz", + "integrity": "sha512-NIxF55hv4nSqQswkAeiOi1r83xy8JldOFDTWiug55KBu9Jnblncd2U6ViHmYgHf01TPZS77NJBhBMKdWj9HQMQ==", + "dev": true + }, + "find-up": { + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/find-up/-/find-up-4.1.0.tgz", + "integrity": "sha512-PpOwAdQ/YlXQ2vj8a3h8IipDuYRi3wceVQQGYWxNINccq40Anw7BlsEXCMbt1Zt+OLA6Fq9suIpIWD0OsnISlw==", + "dev": true, + "requires": { + "locate-path": "^5.0.0", + "path-exists": "^4.0.0" + } + }, + "locate-path": { + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/locate-path/-/locate-path-5.0.0.tgz", + "integrity": "sha512-t7hw9pI+WvuwNJXwk5zVHpyhIqzg2qTlklJOf0mVxGSbe3Fp2VieZcduNYjaLDoy6p9uGpQEGWG87WpMKlNq8g==", + "dev": true, + "requires": { + "p-locate": "^4.1.0" + } + }, + "p-limit": { + "version": "2.3.0", + "resolved": "https://registry.npmjs.org/p-limit/-/p-limit-2.3.0.tgz", + "integrity": "sha512-//88mFWSJx8lxCzwdAABTJL2MyWB12+eIY7MDL2SqLmAkeKU9qxRvWuSyTjm3FUmpBEMuFfckAIqEaVGUDxb6w==", + "dev": true, + "requires": { + "p-try": "^2.0.0" + } + }, + "p-locate": { + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/p-locate/-/p-locate-4.1.0.tgz", + "integrity": "sha512-R79ZZ/0wAxKGu3oYMlz8jy/kbhsNrS7SKZ7PxEHBgJ5+F2mtFW2fK2cOtBh1cHYkQsbzFV7I+EoRKe6Yt0oK7A==", + "dev": true, + "requires": { + "p-limit": "^2.2.0" + } + }, + "read-pkg": { + "version": "5.2.0", + "resolved": "https://registry.npmjs.org/read-pkg/-/read-pkg-5.2.0.tgz", + "integrity": "sha512-Ug69mNOpfvKDAc2Q8DRpMjjzdtrnv9HcSMX+4VsZxD1aZ6ZzrIE7rlzXBtWTyhULSMKg076AW6WR5iZpD0JiOg==", + "dev": true, + "requires": { + "@types/normalize-package-data": "^2.4.0", + "normalize-package-data": "^2.5.0", + "parse-json": "^5.0.0", + "type-fest": "^0.6.0" + }, + "dependencies": { + "type-fest": { + "version": "0.6.0", + "resolved": "https://registry.npmjs.org/type-fest/-/type-fest-0.6.0.tgz", + "integrity": "sha512-q+MB8nYR1KDLrgr4G5yemftpMC7/QLqVndBmEEdqzmNj5dcFOO4Oo8qlwZE3ULT3+Zim1F8Kq4cBnikNhlCMlg==", + "dev": true + } + } + }, + "read-pkg-up": { + "version": "7.0.1", + "resolved": "https://registry.npmjs.org/read-pkg-up/-/read-pkg-up-7.0.1.tgz", + "integrity": "sha512-zK0TB7Xd6JpCLmlLmufqykGE+/TlOePD6qKClNW7hHDKFh/J7/7gCWGR7joEQEW1bKq3a3yUZSObOoWLFQ4ohg==", + "dev": true, + "requires": { + "find-up": "^4.1.0", + "read-pkg": "^5.2.0", + "type-fest": "^0.8.1" + } + }, + "strip-indent": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/strip-indent/-/strip-indent-3.0.0.tgz", + "integrity": "sha512-laJTa3Jb+VQpaC6DseHhF7dXVqHTfJPCRDaEbid/drOhgitgYku/letMUqOXFoWV0zIIUbjpdH2t+tYj4bQMRQ==", + "dev": true, + "requires": { + "min-indent": "^1.0.0" + } + }, + "type-fest": { + "version": "0.8.1", + "resolved": "https://registry.npmjs.org/type-fest/-/type-fest-0.8.1.tgz", + "integrity": "sha512-4dbzIzqvjtgiM5rw1k5rEHtBANKmdudhGyBEajN01fEyhaAIhsoKNy6y7+IN93IfpFtwY9iqi7kD+xwKhQsNJA==", + "dev": true + } + } + }, "eslint-scope": { "version": "5.1.1", "resolved": "https://registry.npmjs.org/eslint-scope/-/eslint-scope-5.1.1.tgz", @@ -25556,6 +26169,23 @@ } } }, + "eslint-utils": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/eslint-utils/-/eslint-utils-3.0.0.tgz", + "integrity": "sha512-uuQC43IGctw68pJA1RgbQS8/NP7rch6Cwd4j3ZBtgo4/8Flj4eGE7ZYSZRN3iq5pVUv6GPdW5Z1RFleo84uLDA==", + "dev": true, + "requires": { + "eslint-visitor-keys": "^2.0.0" + }, + "dependencies": { + "eslint-visitor-keys": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/eslint-visitor-keys/-/eslint-visitor-keys-2.1.0.tgz", + "integrity": "sha512-0rSmRBzXgDzIsD6mGdJgevzgezI534Cer5L/vyMX0kHzT/jiB43jRhd9YUlMGYLQy2zprNmoT8qasCGtY+QaKw==", + "dev": true + } + } + }, "eslint-visitor-keys": { "version": "3.4.3", "resolved": "https://registry.npmjs.org/eslint-visitor-keys/-/eslint-visitor-keys-3.4.3.tgz", @@ -26234,6 +26864,15 @@ "get-intrinsic": "^1.1.1" } }, + "get-tsconfig": { + "version": "4.7.2", + "resolved": "https://registry.npmjs.org/get-tsconfig/-/get-tsconfig-4.7.2.tgz", + "integrity": "sha512-wuMsz4leaj5hbGgg4IvDU0bqJagpftG5l5cXIAvo8uZrqn0NJqwtfupTN00VnkQJPcIRrxYrm1Ue24btpCha2A==", + "dev": true, + "requires": { + "resolve-pkg-maps": "^1.0.0" + } + }, "getpass": { "version": "0.1.7", "resolved": "https://registry.npmjs.org/getpass/-/getpass-0.1.7.tgz", @@ -26510,14 +27149,6 @@ "integrity": "sha512-VIZB+ibDhx7ObhAe7OVtoEbuP4h/MuOTHJ+J8h/eBXotJYl0fBgR72xDFCKgIh22OJZIOVNxBMWuhAr10r8HdA==", "dev": true }, - "has": { - "version": "1.0.3", - "resolved": "https://registry.npmjs.org/has/-/has-1.0.3.tgz", - "integrity": "sha512-f2dvO0VU6Oej7RkWJGrehjbzMAjFp5/VKPp5tTpWIV4JHHZK1/BxbFRtf/siA2SWTe09caDmVtYYzWEIbBS4zw==", - "requires": { - "function-bind": "^1.1.1" - } - }, "has-ansi": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/has-ansi/-/has-ansi-2.0.0.tgz", @@ -26640,7 +27271,6 @@ "version": "2.0.0", "resolved": "https://registry.npmjs.org/hasown/-/hasown-2.0.0.tgz", "integrity": "sha512-vUptKVTpIJhcczKBbgnS+RtcuYMB8+oNzPK2/Hp3hanz8JmpATdmmgLgSaadVREkDm+e2giHwY3ZRkyjSIDDFA==", - "dev": true, "requires": { "function-bind": "^1.1.2" } @@ -27217,11 +27847,11 @@ } }, "is-core-module": { - "version": "2.9.0", - "resolved": "https://registry.npmjs.org/is-core-module/-/is-core-module-2.9.0.tgz", - "integrity": "sha512-+5FPy5PnwmO3lvfMb0AsoPaBG+5KHUI0wYFXOtYPnVVVspTFUuMZNfNaNVRt3FZadstu2c8x23vykRW/NBoU6A==", + "version": "2.13.1", + "resolved": "https://registry.npmjs.org/is-core-module/-/is-core-module-2.13.1.tgz", + "integrity": "sha512-hHrIjvZsftOsvKSn2TRYl63zvxsgE0K+0mYMoH6gD4omR5IWB2KynivBQczo3+wF1cCkjzvptnI9Q0sPU66ilw==", "requires": { - "has": "^1.0.3" + "hasown": "^2.0.0" } }, "is-date-object": { @@ -30157,6 +30787,12 @@ "irregular-plurals": "^3.2.0" } }, + "pluralize": { + "version": "8.0.0", + "resolved": "https://registry.npmjs.org/pluralize/-/pluralize-8.0.0.tgz", + "integrity": "sha512-Nc3IT5yHzflTfbjgqWcCPpo7DaKy4FnpB0l/zCAW0Tc7jxAiuqSxHasntB3D7887LSrA93kDJ9IXovxJYxyLCA==", + "dev": true + }, "postcss": { "version": "8.4.17", "resolved": "https://registry.npmjs.org/postcss/-/postcss-8.4.17.tgz", @@ -31224,6 +31860,12 @@ "@babel/runtime": "^7.8.4" } }, + "regexp-tree": { + "version": "0.1.27", + "resolved": "https://registry.npmjs.org/regexp-tree/-/regexp-tree-0.1.27.tgz", + "integrity": "sha512-iETxpjK6YoRWJG5o6hXLwvjYAoW+FEZn9os0PD/b6AP6xQwsa/Y7lCVgIixBbUPMfhu+i2LtdeAqVTgGlQarfA==", + "dev": true + }, "regexp.prototype.flags": { "version": "1.5.1", "resolved": "https://registry.npmjs.org/regexp.prototype.flags/-/regexp.prototype.flags-1.5.1.tgz", @@ -31355,12 +31997,13 @@ "dev": true }, "resolve": { - "version": "1.20.0", - "resolved": "https://registry.npmjs.org/resolve/-/resolve-1.20.0.tgz", - "integrity": "sha512-wENBPt4ySzg4ybFQW2TT1zMQucPK95HSh/nq2CFTZVOGut2+pQvSsgtda4d26YrYcr067wjbmzOG8byDPBX63A==", + "version": "1.22.8", + "resolved": "https://registry.npmjs.org/resolve/-/resolve-1.22.8.tgz", + "integrity": "sha512-oKWePCxqpd6FlLvGV1VU0x7bkPmmCNolxzjMf4NczoDnQcIWrAF+cPtZn5i6n+RfD2d9i0tzpKnG6Yk168yIyw==", "requires": { - "is-core-module": "^2.2.0", - "path-parse": "^1.0.6" + "is-core-module": "^2.13.0", + "path-parse": "^1.0.7", + "supports-preserve-symlinks-flag": "^1.0.0" } }, "resolve-cwd": { @@ -31385,6 +32028,12 @@ "resolved": "https://registry.npmjs.org/resolve-from/-/resolve-from-4.0.0.tgz", "integrity": "sha512-pb/MYmXstAkysRFx8piNI1tGFNQIFA3vkE3Gq4EuA1dF6gHp/+vgZqsCGJapvy8N3Q+4o7FwvquPJcnZ7RYy4g==" }, + "resolve-pkg-maps": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/resolve-pkg-maps/-/resolve-pkg-maps-1.0.0.tgz", + "integrity": "sha512-seS2Tj26TBVOC2NIc2rOe2y2ZO7efxITtLZcGSOnHHNOQ7CkiUBfw0Iw2ck6xkIhPwLhKNLS8BO+hEpngQlqzw==", + "dev": true + }, "responselike": { "version": "1.0.2", "resolved": "https://registry.npmjs.org/responselike/-/responselike-1.0.2.tgz", @@ -31488,6 +32137,15 @@ "resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.1.2.tgz", "integrity": "sha512-Gd2UZBJDkXlY7GbJxfsE8/nvKkUEU1G38c1siN6QP6a9PT9MmHB8GnpscSmMJSoF8LOIrt8ud/wPtojys4G6+g==" }, + "safe-regex": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/safe-regex/-/safe-regex-2.1.1.tgz", + "integrity": "sha512-rx+x8AMzKb5Q5lQ95Zoi6ZbJqwCLkqi3XuJXp5P3rT8OEc6sZCJG5AE5dU3lsgRr/F4Bs31jSlVN+j5KrsGu9A==", + "dev": true, + "requires": { + "regexp-tree": "~0.1.1" + } + }, "safe-regex-test": { "version": "1.0.2", "resolved": "https://registry.npmjs.org/safe-regex-test/-/safe-regex-test-1.0.2.tgz", @@ -32761,8 +33419,7 @@ "supports-preserve-symlinks-flag": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/supports-preserve-symlinks-flag/-/supports-preserve-symlinks-flag-1.0.0.tgz", - "integrity": "sha512-ot0WnXS9fgdkgIcePe6RHNk1WA8+muPa6cSjeR3V8K27q9BB1rTE3R1p7Hv0z1ZyAc8s6Vvv8DIyWf681MAt0w==", - "dev": true + "integrity": "sha512-ot0WnXS9fgdkgIcePe6RHNk1WA8+muPa6cSjeR3V8K27q9BB1rTE3R1p7Hv0z1ZyAc8s6Vvv8DIyWf681MAt0w==" }, "svg-tags": { "version": "1.0.0", diff --git a/package.json b/package.json index dcfd6da679..2410c0b008 100644 --- a/package.json +++ b/package.json @@ -71,8 +71,8 @@ "eleventy-plugin-page-assets": "^0.3.0", "eleventy-plugin-reading-time": "^0.0.1", "eslint": "^8.56.0", - "eslint-config-eslint": "^7.0.0", - "eslint-plugin-jsdoc": "^48.0.3", + "eslint-config-eslint": "^9.0.0", + "eslint-plugin-jsdoc": "^48.0.4", "eslint-plugin-jsx-a11y": "^6.8.0", "eslint-plugin-node": "^11.1.0", "eslint-plugin-react": "^7.33.2", diff --git a/src/playground/utils/codemirror-linter-extension.js b/src/playground/utils/codemirror-linter-extension.js index 7773ad7b3a..54f1a2df1d 100644 --- a/src/playground/utils/codemirror-linter-extension.js +++ b/src/playground/utils/codemirror-linter-extension.js @@ -1,4 +1,4 @@ -/* eslint-disable no-use-before-define, no-param-reassign */ +/* eslint-disable no-use-before-define, no-param-reassign, jsdoc/check-tag-names, eslint-comments/disable-enable-pair, eslint-comments/require-description -- Code follows 3rd party styles */ /** * This file is inspired from @codemirror/lint package https://github.com/codemirror/lint * We added custom styles and tooltips content as per our theme and design @@ -92,11 +92,11 @@ function setDiagnostics(state, diagnostics) { * The state effect that updates the set of active diagnostics. Can * be useful when writing an extension that needs to track these. */ -const setDiagnosticsEffect = /* @__PURE__*/StateEffect.define(); -const togglePanel = /* @__PURE__*/StateEffect.define(); -const movePanelSelection = /* @__PURE__*/StateEffect.define(); +const setDiagnosticsEffect = /** @__PURE__*/StateEffect.define(); +const togglePanel = /** @__PURE__*/StateEffect.define(); +const movePanelSelection = /** @__PURE__*/StateEffect.define(); -const lintState = /* @__PURE__*/StateField.define({ +const lintState = /** @__PURE__*/StateField.define({ create() { return new LintState(Decoration.none, null, null); }, @@ -127,7 +127,7 @@ const lintState = /* @__PURE__*/StateField.define({ EditorView.decorations.from(f, s => s.diagnostics)] }); -const activeMark = /* @__PURE__*/Decoration.mark({ class: "cm-lintRange cm-lintRange-active" }); +const activeMark = /** @__PURE__*/Decoration.mark({ class: "cm-lintRange cm-lintRange-active" }); function lintTooltip(view, pos, side) { const { diagnostics } = view.state.field(lintState); @@ -173,7 +173,7 @@ const closeLintPanel = view => { return true; }; -const lintPlugin = /* @__PURE__*/ViewPlugin.fromClass(class { +const lintPlugin = /** @__PURE__*/ViewPlugin.fromClass(class { constructor(view) { this.view = view; this.timeout = -1; @@ -227,7 +227,7 @@ const lintPlugin = /* @__PURE__*/ViewPlugin.fromClass(class { } }); -const lintSource = /* @__PURE__*/Facet.define({ +const lintSource = /** @__PURE__*/Facet.define({ combine(input) { return { sources: input.map(i => i.source), delay: input.length ? Math.max(...input.map(i => i.delay)) : 750 }; }, @@ -503,15 +503,15 @@ function svg(content, attrs = "viewBox=\"0 0 40 40\"") { function underline(color) { return svg(``, "width=\"6\" height=\"3\""); } -const baseTheme = /* @__PURE__*/EditorView.baseTheme({ +const baseTheme = /** @__PURE__*/EditorView.baseTheme({ ".cm-lintRange": { backgroundPosition: "left bottom", backgroundRepeat: "repeat-x", paddingBottom: "0.7px" }, - ".cm-lintRange-error": { backgroundImage: /* @__PURE__*/underline("#d11") }, - ".cm-lintRange-warning": { backgroundImage: /* @__PURE__*/underline("orange") }, - ".cm-lintRange-info": { backgroundImage: /* @__PURE__*/underline("#999") }, + ".cm-lintRange-error": { backgroundImage: /** @__PURE__*/underline("#d11") }, + ".cm-lintRange-warning": { backgroundImage: /** @__PURE__*/underline("orange") }, + ".cm-lintRange-info": { backgroundImage: /** @__PURE__*/underline("#999") }, ".cm-lintRange-active": { backgroundColor: "#ffdd9980" }, ".cm-lintPoint": { position: "relative", diff --git a/tools/add-author.js b/tools/add-author.js index 577733c8a0..6d05561c2d 100644 --- a/tools/add-author.js +++ b/tools/add-author.js @@ -4,7 +4,7 @@ * @author Nicholas C. Zakas */ -/* eslint camelcase: [error, { properties: never }] */ +/* eslint camelcase: [error, { properties: never }] -- API response */ "use strict"; @@ -38,7 +38,7 @@ const octokit = new Octokit({ userAgent: "ESLint Website" }); -async function fetchUserProfile(username) { +async function fetchUserProfile() { const { data: profile } = await octokit.users.getByUsername({ username }); @@ -63,7 +63,7 @@ async function fetchUserProfile(username) { // fetch author info from GitHub const authors = JSON.parse(await fs.readFile(authorsFilename, "utf8")); - const profile = await fetchUserProfile(username); + const profile = await fetchUserProfile(); authors[profile.username] = profile; diff --git a/tools/fetch-sponsors.js b/tools/fetch-sponsors.js index 88b18fb5e9..e84a49c7ed 100644 --- a/tools/fetch-sponsors.js +++ b/tools/fetch-sponsors.js @@ -9,7 +9,7 @@ * @author Nicholas C. Zakas */ -/* eslint camelcase: [error, { properties: never }] */ +/* eslint camelcase: [error, { properties: never }] -- API response */ "use strict"; @@ -149,7 +149,7 @@ async function fetchOpenCollectiveData() { body: JSON.stringify({ query }) }); - let payload = await result.json(); + const payload = await result.json(); if (process.env.DEBUG) { await fs.writeFile("./debug-opencollective-raw-response.json", JSON.stringify(payload, null, 4), { encoding: "utf8" }); @@ -329,11 +329,12 @@ async function fetchGitHubSponsors() { source: "github" })) .filter(donation => { + // invoiced recurring donations are incorrectly marked as one-time - const sponsor = sponsors.find(sponsor => sponsor.name === donation.name); + const foundSponsor = sponsors.find(sponsor => sponsor.name === donation.name); // only include if the amount is different than the monthly amount - return sponsor ? sponsor.monthlyDonation !== donation.amount : true; + return foundSponsor ? foundSponsor.monthlyDonation !== donation.amount : true; }); // TODO: Double check that donations don't include recurring @@ -359,7 +360,7 @@ async function fetchGitHubSponsors() { { sponsors: githubSponsors, donations: githubDonations - }, + } ] = await Promise.all([ fetchOpenCollectiveData(), fetchGitHubSponsors() diff --git a/tools/fetch-stats.js b/tools/fetch-stats.js index 13d7aa2fb5..66ca5d0c67 100644 --- a/tools/fetch-stats.js +++ b/tools/fetch-stats.js @@ -79,7 +79,7 @@ async function fetchGitHubNetworkStats() { const projectDependents = $("[href~='/eslint/eslint/network/dependents?dependent_type=REPOSITORY']").text(); return { - projectDependents: Number(projectDependents.trim().replace(/[^\d]/g, "")) + projectDependents: Number(projectDependents.trim().replace(/[^\d]/gu, "")) }; } @@ -110,6 +110,7 @@ async function fetchGitHubNetworkStats() { if (stats.currentVersionIsPrerelease) { if (upcomingVersionPrereleaseType) { + /* * prerelease -> prerelease * Increments prerelease number or updates prerelease type. @@ -119,15 +120,17 @@ async function fetchGitHubNetworkStats() { */ nextVersion = semver.inc(currentVersion, "prerelease", upcomingVersionPrereleaseType); } else { - /* + + /* * prerelease -> major * Example: * 9.0.0-rc.1 -> 9.0.0 */ - nextVersion = semver.inc(currentVersion, "major"); + nextVersion = semver.inc(currentVersion, "major"); } } else { if (upcomingVersionPrereleaseType) { + /* * regular -> prerelease * Example: @@ -135,12 +138,13 @@ async function fetchGitHubNetworkStats() { */ nextVersion = semver.inc(currentVersion, "premajor", upcomingVersionPrereleaseType); } else { - /* + + /* * regular -> regular * Example: * 8.56.0 -> 8.57.0 */ - nextVersion = semver.inc(currentVersion, "minor"); + nextVersion = semver.inc(currentVersion, "minor"); } } diff --git a/tools/fetch-team-data.js b/tools/fetch-team-data.js index 0eaaadef50..92845bfa6b 100644 --- a/tools/fetch-team-data.js +++ b/tools/fetch-team-data.js @@ -4,7 +4,7 @@ * @author Nicholas C. Zakas */ -/* eslint camelcase: [error, { properties: never }] */ +/* eslint camelcase: [error, { properties: never }] -- API response */ "use strict"; @@ -82,13 +82,14 @@ async function fetchUserProfile(username) { } const { data: profile } = await octokit.users.getByUsername({ username }); - const { data: social } = await octokit.request('GET /users/{username}/social_accounts', { username }); + const { data: social } = await octokit.request("GET /users/{username}/social_accounts", { username }); const result = { username: profile.login, name: profile.name, title: "Guest Author", - website: profile.blog.match(/http(s)?:\/\//) + // eslint-disable-next-line no-nested-ternary -- add https if missing + website: profile.blog.match(/http(s)?:\/\//u) ? profile.blog : profile.blog ? `https://${profile.blog}` : profile.blog, avatar_url: profile.avatar_url, @@ -133,8 +134,8 @@ async function fetchTeamMembers() { } // filter out TSC members and reviewers from committers list - team.committers = team.committers.filter(user => !team.tsc.find(tscmember => tscmember.username === user.username) && - !team.reviewers.find(tscmember => tscmember.username === user.username)); + team.committers = team.committers.filter(user => !team.tsc.some(tscmember => tscmember.username === user.username) && + !team.reviewers.some(tscmember => tscmember.username === user.username)); // add appropriate titles for (const [teamName, members] of Object.entries(team)) { diff --git a/tools/validate-links.js b/tools/validate-links.js index 5e042b387a..c5bda44b88 100644 --- a/tools/validate-links.js +++ b/tools/validate-links.js @@ -1,3 +1,5 @@ +"use strict"; + const path = require("path"); const TapRender = require("@munter/tap-render"); const spot = require("tap-spot"); @@ -14,10 +16,9 @@ const skipPatterns = [ "/docs" ]; -const skipFilter = (report) => - Object.values(report).some((value) => - skipPatterns.some((pattern) => String(value).includes(pattern)) - ); +const skipFilter = report => + Object.values(report).some(value => + skipPatterns.some(pattern => String(value).includes(pattern))); (async () => { try { @@ -30,7 +31,7 @@ const skipFilter = (report) => internalOnly: true, pretty: true, concurrency: 25, - skipFilter, + skipFilter }, tapRenderInstance );