Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore(gatsby-cli): Convert init-starter to typescript #22086

Merged
merged 5 commits into from
Mar 10, 2020

Conversation

mottox2
Copy link
Contributor

@mottox2 mottox2 commented Mar 9, 2020

Description

Convert init-starter to typescript

Related Issues

Related to #21995

@mottox2 mottox2 requested a review from a team as a code owner March 9, 2020 07:45
blainekasten
blainekasten previously approved these changes Mar 9, 2020
Copy link
Contributor

@blainekasten blainekasten left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This looks great! Thank you so much!

@blainekasten blainekasten added the bot: merge on green Gatsbot will merge these PRs automatically when all tests passes label Mar 9, 2020
@blainekasten
Copy link
Contributor

@mottox2 lint is failing:

/home/circleci/project/packages/gatsby-cli/src/init-starter.ts
   17:39  warning  Unexpected any. Specify a different type        @typescript-eslint/no-explicit-any
   19:10  error    'spawnWithArgs' was used before it was defined  @typescript-eslint/no-use-before-define
   21:23  error    Missing return type on function                 @typescript-eslint/explicit-function-return-type
   21:64  warning  Unexpected any. Specify a different type        @typescript-eslint/no-explicit-any
  161:32  warning  Unexpected any. Specify a different type        @typescript-eslint/no-explicit-any
  192:18  error    Missing return type on function                 @typescript-eslint/explicit-function-return-type
  239:6   error    Use an `interface` instead of a `type`          @typescript-eslint/consistent-type-definitions
  243:24  error    Missing return type on function                 @typescript-eslint/explicit-function-return-type```

@mottox2
Copy link
Contributor Author

mottox2 commented Mar 9, 2020

Sorry, I fixed it. Thank you for reviewing.

packages/gatsby-cli/src/init-starter.ts Outdated Show resolved Hide resolved
packages/gatsby-cli/src/init-starter.ts Outdated Show resolved Hide resolved
const spawnWithArgs = (
file: string,
args: string[],
options?: any
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

is it possible to type this? seems like it should be available maybe on execa or something?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm going to merge because this is the only concern i see, but would love to see this get fixed in a follow up!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bot: merge on green Gatsbot will merge these PRs automatically when all tests passes
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants