/js-style-guide

JavaScript Style Guide

Primary LanguageJavaScript

JavaScript Style Guide

This JavaScript style guide is based off best practices, what's popular, and sprinkled with a bit of personal preference. The goal of this project is to help keep code uniformity amongst projects and team members.

You will find a .jshintrc, .eslintrc and .jcsrc file in this repo that can be used with your IDE's and/or linting tools.

Creative Commons License

Usage

Find the relative setup .md file for your IDE in the docs folder and follow the instructions. Configurations can also be used by CLI tools.

Please submit additional IDE setup files by forking and making a pull request.

Guides

Please see the guides folder detailed documentation. Each file links to a related example file in examples directory.

Exceptions

If working on a project where a style guide is already defined, then use that to keep code consistent. Do not change their style guide before discussing with project owner and/or team. In the event no style rule is defined for a specific feature, then apply the common style guide that you use among other projects.

Credits

Google's JavaScript Style Guide and the Felix Geisendörfer's Node Style Guide were used as the initial sources under the Creative Commons License v3.0 while putting together this guide. Tweaks were made to the style guides to fit the practices I've used most in my personal and professional work environments. Additional considerations were taken from Crockford's Code Conventions.