Skip to content

Latest commit

 

History

History
71 lines (53 loc) · 2.98 KB

CONTRIBUTING.md

File metadata and controls

71 lines (53 loc) · 2.98 KB

🚧 Notice 🚧

Pardon the mess. The master branch is in flux while we work on Lodash v5. This means things like npm scripts, which we encourage using for contributions, may not be working. Thank you for your patience.

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.

Feature Requests

Feature requests should be submitted in the issue tracker, with a description of the expected behavior & use case, where they’ll remain closed until sufficient interest, e.g. 👍 reactions, has been shown by the community. Before submitting a request, please search for similar ones in the closed issues.

Pull Requests

For additions or bug fixes, please modify the relevant files. Include updated unit tests in the test directory as part of your pull request. Unit test files should be named [filename].test.js.

Before running the unit tests you’ll need to install, npm i, development dependencies. Run unit tests from the command-line via npm test.

Contributor License Agreement

Lodash is a member of the JS Foundation. As such, we request that all contributors sign the JS Foundation contributor license agreement (CLA).

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, array, & iteratee 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 ESLint:

$ npm run style