Skip to content
This repository has been archived by the owner on Jan 9, 2023. It is now read-only.

chore: basic create react app #1621

Merged
merged 12 commits into from
Sep 12, 2019
Merged

chore: basic create react app #1621

merged 12 commits into from
Sep 12, 2019

Conversation

jackcmeyer
Copy link
Member

@jackcmeyer jackcmeyer commented Sep 9, 2019

fixes #1619

Got some code for us? Awesome 🎊!

Please include a description of your change & check your PR against this list, thanks!

  • basic create react app
  • husky and commitizen
  • commitlint

More info can be found by clicking the "guidelines for contributing" link above.

@jackcmeyer jackcmeyer changed the base branch from master to next September 9, 2019 00:30
@jackcmeyer
Copy link
Member Author

@fox1t @tehkapa @PhearZero

Here is a PR for a basic create react app. It has basic create react app, husky, commitzen, and and commitlint. This should address all tasks that were in the issue.

I have marked it as WIP since I have the following questions.

  • Does this repository need its own eslint/prettier config?
  • Does this repository need .travis.yml enabled on it and its own .travis.yml config?
  • Does this repository need its own semantic release process enabled?
  • Should all of the .github templates be updated so that they can be standard across all repos? (Might be useful to create a template repo for the organization which standardizes formatting for issue/PR templates, README, contributing, etc.)

package.json Outdated Show resolved Hide resolved
package.json Outdated Show resolved Hide resolved
Copy link
Contributor

@PhearZero PhearZero left a comment

Choose a reason for hiding this comment

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

Update package.json to include @hospitalrun-org namespace and pre-commit hooks

@PhearZero
Copy link
Contributor

@jackcmeyer

  • Does this repository need its own eslint/prettier config?
  • Does this repository need .travis.yml enabled on it and its own .travis.yml config?
  • Does this repository need its own semantic release process enabled?
  • Should all of the .github templates be updated so that they can be standard across all repos? (Might be useful to create a template repo for the organization which standardizes formatting for issue/PR templates, README, contributing, etc.)
  • Yes whatever CRA provides by default (react-app)
  • Yes but it is not a standard release cycle since we have dependent modules similar to Lerna projects. We do not want to release Feature X in the front end if Feature X is not implemented in the Server/Component libraries. This is done via the Mono-Repo Integration/E2E Acceptance hospitalrun#17 Organization Repository Acceptance hospitalrun#16
  • Yes it will be triggered on Master from a Mono-Repo Build
  • I like the way you think, Project documentation hospitalrun#8 and the old example in the PoC are going down that same path of thinking. We are going to have a standard storybook component DocumentationPage and CLI command called hospitalrun docs that will add any missing contribution guides, wrap readmes with headers and footers, and generate TSDocs to be used in Storybooks/wiki's etc.

@jackcmeyer
Copy link
Member Author

@PhearZero I can start working on getting a templates repository put together. I think it's probably outside the scope of this PR

@PhearZero
Copy link
Contributor

I can start working on getting a templates repository put together. I think it's probably outside the scope of this PR
@jackcmeyer Yea for sure lets head over to HospitalRun/hospitalrun#8 and I can get you up to date there

@jackcmeyer jackcmeyer marked this pull request as ready for review September 9, 2019 03:22
@jackcmeyer jackcmeyer changed the title [WIP] Basic create react app Basic create react app Sep 9, 2019
@matteovivona matteovivona changed the title Basic create react app chore: basic create react app Sep 9, 2019
matteovivona
matteovivona previously approved these changes Sep 9, 2019
@matteovivona matteovivona added v2.x core-team indicates that the issue will be completed by a core team member in progress indicates that issue/pull request is currently being worked on labels Sep 9, 2019
@matteovivona matteovivona added this to In progress in Version 2.0 via automation Sep 9, 2019
@matteovivona matteovivona added this to the v2.0.0 milestone Sep 9, 2019
module.exports = {
extends: ["gitmoji"],
parserPreset: {
parserOpts: {
Copy link
Member

Choose a reason for hiding this comment

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

@tehkapa is this compatible with the commit style you proposed?

Copy link
Contributor

Choose a reason for hiding this comment

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

theoretically, yes. however, I also extends this ['@commitlint/config-conventional']
@PhearZero did you use both solutions in your tests?

Copy link
Member

Choose a reason for hiding this comment

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

I really like conventional. In addition to it we need also to enforce referencing the issue the commits are addressing.

Copy link
Contributor

Choose a reason for hiding this comment

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

I started with config-conventional linting for testing locally and then added in alternative configurations in the PoC testing pnpm/husky. We could rewrite the history if need be

@fox1t @tehkapa

Copy link
Member Author

@jackcmeyer jackcmeyer Sep 10, 2019

Choose a reason for hiding this comment

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

Is there anything that I need to do here?

This looks like it matches the config in the hospitalrun/hospitalrun repository. Also matches the config propoed in HospitalRun/hospitalrun-server#154

If we are changing, I would assume we would update this config to match hospitalrun/components

@matteovivona matteovivona self-requested a review September 9, 2019 08:17
Copy link
Member

@fox1t fox1t left a comment

Choose a reason for hiding this comment

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

Please remove all react logos: we will put ours instead.

package.json Outdated Show resolved Hide resolved
"eject": "react-scripts eject"
},
"eslintConfig": {
"extends": "react-app"
Copy link
Member

Choose a reason for hiding this comment

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

Is this eslintConfig compatible with TS? I can't see the language plugins.

Copy link
Contributor

@PhearZero PhearZero Sep 9, 2019

Choose a reason for hiding this comment

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

It's what the CRA outputs with the --typescript flag. It's somewhere in react-scripts that handles all of the heavy lifting. Not very familiar with the cli yet. We could eject the app but we lose support from upstream

@fox1t
Copy link
Member

fox1t commented Sep 9, 2019

@jackcmeyer we will use always the same tsconfig. This is our FE config https://github.com/HospitalRun/components/blob/master/tsconfig.json
can you please ensure here are used the same compiler options?

@matteovivona matteovivona dismissed their stale review September 9, 2019 12:39

Need more infos

@fox1t fox1t self-requested a review September 9, 2019 12:55
@PhearZero PhearZero self-requested a review September 9, 2019 17:44
@PhearZero
Copy link
Contributor

PhearZero commented Sep 9, 2019

@jackcmeyer we will use always the same tsconfig. This is our FE config https://github.com/HospitalRun/components/blob/master/tsconfig.json
can you please ensure here are used the same compiler options?

Just a note react-scripts ignores/overrides some tsconfig options so we may have to eject if we want full control or find a workaround. Ran into this issue trying to resolve module aliases

@jackcmeyer
Copy link
Member Author

jackcmeyer commented Sep 10, 2019

@PhearZero @fox1t

@jackcmeyer we will use always the same tsconfig. This is our FE config HospitalRun/components:tsconfig.json@master
can you please ensure here are used the same compiler options?

I've updated the tsconfig.json to match the components library. However, I was not able to use declarations and isolatedModules together so I dropped declarations support. Let me know if that is ok

@matteovivona matteovivona requested review from irvelervel and removed request for PhearZero and matteovivona September 10, 2019 09:15
Copy link
Contributor

@matteovivona matteovivona left a comment

Choose a reason for hiding this comment

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

proposed change to the dockerfile

@matteovivona matteovivona requested review from matteovivona and removed request for matteovivona September 12, 2019 13:29
@fox1t
Copy link
Member

fox1t commented Sep 12, 2019

@irvelervel what do you think about what is proposing @jackcmeyer?

Copy link

@irvelervel irvelervel left a comment

Choose a reason for hiding this comment

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

Good to go!

@matteovivona matteovivona merged commit 04f2a19 into next Sep 12, 2019
Version 2.0 automation moved this from In progress to Done Sep 12, 2019
@delete-merged-branch delete-merged-branch bot deleted the create-react-app branch September 12, 2019 14:43
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
core-team indicates that the issue will be completed by a core team member in progress indicates that issue/pull request is currently being worked on v2.x
Projects
Version 2.0
  
Done
Development

Successfully merging this pull request may close these issues.

None yet

5 participants