-
-
Notifications
You must be signed in to change notification settings - Fork 3.1k
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
Comments
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. |
@tannerlinsley understood - I'll keep the 2nd TS point in there as it's useful for consumers of Will update the list, and get cracking on a couple :) |
…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 TanStack#1383 write files with prettier add prettier config
# Via Tanner Linsley * master: Feature/add prettier config, ref TanStack#1383 (TanStack#1384) # Conflicts: # package.json # yarn.lock
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. |
@nmccready, Yes. When we bring in TS, we'll probably compile it using babel. |
use `npm run commit` to use commitizen for better commit messages re TanStack#1383
use `npm run commit` to use commitizen for better commit messages re #1383
@larrybotha, I've set up some failing tests in master. Not sure why they aren't running correctly. Any ideas? |
@tannerlinsley will have a look and get back to you :) |
PR here: #1417 Required a few small tweaks to babel configs and versions. You'll see I noticed you've got I'm using |
Awesome! I absolutely want to use |
Want me to tackle enforcing the commit convention? |
I would love that :) |
Great, will get on it this evening :) |
How can we generate the changelog and do the rest of these awesome things you have on this issue? |
@tannerlinsley will get on this this evening. I need to do some evaluation on how alpha releases work with |
Awesome. Thanks for your help man. If I can do anything to help, let me know. |
Only a pleasure; I'll let you know. Wow, you're tearing through those issues and PRs like a monster - 2 issues (this included), and 0 PRs outstanding! |
I could help with TypeScript typings - I already have some, because my whole project is written in TypeScript, though they're rather low effort for now (way too many |
@paolostyle I agree; waiting for beta is a good idea. I'm not sure about where is best to host the definitions. I suppose there are a few things to consider, depending on the route taken. Managed here
Managed on DefinitelyTyped
Issues common to both strategies
I haven't looked into it deeply to determine what other strategies there may be to make this as painless to maintain as possible, while providing the best UX for users, so there may well be better or more reliable tools than what I've listed here. Alternatively, a smaller benefit with lower overhead may be to use JsDoc and suggest TypeScript users enable |
Just had a discussion about this here: https://spectrum.chat/react-table/general/the-types-for-typescript-are-outdated~79730c66-b5f8-48f0-b8d9-a187c3d2f435 TLDR, I would like the types to be kept over at DefinitelyTyped and distributed via My reasoning: https://blog.johnnyreilly.com/2019/08/symbiotic-definitely-typed.html, someday RT will be TS, but tomorrow is likely not that day. |
On the topic of typescript declarations, there are a handful of github gists out in the wild attempting to provide type declarations for v7, such as this: https://gist.github.com/Grsmto/1ac3a7ddb8ad8288660784a37bff1798 The usefulness of these attempts is limited because of the use of the I might try writing my own declaration file in my current project that attempts to do better about inferring the types with generics, but it might help if the WIP v7 documentation for the public API were a little more fine grained in terms of the function types. EDIT: |
I think this can be closed now as long as we track the rest of the items in their own issues like #1467 |
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.
prettierrc.js
to normalise prettier configs across all contributors setuphusky
to automate formatting of code for contributors not using prettier without having to install prettierjest.config.js
for more flexibility over test configs (removereact-scripts
dep?)@testing-library/react
for awesome testingjest-watch-select-projects
for switching between watched tests quicklyjest-watch-typeahead
for faster selection of test files to runis-ci-cli
so that a singlenpm test
script can be run for local watched testing while CI runs through tests oncecommitizen
to introduce a standard for commit messages to allow for automated semantic releases and generated changelogsconventional-changelog
to save time, automate linking to issues fromcommitizen
-formatted commitssemantic-release
and configure Travis to automate semantic versioning based on commit messages. Ensure latest commit is tagged before installing.1. rewrite code in TypeScript, or (at least)Let me know what you think about each point; will be happy to get working on the list as soon as you're happy!
The text was updated successfully, but these errors were encountered: