From 2f4e17605457da044b3c45bef6e173a48c82151a Mon Sep 17 00:00:00 2001 From: Veikko Karsikko Date: Sun, 3 Jan 2016 11:50:16 +1000 Subject: [PATCH] docs(developer): add linting instructions --- DEVELOPER.md | 14 ++++++++++++-- 1 file changed, 12 insertions(+), 2 deletions(-) diff --git a/DEVELOPER.md b/DEVELOPER.md index cc3bbc993a..d1e270b92f 100644 --- a/DEVELOPER.md +++ b/DEVELOPER.md @@ -9,7 +9,7 @@ JS and Dart versions. It also explains the basic mechanics of using `git`, `node * [Installing NPM Modules and Dart Packages](#installing-npm-modules-and-dart-packages) * [Build commands](#build-commands) * [Running Tests Locally](#running-tests-locally) -* [Formatting](#clang-format) +* [Code Style](#code-style) * [Project Information](#project-information) * [CI using Travis](#ci-using-travis) * [Transforming Dart code](#transforming-dart-code) @@ -227,7 +227,9 @@ Angular specific command line options when running protractor: Angular specific command line options when running protractor (e.g. force gc, ...): `$(npm bin)/protractor protractor-{js|dart2js}-conf.js --ng-help` -## Formatting with clang-format +## Code Style + +### Formatting with clang-format We use [clang-format](http://clang.llvm.org/docs/ClangFormat.html) to automatically enforce code style for our TypeScript code. This allows us to focus our code reviews more on the content, and @@ -273,6 +275,14 @@ to some whitespace difference. * `clang-format` integrations are also available for many popular editors (`vim`, `emacs`, `Sublime Text`, etc.). +### Linting + +We use [tslint](https://github.com/palantir/tslint) for linting. See linting rules in [gulpfile](gulpfile.js). To lint, run + +```shell +$ gulp lint +``` + ## Generating the API documentation The following gulp task will generate the API docs in the `dist/angular.io/partials/api/angular2`: