-
Notifications
You must be signed in to change notification settings - Fork 135
Contribution
Evgenii Koriakin edited this page Mar 10, 2021
·
20 revisions
- To contribute just create a pull request and describe the changes.
- Clone the repository and install the dependencies wiht
npm install. - Use
ionic serve(v3) orng serve(v4) to run the app that containsionic-selectablemodule together with demos.
- Update the version in the
package.jsonaccording to Semantic Versioning. For example, if the release contains breaking changes than major number should be bumped and others reset to 0 - from4.1.6to5.0.0. - Run
gulpfrom the root folder to prepare an npm package that will be created indistfolder. - Run
npm publish distto publish the package to npm. - Create a GitHub tag and describe the changes following the pattern.
-
Boolean fields and variables should start with
is,has,can,should, etc, for exampleisDisabled,hasConfirmButton,canSearch,shouldFocusSearchbar. -
Events should be named using continuous or past participle form, for example searching, changed, selected, itemAdded. This will allow to differentiate between starting and ending events, for example,
openingandopened. In some cases a starting event might be cancelled, where an ending event have already completed. For instance, cancellation can be implemented foropeningeven to prevent it based on some conditions. - Prefer complete words over contractions, for example,
elementinstead ofel,eventinstead ofev,countinstead ofcnt, etc. Some commonly used contractions are allowed:id,min,max. - Avoid general suffixes that don't add value to the meaning, such as
Detail,Details,Data, etc. For example, preferItemoverItemDetail. - Add
Iprefix to interfaces. It might seem an obsoleteHungarian notation, but it allows to have nice short names for both class and its interface. For example,interface IEventandclass Event implements IEvent.
- Use Prettier code formatter. Rules are set up in
.prettierrcfile. - Install and use editorconfig extension for your IDE. Rules are set up in
.editorconfigfile.
- A commit message should represent a complete sentence starting with a capital letter and ending with a dot, for example,
Added isDisabled field.. A prefix can be added where applicable to label the commit. Some common prefixes:
-
Issue prefix, for example,
#22: Added isDisabled field.