1
0
mirror of synced 2025-11-08 04:48:04 +00:00

fix(tslint): silence some unnecessary tslint warnings

This commit is contained in:
Jason Dreyzehner
2018-11-26 23:56:21 -05:00
parent 4ef5f25972
commit 82b7f45923
4 changed files with 11 additions and 4 deletions

View File

@@ -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',

View File

@@ -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 {

View File

@@ -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}`,

View File

@@ -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`;
}