fix(tslint): silence some unnecessary tslint warnings
This commit is contained in:
@@ -15,6 +15,7 @@ export async function inquire(): Promise<TypescriptStarterCLIOptions> {
|
||||
Library = 'lib'
|
||||
}
|
||||
const projectTypeQuestion: Question = {
|
||||
// tslint:disable-next-line:readonly-array
|
||||
choices: [
|
||||
{ name: 'Node.js application', value: ProjectType.Node },
|
||||
{ name: 'Javascript library', value: ProjectType.Library }
|
||||
@@ -33,6 +34,7 @@ export async function inquire(): Promise<TypescriptStarterCLIOptions> {
|
||||
};
|
||||
|
||||
const runnerQuestion: Question = {
|
||||
// tslint:disable-next-line:readonly-array
|
||||
choices: [
|
||||
{ name: 'npm', value: Runner.Npm },
|
||||
{ name: 'yarn', value: Runner.Yarn }
|
||||
@@ -50,6 +52,7 @@ export async function inquire(): Promise<TypescriptStarterCLIOptions> {
|
||||
}
|
||||
|
||||
const typeDefsQuestion: Question = {
|
||||
// tslint:disable-next-line:readonly-array
|
||||
choices: [
|
||||
{
|
||||
name: `None — the library won't use any globals or modules from Node.js or the DOM`,
|
||||
@@ -83,6 +86,7 @@ export async function inquire(): Promise<TypescriptStarterCLIOptions> {
|
||||
vscode = 'vscode'
|
||||
}
|
||||
const extrasQuestion: Question = {
|
||||
// tslint:disable-next-line:readonly-array
|
||||
choices: [
|
||||
{
|
||||
name: 'Enable stricter type-checking',
|
||||
|
||||
@@ -63,6 +63,7 @@ export const cloneRepo = (
|
||||
const revParseResult = await spawner('git', ['rev-parse', 'HEAD'], {
|
||||
cwd: projectDir,
|
||||
encoding: 'utf8',
|
||||
// tslint:disable-next-line:readonly-array
|
||||
stdio: ['pipe', 'pipe', inherit]
|
||||
});
|
||||
const commitHash = revParseResult.stdout;
|
||||
@@ -86,6 +87,7 @@ export const getGithubUsername = (fetcher: any) => async (
|
||||
export const getUserInfo = (spawner: ExecaStatic) => async () => {
|
||||
const opts: Options = {
|
||||
encoding: 'utf8',
|
||||
// tslint:disable-next-line:readonly-array
|
||||
stdio: ['pipe', 'pipe', inherit]
|
||||
};
|
||||
try {
|
||||
|
||||
@@ -87,6 +87,7 @@ export async function typescriptStarter(
|
||||
: {},
|
||||
description,
|
||||
devDependencies: filterAllBut(keptDevDeps, pkg.devDependencies),
|
||||
// tslint:disable-next-line:readonly-array
|
||||
keywords: [],
|
||||
name: projectName,
|
||||
repository: `https://github.com/${githubUsername}/${projectName}`,
|
||||
|
||||
@@ -61,8 +61,8 @@ export function validateName(input: string): true | string {
|
||||
return !validateNpmPackageName(input).validForNewPackages
|
||||
? 'Name should be in-kebab-case (for npm)'
|
||||
: existsSync(input)
|
||||
? `The "${input}" path already exists in this directory.`
|
||||
: true;
|
||||
? `The "${input}" path already exists in this directory.`
|
||||
: true;
|
||||
}
|
||||
|
||||
export function getIntro(columns: number | undefined): string {
|
||||
@@ -86,6 +86,6 @@ _ _ _ _ _
|
||||
return columns && columns >= 85
|
||||
? chalk.bold(gradient.mind(ascii))
|
||||
: columns && columns >= 74
|
||||
? chalk.bold(gradient.mind(asciiSmaller))
|
||||
: `\n${chalk.cyan.bold.underline('typescript-starter')}\n`;
|
||||
? chalk.bold(gradient.mind(asciiSmaller))
|
||||
: `\n${chalk.cyan.bold.underline('typescript-starter')}\n`;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user