Skip to content

chore(schematics): re-enable linting for ignored file #13542

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 5 additions & 7 deletions src/cdk/schematics/utils/build-component.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
/* tslint:disable */

/**
* @license
* Copyright Google LLC All Rights Reserved.
Expand Down Expand Up @@ -58,7 +56,7 @@ function addDeclarationToNgModule(options: ComponentOptions): Rule {
}

const modulePath = options.module;
const source = readIntoSourceFile(host, modulePath);
let source = readIntoSourceFile(host, modulePath);

const componentPath = `/${options.path}/`
+ (options.flat ? '' : strings.dasherize(options.name) + '/')
Expand All @@ -83,9 +81,9 @@ function addDeclarationToNgModule(options: ComponentOptions): Rule {

if (options.export) {
// Need to refresh the AST because we overwrote the file in the host.
const source = readIntoSourceFile(host, modulePath);
const exportRecorder = host.beginUpdate(modulePath);
source = readIntoSourceFile(host, modulePath);

const exportRecorder = host.beginUpdate(modulePath);
const exportChanges = addExportToModule(
source,
modulePath,
Expand All @@ -102,9 +100,9 @@ function addDeclarationToNgModule(options: ComponentOptions): Rule {

if (options.entryComponent) {
// Need to refresh the AST because we overwrote the file in the host.
const source = readIntoSourceFile(host, modulePath);
const entryComponentRecorder = host.beginUpdate(modulePath);
source = readIntoSourceFile(host, modulePath);

const entryComponentRecorder = host.beginUpdate(modulePath);
const entryComponentChanges = addEntryComponentToModule(
source,
modulePath,
Expand Down