Skip to content

Commit

Permalink
docs(linter): add missing properties to the dep-checks docs (#19125)
Browse files Browse the repository at this point in the history
  • Loading branch information
meeroslav authored Sep 15, 2023
1 parent d5f87f7 commit d87826e
Show file tree
Hide file tree
Showing 3 changed files with 22 additions and 15 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -62,6 +62,8 @@ Sometimes we intentionally want to add or remove a dependency from our `package.
{
"buildTargets": ["build", "custom-build"], // add non standard build target names
"ignoredDependencies": ["lodash"], // these libs will be omitted from checks
"includeTransitiveDependencies": true, // collect dependencies transitively from children
"ignoredFiles": ["webpack.config.js", "eslint.config.js"], // list of files that should be skipped for check
"checkMissingDependencies": true, // toggle to disable
"checkObsoleteDependencies": true, // toggle to disable
"checkVersionMismatches": true // toggle to disable
Expand All @@ -72,10 +74,12 @@ Sometimes we intentionally want to add or remove a dependency from our `package.

## Options

| Property | Type | Default | Description |
| ------------------------- | --------------- | ----------- | ----------------------------------------------------------------------- |
| buildTargets | _Array<string>_ | _["build"]_ | List of build target names |
| ignoredDependencies | _Array<string>_ | _[]_ | List of dependencies to ignore for checks |
| checkMissingDependencies | _boolean_ | _true_ | Disable to skip checking for missing dependencies |
| checkObsoleteDependencies | _boolean_ | _true_ | Disable to skip checking for unused dependencies |
| checkVersionMismatches | _boolean_ | _true_ | Disable to skip checking if version specifier matches installed version |
| Property | Type | Default | Description |
| ----------------------------- | --------------- | ----------- | ----------------------------------------------------------------------------------------------------------------------------------------- |
| buildTargets | _Array<string>_ | _["build"]_ | List of build target names |
| ignoredDependencies | _Array<string>_ | _[]_ | List of dependencies to ignore for checks |
| includeTransitiveDependencies | _boolean_ | _false_ | Enable to collect dependencies of children projects |
| ignoredFiles | _Array<string>_ | N/A | List of files to ignore when collecting dependencies. The default value will be set based on the selected executor during the generation. |
| checkMissingDependencies | _boolean_ | _true_ | Disable to skip checking for missing dependencies |
| checkObsoleteDependencies | _boolean_ | _true_ | Disable to skip checking for unused dependencies |
| checkVersionMismatches | _boolean_ | _true_ | Disable to skip checking if version specifier matches installed version |
18 changes: 11 additions & 7 deletions docs/shared/packages/linter/dependency-checks.md
Original file line number Diff line number Diff line change
Expand Up @@ -62,6 +62,8 @@ Sometimes we intentionally want to add or remove a dependency from our `package.
{
"buildTargets": ["build", "custom-build"], // add non standard build target names
"ignoredDependencies": ["lodash"], // these libs will be omitted from checks
"includeTransitiveDependencies": true, // collect dependencies transitively from children
"ignoredFiles": ["webpack.config.js", "eslint.config.js"], // list of files that should be skipped for check
"checkMissingDependencies": true, // toggle to disable
"checkObsoleteDependencies": true, // toggle to disable
"checkVersionMismatches": true // toggle to disable
Expand All @@ -72,10 +74,12 @@ Sometimes we intentionally want to add or remove a dependency from our `package.

## Options

| Property | Type | Default | Description |
| ------------------------- | --------------- | ----------- | ----------------------------------------------------------------------- |
| buildTargets | _Array<string>_ | _["build"]_ | List of build target names |
| ignoredDependencies | _Array<string>_ | _[]_ | List of dependencies to ignore for checks |
| checkMissingDependencies | _boolean_ | _true_ | Disable to skip checking for missing dependencies |
| checkObsoleteDependencies | _boolean_ | _true_ | Disable to skip checking for unused dependencies |
| checkVersionMismatches | _boolean_ | _true_ | Disable to skip checking if version specifier matches installed version |
| Property | Type | Default | Description |
| ----------------------------- | --------------- | ----------- | ----------------------------------------------------------------------------------------------------------------------------------------- |
| buildTargets | _Array<string>_ | _["build"]_ | List of build target names |
| ignoredDependencies | _Array<string>_ | _[]_ | List of dependencies to ignore for checks |
| includeTransitiveDependencies | _boolean_ | _false_ | Enable to collect dependencies of children projects |
| ignoredFiles | _Array<string>_ | N/A | List of files to ignore when collecting dependencies. The default value will be set based on the selected executor during the generation. |
| checkMissingDependencies | _boolean_ | _true_ | Disable to skip checking for missing dependencies |
| checkObsoleteDependencies | _boolean_ | _true_ | Disable to skip checking for unused dependencies |
| checkVersionMismatches | _boolean_ | _true_ | Disable to skip checking if version specifier matches installed version |
1 change: 0 additions & 1 deletion packages/eslint-plugin/src/rules/dependency-checks.ts
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,6 @@ export type Options = [
checkMissingDependencies?: boolean;
checkObsoleteDependencies?: boolean;
checkVersionMismatches?: boolean;
checkMissingPackageJson?: boolean;
ignoredDependencies?: string[];
ignoredFiles?: string[];
includeTransitiveDependencies?: boolean;
Expand Down

1 comment on commit d87826e

@vercel
Copy link

@vercel vercel bot commented on d87826e Sep 15, 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.dev
nx-five.vercel.app

Please sign in to comment.