Skip to content

Commit f393ab1

Browse files
committed
docs: rewrite using const
1 parent c0879d8 commit f393ab1

File tree

1 file changed

+6
-6
lines changed

1 file changed

+6
-6
lines changed

docs/src/rules/accessor-pairs.md

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -68,7 +68,7 @@ let q = {
6868
};
6969

7070

71-
let r = {d: 1};
71+
const r = {d: 1};
7272
Object.defineProperty(r, 'c', {
7373
set: function(value) {
7474
this.val = value;
@@ -85,7 +85,7 @@ Examples of **correct** code for the default `{ "setWithoutGet": true }` option:
8585
```js
8686
/*eslint accessor-pairs: "error"*/
8787

88-
let s = {
88+
const s = {
8989
set a(value) {
9090
this.val = value;
9191
},
@@ -94,7 +94,7 @@ let s = {
9494
}
9595
};
9696

97-
let t = {d: 1};
97+
const t = {d: 1};
9898
Object.defineProperty(t, 'c', {
9999
set: function(value) {
100100
this.val = value;
@@ -161,7 +161,7 @@ let y = {
161161
}
162162
};
163163

164-
let y = {d: 1};
164+
const z = {d: 1};
165165
Object.defineProperty(y, 'c', {
166166
set: function(value) {
167167
this.val = value;
@@ -284,7 +284,7 @@ might not report a missing pair for a getter/setter that has a computed key, lik
284284
let z = 1;
285285

286286
// no warnings
287-
let a = {
287+
const a = {
288288
get [z++]() {
289289
return this.val;
290290
},
@@ -301,7 +301,7 @@ might not report a missing pair for a getter/setter, like in the following examp
301301
/*eslint accessor-pairs: "error"*/
302302

303303
// no warnings
304-
let b = {
304+
const b = {
305305
get a() {
306306
return this.val;
307307
},

0 commit comments

Comments
 (0)