ffffng/app/bower_components/lodash/.github/CONTRIBUTING.md
2020-01-20 21:14:50 +01:00

3.1 KiB
Raw Permalink Blame History

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 theyll 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 you should only need to modify lodash.js. Include updated unit tests in the test directory as part of your pull request. Dont worry about regenerating the dist/ or doc/ files.

Before running the unit tests youll need to install, npm i, development dependencies. Run unit tests from the command-line via npm test, or open test/index.html & test/fp.html in a web browser. The Backbone & Underscore test suites are included as well.

Contributor License Agreement

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

For more information about CLAs, please check out Alex Russells 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 JSCS:

$ npm run style

Tips

You can opt-in to a pre-push git hook by adding an .opt-in file to the root of the project containing:

pre-push

With that, when you git push, the pre-push git hook will trigger and execute npm run validate.