Skip to content

Commit

Permalink
Merge branch 'master' into eslint-plugin-refactor
Browse files Browse the repository at this point in the history
  • Loading branch information
JamesHenry committed Feb 9, 2024
2 parents 73933c3 + d2272fd commit c0f46cc
Show file tree
Hide file tree
Showing 103 changed files with 812 additions and 565 deletions.
2 changes: 1 addition & 1 deletion docs/generated/packages/angular/documents/overview.md
Expand Up @@ -33,7 +33,7 @@ In any Nx workspace, you can install `@nx/angular` by running the following comm
{% tabs %}
{% tab label="Nx 18+" %}

```shell
```shell {% skipRescope=true %}
nx add @nx/angular
```

Expand Down
12 changes: 6 additions & 6 deletions docs/generated/packages/cypress/documents/overview.md
Expand Up @@ -29,7 +29,7 @@ In any Nx workspace, you can install `@nx/cypress` by running the following comm
{% tabs %}
{% tab label="Nx 18+" %}

```shell
```shell {% skipRescope=true %}
nx add @nx/cypress
```

Expand Down Expand Up @@ -95,18 +95,18 @@ By default, when creating a new frontend application, Nx will use Cypress to cre
nx g @nx/web:app frontend
```

### Creating a Cypress E2E project for an existing project
### Configure Cypress for an existing project

To generate an E2E project based on an existing project, run the following generator
To configure Cypress for an existing project, run the following generator

```shell
nx g @nx/cypress:configuration your-app-name-e2e --project=your-app-name
nx g @nx/cypress:configuration --project=your-app-name
```

Optionally, you can use the `--baseUrl` option if you don't want cypress plugin to serve `your-app-name`.
Optionally, you can use the `--baseUrl` option if you don't want the Cypress plugin to serve `your-app-name`.

```shell
nx g @nx/cypress:configuration your-app-name-e2e --baseUrl=http://localhost:4200
nx g @nx/cypress:configuration --project=your-app-name --baseUrl=http://localhost:4200
```

Replace `your-app-name` with the app's name as defined in your `tsconfig.base.json` file or the `name` property of your `package.json`.
Expand Down
2 changes: 1 addition & 1 deletion docs/generated/packages/detox/documents/overview.md
Expand Up @@ -36,7 +36,7 @@ In any Nx workspace, you can install `@nx/detox` by running the following comman
{% tabs %}
{% tab label="Nx 18+" %}

```shell
```shell {% skipRescope=true %}
nx add @nx/detox
```

Expand Down
2 changes: 1 addition & 1 deletion docs/generated/packages/esbuild/documents/overview.md
Expand Up @@ -25,7 +25,7 @@ In any Nx workspace, you can install `@nx/esbuild` by running the following comm
{% tabs %}
{% tab label="Nx 18+" %}

```shell
```shell {% skipRescope=true %}
nx add @nx/esbuild
```

Expand Down
19 changes: 18 additions & 1 deletion docs/generated/packages/eslint-plugin/documents/overview.md
Expand Up @@ -13,10 +13,27 @@ Make sure to install the `@nx/eslint-plugin` version that matches the version of

In any Nx workspace, you can install `@nx/eslint-plugin` by running the following commands if the package is not already installed:

```shell
{% tabs %}
{% tab label="Nx 18+" %}

```shell {% skipRescope=true %}
nx add @nx/eslint-plugin
```

This will install the correct version of `@nx/eslint-plugin`.

{% /tab %}
{% tab label="Nx < 18" %}

Install the `@nx/eslint-plugin` package with your package manager.

```shell
npm add -D @nx/eslint-plugin
```

{% /tab %}
{% /tabs %}

## Included plugins

The plugin contains the following rule configurations divided into sub-plugins.
Expand Down
15 changes: 12 additions & 3 deletions docs/generated/packages/eslint/documents/overview.md
Expand Up @@ -13,7 +13,7 @@ In any Nx workspace, you can install `@nx/eslint` by running the following comma
{% tabs %}
{% tab label="Nx 18+" %}

```shell
```shell {% skipRescope=true %}
nx add @nx/eslint
```

Expand Down Expand Up @@ -57,14 +57,23 @@ The `@nx/eslint/plugin` is configured in the `plugins` array in `nx.json`.
- The `targetName` option controls the name of the inferred ESLint tasks. The default name is `lint`.

{% /tab %}
{% tab label="Nx < 18" %}
{% tab label="Nx 17" %}

Install the `@nx/eslint` package with your package manager.

```shell
```shell {% skipRescope=true %}
npm add -D @nx/eslint
```

{% /tab %}
{% tab label="Nx < 17" %}

Install the `@nx/linter` package with your package manager.

```shell
npm add -D @nx/linter
```

{% /tab %}
{% /tabs %}

Expand Down
2 changes: 1 addition & 1 deletion docs/generated/packages/expo/documents/overview.md
Expand Up @@ -21,7 +21,7 @@ In any Nx workspace, you can install `@nx/expo` by running the following command
{% tabs %}
{% tab label="Nx 18+" %}

```shell
```shell {% skipRescope=true %}
nx add @nx/expo
```

Expand Down
2 changes: 1 addition & 1 deletion docs/generated/packages/express/documents/overview.md
Expand Up @@ -22,7 +22,7 @@ In any Nx workspace, you can install `@nx/express` by running the following comm
{% tabs %}
{% tab label="Nx 18+" %}

```shell
```shell {% skipRescope=true %}
nx add @nx/express
```

Expand Down
2 changes: 1 addition & 1 deletion docs/generated/packages/jest/documents/overview.md
Expand Up @@ -22,7 +22,7 @@ In any Nx workspace, you can install `@nx/jest` by running the following command
{% tabs %}
{% tab label="Nx 18+" %}

```shell
```shell {% skipRescope=true %}
nx add @nx/jest
```

Expand Down
2 changes: 1 addition & 1 deletion docs/generated/packages/js/documents/overview.md
Expand Up @@ -18,7 +18,7 @@ In any Nx workspace, you can install `@nx/js` by running the following command:
{% tabs %}
{% tab label="Nx 18+" %}

```shell
```shell {% skipRescope=true %}
nx add @nx/js
```

Expand Down
2 changes: 1 addition & 1 deletion docs/generated/packages/nest/documents/overview.md
Expand Up @@ -34,7 +34,7 @@ In any Nx workspace, you can install `@nx/nest` by running the following command
{% tabs %}
{% tab label="Nx 18+" %}

```shell
```shell {% skipRescope=true %}
nx add @nx/nest
```

Expand Down
2 changes: 1 addition & 1 deletion docs/generated/packages/next/documents/overview.md
Expand Up @@ -30,7 +30,7 @@ In any workspace, you can install `@nx/next` by running the following command:
{% tabs %}
{% tab label="Nx 18+" %}

```shell
```shell {% skipRescope=true %}
nx add @nx/next
```

Expand Down
2 changes: 1 addition & 1 deletion docs/generated/packages/node/documents/overview.md
Expand Up @@ -13,7 +13,7 @@ In any Nx workspace, you can install `@nx/node` by running the following command
{% tabs %}
{% tab label="Nx 18+" %}

```shell
```shell {% skipRescope=true %}
nx add @nx/node
```

Expand Down
2 changes: 1 addition & 1 deletion docs/generated/packages/nuxt/documents/overview.md
Expand Up @@ -23,7 +23,7 @@ Make sure to install the `@nx/nuxt` version that matches the version of `nx` in

In any Nx workspace, you can install `@nx/nuxt` by running the following command:

```shell
```shell {% skipRescope=true %}
nx add @nx/nuxt
```

Expand Down
4 changes: 2 additions & 2 deletions docs/generated/packages/playwright/documents/overview.md
Expand Up @@ -24,7 +24,7 @@ In any Nx workspace, you can install `@nx/playwright` by running the following c
{% tabs %}
{% tab label="Nx 18+" %}

```shell
```shell {% skipRescope=true %}
nx add @nx/playwright
```

Expand Down Expand Up @@ -74,7 +74,7 @@ The `@nx/playwright/plugin` will automatically split your e2e tasks by file. You

Install the `@nx/playwright` package with your package manager.

```shell
```shell {% skipRescope=true %}
npm add -D @nx/playwright
```

Expand Down
2 changes: 1 addition & 1 deletion docs/generated/packages/react-native/documents/overview.md
Expand Up @@ -35,7 +35,7 @@ In any Nx workspace, you can install `@nx/react-native` by running the following
{% tabs %}
{% tab label="Nx 18+" %}

```shell
```shell {% skipRescope=true %}
nx add @nx/react-native
```

Expand Down
2 changes: 1 addition & 1 deletion docs/generated/packages/react/documents/overview.md
Expand Up @@ -27,7 +27,7 @@ In any Nx workspace, you can install `@nx/react` by running the following comman
{% tabs %}
{% tab label="Nx 18+" %}

```shell
```shell {% skipRescope=true %}
nx add @nx/react
```

Expand Down
2 changes: 1 addition & 1 deletion docs/generated/packages/remix/documents/overview.md
Expand Up @@ -28,7 +28,7 @@ In any Nx workspace, you can install `@nx/remix` by running the following comman
{% tabs %}
{% tab label="Nx 18+" %}

```shell
```shell {% skipRescope=true %}
nx add @nx/remix
```

Expand Down
2 changes: 1 addition & 1 deletion docs/generated/packages/storybook/documents/overview.md
Expand Up @@ -20,7 +20,7 @@ In any Nx workspace, you can install `@nx/storybook` by running the following co
{% tabs %}
{% tab label="Nx 18+" %}

```shell
```shell {% skipRescope=true %}
nx add @nx/storybook
```

Expand Down
2 changes: 1 addition & 1 deletion docs/generated/packages/vite/documents/overview.md
Expand Up @@ -35,7 +35,7 @@ In any Nx workspace, you can install `@nx/vite` by running the following command
{% tabs %}
{% tab label="Nx 18+" %}

```shell
```shell {% skipRescope=true %}
nx add @nx/vite
```

Expand Down
4 changes: 2 additions & 2 deletions docs/generated/packages/vue/documents/overview.md
Expand Up @@ -26,7 +26,7 @@ In any Nx workspace, you can install `@nx/vue` by running the following command:
{% tabs %}
{% tab label="Nx 18+" %}

```shell
```shell {% skipRescope=true %}
nx add @nx/vue
```

Expand All @@ -37,7 +37,7 @@ This will install the correct version of `@nx/vue`.

Install the `@nx/vue` package with your package manager.

```shell
```shell {% skipRescope=true %}
npm add -D @nx/vue
```

Expand Down
2 changes: 1 addition & 1 deletion docs/generated/packages/web/documents/overview.md
Expand Up @@ -21,7 +21,7 @@ In any Nx workspace, you can install `@nx/web` by running the following command:
{% tabs %}
{% tab label="Nx 18+" %}

```shell
```shell {% skipRescope=true %}
nx add @nx/web
```

Expand Down
2 changes: 1 addition & 1 deletion docs/generated/packages/webpack/documents/overview.md
Expand Up @@ -36,7 +36,7 @@ In any Nx workspace, you can install `@nx/webpack` by running the following comm
{% tabs %}
{% tab label="Nx 18+" %}

```shell
```shell {% skipRescope=true %}
nx add @nx/webpack
```

Expand Down
4 changes: 2 additions & 2 deletions docs/nx-cloud/features/split-e2e-tasks.md
Expand Up @@ -11,14 +11,14 @@ To enable automatically split e2e tasks, you need to turn on [inferred tasks](/c
{% tabs %}
{% tab label="Cypress" %}

```shell
```shell {% skipRescope=true %}
nx add @nx/cypress
```

{% /tab %}
{% tab label="Playwright" %}

```shell
```shell {% skipRescope=true %}
nx add @nx/playwright
```

Expand Down
2 changes: 1 addition & 1 deletion docs/shared/features/enforce-module-boundaries.md
Expand Up @@ -15,7 +15,7 @@ Nx provides an `enforce-module-boundaries` eslint rule that enforces the public

To set up the lint rule, install these dependencies:

```shell
```shell {% skipRescope=true %}
nx add @nx/eslint-plugin @nx/devkit
```

Expand Down
2 changes: 1 addition & 1 deletion docs/shared/guides/react-native.md
Expand Up @@ -134,7 +134,7 @@ When using React Native in Nx, you get the out-of-the-box support for TypeScript

For existing Nx workspaces, install the `@nx/react-native` package to add React Native capabilities to it.

```shell
```shell {% skipRescope=true %}
nx add @nx/react-native
```

Expand Down
2 changes: 1 addition & 1 deletion docs/shared/guides/remix.md
Expand Up @@ -31,7 +31,7 @@ In this recipe, we'll show you how to create a [Remix](https://remix.run) applic
Make sure to install the `@nx/remix` version that is on the same minor version as the `nx` version 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 %}

```shell
```shell {% skipRescope=true %}
nx add @nx/remix
```

Expand Down
2 changes: 1 addition & 1 deletion docs/shared/migration/migration-angularjs.md
Expand Up @@ -41,7 +41,7 @@ At the next prompt, you can choose whether to use [Nx Cloud](https://nx.app) or

Your new workspace won’t have much in it because of the `apps` preset. You’ll need to generate an application to have some structure created. Add the Angular plugin to your workspace:

```shell
```shell {% skipRescope=true %}
nx add @nx/angular
```

Expand Down
2 changes: 1 addition & 1 deletion docs/shared/packages/angular/angular-plugin.md
Expand Up @@ -33,7 +33,7 @@ In any Nx workspace, you can install `@nx/angular` by running the following comm
{% tabs %}
{% tab label="Nx 18+" %}

```shell
```shell {% skipRescope=true %}
nx add @nx/angular
```

Expand Down
12 changes: 6 additions & 6 deletions docs/shared/packages/cypress/cypress-plugin.md
Expand Up @@ -29,7 +29,7 @@ In any Nx workspace, you can install `@nx/cypress` by running the following comm
{% tabs %}
{% tab label="Nx 18+" %}

```shell
```shell {% skipRescope=true %}
nx add @nx/cypress
```

Expand Down Expand Up @@ -95,18 +95,18 @@ By default, when creating a new frontend application, Nx will use Cypress to cre
nx g @nx/web:app frontend
```

### Creating a Cypress E2E project for an existing project
### Configure Cypress for an existing project

To generate an E2E project based on an existing project, run the following generator
To configure Cypress for an existing project, run the following generator

```shell
nx g @nx/cypress:configuration your-app-name-e2e --project=your-app-name
nx g @nx/cypress:configuration --project=your-app-name
```

Optionally, you can use the `--baseUrl` option if you don't want cypress plugin to serve `your-app-name`.
Optionally, you can use the `--baseUrl` option if you don't want the Cypress plugin to serve `your-app-name`.

```shell
nx g @nx/cypress:configuration your-app-name-e2e --baseUrl=http://localhost:4200
nx g @nx/cypress:configuration --project=your-app-name --baseUrl=http://localhost:4200
```

Replace `your-app-name` with the app's name as defined in your `tsconfig.base.json` file or the `name` property of your `package.json`.
Expand Down
2 changes: 1 addition & 1 deletion docs/shared/packages/detox/detox-plugin.md
Expand Up @@ -36,7 +36,7 @@ In any Nx workspace, you can install `@nx/detox` by running the following comman
{% tabs %}
{% tab label="Nx 18+" %}

```shell
```shell {% skipRescope=true %}
nx add @nx/detox
```

Expand Down

0 comments on commit c0f46cc

Please sign in to comment.