More linter silencing
[benchmarks-js.git] / promise-handling.js
index 182ba772bef44b6c60ced6f74e6e1d79a15920ec..e4e712b2f664e25e736d91d35d3876bb022f969d 100644 (file)
@@ -3,29 +3,35 @@ const { LIST_FORMATTER } = require('./benchmark-utils')
 
 const suite = new Benchmark.Suite()
 
+/**
+ *
+ */
 function promise () {
   return new Promise()
 }
 
+/**
+ *
+ */
 async function asyncFunction () {
   await promise()
 }
 
 suite
-  .add('await promise', async function () {
+  .add('await promise', async () => {
     await asyncFunction()
   })
-  .add('promise', function () {
+  .add('promise', () => {
     asyncFunction()
   })
-  .on('cycle', function (event) {
+  .on('cycle', event => {
     console.log(event.target.toString())
   })
   .on('complete', function () {
     console.log(
       'Fastest is ' + LIST_FORMATTER.format(this.filter('fastest').map('name'))
     )
-    // eslint-disable-next-line no-process-exit
+    // eslint-disable-next-line n/no-process-exit
     process.exit()
   })
   .run()