Skip to content

Latest commit

 

History

History
45 lines (29 loc) · 2.53 KB

CONTRIBUTING.md

File metadata and controls

45 lines (29 loc) · 2.53 KB

Contributing to lodash

Contributions are always welcome. Before contributing, please read the code of conduct & search the issue tracker; your issue may have already been discussed or fixed in master. To contribute, fork lodash, commit your changes, & send a pull request.

Tests

Include updated unit tests in the test directory as part of your pull request. Don’t worry about regenerating the documentation, lodash.js, or lodash.min.js.

Before running the unit tests you’ll need to install, npm i, development dependencies. Run unit tests from the command-line via node test/test, or open test/index.html in a web browser.

The test/run-test.sh script attempts to run the tests in Rhino, RingoJS, PhantomJS, & Node, before running them in your default browser. The Backbone & Underscore test suites are included as well.

Contributor License Agreement

lodash is a member of the Dojo Foundation. As such, we request that all contributors sign the Dojo Foundation contributor license agreement.

For more information about CLAs, please check out Alex Russell’s excellent post, “Why Do I Need to Sign This?”.

Coding Guidelines

In addition to the following guidelines, please follow the conventions already established in the code.

  • Spacing:
    Use two spaces for indentation. No tabs.

  • Naming:
    Keep variable & method names concise & descriptive.
    Variable names index, collection, & callback are preferable to i, arr, & fn.

  • Quotes:
    Single-quoted strings are preferred to double-quoted strings; however, please use a double-quoted string if the value contains a single-quote character to avoid unnecessary escaping.

  • Comments:
    Please use single-line comments to annotate significant additions, & JSDoc-style comments for functions.

Guidelines are enforced using JSCS:

$ npm run style