diff --git a/docs/modules/README.md b/docs/modules/README.md index b1c0b5c..ce7acf5 100644 --- a/docs/modules/README.md +++ b/docs/modules/README.md @@ -48,6 +48,7 @@ ESLint plugin. - [`ezspawn`](./ez-spawn.md) - [`faker`](./faker.md) - [`fast-glob`](./fast-glob.md) +- [`feather-icons`](./feather.md) - [`find-cache-dir`](./find-cache-dir.md) - [`find-cache-directory`](./find-cache-directory.md) - [`find-file-up`](./find-file-up.md) @@ -81,6 +82,7 @@ ESLint plugin. - [`pkg-dir`](./pkg-dir.md) - [`qs`](./qs.md) - [`react-helmet`](./react-helmet.md) +- [`react-feather`](./feather.md) - [`read-pkg`](./read-pkg.md) - [`read-pkg-up`](./read-pkg-up.md) - [`read-package-up`](./read-package-up.md) diff --git a/docs/modules/feather.md b/docs/modules/feather.md new file mode 100644 index 0000000..db37c17 --- /dev/null +++ b/docs/modules/feather.md @@ -0,0 +1,44 @@ +--- +description: Modern alternatives to feather packages +--- + +# Replacements for `feather-icons` and `react-feather` + +## `lucide` for `feather-icons` + +[`lucide`](https://lucide.dev/) is a community-maintained fork of Feather Icons. + +Example: + + +```js +import feather from 'feather-icons' // [!code --] +import { icons } from 'lucide' // [!code ++] + +feather.icons.x.toSvg({ class: 'icon icon-x' }) // [!code --] +icons.x.toSvg({ class: 'icon icon-x' }) // [!code ++] +``` + +## `lucide-react` for `react-feather` + +[`lucide-react`](https://lucide.dev/guide/packages/lucide-react) provides React components for the Lucide icon set and is the natural replacement for `react-feather`. + +Example: + + +```jsx +import { Camera, ArrowRight } from 'react-feather' // [!code --] +import { Camera, ArrowRight } from 'lucide-react' // [!code ++] + +export function Header() { + return ( + <> + + + + ) +} +``` + +> [!NOTE] +> Lucide provides information on the [comparison](https://lucide.dev/guide/comparison#lucide-vs-feather-icons) of it vs feather-icons diff --git a/manifests/preferred.json b/manifests/preferred.json index a6f06a2..a2f820f 100644 --- a/manifests/preferred.json +++ b/manifests/preferred.json @@ -246,6 +246,12 @@ "replacements": ["tinyglobby"], "url": {"type": "e18e", "id": "fast-glob"} }, + "feather-icons": { + "type": "module", + "moduleName": "feather-icons", + "replacements": ["lucide"], + "url": {"type": "e18e", "id": "feather"} + }, "find-cache-dir": { "type": "module", "moduleName": "find-cache-dir", @@ -2446,6 +2452,12 @@ "replacements": ["nanoid"], "url": {"type": "e18e", "id": "shortid"} }, + "react-feather": { + "type": "module", + "moduleName": "react-feather", + "replacements": ["lucide-react"], + "url": {"type": "e18e", "id": "feather"} + }, "react-helmet": { "type": "module", "moduleName": "react-helmet", @@ -3081,6 +3093,18 @@ "url": {"type": "e18e", "id": "lodash-underscore"}, "description": "lodash and Underscore can be replaced with native JavaScript APIs" }, + "lucide": { + "id": "lucide", + "type": "documented", + "url": {"type": "e18e", "id": "feather"}, + "replacementModule": "lucide" + }, + "lucide-react": { + "id": "lucide-react", + "type": "documented", + "url": {"type": "e18e", "id": "feather"}, + "replacementModule": "lucide-react" + }, "luxon": { "id": "luxon", "type": "documented",