Skip to content

Commit

Permalink
chore: fix lint
Browse files Browse the repository at this point in the history
  • Loading branch information
onlyexeption committed Oct 25, 2023
1 parent 6ed5f34 commit 1193ec1
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 8 deletions.
4 changes: 2 additions & 2 deletions packages/cli/lib/commands/add.ts
Original file line number Diff line number Diff line change
Expand Up @@ -115,13 +115,13 @@ command = {
},
async addTemplate(fileName: string, template: Template, options?: AddTemplateArgs): Promise<boolean> {
if (!options) {
if (template.framework === 'react') {
if (template.framework === "react") {
options = {
parentName: "app",
parentRoutingModulePath: "src/app/app-routes.tsx",
className: Util.className(fileName),
modulePath: `src/app/${Util.lowerDashed(fileName)}`
}
};
} else {
options = {
parentName: "app",
Expand Down
19 changes: 13 additions & 6 deletions packages/cli/lib/templates/IgniteUIForReactTemplate.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,13 @@
import { AddTemplateArgs, App, ControlExtraConfiguration, defaultDelimiters, FS_TOKEN, IFileSystem, Template, Util } from "@igniteui/cli-core";
import {
AddTemplateArgs,
App,
ControlExtraConfiguration,
defaultDelimiters,
FS_TOKEN,
IFileSystem,
Template,
Util
} from "@igniteui/cli-core";
import * as path from "path";
import { ReactTypeScriptFileUpdate } from "../../templates/react/ReactTypeScriptFileUpdate";

Expand Down Expand Up @@ -53,8 +62,8 @@ export class IgniteUIForReactTemplate implements Template {

public registerInProject(projectPath: string, name: string, options?: AddTemplateArgs, defaultPath = false) {
if (!options.parentName) {
return;
}
return;
}

const routeModulePath: string = options.parentRoutingModulePath;
const routingModule = new ReactTypeScriptFileUpdate(path.join(projectPath, routeModulePath));
Expand Down Expand Up @@ -88,13 +97,11 @@ export class IgniteUIForReactTemplate implements Template {
options.className,
nameFromPath,
filePath,
options.routerChildren,
options.routerChildren,
options.importAlias
);
}
}


}
public getExtraConfiguration(): ControlExtraConfiguration[] {
throw new Error("Method not implemented.");
Expand Down

0 comments on commit 1193ec1

Please sign in to comment.