diff --git a/packages/angular/generators.json b/packages/angular/generators.json index f9665da73fd67..90e67caa908e7 100644 --- a/packages/angular/generators.json +++ b/packages/angular/generators.json @@ -40,7 +40,7 @@ "description": "Creates a cypress component test file for a component." }, "convert-tslint-to-eslint": { - "factory": "./src/generators/convert-tslint-to-eslint/convert-tslint-to-eslint#conversionSchematic", + "factory": "./src/generators/convert-tslint-to-eslint/compat", "schema": "./src/generators/convert-tslint-to-eslint/schema.json", "description": "Converts a project from TSLint to ESLint." }, @@ -70,7 +70,7 @@ "description": "Generate a Remote Angular Module Federation Application." }, "move": { - "factory": "./src/generators/move/move#angularMoveSchematic", + "factory": "./src/generators/move/compat", "schema": "./src/generators/move/schema.json", "aliases": ["mv"], "description": "Moves an Angular application or library to another folder within the workspace and updates the project configuration." diff --git a/packages/angular/src/generators/convert-tslint-to-eslint/compat.ts b/packages/angular/src/generators/convert-tslint-to-eslint/compat.ts new file mode 100644 index 0000000000000..78822c2f471b6 --- /dev/null +++ b/packages/angular/src/generators/convert-tslint-to-eslint/compat.ts @@ -0,0 +1,7 @@ +import { convertNxGenerator } from '@nx/devkit'; +import { warnForSchematicUsage } from '../utils/warn-for-schematic-usage'; +import { conversionGenerator } from './convert-tslint-to-eslint'; + +export const conversionSchematic = warnForSchematicUsage( + convertNxGenerator(conversionGenerator) +); diff --git a/packages/angular/src/generators/convert-tslint-to-eslint/convert-tslint-to-eslint.ts b/packages/angular/src/generators/convert-tslint-to-eslint/convert-tslint-to-eslint.ts index 42afb42345000..9d04cabb36f25 100755 --- a/packages/angular/src/generators/convert-tslint-to-eslint/convert-tslint-to-eslint.ts +++ b/packages/angular/src/generators/convert-tslint-to-eslint/convert-tslint-to-eslint.ts @@ -1,16 +1,9 @@ import { conversionGenerator as cypressConversionGenerator } from '@nx/cypress'; -import { - convertNxGenerator, - formatFiles, - GeneratorCallback, - logger, - Tree, -} from '@nx/devkit'; +import { formatFiles, GeneratorCallback, logger, Tree } from '@nx/devkit'; import { ConvertTSLintToESLintSchema, ProjectConverter } from '@nx/linter'; import type { Linter } from 'eslint'; import type { AngularProjectConfiguration } from '../../utils/types'; import { addLintingGenerator } from '../add-linting/add-linting'; -import { warnForSchematicUsage } from '../utils/warn-for-schematic-usage'; export async function conversionGenerator( host: Tree, @@ -139,10 +132,6 @@ export async function conversionGenerator( }; } -export const conversionSchematic = warnForSchematicUsage( - convertNxGenerator(conversionGenerator) -); - /** * In the case of Angular lint rules, we need to apply them to correct override depending upon whether * or not they require @typescript-eslint/parser or @angular-eslint/template-parser in order to function. diff --git a/packages/angular/src/generators/move/compat.ts b/packages/angular/src/generators/move/compat.ts new file mode 100644 index 0000000000000..c7b5746b8d9f0 --- /dev/null +++ b/packages/angular/src/generators/move/compat.ts @@ -0,0 +1,7 @@ +import { convertNxGenerator } from '@nx/devkit'; +import { warnForSchematicUsage } from '../utils/warn-for-schematic-usage'; +import { angularMoveGenerator } from './move'; + +export const angularMoveSchematic = warnForSchematicUsage( + convertNxGenerator(angularMoveGenerator) +); diff --git a/packages/angular/src/generators/move/move.ts b/packages/angular/src/generators/move/move.ts index 1184af3ef9c33..029751ff72296 100644 --- a/packages/angular/src/generators/move/move.ts +++ b/packages/angular/src/generators/move/move.ts @@ -1,5 +1,4 @@ -import { convertNxGenerator, formatFiles, Tree } from '@nx/devkit'; -import { warnForSchematicUsage } from '../utils/warn-for-schematic-usage'; +import { formatFiles, Tree } from '@nx/devkit'; import { moveGenerator } from '@nx/workspace/generators'; import { updateModuleName } from './lib/update-module-name'; import { updateNgPackage } from './lib/update-ng-package'; @@ -24,7 +23,3 @@ export async function angularMoveGenerator( await formatFiles(tree); } } - -export const angularMoveSchematic = warnForSchematicUsage( - convertNxGenerator(angularMoveGenerator) -);