Skip to content

Commit

Permalink
docs(linter): update docs for eslint package
Browse files Browse the repository at this point in the history
  • Loading branch information
meeroslav committed Oct 17, 2023
1 parent 6f9d48c commit 7536001
Show file tree
Hide file tree
Showing 40 changed files with 317 additions and 246 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 @@ -6560,19 +6560,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 @@ -6583,28 +6600,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
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

0 comments on commit 7536001

Please sign in to comment.