Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Code Style and Cleanup #4

Open
3 tasks
BrainBacon opened this issue Feb 23, 2016 · 1 comment
Open
3 tasks

Code Style and Cleanup #4

BrainBacon opened this issue Feb 23, 2016 · 1 comment

Comments

@BrainBacon
Copy link
Contributor

I propose we keep the codebase clean by enhancing integration with the following tools:

  • JSHint
  • JSCS
  • conventional changelog
  • Editor Config

JSHint

Right now jshint and conventional changelog are integrated with the project, but we have not been enforcing compliance with them.

Before you commit any JavaScript changes use the gulp jshint task, or while running the development server keep an eye out for any warnings produced by JSHint.

JSCS

JSCS will help us keep a consistent code style throughout all our JavaScript files. This will have to be integrated into this project and possibly gulp-begin.

A good place to get some boilerplate rules would be Bower

Additional resources for JSCS:

Conventional Changelog

gulp-begin comes with Conventional Changelog, and we should start following Angular Conventional Commit Format

Editor Config

We should produce a .editorconfig file that will help our editors automatically conform to some of our code style preferences. See the Editor Config homepage.

Additional Comments

I propose the following guidelines

  • 4 spaces for indentation
  • Single quotes for strings within JavaScript files
  • 'use strict'; as the first line in all JavaScript files

You can use Google's JavaScript Style Guide for help with general JavaScript design choices.

TODO

  • Documentation for a Contributing section with code style guidelines. Perhaps a CONTRIBUTING.md file.
  • Addition of a JSCS task and config file
  • Addition of a .editorconfig file
@BrainBacon
Copy link
Contributor Author

JSCS is to be implemented in Beg-in/gulp-begin#2 and Fritz will use the implementation from gulp-begin.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant