-
Notifications
You must be signed in to change notification settings - Fork 125
Contribution
Evgenii Koriakin edited this page Feb 26, 2020
·
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-selectable
module together with demos.
- Update the version in the
package.json
according to Semantic Versioning. For example, if the release contains breaking changes than major number should be bumped and others reset to 0 - from4.1.6
to5.0.0
. - Run
gulp
from the root folder to prepare an npm package that will be created indist
folder. - Run
npm publish dist
to 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 with a past participle, for example changed, selected, itemAdded.
- Prefer complete words over contractions, for example,
element
instead ofel
,event
instead ofev
,count
instead 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, preferItem
overItemDetail
. - Add
I
prefix 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 IEvent
andclass Event implements IEvent
.
- Use Prettier code formatter. Rules are set up in
.prettierrc
file. - Install and use editorconfig extension for your IDE. Rules are set up in
.editorconfig
file.
- 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.
-
Refactor prefix,
Refactor: Renamed isEnabled to isDisabled.