Review popular (web/JS) open source projects for common styles
Closed this issue · 14 comments
Project needs to use npm for installing dependencies, doesn't really matter what it does otherwise.
JSHint has something vaguely similar to Angular: https://github.com/jshint/jshint/commits/master
ESLint seems pretty similar to jQuery: https://github.com/eslint/eslint/commits/master
etc. pp.
I have ordered the following list by how useful, imo, commitplease might be for the project. First four look rapidly developing with quite a few people working together, so I think we need to start with those.
- Ember PR emberjs/ember.js#13893
- Contributing has special prefixes for commit messages
- Using this in other repos, too, like ember-data
- ReactJS PR
facebook/react#7347- Contributing does not mention commit style
- Mostly link to issue/pull request in first line
- airbnb/javascript issue airbnb/javascript#965
- No contributing, no commit style discussion
- Lead contributor alone uses sort of tags in first line
- No contributing instructions, no website, no wiki -> just do it
- Chart.js, issue chartjs/Chart.js#3147
- Contributing asks for clear commit messages
- No consistent message style
- JSHint, issue jshint/jshint#2983
- Contributing mentions jQuery-like style (different look, same feel)
- ESLint, issue
eslint/eslint#6706- Contributing describes a message style very similar to jQuery, but no link to it.
- Makefile.js has validation logic that is slightly more specific than style guide
- Modernizr, issue Modernizr/Modernizr#2050
- Did not find any instructions for contributing, only using
- Sometimes angular-like commit style
- Sometimes issue number in first line
- Backbone.js, issue jashkenas/backbone#4065
- Contributing does not mention commit style
- No commit style discussion found
- Mostly a capitalized verb in imperative starts the message
- Sometimes first line includes link to issue/pr
- Jest
- Contributing does not mention commit style
- Mostly link to issue/pull request in first line
- impress.js
- Contributing only specifies a “release” commit message
- No commit style discussion found
- No explicit commit message style guide. Capitalize and use a verb in imperative is the de-facto standard
- vue.js
- Contributing does not mention commit style
- Sometimes capitalized (or not) verb in imperative
- Sometimes issue number in first line, in parens
- Sometimes a [build] or [release] tag
- h5bp
- Contributing only asks for a “clear title and description”
- No commit style discussion found
- Mostly a capitalized verb in imperative starts the message
- Sometimes “Doc:” or “Docs:” start a doc-change commit
- Sometimes [skip ci] tag at the end of first line
node
1.Contributing describes a commit style close to jQueryMeteor
1.Contibuting links to a style guide for code style and commit messages. Only code style is actually described there
2.Lead developer capitalizes commit message and ends first line with a dot. That is the de-facto commit message style.
Sounds good, let's start with those four. Could you summarize here what you would suggest to each? Like style or other options.
Btw. what about jshint and eslint (I mentioned them above)?
I have now added both jshint and eslint to the list above. Both these projects actually describe a style for commit messages. In the case of eslint there is even automatic checking for that style (that has extra corner cases compared to style guide).
So, I do not know what the best approach would be here:
- We could try to convince them to switch to one of the styles that we already support. Probably jQuery style suits both jshint and eslint best.
- We could implement support for those styles in commitplease and simply let jshint add automatic checking and eslint -- drop some of their in-house scripts. This is probably the way to go?
The eslint script runs as part of a build (I guess), which commitplease doesn't do by default. They could use the commitplease validation module though, instead of implementing their own logic. So I think for eslint we should start with a discussion. See if they're interested in adopting commitplease (it provides more immediate feedback while committing!). If yes, if they want to keep their current format or would consider adopting another. If they want to keep theirs we can consider adding support in commitplease. Though I see that more of a last resort.
More or less the same for jshint: Open an issue where you suggest they adopt the jQuery style with commitplease.
grep -r Makefile.js
from the repo root shows that Makefile.js
is just a collection of functions that are called manually by running various npm run some-script
. In particular, I am pretty sure that checkGitCommit
is run manually and not actually different from a standalone validate-commit-msg.js
script that we saw in Angular. Here is my take at the issue text for eslint, please review.
That looks great!
Only nitpick: commitplease is used by jQuery Core, jQuery UI, jQuery Mobile, Globalize and QUnit. Probably others, but npm doesn't allow search for dev-depended-on packages. Linking to the jQuery Core PR makes it look like they aren't actually using it, yet.
Thanks! I have addressed the nitpick and created the issue.
Created a PR to emberjs/ember.js#13893
Created an issue to airbnb/javascript#965
Created an issue to Modernizr/Modernizr#2050
Created an issue to chartjs/Chart.js#3147
Created an issue to jashkenas/backbone#4065
I think the outreach last year was plenty. Adoption wasn't anywhere near to what we've hoped for, but that's okay.