Skip to content

Commit b6fd8fa

Browse files
committed
Update eslint config and code style
1 parent d6a5f04 commit b6fd8fa

2 files changed

Lines changed: 5 additions & 4 deletions

File tree

.eslintrc.json

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,8 @@
1111
"globals": {
1212
"BigInt": true,
1313
"SharedArrayBuffer": true,
14-
"Atomics": true
14+
"Atomics": true,
15+
"BigInt": true
1516
},
1617
"rules": {
1718
"indent": [
@@ -215,7 +216,7 @@
215216
],
216217
"arrow-parens": [
217218
"error",
218-
"as-needed"
219+
"always"
219220
],
220221
"arrow-body-style": [
221222
"error",

JavaScript/8-await-counting.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ class CountingSemaphore {
99
}
1010

1111
enter() {
12-
return new Promise(resolve => {
12+
return new Promise((resolve) => {
1313
if (this.counter > 0) {
1414
this.counter--;
1515
resolve();
@@ -31,7 +31,7 @@ class CountingSemaphore {
3131

3232
// Usage
3333

34-
const job = async task => {
34+
const job = async (task) => {
3535
console.log('try enter', task);
3636
await semaphore.enter();
3737
console.log('enter', task);

0 commit comments

Comments
 (0)