diff --git a/packages/workspace/src/generators/library/files/lib/README.md b/packages/workspace/src/generators/library/files/lib/README.md index 6346442e498b1..6c5d01351e2ed 100644 --- a/packages/workspace/src/generators/library/files/lib/README.md +++ b/packages/workspace/src/generators/library/files/lib/README.md @@ -6,5 +6,9 @@ This library was generated with [Nx](https://nx.dev). ## Running unit tests Run `<%= cliCommand %> test <%= name %>` to execute the unit tests via [Jest](https://jestjs.io). +<% } %><% if (hasLinter) { %> +## Running lint + +Run `<%= cliCommand %> lint <%= name %>` to execute the lint via [ESLint](https://eslint.org/). <% } %> diff --git a/packages/workspace/src/generators/library/library.ts b/packages/workspace/src/generators/library/library.ts index a9e3b235d20e6..478ec57fef889 100644 --- a/packages/workspace/src/generators/library/library.ts +++ b/packages/workspace/src/generators/library/library.ts @@ -144,6 +144,7 @@ function createFiles(tree: Tree, options: NormalizedSchema) { offsetFromRoot: rootOffset, rootTsConfigPath: getRelativePathToRootTsConfig(tree, options.projectRoot), hasUnitTestRunner: options.unitTestRunner !== 'none', + hasLinter: options.linter !== 'none', }); if (options.unitTestRunner === 'none') {