diff --git a/e2e/nx-plugin/src/nx-plugin.test.ts b/e2e/nx-plugin/src/nx-plugin.test.ts index a88a5fb4b5..4cfdd5bfd7 100644 --- a/e2e/nx-plugin/src/nx-plugin.test.ts +++ b/e2e/nx-plugin/src/nx-plugin.test.ts @@ -97,7 +97,7 @@ describe('Nx Plugin', () => { expect(migrationsJson).toMatchObject({ generators: expect.objectContaining({ [`update-${version}`]: { - version: version, + version, description: `update-${version}`, cli: `nx`, implementation: `./src/migrations/update-${version}/update-${version}`, diff --git a/packages/create-nx-plugin/bin/create-nx-plugin.ts b/packages/create-nx-plugin/bin/create-nx-plugin.ts index 68e682fc7f..d2ce0b6542 100644 --- a/packages/create-nx-plugin/bin/create-nx-plugin.ts +++ b/packages/create-nx-plugin/bin/create-nx-plugin.ts @@ -79,17 +79,14 @@ function createWorkspace( } function createNxPlugin(workspaceName, pluginName, packageManager) { - console.log( - `nx generate @nrwl/nx-plugin:plugin ${pluginName} --importPath=${workspaceName}/${pluginName}` - ); + const command = `nx generate @nrwl/nx-plugin:plugin ${pluginName} --importPath=${workspaceName}/${pluginName}`; + console.log(command); + const pmc = getPackageManagerCommand(packageManager); - execSync( - `${pmc.exec} nx generate @nrwl/nx-plugin:plugin ${pluginName} --importPath=${workspaceName}/${pluginName}`, - { - cwd: workspaceName, - stdio: [0, 1, 2], - } - ); + execSync(`${pmc.exec} ${command}`, { + cwd: workspaceName, + stdio: [0, 1, 2], + }); } function updateWorkspace(workspaceName: string) { diff --git a/packages/create-nx-workspace/bin/create-nx-workspace.ts b/packages/create-nx-workspace/bin/create-nx-workspace.ts index 262472f0bd..8a7300797d 100644 --- a/packages/create-nx-workspace/bin/create-nx-workspace.ts +++ b/packages/create-nx-workspace/bin/create-nx-workspace.ts @@ -513,7 +513,7 @@ function pointToTutorialAndCourse(preset: Preset) { // case Preset.Gatsby: output.addVerticalSeparator(); output.note({ - title: title, + title, bodyLines: [ `https://nx.dev/react/tutorial/01-create-application`, ...pointToFreeCourseOnEgghead(), @@ -524,7 +524,7 @@ function pointToTutorialAndCourse(preset: Preset) { case Preset.AngularWithNest: output.addVerticalSeparator(); output.note({ - title: title, + title, bodyLines: [ `https://nx.dev/angular/tutorial/01-create-application`, ...pointToFreeCourseOnYoutube(), diff --git a/packages/cypress/src/executors/cypress/cypress.impl.ts b/packages/cypress/src/executors/cypress/cypress.impl.ts index 3705865c5e..3bfc563e3d 100644 --- a/packages/cypress/src/executors/cypress/cypress.impl.ts +++ b/packages/cypress/src/executors/cypress/cypress.impl.ts @@ -144,7 +144,7 @@ async function runCypress(baseUrl: string, opts: CypressExecutorOptions) { // If not, will use the `baseUrl` normally from `cypress.json` if (baseUrl) { - options.config = { baseUrl: baseUrl }; + options.config = { baseUrl }; } if (opts.browser) { diff --git a/packages/jest/src/utils/config/functions.ts b/packages/jest/src/utils/config/functions.ts index 102df5f75b..72996277d7 100644 --- a/packages/jest/src/utils/config/functions.ts +++ b/packages/jest/src/utils/config/functions.ts @@ -113,7 +113,7 @@ export function addOrUpdateProperty( { type: ChangeType.Insert, index: arrayLiteral.elements.end, - text: text, + text, }, ]); tree.write(path, updatedContents); @@ -145,7 +145,7 @@ export function addOrUpdateProperty( { type: ChangeType.Insert, index: object.properties.end, - text: text, + text, }, ]); tree.write(path, updatedContents); diff --git a/packages/node/src/schematics/library/library.ts b/packages/node/src/schematics/library/library.ts index a226bcc70c..9194bcebba 100644 --- a/packages/node/src/schematics/library/library.ts +++ b/packages/node/src/schematics/library/library.ts @@ -120,7 +120,7 @@ function addProject(options: NormalizedSchema): Rule { } return updateWorkspaceInTree((json, context, host) => { - const architect = json.projects[options.name].architect; + const { architect } = json.projects[options.name]; if (architect) { architect.build = { builder: '@nrwl/node:package', diff --git a/packages/nx-plugin/src/schematics/plugin/plugin.ts b/packages/nx-plugin/src/schematics/plugin/plugin.ts index 0329a19980..9112df3134 100644 --- a/packages/nx-plugin/src/schematics/plugin/plugin.ts +++ b/packages/nx-plugin/src/schematics/plugin/plugin.ts @@ -17,13 +17,13 @@ import { Schema } from './schema'; export default function (schema: Schema): Rule { return (host: Tree) => { const options = normalizeOptions(host, schema); - + const { unitTestRunner } = options; return chain([ externalSchematic('@nrwl/node', 'lib', { ...schema, publishable: true, importPath: schema.importPath, - unitTestRunner: options.unitTestRunner, + unitTestRunner, }), addDepsToPackageJson( {}, diff --git a/packages/storybook/src/executors/build-storybook/build-storybook.impl.spec.ts b/packages/storybook/src/executors/build-storybook/build-storybook.impl.spec.ts index b3839b343b..09e1680f11 100644 --- a/packages/storybook/src/executors/build-storybook/build-storybook.impl.spec.ts +++ b/packages/storybook/src/executors/build-storybook/build-storybook.impl.spec.ts @@ -53,8 +53,8 @@ describe('Build storybook', () => { const result = await storybookBuilder( { - uiFramework: uiFramework, - outputPath: outputPath, + uiFramework, + outputPath, config, }, context diff --git a/packages/tao/src/commands/ngcli-adapter.ts b/packages/tao/src/commands/ngcli-adapter.ts index 13809971ea..1790304945 100644 --- a/packages/tao/src/commands/ngcli-adapter.ts +++ b/packages/tao/src/commands/ngcli-adapter.ts @@ -642,10 +642,10 @@ function convertEventTypeToHandleMultipleConfigNames( content: Buffer.from(JSON.stringify(formatted, null, 2)), }; } else { - return { eventPath: actualConfigName, content: content }; + return { eventPath: actualConfigName, content }; } } else { - return { eventPath: actualConfigName, content: content }; + return { eventPath: actualConfigName, content }; } } else { return { eventPath, content }; diff --git a/packages/tao/src/commands/run.ts b/packages/tao/src/commands/run.ts index 7fe0cf26dc..fa99ac24b1 100644 --- a/packages/tao/src/commands/run.ts +++ b/packages/tao/src/commands/run.ts @@ -206,14 +206,14 @@ async function runExecutorInternal( if (ws.isNxExecutor(nodeModule, executor)) { const implementation = implementationFactory(); const r = implementation(combinedOptions, { - root: root, + root, target: targetConfig, - workspace: workspace, + workspace, projectName: project, targetName: target, configurationName: configuration, - cwd: cwd, - isVerbose: isVerbose, + cwd, + isVerbose, }) as Promise | AsyncIterableIterator; if (isPromise(r)) { return promiseToIterator(r); diff --git a/packages/web/src/utils/devserver.config.ts b/packages/web/src/utils/devserver.config.ts index 2926b1c15b..3ec224403c 100644 --- a/packages/web/src/utils/devserver.config.ts +++ b/packages/web/src/utils/devserver.config.ts @@ -57,7 +57,7 @@ function getDevServerPartial( htmlAcceptHeaders: ['text/html', 'application/xhtml+xml'], }, noInfo: true, - onListening: function (server: any) { + onListening(server: any) { // Depend on the info in the server for this function because the user might adjust the webpack config const serverUrl = url.format({ protocol: server.options.https ? 'https' : 'http', diff --git a/packages/web/src/utils/web.config.ts b/packages/web/src/utils/web.config.ts index ab524f75d3..2dad0e088a 100644 --- a/packages/web/src/utils/web.config.ts +++ b/packages/web/src/utils/web.config.ts @@ -81,7 +81,7 @@ function getBrowserPartial( output: basename(index), baseHref, entrypoints: generateEntryPoints({ scripts, styles }), - deployUrl: deployUrl, + deployUrl, sri: subresourceIntegrity, noModuleEntrypoints: ['polyfills-es5'], }) diff --git a/packages/workspace/src/command-line/print-affected.ts b/packages/workspace/src/command-line/print-affected.ts index f3df19045f..b25fd74569 100644 --- a/packages/workspace/src/command-line/print-affected.ts +++ b/packages/workspace/src/command-line/print-affected.ts @@ -52,7 +52,7 @@ async function createTasks( project: affectedProject, target: nxArgs.target, configuration: nxArgs.configuration, - overrides: overrides, + overrides, errorIfCannotFindConfiguration: false, }) ); @@ -62,7 +62,7 @@ async function createTasks( const isYarn = pm === 'yarn'; return tasks.map((task, index) => ({ id: task.id, - overrides: overrides, + overrides, target: task.target, command: `${isYarn ? 'yarn' : `${pm} run`} ${getCommandAsString( 'nx', diff --git a/packages/workspace/src/command-line/workspace-generators.ts b/packages/workspace/src/command-line/workspace-generators.ts index 79a178c191..2f73308aff 100644 --- a/packages/workspace/src/command-line/workspace-generators.ts +++ b/packages/workspace/src/command-line/workspace-generators.ts @@ -124,7 +124,7 @@ function constructCollection() { return { name: 'workspace-generators', version: '1.0', - generators: generators, + generators, schematics: generators, }; } @@ -353,8 +353,8 @@ async function executeAngularDevkitSchematic( .execute({ collection: path.join(outDir, 'workspace-generators.json'), schematic: schematicName, - options: options, - logger: logger, + options, + logger, }) .toPromise(); diff --git a/packages/workspace/src/core/file-utils.ts b/packages/workspace/src/core/file-utils.ts index 23be7bafee..0bb7f3a2ad 100644 --- a/packages/workspace/src/core/file-utils.ts +++ b/packages/workspace/src/core/file-utils.ts @@ -115,7 +115,7 @@ function defaultReadFileAtRevision( function getFileData(filePath: string): FileData { const file = path.relative(appRootPath, filePath).split(path.sep).join('/'); return { - file: file, + file, hash: defaultFileHasher.hashFile(filePath), ext: path.extname(filePath), }; diff --git a/packages/workspace/src/core/nx-deps/nx-deps-cache.ts b/packages/workspace/src/core/nx-deps/nx-deps-cache.ts index e8299b0405..38f4d2831f 100644 --- a/packages/workspace/src/core/nx-deps/nx-deps-cache.ts +++ b/packages/workspace/src/core/nx-deps/nx-deps-cache.ts @@ -131,7 +131,7 @@ export function differentFromCache( }; return { - filesDifferentFromCache: filesDifferentFromCache, + filesDifferentFromCache, partiallyConstructedProjectGraph, noDifference: Object.keys(filesDifferentFromCache).length === 0, }; diff --git a/packages/workspace/src/core/project-graph/project-graph.ts b/packages/workspace/src/core/project-graph/project-graph.ts index 4df8ca8984..83f9df21b6 100644 --- a/packages/workspace/src/core/project-graph/project-graph.ts +++ b/packages/workspace/src/core/project-graph/project-graph.ts @@ -70,7 +70,7 @@ export function createProjectGraph( const ctx = { workspaceJson, nxJson: normalizedNxJson, - fileMap: fileMap, + fileMap, }; const projectGraph = buildProjectGraph(ctx, fileRead, null); if (shouldCache) { diff --git a/packages/workspace/src/tasks-runner/run-command.ts b/packages/workspace/src/tasks-runner/run-command.ts index 63b6161ff9..19afdca5b2 100644 --- a/packages/workspace/src/tasks-runner/run-command.ts +++ b/packages/workspace/src/tasks-runner/run-command.ts @@ -42,7 +42,7 @@ export async function runCommand( project, target: nxArgs.target, configuration: nxArgs.configuration, - overrides: overrides, + overrides, errorIfCannotFindConfiguration: project.name === initiatingProject, }); }); @@ -55,7 +55,7 @@ export async function runCommand( } const cached = []; tasksRunner(tasks, runnerOptions, { - initiatingProject: initiatingProject, + initiatingProject, target: nxArgs.target, projectGraph, nxJson, diff --git a/packages/workspace/src/utilities/create-project-graph-from-tree.ts b/packages/workspace/src/utilities/create-project-graph-from-tree.ts index 6107c8ad12..ad07f94da2 100644 --- a/packages/workspace/src/utilities/create-project-graph-from-tree.ts +++ b/packages/workspace/src/utilities/create-project-graph-from-tree.ts @@ -16,7 +16,7 @@ export function createProjectGraphFromTree(tree: Tree) { visitNotIgnoredFiles(tree, '', (file) => { files.push({ - file: file, + file, ext: extname(file), hash: '', });