From d966d21b961d8f7441d4b05ce83dd9881f9b1707 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Miroslav=20Jona=C5=A1?= Date: Wed, 17 Jan 2024 14:14:29 +0100 Subject: [PATCH] docs(nx-dev): add pnpm and simplify examples on eslint landing page (#21178) --- .../packages/eslint/documents/overview.md | 28 +++++++++++++------ docs/shared/packages/eslint/eslint.md | 28 +++++++++++++------ 2 files changed, 40 insertions(+), 16 deletions(-) diff --git a/docs/generated/packages/eslint/documents/overview.md b/docs/generated/packages/eslint/documents/overview.md index 9727103084c5c..d5cf2a6f4360d 100644 --- a/docs/generated/packages/eslint/documents/overview.md +++ b/docs/generated/packages/eslint/documents/overview.md @@ -8,26 +8,38 @@ The ESLint plugin contains executors, generator, plugin and utilities used for l Make sure to install the `@nx/eslint` version that matches the version of `nx` in your repository. If the version numbers get out of sync, you can encounter some difficult to debug errors. You can [fix Nx version mismatches with this recipe](/recipes/tips-n-tricks/keep-nx-versions-in-sync). {% /callout %} -In any Nx workspace, you can install `@nx/eslint` by running the following commands if `@nx/eslint` package is not installed: +In any Nx workspace, you can install `@nx/eslint` by running the following command: + +{% tabs %} +{%tab label="npm"%} ```shell -npm i --save-dev @nx/eslint +npm i -D @nx/eslint ``` +{% /tab %} +{%tab label="yarn"%} + ```shell -yarn add --dev @nx/eslint +yarn add -D @nx/eslint ``` -## Lint - -You can lint an application or a library with the following command: +{% /tab %} +{%tab label="pnpm"%} ```shell -nx lint my-app +pnpm add -D @nx/eslint ``` +{% /tab %} +{% /tabs %} + +## Lint + +You can lint an application or a library with the following command: + ```shell -nx lint my-lib +nx lint my-project ``` ## Utils diff --git a/docs/shared/packages/eslint/eslint.md b/docs/shared/packages/eslint/eslint.md index 9727103084c5c..d5cf2a6f4360d 100644 --- a/docs/shared/packages/eslint/eslint.md +++ b/docs/shared/packages/eslint/eslint.md @@ -8,26 +8,38 @@ The ESLint plugin contains executors, generator, plugin and utilities used for l Make sure to install the `@nx/eslint` version that matches the version of `nx` in your repository. If the version numbers get out of sync, you can encounter some difficult to debug errors. You can [fix Nx version mismatches with this recipe](/recipes/tips-n-tricks/keep-nx-versions-in-sync). {% /callout %} -In any Nx workspace, you can install `@nx/eslint` by running the following commands if `@nx/eslint` package is not installed: +In any Nx workspace, you can install `@nx/eslint` by running the following command: + +{% tabs %} +{%tab label="npm"%} ```shell -npm i --save-dev @nx/eslint +npm i -D @nx/eslint ``` +{% /tab %} +{%tab label="yarn"%} + ```shell -yarn add --dev @nx/eslint +yarn add -D @nx/eslint ``` -## Lint - -You can lint an application or a library with the following command: +{% /tab %} +{%tab label="pnpm"%} ```shell -nx lint my-app +pnpm add -D @nx/eslint ``` +{% /tab %} +{% /tabs %} + +## Lint + +You can lint an application or a library with the following command: + ```shell -nx lint my-lib +nx lint my-project ``` ## Utils