Skip to content

Commit

Permalink
docs(linter): update docs for eslint package (#19649)
Browse files Browse the repository at this point in the history
  • Loading branch information
meeroslav authored Oct 19, 2023
1 parent 3176353 commit b30f3c5
Show file tree
Hide file tree
Showing 40 changed files with 329 additions and 248 deletions.
4 changes: 2 additions & 2 deletions CODEOWNERS
Validating CODEOWNERS rules …
Original file line number Diff line number Diff line change
Expand Up @@ -113,8 +113,8 @@ rust-toolchain @nrwl/nx-native-reviewers

# Linter
/docs/generated/packages/eslint-plugin/** @nrwl/nx-linter-reviewers @nrwl/nx-docs-reviewers
/docs/generated/packages/linter/** @nrwl/nx-linter-reviewers @nrwl/nx-docs-reviewers
/docs/shared/packages/linter/** @nrwl/nx-linter-reviewers @nrwl/nx-docs-reviewers
/docs/generated/packages/eslint/** @nrwl/nx-linter-reviewers @nrwl/nx-docs-reviewers
/docs/shared/packages/eslint/** @nrwl/nx-linter-reviewers @nrwl/nx-docs-reviewers
/packages/eslint-plugin/** @nrwl/nx-linter-reviewers
/packages/eslint/** @nrwl/nx-linter-reviewers
/e2e/eslint/** @nrwl/nx-linter-reviewers
Expand Down
39 changes: 28 additions & 11 deletions docs/generated/manifests/menus.json
Original file line number Diff line number Diff line change
Expand Up @@ -6668,19 +6668,36 @@
"disableCollapsible": false
},
{
"id": "linter",
"path": "/nx-api/linter",
"name": "linter",
"id": "eslint",
"path": "/nx-api/eslint",
"name": "eslint",
"children": [
{
"id": "documents",
"path": "/nx-api/eslint/documents",
"name": "documents",
"children": [
{
"name": "Overview",
"path": "/nx-api/eslint/documents/overview",
"id": "overview",
"isExternal": false,
"children": [],
"disableCollapsible": false
}
],
"isExternal": false,
"disableCollapsible": false
},
{
"id": "executors",
"path": "/nx-api/linter/executors",
"path": "/nx-api/eslint/executors",
"name": "executors",
"children": [
{
"id": "eslint",
"path": "/nx-api/linter/executors/eslint",
"name": "eslint",
"id": "lint",
"path": "/nx-api/eslint/executors/lint",
"name": "lint",
"children": [],
"isExternal": false,
"disableCollapsible": false
Expand All @@ -6691,28 +6708,28 @@
},
{
"id": "generators",
"path": "/nx-api/linter/generators",
"path": "/nx-api/eslint/generators",
"name": "generators",
"children": [
{
"id": "workspace-rules-project",
"path": "/nx-api/linter/generators/workspace-rules-project",
"path": "/nx-api/eslint/generators/workspace-rules-project",
"name": "workspace-rules-project",
"children": [],
"isExternal": false,
"disableCollapsible": false
},
{
"id": "workspace-rule",
"path": "/nx-api/linter/generators/workspace-rule",
"path": "/nx-api/eslint/generators/workspace-rule",
"name": "workspace-rule",
"children": [],
"isExternal": false,
"disableCollapsible": false
},
{
"id": "convert-to-flat-config",
"path": "/nx-api/linter/generators/convert-to-flat-config",
"path": "/nx-api/eslint/generators/convert-to-flat-config",
"name": "convert-to-flat-config",
"children": [],
"isExternal": false,
Expand Down
54 changes: 33 additions & 21 deletions docs/generated/manifests/nx-api.json
Original file line number Diff line number Diff line change
Expand Up @@ -650,55 +650,67 @@
},
"path": "/nx-api/esbuild"
},
"linter": {
"eslint": {
"githubRoot": "https://github.com/nrwl/nx/blob/master",
"name": "linter",
"packageName": "@nx/linter",
"name": "eslint",
"packageName": "@nx/eslint",
"description": "The ESLint plugin for Nx contains executors, generators and utilities used for linting JavaScript/TypeScript projects within an Nx workspace.",
"documents": {},
"documents": {
"/nx-api/eslint/documents/overview": {
"id": "overview",
"name": "Overview",
"description": "The ESLint plugin for Nx contains executors, generators and utilities used for linting JavaScript/TypeScript projects within an Nx workspace.",
"file": "generated/packages/eslint/documents/overview",
"itemList": [],
"isExternal": false,
"path": "/nx-api/eslint/documents/overview",
"tags": [],
"originalFilePath": "shared/packages/eslint/eslint"
}
},
"root": "/packages/eslint",
"source": "/packages/eslint/src",
"executors": {
"/nx-api/linter/executors/eslint": {
"/nx-api/eslint/executors/lint": {
"description": "Run ESLint on a project.",
"file": "generated/packages/linter/executors/eslint.json",
"file": "generated/packages/eslint/executors/lint.json",
"hidden": false,
"name": "eslint",
"name": "lint",
"originalFilePath": "/packages/eslint/src/executors/lint/schema.json",
"path": "/nx-api/linter/executors/eslint",
"path": "/nx-api/eslint/executors/lint",
"type": "executor"
}
},
"generators": {
"/nx-api/linter/generators/workspace-rules-project": {
"/nx-api/eslint/generators/workspace-rules-project": {
"description": "Create the Workspace Lint Rules Project.",
"file": "generated/packages/linter/generators/workspace-rules-project.json",
"file": "generated/packages/eslint/generators/workspace-rules-project.json",
"hidden": true,
"name": "workspace-rules-project",
"originalFilePath": "/packages/eslint/src/generators/workspace-rules-project/schema.json",
"path": "/nx-api/linter/generators/workspace-rules-project",
"path": "/nx-api/eslint/generators/workspace-rules-project",
"type": "generator"
},
"/nx-api/linter/generators/workspace-rule": {
"/nx-api/eslint/generators/workspace-rule": {
"description": "Create a new Workspace ESLint rule.",
"file": "generated/packages/linter/generators/workspace-rule.json",
"file": "generated/packages/eslint/generators/workspace-rule.json",
"hidden": false,
"name": "workspace-rule",
"originalFilePath": "/packages/eslint/src/generators/workspace-rule/schema.json",
"path": "/nx-api/linter/generators/workspace-rule",
"path": "/nx-api/eslint/generators/workspace-rule",
"type": "generator"
},
"/nx-api/linter/generators/convert-to-flat-config": {
"/nx-api/eslint/generators/convert-to-flat-config": {
"description": "Convert an Nx workspace's ESLint configs to use Flat Config.",
"file": "generated/packages/linter/generators/convert-to-flat-config.json",
"file": "generated/packages/eslint/generators/convert-to-flat-config.json",
"hidden": false,
"name": "convert-to-flat-config",
"originalFilePath": "/packages/eslint/src/generators/convert-to-flat-config/schema.json",
"path": "/nx-api/linter/generators/convert-to-flat-config",
"path": "/nx-api/eslint/generators/convert-to-flat-config",
"type": "generator"
}
},
"path": "/nx-api/linter"
"path": "/nx-api/eslint"
},
"eslint-plugin": {
"githubRoot": "https://github.com/nrwl/nx/blob/master",
Expand All @@ -715,7 +727,7 @@
"isExternal": false,
"path": "/nx-api/eslint-plugin/documents/overview",
"tags": [],
"originalFilePath": "shared/packages/linter/eslint-plugin"
"originalFilePath": "shared/packages/eslint/eslint-plugin"
},
"/nx-api/eslint-plugin/documents/enforce-module-boundaries": {
"id": "enforce-module-boundaries",
Expand All @@ -726,7 +738,7 @@
"isExternal": false,
"path": "/nx-api/eslint-plugin/documents/enforce-module-boundaries",
"tags": [],
"originalFilePath": "shared/packages/linter/enforce-module-boundaries"
"originalFilePath": "shared/packages/eslint/enforce-module-boundaries"
},
"/nx-api/eslint-plugin/documents/dependency-checks": {
"id": "dependency-checks",
Expand All @@ -737,7 +749,7 @@
"isExternal": false,
"path": "/nx-api/eslint-plugin/documents/dependency-checks",
"tags": [],
"originalFilePath": "shared/packages/linter/dependency-checks"
"originalFilePath": "shared/packages/eslint/dependency-checks"
}
},
"root": "/packages/eslint-plugin",
Expand Down
42 changes: 27 additions & 15 deletions docs/generated/packages-metadata.json
Original file line number Diff line number Diff line change
Expand Up @@ -645,50 +645,62 @@
},
{
"description": "The ESLint plugin for Nx contains executors, generators and utilities used for linting JavaScript/TypeScript projects within an Nx workspace.",
"documents": [],
"documents": [
{
"id": "overview",
"name": "Overview",
"description": "The ESLint plugin for Nx contains executors, generators and utilities used for linting JavaScript/TypeScript projects within an Nx workspace.",
"file": "generated/packages/eslint/documents/overview",
"itemList": [],
"isExternal": false,
"path": "eslint/documents/overview",
"tags": [],
"originalFilePath": "shared/packages/eslint/eslint"
}
],
"executors": [
{
"description": "Run ESLint on a project.",
"file": "generated/packages/linter/executors/eslint.json",
"file": "generated/packages/eslint/executors/lint.json",
"hidden": false,
"name": "eslint",
"name": "lint",
"originalFilePath": "/packages/eslint/src/executors/lint/schema.json",
"path": "linter/executors/eslint",
"path": "eslint/executors/lint",
"type": "executor"
}
],
"generators": [
{
"description": "Create the Workspace Lint Rules Project.",
"file": "generated/packages/linter/generators/workspace-rules-project.json",
"file": "generated/packages/eslint/generators/workspace-rules-project.json",
"hidden": true,
"name": "workspace-rules-project",
"originalFilePath": "/packages/eslint/src/generators/workspace-rules-project/schema.json",
"path": "linter/generators/workspace-rules-project",
"path": "eslint/generators/workspace-rules-project",
"type": "generator"
},
{
"description": "Create a new Workspace ESLint rule.",
"file": "generated/packages/linter/generators/workspace-rule.json",
"file": "generated/packages/eslint/generators/workspace-rule.json",
"hidden": false,
"name": "workspace-rule",
"originalFilePath": "/packages/eslint/src/generators/workspace-rule/schema.json",
"path": "linter/generators/workspace-rule",
"path": "eslint/generators/workspace-rule",
"type": "generator"
},
{
"description": "Convert an Nx workspace's ESLint configs to use Flat Config.",
"file": "generated/packages/linter/generators/convert-to-flat-config.json",
"file": "generated/packages/eslint/generators/convert-to-flat-config.json",
"hidden": false,
"name": "convert-to-flat-config",
"originalFilePath": "/packages/eslint/src/generators/convert-to-flat-config/schema.json",
"path": "linter/generators/convert-to-flat-config",
"path": "eslint/generators/convert-to-flat-config",
"type": "generator"
}
],
"githubRoot": "https://github.com/nrwl/nx/blob/master",
"name": "linter",
"packageName": "@nx/linter",
"name": "eslint",
"packageName": "@nx/eslint",
"root": "/packages/eslint",
"source": "/packages/eslint/src"
},
Expand All @@ -704,7 +716,7 @@
"isExternal": false,
"path": "eslint-plugin/documents/overview",
"tags": [],
"originalFilePath": "shared/packages/linter/eslint-plugin"
"originalFilePath": "shared/packages/eslint/eslint-plugin"
},
{
"id": "enforce-module-boundaries",
Expand All @@ -715,7 +727,7 @@
"isExternal": false,
"path": "eslint-plugin/documents/enforce-module-boundaries",
"tags": [],
"originalFilePath": "shared/packages/linter/enforce-module-boundaries"
"originalFilePath": "shared/packages/eslint/enforce-module-boundaries"
},
{
"id": "dependency-checks",
Expand All @@ -726,7 +738,7 @@
"isExternal": false,
"path": "eslint-plugin/documents/dependency-checks",
"tags": [],
"originalFilePath": "shared/packages/linter/dependency-checks"
"originalFilePath": "shared/packages/eslint/dependency-checks"
}
],
"executors": [],
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ Additionally, you need to adjust your `lintFilePatterns` to include the project'
"targets": {
// ... more targets
"lint": {
"executor": "@nx/linter:lint",
"executor": "@nx/eslint:lint",
"outputs": ["{options.outputFile}"],
"options": {
"lintFilePatterns": [
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
The `@nx/linter-plugin` package is an ESLint plugin that contains a collection of recommended ESLint rule configurations which you can extend from in your own ESLint configs, as well as the following Nx-specific ESLint rules:
The `@nx/eslint-plugin` package is an ESLint plugin that contains a collection of recommended ESLint rule configurations which you can extend from in your own ESLint configs, as well as the following Nx-specific ESLint rules:

- [enforce-module-boundaries](#enforce-module-boundaries-rule)
- [dependency-checks](#dependency-checks-rule)
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
The Linter plugin contains executors, generator, plugin and utilities used for linting JavaScript/TypeScript projects within an Nx workspace.
The ESLint plugin contains executors, generator, plugin and utilities used for linting JavaScript/TypeScript projects within an Nx workspace.

## Setting Up Linter
## Setting Up ESLint

### Installation

Expand Down Expand Up @@ -32,7 +32,7 @@ nx lint my-lib

## Utils

- [convert-to-flat-config](/nx-api/linter/generators/convert-to-flat-config) - Converts the workspace's [ESLint](https://eslint.org/) configs to the new [Flat Config](https://eslint.org/blog/2022/08/new-config-system-part-2)
- [convert-to-flat-config](/nx-api/eslint/generators/convert-to-flat-config) - Converts the workspace's [ESLint](https://eslint.org/) configs to the new [Flat Config](https://eslint.org/blog/2022/08/new-config-system-part-2)

## ESLint plugin

Expand Down
Loading

1 comment on commit b30f3c5

@vercel
Copy link

@vercel vercel bot commented on b30f3c5 Oct 19, 2023

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-nrwl.vercel.app
nx-dev-git-master-nrwl.vercel.app
nx-five.vercel.app
nx.dev

Please sign in to comment.