From cb5a15f04732a358afd1b705199a07492125b59d Mon Sep 17 00:00:00 2001 From: Rishabh Date: Tue, 28 May 2019 16:38:52 +0530 Subject: [PATCH] chore: lint --- packages/generators/add-generator.ts | 1 + packages/generators/utils/add/index.ts | 6 ++++-- packages/generators/utils/add/questions/index.ts | 3 ++- 3 files changed, 7 insertions(+), 3 deletions(-) diff --git a/packages/generators/add-generator.ts b/packages/generators/add-generator.ts index 82755ba9d28..eb3822edd1e 100644 --- a/packages/generators/add-generator.ts +++ b/packages/generators/add-generator.ts @@ -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; diff --git a/packages/generators/utils/add/index.ts b/packages/generators/utils/add/index.ts index 9b6e9eaac22..f9743d9ecd6 100644 --- a/packages/generators/utils/add/index.ts +++ b/packages/generators/utils/add/index.ts @@ -3,7 +3,9 @@ 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"); /** @@ -11,7 +13,7 @@ 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 * @@ -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; diff --git a/packages/generators/utils/add/questions/index.ts b/packages/generators/utils/add/questions/index.ts index 1d632b41c18..81b0cfd23c3 100644 --- a/packages/generators/utils/add/questions/index.ts +++ b/packages/generators/utils/add/questions/index.ts @@ -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}?`;