Skip to content

Latest commit

 

History

History
54 lines (35 loc) · 1.72 KB

CONTRIBUTING.md

File metadata and controls

54 lines (35 loc) · 1.72 KB

Contributing to Riot Examples

If you'd like to contribute an example or bug fix, feel free to send us a pull request. Please make sure to search the issue tracker first for duplicates.

Make it testable

Create tests for your examples. This is so we can ensure they don't break when future changes are made and it also helps people to understand the processes within.

Script tags and external libraries

Please make sure to use always the latest riot releases:

For all the other libraries use either jsdelivr.com or cdnjs

Folder structure

Please follow the standard set by the other examples by using this folder structure suggestion:

  • example-tag.css
  • example-tag.js
  • example-tag.tag
  • index.html
  • README.md
  • package.json
  • test/

Not all of these are required, it will differ between examples.

Coding Guidelines

Follow the coding style established in the rest of the codebase.

Semicolons
No semicolons, please!

Spacing
Use two spaces for indentation. No tabs. Spacing around brackets: if (foo) { instead of if(foo){

Quotes
Single-quoted strings are preferred to double-quoted strings.

Equality Checking
Prefer == over === unless it's a must.

Bitwise Operations
Prefer classic conditionals i < 0 over bitwise operators !~pos

We are happy to accept PRs so thank you in advance!