docs(developer): add linting instructions

This commit is contained in:
Veikko Karsikko 2016-01-03 11:50:16 +10:00 committed by Alex Eagle
parent d4565fdaf3
commit 2f4e176054

View File

@ -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) * [Installing NPM Modules and Dart Packages](#installing-npm-modules-and-dart-packages)
* [Build commands](#build-commands) * [Build commands](#build-commands)
* [Running Tests Locally](#running-tests-locally) * [Running Tests Locally](#running-tests-locally)
* [Formatting](#clang-format) * [Code Style](#code-style)
* [Project Information](#project-information) * [Project Information](#project-information)
* [CI using Travis](#ci-using-travis) * [CI using Travis](#ci-using-travis)
* [Transforming Dart code](#transforming-dart-code) * [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, ...): Angular specific command line options when running protractor (e.g. force gc, ...):
`$(npm bin)/protractor protractor-{js|dart2js}-conf.js --ng-help` `$(npm bin)/protractor protractor-{js|dart2js}-conf.js --ng-help`
## Formatting with <a name="clang-format">clang-format</a> ## Code Style
### Formatting with <a name="clang-format">clang-format</a>
We use [clang-format](http://clang.llvm.org/docs/ClangFormat.html) to automatically enforce code 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 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`, * `clang-format` integrations are also available for many popular editors (`vim`, `emacs`,
`Sublime Text`, etc.). `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 ## Generating the API documentation
The following gulp task will generate the API docs in the `dist/angular.io/partials/api/angular2`: The following gulp task will generate the API docs in the `dist/angular.io/partials/api/angular2`: