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

Project standards and conventions #1383

Open
larrybotha opened this issue Jul 1, 2019 · 11 comments

Comments

@larrybotha
Copy link
Contributor

commented Jul 1, 2019

Hey @tannerlinsley, loving react-table and would love to contribute and make things easier for you and contributors, so I'd like to open a discussion and see if you're happy to work with a checklist of standards and conventions to introduce.

Todo

Tasks are ordered by ease of implementation / impact on maintenance and reliability.

  1. Code formatting
    1. 1. add prettierrc.js to normalise prettier configs across all contributors setup
    2. 2. use husky to automate formatting of code for contributors not using prettier without having to install prettier
  2. Testing
    1. 1. add custom jest.config.js for more flexibility over test configs (remove react-scripts dep?)
    2. 2. add @testing-library/react for awesome testing
    3. 3. add separate jest projects for unit testing and linting, as well as jest-watch-select-projects for switching between watched tests quickly
    4. 4. add jest-watch-typeahead for faster selection of test files to run
    5. 5. add is-ci-cli so that a single npm test script can be run for local watched testing while CI runs through tests once
  3. Commit message formatting
    1. add commitizen to introduce a standard for commit messages to allow for automated semantic releases and generated changelogs
  4. Changelog
    1. 1. generate changelog using conventional-changelog to save time, automate linking to issues from commitizen-formatted commits
  5. Semantic releases
    1. 1. add semantic-release and configure Travis to automate semantic versioning based on commit messages. Ensure latest commit is tagged before installing.
  6. Code coverage
    1. 1. update Travis to send code coverage results to codecov.io or similar on successful builds
  7. TypeScript
    1. rewrite code in TypeScript, or (at least)
    1. add TypeScript module declarations

Let me know what you think about each point; will be happy to get working on the list as soon as you're happy!

@tannerlinsley

This comment has been minimized.

Copy link
Owner

commented Jul 1, 2019

I agree full-heartedly with every single point, with the exception of rewriting in typescript. Long story short, I'm not ready to full full typescript on open source code yet, but fully support having definitions.

@larrybotha

This comment has been minimized.

Copy link
Contributor Author

commented Jul 1, 2019

@tannerlinsley understood - I'll keep the 2nd TS point in there as it's useful for consumers of react-table.

Will update the list, and get cracking on a couple :)

@larrybotha larrybotha changed the title Chat about project standards / conventions Project standards and conventions Jul 1, 2019

larrybotha added a commit to larrybotha/react-table that referenced this issue Jul 1, 2019

larrybotha added a commit to larrybotha/react-table that referenced this issue Jul 1, 2019

larrybotha added a commit to larrybotha/react-table that referenced this issue Jul 1, 2019

Merge branch 'feature/add-prettier-config' of github.com:larrybotha/r…
…eact-table into feature/add-prettier-config

* 'feature/add-prettier-config' of github.com:larrybotha/react-table:
  install and configure lint-staged and husky - ref 1.2 in tannerlinsley#1383
  write files with prettier
  add prettier config

tannerlinsley added a commit that referenced this issue Jul 2, 2019

Feature/add prettier config, ref #1383 (#1384)
* add prettier config

* write files with prettier

* install and configure lint-staged and husky - ref 1.2 in #1383

* feat(style): add prettier configs, ref 1.1 & 1.2 in #1383

larrybotha added a commit to larrybotha/react-table that referenced this issue Jul 2, 2019

Merge branch 'master' into feature/add-jest-configs
# Via Tanner Linsley
* master:
  Feature/add prettier config, ref tannerlinsley#1383 (tannerlinsley#1384)

# Conflicts:
#	package.json
#	yarn.lock

tannerlinsley added a commit that referenced this issue Jul 15, 2019

Feature/add jest configs ref: #1383 (#1385)
* add deps for testing

* feat(tests): add jest configs

* uncomment module directories path

@tannerlinsley tannerlinsley added the wiki label Jul 16, 2019

@nmccready

This comment has been minimized.

Copy link

commented Jul 25, 2019

One thing that makes the barrier of entry into typescript a whole lot easier and friendly is using Babel to compile it instead. It's much more forgiving.
https://babeljs.io/docs/en/babel-preset-typescript

@tannerlinsley

This comment has been minimized.

Copy link
Owner

commented Jul 25, 2019

@nmccready, Yes. When we bring in TS, we'll probably compile it using babel.

larrybotha added a commit to larrybotha/react-table that referenced this issue Jul 26, 2019

docs(package.json): add commitizen dep, config, and npm script
use `npm run commit` to use commitizen for better commit messages

re tannerlinsley#1383

tannerlinsley added a commit that referenced this issue Jul 26, 2019

docs(package.json): add commitizen dep, config, and npm script (#1408)
use `npm run commit` to use commitizen for better commit messages

re #1383
@tannerlinsley

This comment has been minimized.

Copy link
Owner

commented Jul 29, 2019

@larrybotha, I've set up some failing tests in master. Not sure why they aren't running correctly. Any ideas?

@larrybotha

This comment has been minimized.

Copy link
Contributor Author

commented Jul 29, 2019

@tannerlinsley will have a look and get back to you :)

@larrybotha

This comment has been minimized.

Copy link
Contributor Author

commented Jul 29, 2019

PR here: #1417

Required a few small tweaks to babel configs and versions. You'll see useTable passes now on all but one test.

I noticed you've got commit: "git commit" in packages.json. No biggie, but git-cz makes writing conventional commits super easy, but that's up to you :)

I'm using $ $(npm bin)/git-cz directly for the commitizen prompts.

@tannerlinsley

This comment has been minimized.

Copy link
Owner

commented Jul 29, 2019

Awesome!

I absolutely want to use git-cz. Still just trying to figure out the workflow we were talking about in #1410, how to enforce it, etc.

@larrybotha

This comment has been minimized.

Copy link
Contributor Author

commented Jul 29, 2019

Want me to tackle enforcing the commit convention?

@tannerlinsley

This comment has been minimized.

Copy link
Owner

commented Jul 29, 2019

I would love that :)

@larrybotha

This comment has been minimized.

Copy link
Contributor Author

commented Jul 29, 2019

Great, will get on it this evening :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
3 participants
You can’t perform that action at this time.