Skip to content

Commit 6586ac4

Browse files
committed
docs: prefer const
1 parent 71150e9 commit 6586ac4

File tree

2 files changed

+5
-5
lines changed

2 files changed

+5
-5
lines changed

docs/rules/always-return.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -78,11 +78,11 @@ promise
7878
})
7979

8080
// NG
81-
var v = promise.then((x) => {
81+
const v = promise.then((x) => {
8282
console.log(x)
8383
})
8484
// NG
85-
var v = await promise.then((x) => {
85+
const v = await promise.then((x) => {
8686
console.log(x)
8787
})
8888
function foo() {

docs/rules/no-native.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -12,12 +12,12 @@ existence of a native promise implementation. Helpful if you want to use
1212
#### Valid
1313

1414
```js
15-
var Promise = require('bluebird')
16-
var x = Promise.resolve('good')
15+
const Promise = require('bluebird')
16+
const x = Promise.resolve('good')
1717
```
1818

1919
#### Invalid
2020

2121
```js
22-
var x = Promise.resolve('bad')
22+
const x = Promise.resolve('bad')
2323
```

0 commit comments

Comments
 (0)