HsuTing/generator-cat

add flow, commitizen, transform-class-properties

Opened this issue · 1 comments

https://github.com/HsuTing/notes/issues/10
https://github.com/HsuTing/notes/issues/44
https://github.com/HsuTing/notes/issues/43
https://github.com/HsuTing/notes/issues/53

  • add flow to subgenerator

react

  • .flowconfig
esproposal.decorators=ignore
  • .babelrc
{
  "presets": [
    "react",
    "env",
    "stage-0",
    "flow"
  ],
  "plugins": [
    "transform-decorators-legacy",
    "transform-object-assign",
    "transform-class-properties",
    "react-flow-props-to-prop-types",
    ["module-resolver", {
      "root": ["./src"],
      "alias": {
        "components": "./src/docs/components",
        "componentsShare": "./src/docs/components/share"
      }
    }]
  ]
}
  • install
yarn add prop-types prop-types-extra
yarn add --dev babel-plugin-react-flow-props-to-prop-types