mirror of
https://github.com/NativeScript/NativeScript.git
synced 2025-08-15 02:54:11 +08:00
Minor fixes (#4806)
This commit is contained in:

committed by
Alexander Vakrilov

parent
35be4bc40a
commit
3891f3d3d2
@ -3,7 +3,7 @@
|
|||||||
## Linting
|
## Linting
|
||||||
|
|
||||||
We use [TSLint](https://palantir.github.io/tslint/) for linting. Rules are defined in `build/tslint.json`.
|
We use [TSLint](https://palantir.github.io/tslint/) for linting. Rules are defined in `build/tslint.json`.
|
||||||
Run the tslint form the root of the repo with:
|
Run the tslint from the root of the repo with:
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
npm run tslint
|
npm run tslint
|
||||||
@ -138,7 +138,7 @@ let adminUser = db.query("SELECT * FROM users ...");
|
|||||||
let admin_user = db.query("SELECT * FROM users ...");
|
let admin_user = db.query("SELECT * FROM users ...");
|
||||||
```
|
```
|
||||||
|
|
||||||
[camelcase]: http://en.wikipedia.org/wiki/camelCase#Variations_and_synonyms
|
[camelcase]: https://en.wikipedia.org/wiki/camelCase#Variations_and_synonyms
|
||||||
|
|
||||||
## Type names
|
## Type names
|
||||||
|
|
||||||
@ -231,6 +231,7 @@ if (a == "") {
|
|||||||
## Short-hand operators
|
## Short-hand operators
|
||||||
|
|
||||||
Try to avoid short-hand operators except in very simple scenarios.
|
Try to avoid short-hand operators except in very simple scenarios.
|
||||||
|
|
||||||
*Right:*
|
*Right:*
|
||||||
|
|
||||||
```TypeScript
|
```TypeScript
|
||||||
@ -272,7 +273,7 @@ if (a) return "winning";
|
|||||||
|
|
||||||
## Boolean comparisons
|
## Boolean comparisons
|
||||||
|
|
||||||
**Do not** directly compare with `true`, or `false`.
|
**Do not** directly compare with `true` or `false`.
|
||||||
|
|
||||||
*Right:*
|
*Right:*
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user