Skip to content

Commit

Permalink
chore: lint
Browse files Browse the repository at this point in the history
  • Loading branch information
rishabh3112 committed May 28, 2019
1 parent 0782944 commit cb5a15f
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 3 deletions.
1 change: 1 addition & 0 deletions packages/generators/add-generator.ts
Expand Up @@ -117,6 +117,7 @@ export default class AddGenerator extends Generator {
mergeFile: string;
}) => {
const resolvedPath = resolve(process.cwd(), mergeFileAnswer.mergeFile);
// eslint-disable-next-line
const mergeConfig = require(resolvedPath);
(this.configuration.config.merge as {
configName?: string;
Expand Down
6 changes: 4 additions & 2 deletions packages/generators/utils/add/index.ts
Expand Up @@ -3,15 +3,17 @@ import PROP_TYPES from "@webpack-cli/utils/prop-types";
export const PROPS: string[] = Array.from(PROP_TYPES.keys());

// tslint:disable:no-var-requires
// eslint-disable-next-line
export const webpackDevServerSchema = require("webpack-dev-server/lib/options.json");
// eslint-disable-next-line
export const webpackSchema = require("../optionsSchema.json");

/**
*
* Replaces the string with a substring at the given index
* https://gist.github.com/efenacigiray/9367920
*
* @param {String} string - string to be modified
* @param {String} str - string to be modified
* @param {Number} index - index to replace from
* @param {String} replace - string to replace starting from index
*
Expand All @@ -33,7 +35,7 @@ export function replaceAt(str: string, index: number, replace: string): string {
* is present
*/
export const traverseAndGetProperties = (arr: object[], prop: string): boolean => {
let hasProp: boolean = false;
let hasProp = false;
arr.forEach((p: object): void => {
if (p[prop]) {
hasProp = true;
Expand Down
3 changes: 2 additions & 1 deletion packages/generators/utils/add/questions/index.ts
Expand Up @@ -13,7 +13,8 @@ import { Question } from "inquirer";

/**
* Returns Inquirer question for given action
* @param action string
* @param {string} action
* @returns {Question}
*/
export const manualOrListInput: (action: string) => Question = (action: string) => {
const actionQuestion = `What do you want to add to ${action}?`;
Expand Down

0 comments on commit cb5a15f

Please sign in to comment.