From 65378cb3dce3be416a58676f1ced1f60440c747f Mon Sep 17 00:00:00 2001 From: Will Heslam Date: Wed, 21 Apr 2021 16:40:48 +0100 Subject: [PATCH] Fix swapped rule descriptions (#1187) --- readme.md | 4 ++-- rules/prefer-array-flat-map.js | 2 +- rules/prefer-array-flat.js | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/readme.md b/readme.md index 9a1d6e36e3..8cdf8ea850 100644 --- a/readme.md +++ b/readme.md @@ -167,8 +167,8 @@ Each rule has emojis denoting: | [numeric-separators-style](docs/rules/numeric-separators-style.md) | Enforce the style of numeric separators by correctly grouping digits. | | 🔧 | | [prefer-add-event-listener](docs/rules/prefer-add-event-listener.md) | Prefer `.addEventListener()` and `.removeEventListener()` over `on`-functions. | ✅ | 🔧 | | [prefer-array-find](docs/rules/prefer-array-find.md) | Prefer `.find(…)` over the first element from `.filter(…)`. | ✅ | 🔧 | -| [prefer-array-flat](docs/rules/prefer-array-flat.md) | Prefer `.flatMap(…)` over `.map(…).flat()`. | | 🔧 | -| [prefer-array-flat-map](docs/rules/prefer-array-flat-map.md) | Prefer `Array#flat()` over legacy techniques to flatten arrays. | | 🔧 | +| [prefer-array-flat](docs/rules/prefer-array-flat.md) | Prefer `Array#flat()` over legacy techniques to flatten arrays. | | 🔧 | +| [prefer-array-flat-map](docs/rules/prefer-array-flat-map.md) | Prefer `.flatMap(…)` over `.map(…).flat()`. | | 🔧 | | [prefer-array-index-of](docs/rules/prefer-array-index-of.md) | Prefer `Array#indexOf()` over `Array#findIndex()` when looking for the index of an item. | ✅ | 🔧 | | [prefer-array-some](docs/rules/prefer-array-some.md) | Prefer `.some(…)` over `.find(…)`. | ✅ | | | [prefer-date-now](docs/rules/prefer-date-now.md) | Prefer `Date.now()` to get the number of milliseconds since the Unix Epoch. | ✅ | 🔧 | diff --git a/rules/prefer-array-flat-map.js b/rules/prefer-array-flat-map.js index 4e60ed497b..6b2140e723 100644 --- a/rules/prefer-array-flat-map.js +++ b/rules/prefer-array-flat-map.js @@ -171,7 +171,7 @@ module.exports = { meta: { type: 'suggestion', docs: { - description: 'Prefer `Array#flat()` over legacy techniques to flatten arrays.', + description: 'Prefer `.flatMap(…)` over `.map(…).flat()`.', url: getDocumentationUrl(__filename) }, fixable: 'code', diff --git a/rules/prefer-array-flat.js b/rules/prefer-array-flat.js index 7b02385b9a..d9313e1fc2 100644 --- a/rules/prefer-array-flat.js +++ b/rules/prefer-array-flat.js @@ -265,7 +265,7 @@ module.exports = { meta: { type: 'suggestion', docs: { - description: 'Prefer `.flatMap(…)` over `.map(…).flat()`.', + description: 'Prefer `Array#flat()` over legacy techniques to flatten arrays.', url: getDocumentationUrl(__filename) }, fixable: 'code',