Skip to content

TypeScript Support for FusionJS#1

Closed
gutenye wants to merge 5 commits intomasterfrom
feat/typescript-support
Closed

TypeScript Support for FusionJS#1
gutenye wants to merge 5 commits intomasterfrom
feat/typescript-support

Conversation

@gutenye
Copy link
Copy Markdown
Owner

@gutenye gutenye commented Nov 22, 2020

Getting Started

  1. Follow the official guide to create a fusion project

  2. Setup Typescript

yarn remove fusion-cli
yarn add @gutenye/fusion-cli
rename .js files to .ts and .tsx
  1. Setup eslint
yarn remove eslint-config-fusion
yarn add --dev @gutenye/eslint-config-fusion @gutenye/eslint-config-fusion-typescript @typescript-eslint/eslint-plugin @typescript-eslint/parser typescript
vi .eslintrc.js
  extends: [
    require.resolve('@gutenye/eslint-config-fusion'),
    require.resolve('@gutenye/eslint-config-fusion-typescript')
  ],
  rules: {
    "prettier/prettier": ["error", {}, { "usePrettierrc": true }]
  }
vi package.json
  "scripts": {
    "eslint": "eslint --ext .ts,.tsx",
    "lint": "yarn lint ."

  1. Start development like before
yarn dev
yarn lint
yarn test

Development

git clone git@github.com:fusionjs/fusionjs.git
git remote add gutenye git@github.com:gutenye/fusionjs.git
git fetch gutenye
git checkout -b feat/typescript-support gutenye/feat/typescript-support
git rebase master 

Publish

yarn publish --no-git-tag-version

@gutenye gutenye force-pushed the feat/typescript-support branch 4 times, most recently from 764596c to 78d6298 Compare November 22, 2020 07:54
@gutenye gutenye changed the title TypeScript Support TypeScript Support for FusionJS / Fusion.js Nov 22, 2020
@gutenye gutenye changed the title TypeScript Support for FusionJS / Fusion.js TypeScript Support for FusionJS Nov 22, 2020
@gutenye gutenye force-pushed the feat/typescript-support branch 2 times, most recently from ac5e6e2 to 61b03cd Compare November 22, 2020 15:46
@sansdesign-albert
Copy link
Copy Markdown

Would it be practical to integrate this into the upstream fusion-cli? Maybe with an additional flag to yarn create fusion-app to use TS out of the box?

@gutenye
Copy link
Copy Markdown
Owner Author

gutenye commented Mar 24, 2021

I have no intention, but feel free to grab this one and send a PR to the upstream.

@gutenye gutenye closed this Jan 24, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants