Skip to content

Commit

Permalink
docs(nx-dev): add pnpm and simplify examples on eslint landing page (#…
Browse files Browse the repository at this point in the history
  • Loading branch information
meeroslav authored Jan 17, 2024
1 parent 92a4861 commit d966d21
Show file tree
Hide file tree
Showing 2 changed files with 40 additions and 16 deletions.
28 changes: 20 additions & 8 deletions docs/generated/packages/eslint/documents/overview.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
28 changes: 20 additions & 8 deletions docs/shared/packages/eslint/eslint.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

1 comment on commit d966d21

@vercel
Copy link

@vercel vercel bot commented on d966d21 Jan 17, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Successfully deployed to the following URLs:

nx-dev – ./

nx-dev-git-master-nrwl.vercel.app
nx-dev-nrwl.vercel.app
nx.dev
nx-five.vercel.app

Please sign in to comment.