Skip to content

Latest commit

 

History

History
54 lines (44 loc) · 3.24 KB

CONTRIBUTING.md

File metadata and controls

54 lines (44 loc) · 3.24 KB

Contributing Guide

Set Up

  1. Run npm install
  2. Run npm run prepare

Code style

Please follow the code style of the rest of the project. This is enforced via ESLint, whose config is here. You can run npm run lint before committing to ensure your code does not violate the code style, or -- better -- install an ESLint plugin for your editor, to see issues inline as you edit code.

Here are the rules in the ESLint file with some commentary about what they are (since JSON does not allow comments):

Rule Code What it does
semi "semi": 1 Mandatory semicolons
no-dupe-args "no-dupe-args": 1 no duplicate parameter names in function declarations or expressions
no-dupe-keys "no-dupe-keys": 1 no duplicate keys in object literals
no-unreachable "no-unreachable": 1 no unreachable code after return, throw, continue, and break statements.
valid-typeof "valid-typeof": 1 enforces comparing typeof expressions to valid string literals
curly "curly": 1 No block statements without curly braces
no-useless-call "no-useless-call": 1 No useless function.call() or .apply() when it can be replaced with a regular function call
brace-style "brace-style": [1,"stroustrup"] Stroustrup variant of one true brace style: { on the same line, } on its own line, else/catch/finally on separate lines
no-mixed-spaces-and-tabs "no-mixed-spaces-and-tabs": [1,"smart-tabs"] Tabs for indentation, spaces for alignment, no mixed spaces and tabs otherwise
spaced-comment "spaced-comment": [1,"always",{"block":{"exceptions":["*"]}}] Mandatory space after // and /*
arrow-spacing "arrow-spacing": 1 Spacing around =>
comma-spacing "comma-spacing": 1 Enforce spacing after comma, and not before
keyword-spacing "keyword-spacing": 1 Spacing around keywords

Commit Messages

Commit messages MUST be in the angular commit-message format Which can be summarized as:

<type>(<scope>): <short summary>
<BLANK LINE>
<body, explaining motivation for the change>
<BLANK LINE>
<footer, optional>

<type> Must be build | ci | docs | feat | fix | perf | refactor | test This field is used to control the semantic versioning of the release following a merge of the commit