From ecbce9faef0c8e05636287cf9c851949be6d70cc Mon Sep 17 00:00:00 2001 From: Yosuke Ota Date: Mon, 1 Jul 2024 10:59:47 +0900 Subject: [PATCH] feat: add support for flat config (#479) --- .eslint-doc-generatorrc.js | 10 + README.md | 26 ++- __tests__/index.js | 8 + docs/rules/always-return.md | 3 +- docs/rules/avoid-new.md | 3 +- docs/rules/catch-or-return.md | 3 +- docs/rules/no-callback-in-promise.md | 3 +- docs/rules/no-native.md | 3 +- docs/rules/no-nesting.md | 3 +- docs/rules/no-new-statics.md | 3 +- docs/rules/no-promise-in-callback.md | 3 +- docs/rules/no-return-in-finally.md | 3 +- docs/rules/no-return-wrap.md | 3 +- docs/rules/param-names.md | 3 +- docs/rules/valid-params.md | 3 +- index.js | 45 +++-- package-lock.json | 261 +++++++++++++++++++-------- package.json | 2 +- 18 files changed, 277 insertions(+), 111 deletions(-) create mode 100644 .eslint-doc-generatorrc.js diff --git a/.eslint-doc-generatorrc.js b/.eslint-doc-generatorrc.js new file mode 100644 index 00000000..0f204f5e --- /dev/null +++ b/.eslint-doc-generatorrc.js @@ -0,0 +1,10 @@ +/** @type {import('eslint-doc-generator').GenerateOptions} */ +module.exports = { + configEmoji: [ + ['recommended', '✅'], + ['flat/recommended', '✅'], + ], + postprocess: (doc) => { + return doc.replace(/✅\s*✅/gu, '✅') + }, +} diff --git a/README.md b/README.md index 30a82e7c..fc66f8fe 100644 --- a/README.md +++ b/README.md @@ -68,11 +68,23 @@ Then configure the rules you want to use under the rules section. or start with the recommended rule set: -```json -{ - "extends": ["plugin:promise/recommended"] -} -``` +- `eslint.config.js`: + + ```js + import pluginPromise from 'eslint-plugin-promise' + export default [ + // ... + pluginPromise.configs['flat/recommended'], + ] + ``` + +- `.eslintrc.*`: + + ```json + { + "extends": ["plugin:promise/recommended"] + } + ``` ## Rules @@ -81,9 +93,9 @@ or start with the recommended rule set: 💼 Configurations enabled in.\ ⚠️ Configurations set to warn in.\ 🚫 Configurations disabled in.\ +✅ Set in the `flat/recommended` configuration.\ ✅ Set in the `recommended` configuration.\ -🔧 Automatically fixable by the -[`--fix` CLI option](https://eslint.org/docs/user-guide/command-line-interface#--fix). +🔧 Automatically fixable by the [`--fix` CLI option](https://eslint.org/docs/user-guide/command-line-interface#--fix). | Name                      | Description | 💼 | ⚠️ | 🚫 | 🔧 | | :------------------------------------------------------------------- | :------------------------------------------------------------------------------------- | :-- | :-- | :-- | :-- | diff --git a/__tests__/index.js b/__tests__/index.js index fee0c7fa..66198d9a 100644 --- a/__tests__/index.js +++ b/__tests__/index.js @@ -3,3 +3,11 @@ test('can require index file', () => { expect(require('../index')).toBeInstanceOf(Object) }) + +test('rule set', () => { + const plugin = require('../index') + expect(plugin.configs.recommended.rules).toEqual( + plugin.configs['flat/recommended'].rules + ) + expect(plugin.configs['flat/recommended'].plugins.promise).toBe(plugin) +}) diff --git a/docs/rules/always-return.md b/docs/rules/always-return.md index 52bfda7a..d778771b 100644 --- a/docs/rules/always-return.md +++ b/docs/rules/always-return.md @@ -1,6 +1,7 @@ # Require returning inside each `then()` to create readable and reusable Promise chains (`promise/always-return`) -💼 This rule is enabled in the ✅ `recommended` config. +💼 This rule is enabled in the following configs: ✅ `flat/recommended`, ✅ +`recommended`. diff --git a/docs/rules/avoid-new.md b/docs/rules/avoid-new.md index a62f6ba1..a03c6a19 100644 --- a/docs/rules/avoid-new.md +++ b/docs/rules/avoid-new.md @@ -1,6 +1,7 @@ # Disallow creating `new` promises outside of utility libs (use [pify][] instead) (`promise/avoid-new`) -🚫 This rule is _disabled_ in the ✅ `recommended` config. +🚫 This rule is _disabled_ in the following configs: ✅ `flat/recommended`, ✅ +`recommended`. diff --git a/docs/rules/catch-or-return.md b/docs/rules/catch-or-return.md index 0019adb9..1833ca57 100644 --- a/docs/rules/catch-or-return.md +++ b/docs/rules/catch-or-return.md @@ -1,6 +1,7 @@ # Enforce the use of `catch()` on un-returned promises (`promise/catch-or-return`) -💼 This rule is enabled in the ✅ `recommended` config. +💼 This rule is enabled in the following configs: ✅ `flat/recommended`, ✅ +`recommended`. diff --git a/docs/rules/no-callback-in-promise.md b/docs/rules/no-callback-in-promise.md index 8ae3ac53..0188b1a2 100644 --- a/docs/rules/no-callback-in-promise.md +++ b/docs/rules/no-callback-in-promise.md @@ -1,6 +1,7 @@ # Disallow calling `cb()` inside of a `then()` (use [nodeify][] instead) (`promise/no-callback-in-promise`) -⚠️ This rule _warns_ in the ✅ `recommended` config. +⚠️ This rule _warns_ in the following configs: ✅ `flat/recommended`, ✅ +`recommended`. diff --git a/docs/rules/no-native.md b/docs/rules/no-native.md index d2d1c303..fff32d9b 100644 --- a/docs/rules/no-native.md +++ b/docs/rules/no-native.md @@ -1,6 +1,7 @@ # Require creating a `Promise` constructor before using it in an ES5 environment (`promise/no-native`) -🚫 This rule is _disabled_ in the ✅ `recommended` config. +🚫 This rule is _disabled_ in the following configs: ✅ `flat/recommended`, ✅ +`recommended`. diff --git a/docs/rules/no-nesting.md b/docs/rules/no-nesting.md index 311d81a2..bc7d8163 100644 --- a/docs/rules/no-nesting.md +++ b/docs/rules/no-nesting.md @@ -1,6 +1,7 @@ # Disallow nested `then()` or `catch()` statements (`promise/no-nesting`) -⚠️ This rule _warns_ in the ✅ `recommended` config. +⚠️ This rule _warns_ in the following configs: ✅ `flat/recommended`, ✅ +`recommended`. diff --git a/docs/rules/no-new-statics.md b/docs/rules/no-new-statics.md index ea1aa474..2e5a383f 100644 --- a/docs/rules/no-new-statics.md +++ b/docs/rules/no-new-statics.md @@ -1,6 +1,7 @@ # Disallow calling `new` on a Promise static method (`promise/no-new-statics`) -💼 This rule is enabled in the ✅ `recommended` config. +💼 This rule is enabled in the following configs: ✅ `flat/recommended`, ✅ +`recommended`. 🔧 This rule is automatically fixable by the [`--fix` CLI option](https://eslint.org/docs/latest/user-guide/command-line-interface#--fix). diff --git a/docs/rules/no-promise-in-callback.md b/docs/rules/no-promise-in-callback.md index 72cc89f6..54f0e020 100644 --- a/docs/rules/no-promise-in-callback.md +++ b/docs/rules/no-promise-in-callback.md @@ -1,5 +1,6 @@ # Disallow using promises inside of callbacks (`promise/no-promise-in-callback`) -⚠️ This rule _warns_ in the ✅ `recommended` config. +⚠️ This rule _warns_ in the following configs: ✅ `flat/recommended`, ✅ +`recommended`. diff --git a/docs/rules/no-return-in-finally.md b/docs/rules/no-return-in-finally.md index de0364e0..864bdb1f 100644 --- a/docs/rules/no-return-in-finally.md +++ b/docs/rules/no-return-in-finally.md @@ -1,6 +1,7 @@ # Disallow return statements in `finally()` (`promise/no-return-in-finally`) -⚠️ This rule _warns_ in the ✅ `recommended` config. +⚠️ This rule _warns_ in the following configs: ✅ `flat/recommended`, ✅ +`recommended`. diff --git a/docs/rules/no-return-wrap.md b/docs/rules/no-return-wrap.md index 7be071dd..0e980899 100644 --- a/docs/rules/no-return-wrap.md +++ b/docs/rules/no-return-wrap.md @@ -1,6 +1,7 @@ # Disallow wrapping values in `Promise.resolve` or `Promise.reject` when not needed (`promise/no-return-wrap`) -💼 This rule is enabled in the ✅ `recommended` config. +💼 This rule is enabled in the following configs: ✅ `flat/recommended`, ✅ +`recommended`. diff --git a/docs/rules/param-names.md b/docs/rules/param-names.md index cc76a977..9a71e542 100644 --- a/docs/rules/param-names.md +++ b/docs/rules/param-names.md @@ -1,6 +1,7 @@ # Enforce consistent param names and ordering when creating new promises (`promise/param-names`) -💼 This rule is enabled in the ✅ `recommended` config. +💼 This rule is enabled in the following configs: ✅ `flat/recommended`, ✅ +`recommended`. diff --git a/docs/rules/valid-params.md b/docs/rules/valid-params.md index bdaae97b..f2387718 100644 --- a/docs/rules/valid-params.md +++ b/docs/rules/valid-params.md @@ -1,6 +1,7 @@ # Enforces the proper number of arguments are passed to Promise functions (`promise/valid-params`) -⚠️ This rule _warns_ in the ✅ `recommended` config. +⚠️ This rule _warns_ in the following configs: ✅ `flat/recommended`, ✅ +`recommended`. diff --git a/index.js b/index.js index 40b81054..e554a3c1 100644 --- a/index.js +++ b/index.js @@ -1,6 +1,21 @@ 'use strict' -module.exports = { +const recommendedRules = { + 'promise/always-return': 'error', + 'promise/no-return-wrap': 'error', + 'promise/param-names': 'error', + 'promise/catch-or-return': 'error', + 'promise/no-native': 'off', + 'promise/no-nesting': 'warn', + 'promise/no-promise-in-callback': 'warn', + 'promise/no-callback-in-promise': 'warn', + 'promise/avoid-new': 'off', + 'promise/no-new-statics': 'error', + 'promise/no-return-in-finally': 'warn', + 'promise/valid-params': 'warn', +} + +const pluginPromise = { rules: { 'param-names': require('./rules/param-names'), 'no-return-wrap': require('./rules/no-return-wrap'), @@ -25,23 +40,15 @@ module.exports = { 'no-native': 0, 'catch-or-return': 1, }, - configs: { - recommended: { - plugins: ['promise'], - rules: { - 'promise/always-return': 'error', - 'promise/no-return-wrap': 'error', - 'promise/param-names': 'error', - 'promise/catch-or-return': 'error', - 'promise/no-native': 'off', - 'promise/no-nesting': 'warn', - 'promise/no-promise-in-callback': 'warn', - 'promise/no-callback-in-promise': 'warn', - 'promise/avoid-new': 'off', - 'promise/no-new-statics': 'error', - 'promise/no-return-in-finally': 'warn', - 'promise/valid-params': 'warn', - }, - }, +} +pluginPromise.configs = { + recommended: { + plugins: ['promise'], + rules: recommendedRules, + }, + 'flat/recommended': { + plugins: { promise: pluginPromise }, + rules: recommendedRules, }, } +module.exports = pluginPromise diff --git a/package-lock.json b/package-lock.json index 52c0f970..25569e2b 100644 --- a/package-lock.json +++ b/package-lock.json @@ -13,7 +13,7 @@ "doctoc": "^2.2.1", "eslint": "^8.28.0", "eslint-config-prettier": "^8.5.0", - "eslint-doc-generator": "^0.25.0", + "eslint-doc-generator": "^1.7.1", "eslint-plugin-eslint-plugin": "^4.4.1", "eslint-plugin-jest": "^26.9.0", "eslint-plugin-node": "^11.1.0", @@ -1311,12 +1311,6 @@ "integrity": "sha512-m+6nTEOadJZuTPkKR/SYK3A2d7FZrgElol9UP1Kae90VVU4a6mxnPuLiIW1m4Cq4gZ/nWb9GrdVXJCoCazDAbg==", "dev": true }, - "node_modules/@types/parse-json": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/@types/parse-json/-/parse-json-4.0.0.tgz", - "integrity": "sha512-//oorEZjL6sbPcKUaCdIGlIUeH26mgzimjBB77G6XRgnDl/L5wOnpyBGRe/Mmf5CVW3PwEBE1NjiMZ/ssFh4wA==", - "dev": true - }, "node_modules/@types/prettier": { "version": "2.7.0", "resolved": "https://registry.npmjs.org/@types/prettier/-/prettier-2.7.0.tgz", @@ -1833,6 +1827,12 @@ "integrity": "sha512-3oSeUO0TMV67hN1AmbXsK4yaqU7tjiHlbxRDZOpH0KW9+CeX4bRAaX0Anxt0tx2MrpRpWwQaPwIlISEJhYU5Pw==", "dev": true }, + "node_modules/boolean": { + "version": "3.2.0", + "resolved": "https://registry.npmjs.org/boolean/-/boolean-3.2.0.tgz", + "integrity": "sha512-d0II/GO9uf9lfUHH2BQsjxzRJZBdsjgsBiW4BvhWk/3qoKwQFjIDVN19PfX8F2D/r9PCMTtLWjYVCFrpeYUzsw==", + "dev": true + }, "node_modules/brace-expansion": { "version": "1.1.11", "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.11.tgz", @@ -2163,22 +2163,6 @@ "safe-buffer": "~5.1.1" } }, - "node_modules/cosmiconfig": { - "version": "7.1.0", - "resolved": "https://registry.npmjs.org/cosmiconfig/-/cosmiconfig-7.1.0.tgz", - "integrity": "sha512-AdmX6xUzdNASswsFtmwSt7Vj8po9IuqXm0UXz7QKPuEUmPB4XyjGfaAr2PSuELMwkRMVH1EpIkX5bTZGRB3eCA==", - "dev": true, - "dependencies": { - "@types/parse-json": "^4.0.0", - "import-fresh": "^3.2.1", - "parse-json": "^5.0.0", - "path-type": "^4.0.0", - "yaml": "^1.10.0" - }, - "engines": { - "node": ">=10" - } - }, "node_modules/cross-spawn": { "version": "7.0.3", "resolved": "https://registry.npmjs.org/cross-spawn/-/cross-spawn-7.0.3.tgz", @@ -2370,6 +2354,33 @@ "url": "https://github.com/fb55/domutils?sponsor=1" } }, + "node_modules/dot-prop": { + "version": "7.2.0", + "resolved": "https://registry.npmjs.org/dot-prop/-/dot-prop-7.2.0.tgz", + "integrity": "sha512-Ol/IPXUARn9CSbkrdV4VJo7uCy1I3VuSiWCaFSg+8BdUOzF9n3jefIpcgAydvUZbTdEBZs2vEiTiS9m61ssiDA==", + "dev": true, + "dependencies": { + "type-fest": "^2.11.2" + }, + "engines": { + "node": "^12.20.0 || ^14.13.1 || >=16.0.0" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/dot-prop/node_modules/type-fest": { + "version": "2.19.0", + "resolved": "https://registry.npmjs.org/type-fest/-/type-fest-2.19.0.tgz", + "integrity": "sha512-RAH822pAdBgcNMAfWnCBU3CFZcfZ/i1eZjwFU/dsLKumyuuP3niueg2UAukXYF0E2AAoc82ZSSf9J0WQBinzHA==", + "dev": true, + "engines": { + "node": ">=12.20" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, "node_modules/eastasianwidth": { "version": "0.2.0", "resolved": "https://registry.npmjs.org/eastasianwidth/-/eastasianwidth-0.2.0.tgz", @@ -2566,19 +2577,22 @@ } }, "node_modules/eslint-doc-generator": { - "version": "0.25.0", - "resolved": "https://registry.npmjs.org/eslint-doc-generator/-/eslint-doc-generator-0.25.0.tgz", - "integrity": "sha512-zNzxaQ63uEZc5snwhBD+TrskVfvOi5UYGlWAFKbYdGG9G+8MZKXkaGdPVcT8cdvTWBLyxT2ovJxY+PEhwIRBEA==", + "version": "1.7.1", + "resolved": "https://registry.npmjs.org/eslint-doc-generator/-/eslint-doc-generator-1.7.1.tgz", + "integrity": "sha512-i1Zjl+Xcy712SZhbceCeMVaIdhbFqY27i8d7f9gyb9P/6AQNnPA0VCWynAFVGYa0hpeR5kwUI09+GBELgC2nnA==", "dev": true, "dependencies": { "@typescript-eslint/utils": "^5.38.1", "ajv": "^8.11.2", - "camelcase": "^7.0.0", - "commander": "^9.4.0", - "cosmiconfig": "^7.1.0", + "boolean": "^3.2.0", + "commander": "^10.0.0", + "cosmiconfig": "^8.0.0", "deepmerge": "^4.2.2", + "dot-prop": "^7.2.0", "jest-diff": "^29.2.1", - "markdown-table": "^3.0.2", + "json-schema-traverse": "^1.0.0", + "markdown-table": "^3.0.3", + "no-case": "^3.0.4", "type-fest": "^3.0.0" }, "bin": { @@ -2631,16 +2645,39 @@ "url": "https://github.com/chalk/ansi-styles?sponsor=1" } }, - "node_modules/eslint-doc-generator/node_modules/camelcase": { - "version": "7.0.0", - "resolved": "https://registry.npmjs.org/camelcase/-/camelcase-7.0.0.tgz", - "integrity": "sha512-JToIvOmz6nhGsUhAYScbo2d6Py5wojjNfoxoc2mEVLUdJ70gJK2gnd+ABY1Tc3sVMyK7QDPtN0T/XdlCQWITyQ==", + "node_modules/eslint-doc-generator/node_modules/commander": { + "version": "10.0.1", + "resolved": "https://registry.npmjs.org/commander/-/commander-10.0.1.tgz", + "integrity": "sha512-y4Mg2tXshplEbSGzx7amzPwKKOCGuoSRP/CjEdwwk0FOGlUbq6lKuoyDZTNZkmxHdJtp54hdfY/JUrdL7Xfdug==", "dev": true, "engines": { - "node": ">=14.16" + "node": ">=14" + } + }, + "node_modules/eslint-doc-generator/node_modules/cosmiconfig": { + "version": "8.3.6", + "resolved": "https://registry.npmjs.org/cosmiconfig/-/cosmiconfig-8.3.6.tgz", + "integrity": "sha512-kcZ6+W5QzcJ3P1Mt+83OUv/oHFqZHIx8DuxG6eZ5RGMERoLqp4BuGjhHLYGK+Kf5XVkQvqBSmAy/nGWN3qDgEA==", + "dev": true, + "dependencies": { + "import-fresh": "^3.3.0", + "js-yaml": "^4.1.0", + "parse-json": "^5.2.0", + "path-type": "^4.0.0" + }, + "engines": { + "node": ">=14" }, "funding": { - "url": "https://github.com/sponsors/sindresorhus" + "url": "https://github.com/sponsors/d-fischer" + }, + "peerDependencies": { + "typescript": ">=4.9.5" + }, + "peerDependenciesMeta": { + "typescript": { + "optional": true + } } }, "node_modules/eslint-doc-generator/node_modules/diff-sequences": { @@ -2683,9 +2720,9 @@ "dev": true }, "node_modules/eslint-doc-generator/node_modules/markdown-table": { - "version": "3.0.2", - "resolved": "https://registry.npmjs.org/markdown-table/-/markdown-table-3.0.2.tgz", - "integrity": "sha512-y8j3a5/DkJCmS5x4dMCQL+OR0+2EAq3DOtio1COSHsmW2BGXnNCK3v12hJt1LrUz5iZH5g0LmuYOjDdI+czghA==", + "version": "3.0.3", + "resolved": "https://registry.npmjs.org/markdown-table/-/markdown-table-3.0.3.tgz", + "integrity": "sha512-Z1NL3Tb1M9wH4XESsCDEksWoKTdlUafKc4pt0GRwjUyXaCFZ+dc3g2erqB6zm3szA2IUSi7VnPI+o/9jnxh9hw==", "dev": true, "funding": { "type": "github", @@ -2718,6 +2755,21 @@ "url": "https://github.com/sponsors/sindresorhus" } }, + "node_modules/eslint-doc-generator/node_modules/typescript": { + "version": "5.5.2", + "resolved": "https://registry.npmjs.org/typescript/-/typescript-5.5.2.tgz", + "integrity": "sha512-NcRtPEOsPFFWjobJEtfihkLCZCXZt/os3zf8nTxjVH3RvTSxjrCamJpbExGvYOF+tFHc3pA65qpdwPbzjohhew==", + "dev": true, + "optional": true, + "peer": true, + "bin": { + "tsc": "bin/tsc", + "tsserver": "bin/tsserver" + }, + "engines": { + "node": ">=14.17" + } + }, "node_modules/eslint-plugin-es": { "version": "3.0.1", "resolved": "https://registry.npmjs.org/eslint-plugin-es/-/eslint-plugin-es-3.0.1.tgz", @@ -4977,6 +5029,15 @@ "url": "https://github.com/sponsors/wooorm" } }, + "node_modules/lower-case": { + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/lower-case/-/lower-case-2.0.2.tgz", + "integrity": "sha512-7fm3l3NAF9WfN6W3JOmf5drwpVqX78JtoGJ3A6W0a6ZnldM41w2fV5D490psKFTpMds8TJse/eHLFFsNHHjHgg==", + "dev": true, + "dependencies": { + "tslib": "^2.0.3" + } + }, "node_modules/lru-cache": { "version": "6.0.0", "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-6.0.0.tgz", @@ -5402,6 +5463,16 @@ "integrity": "sha512-1nh45deeb5olNY7eX82BkPO7SSxR5SSYJiPTrTdFUVYwAl8CKMA5N9PjTYkHiRjisVcxcQ1HXdLhx2qxxJzLNQ==", "dev": true }, + "node_modules/no-case": { + "version": "3.0.4", + "resolved": "https://registry.npmjs.org/no-case/-/no-case-3.0.4.tgz", + "integrity": "sha512-fgAN3jGAh+RoxUGZHTSOLJIqUc2wmoBwGR4tbpNAKmmovFoWq0OdRkb0VkldReO2a2iBT/OEulG9XSUc10r3zg==", + "dev": true, + "dependencies": { + "lower-case": "^2.0.2", + "tslib": "^2.0.3" + } + }, "node_modules/node-int64": { "version": "0.4.0", "resolved": "https://registry.npmjs.org/node-int64/-/node-int64-0.4.0.tgz", @@ -8306,12 +8377,6 @@ "integrity": "sha512-m+6nTEOadJZuTPkKR/SYK3A2d7FZrgElol9UP1Kae90VVU4a6mxnPuLiIW1m4Cq4gZ/nWb9GrdVXJCoCazDAbg==", "dev": true }, - "@types/parse-json": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/@types/parse-json/-/parse-json-4.0.0.tgz", - "integrity": "sha512-//oorEZjL6sbPcKUaCdIGlIUeH26mgzimjBB77G6XRgnDl/L5wOnpyBGRe/Mmf5CVW3PwEBE1NjiMZ/ssFh4wA==", - "dev": true - }, "@types/prettier": { "version": "2.7.0", "resolved": "https://registry.npmjs.org/@types/prettier/-/prettier-2.7.0.tgz", @@ -8667,6 +8732,12 @@ "integrity": "sha512-3oSeUO0TMV67hN1AmbXsK4yaqU7tjiHlbxRDZOpH0KW9+CeX4bRAaX0Anxt0tx2MrpRpWwQaPwIlISEJhYU5Pw==", "dev": true }, + "boolean": { + "version": "3.2.0", + "resolved": "https://registry.npmjs.org/boolean/-/boolean-3.2.0.tgz", + "integrity": "sha512-d0II/GO9uf9lfUHH2BQsjxzRJZBdsjgsBiW4BvhWk/3qoKwQFjIDVN19PfX8F2D/r9PCMTtLWjYVCFrpeYUzsw==", + "dev": true + }, "brace-expansion": { "version": "1.1.11", "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.11.tgz", @@ -8908,19 +8979,6 @@ "safe-buffer": "~5.1.1" } }, - "cosmiconfig": { - "version": "7.1.0", - "resolved": "https://registry.npmjs.org/cosmiconfig/-/cosmiconfig-7.1.0.tgz", - "integrity": "sha512-AdmX6xUzdNASswsFtmwSt7Vj8po9IuqXm0UXz7QKPuEUmPB4XyjGfaAr2PSuELMwkRMVH1EpIkX5bTZGRB3eCA==", - "dev": true, - "requires": { - "@types/parse-json": "^4.0.0", - "import-fresh": "^3.2.1", - "parse-json": "^5.0.0", - "path-type": "^4.0.0", - "yaml": "^1.10.0" - } - }, "cross-spawn": { "version": "7.0.3", "resolved": "https://registry.npmjs.org/cross-spawn/-/cross-spawn-7.0.3.tgz", @@ -9058,6 +9116,23 @@ "domhandler": "^4.2.0" } }, + "dot-prop": { + "version": "7.2.0", + "resolved": "https://registry.npmjs.org/dot-prop/-/dot-prop-7.2.0.tgz", + "integrity": "sha512-Ol/IPXUARn9CSbkrdV4VJo7uCy1I3VuSiWCaFSg+8BdUOzF9n3jefIpcgAydvUZbTdEBZs2vEiTiS9m61ssiDA==", + "dev": true, + "requires": { + "type-fest": "^2.11.2" + }, + "dependencies": { + "type-fest": { + "version": "2.19.0", + "resolved": "https://registry.npmjs.org/type-fest/-/type-fest-2.19.0.tgz", + "integrity": "sha512-RAH822pAdBgcNMAfWnCBU3CFZcfZ/i1eZjwFU/dsLKumyuuP3niueg2UAukXYF0E2AAoc82ZSSf9J0WQBinzHA==", + "dev": true + } + } + }, "eastasianwidth": { "version": "0.2.0", "resolved": "https://registry.npmjs.org/eastasianwidth/-/eastasianwidth-0.2.0.tgz", @@ -9218,19 +9293,22 @@ "requires": {} }, "eslint-doc-generator": { - "version": "0.25.0", - "resolved": "https://registry.npmjs.org/eslint-doc-generator/-/eslint-doc-generator-0.25.0.tgz", - "integrity": "sha512-zNzxaQ63uEZc5snwhBD+TrskVfvOi5UYGlWAFKbYdGG9G+8MZKXkaGdPVcT8cdvTWBLyxT2ovJxY+PEhwIRBEA==", + "version": "1.7.1", + "resolved": "https://registry.npmjs.org/eslint-doc-generator/-/eslint-doc-generator-1.7.1.tgz", + "integrity": "sha512-i1Zjl+Xcy712SZhbceCeMVaIdhbFqY27i8d7f9gyb9P/6AQNnPA0VCWynAFVGYa0hpeR5kwUI09+GBELgC2nnA==", "dev": true, "requires": { "@typescript-eslint/utils": "^5.38.1", "ajv": "^8.11.2", - "camelcase": "^7.0.0", - "commander": "^9.4.0", - "cosmiconfig": "^7.1.0", + "boolean": "^3.2.0", + "commander": "^10.0.0", + "cosmiconfig": "^8.0.0", "deepmerge": "^4.2.2", + "dot-prop": "^7.2.0", "jest-diff": "^29.2.1", - "markdown-table": "^3.0.2", + "json-schema-traverse": "^1.0.0", + "markdown-table": "^3.0.3", + "no-case": "^3.0.4", "type-fest": "^3.0.0" }, "dependencies": { @@ -9261,12 +9339,24 @@ "integrity": "sha512-Cxwpt2SfTzTtXcfOlzGEee8O+c+MmUgGrNiBcXnuWxuFJHe6a5Hz7qwhwe5OgaSYI0IJvkLqWX1ASG+cJOkEiA==", "dev": true }, - "camelcase": { - "version": "7.0.0", - "resolved": "https://registry.npmjs.org/camelcase/-/camelcase-7.0.0.tgz", - "integrity": "sha512-JToIvOmz6nhGsUhAYScbo2d6Py5wojjNfoxoc2mEVLUdJ70gJK2gnd+ABY1Tc3sVMyK7QDPtN0T/XdlCQWITyQ==", + "commander": { + "version": "10.0.1", + "resolved": "https://registry.npmjs.org/commander/-/commander-10.0.1.tgz", + "integrity": "sha512-y4Mg2tXshplEbSGzx7amzPwKKOCGuoSRP/CjEdwwk0FOGlUbq6lKuoyDZTNZkmxHdJtp54hdfY/JUrdL7Xfdug==", "dev": true }, + "cosmiconfig": { + "version": "8.3.6", + "resolved": "https://registry.npmjs.org/cosmiconfig/-/cosmiconfig-8.3.6.tgz", + "integrity": "sha512-kcZ6+W5QzcJ3P1Mt+83OUv/oHFqZHIx8DuxG6eZ5RGMERoLqp4BuGjhHLYGK+Kf5XVkQvqBSmAy/nGWN3qDgEA==", + "dev": true, + "requires": { + "import-fresh": "^3.3.0", + "js-yaml": "^4.1.0", + "parse-json": "^5.2.0", + "path-type": "^4.0.0" + } + }, "diff-sequences": { "version": "29.2.0", "resolved": "https://registry.npmjs.org/diff-sequences/-/diff-sequences-29.2.0.tgz", @@ -9298,9 +9388,9 @@ "dev": true }, "markdown-table": { - "version": "3.0.2", - "resolved": "https://registry.npmjs.org/markdown-table/-/markdown-table-3.0.2.tgz", - "integrity": "sha512-y8j3a5/DkJCmS5x4dMCQL+OR0+2EAq3DOtio1COSHsmW2BGXnNCK3v12hJt1LrUz5iZH5g0LmuYOjDdI+czghA==", + "version": "3.0.3", + "resolved": "https://registry.npmjs.org/markdown-table/-/markdown-table-3.0.3.tgz", + "integrity": "sha512-Z1NL3Tb1M9wH4XESsCDEksWoKTdlUafKc4pt0GRwjUyXaCFZ+dc3g2erqB6zm3szA2IUSi7VnPI+o/9jnxh9hw==", "dev": true }, "pretty-format": { @@ -9319,6 +9409,14 @@ "resolved": "https://registry.npmjs.org/type-fest/-/type-fest-3.1.0.tgz", "integrity": "sha512-StmrZmK3eD9mDF9Vt7UhqthrDSk66O9iYl5t5a0TSoVkHjl0XZx/xuc/BRz4urAXXGHOY5OLsE0RdJFIApSFmw==", "dev": true + }, + "typescript": { + "version": "5.5.2", + "resolved": "https://registry.npmjs.org/typescript/-/typescript-5.5.2.tgz", + "integrity": "sha512-NcRtPEOsPFFWjobJEtfihkLCZCXZt/os3zf8nTxjVH3RvTSxjrCamJpbExGvYOF+tFHc3pA65qpdwPbzjohhew==", + "dev": true, + "optional": true, + "peer": true } } }, @@ -10923,6 +11021,15 @@ "integrity": "sha512-vM6rUVCVUJJt33bnmHiZEvr7wPT78ztX7rojL+LW51bHtLh6HTjx84LA5W4+oa6aKEJA7jJu5LR6vQRBpA5DVg==", "dev": true }, + "lower-case": { + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/lower-case/-/lower-case-2.0.2.tgz", + "integrity": "sha512-7fm3l3NAF9WfN6W3JOmf5drwpVqX78JtoGJ3A6W0a6ZnldM41w2fV5D490psKFTpMds8TJse/eHLFFsNHHjHgg==", + "dev": true, + "requires": { + "tslib": "^2.0.3" + } + }, "lru-cache": { "version": "6.0.0", "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-6.0.0.tgz", @@ -11233,6 +11340,16 @@ "integrity": "sha512-1nh45deeb5olNY7eX82BkPO7SSxR5SSYJiPTrTdFUVYwAl8CKMA5N9PjTYkHiRjisVcxcQ1HXdLhx2qxxJzLNQ==", "dev": true }, + "no-case": { + "version": "3.0.4", + "resolved": "https://registry.npmjs.org/no-case/-/no-case-3.0.4.tgz", + "integrity": "sha512-fgAN3jGAh+RoxUGZHTSOLJIqUc2wmoBwGR4tbpNAKmmovFoWq0OdRkb0VkldReO2a2iBT/OEulG9XSUc10r3zg==", + "dev": true, + "requires": { + "lower-case": "^2.0.2", + "tslib": "^2.0.3" + } + }, "node-int64": { "version": "0.4.0", "resolved": "https://registry.npmjs.org/node-int64/-/node-int64-0.4.0.tgz", diff --git a/package.json b/package.json index c55945e4..e798e1e2 100644 --- a/package.json +++ b/package.json @@ -70,7 +70,7 @@ "doctoc": "^2.2.1", "eslint": "^8.28.0", "eslint-config-prettier": "^8.5.0", - "eslint-doc-generator": "^0.25.0", + "eslint-doc-generator": "^1.7.1", "eslint-plugin-eslint-plugin": "^4.4.1", "eslint-plugin-jest": "^26.9.0", "eslint-plugin-node": "^11.1.0",