diff --git a/test/wpt/.eslintrc.yaml b/test/wpt/.eslintrc.yaml new file mode 100644 index 00000000000000..b3981bdd272eca --- /dev/null +++ b/test/wpt/.eslintrc.yaml @@ -0,0 +1,3 @@ +rules: + node-core/required-modules: off + node-core/require-common-first: off diff --git a/test/wpt/README.md b/test/wpt/README.md index 39f59d44060e3a..d12bb71681ee1c 100644 --- a/test/wpt/README.md +++ b/test/wpt/README.md @@ -46,7 +46,6 @@ For example, for the URL tests, add a file `test/wpt/test-url.js`: ```js 'use strict'; -require('../common'); const { WPTRunner } = require('../common/wpt'); const runner = new WPTRunner('url'); diff --git a/test/wpt/test-abort.js b/test/wpt/test-abort.js index 11960351b756e6..f582f4c718a5c0 100644 --- a/test/wpt/test-abort.js +++ b/test/wpt/test-abort.js @@ -1,5 +1,5 @@ 'use strict'; -require('../common'); + const { WPTRunner } = require('../common/wpt'); const runner = new WPTRunner('dom/abort'); diff --git a/test/wpt/test-atob.js b/test/wpt/test-atob.js index b227ae4d20e105..eba001f7b7ef78 100644 --- a/test/wpt/test-atob.js +++ b/test/wpt/test-atob.js @@ -1,6 +1,5 @@ 'use strict'; -require('../common'); const { WPTRunner } = require('../common/wpt'); const runner = new WPTRunner('html/webappapis/atob'); diff --git a/test/wpt/test-blob.js b/test/wpt/test-blob.js index 0614c2d3fe36f1..1d6871ce27933f 100644 --- a/test/wpt/test-blob.js +++ b/test/wpt/test-blob.js @@ -1,6 +1,5 @@ 'use strict'; -require('../common'); const { WPTRunner } = require('../common/wpt'); const runner = new WPTRunner('FileAPI/blob'); diff --git a/test/wpt/test-broadcastchannel.js b/test/wpt/test-broadcastchannel.js index 988a6270a936d6..586343ed8221dc 100644 --- a/test/wpt/test-broadcastchannel.js +++ b/test/wpt/test-broadcastchannel.js @@ -1,6 +1,5 @@ 'use strict'; -require('../common'); const { WPTRunner } = require('../common/wpt'); const runner = new WPTRunner('webmessaging/broadcastchannel'); diff --git a/test/wpt/test-console.js b/test/wpt/test-console.js index e66726431fba6e..5d085756e258d8 100644 --- a/test/wpt/test-console.js +++ b/test/wpt/test-console.js @@ -1,5 +1,5 @@ 'use strict'; -require('../common'); + const { WPTRunner } = require('../common/wpt'); const runner = new WPTRunner('console'); diff --git a/test/wpt/test-domexception.js b/test/wpt/test-domexception.js index 09018a25ac58d8..ea68c8562aea57 100644 --- a/test/wpt/test-domexception.js +++ b/test/wpt/test-domexception.js @@ -1,6 +1,5 @@ 'use strict'; -require('../common'); const { WPTRunner } = require('../common/wpt'); const runner = new WPTRunner('webidl/ecmascript-binding/es-exceptions'); diff --git a/test/wpt/test-encoding.js b/test/wpt/test-encoding.js index b297648d9cb7ee..7aeddfefe450e8 100644 --- a/test/wpt/test-encoding.js +++ b/test/wpt/test-encoding.js @@ -1,5 +1,5 @@ 'use strict'; -require('../common'); + const { WPTRunner } = require('../common/wpt'); const runner = new WPTRunner('encoding'); diff --git a/test/wpt/test-events.js b/test/wpt/test-events.js index 5040d56d6a2c58..82bcf7c887c9b4 100644 --- a/test/wpt/test-events.js +++ b/test/wpt/test-events.js @@ -1,5 +1,5 @@ 'use strict'; -require('../common'); + const { WPTRunner } = require('../common/wpt'); const runner = new WPTRunner('dom/events'); diff --git a/test/wpt/test-file.js b/test/wpt/test-file.js index 71e8c179de95e2..a48b2fb55299b9 100644 --- a/test/wpt/test-file.js +++ b/test/wpt/test-file.js @@ -1,6 +1,5 @@ 'use strict'; -require('../common'); const { WPTRunner } = require('../common/wpt'); const runner = new WPTRunner('FileAPI/file'); diff --git a/test/wpt/test-hr-time.js b/test/wpt/test-hr-time.js index 9b7e8fbb2afa1e..9e7303d3e20c79 100644 --- a/test/wpt/test-hr-time.js +++ b/test/wpt/test-hr-time.js @@ -1,6 +1,5 @@ 'use strict'; -require('../common'); const { WPTRunner } = require('../common/wpt'); const runner = new WPTRunner('hr-time'); diff --git a/test/wpt/test-microtask-queuing.js b/test/wpt/test-microtask-queuing.js index 3a83fd33ba051e..86f7d4edbc1c92 100644 --- a/test/wpt/test-microtask-queuing.js +++ b/test/wpt/test-microtask-queuing.js @@ -1,6 +1,5 @@ 'use strict'; -require('../common'); const { WPTRunner } = require('../common/wpt'); const runner = new WPTRunner('html/webappapis/microtask-queuing'); diff --git a/test/wpt/test-performance-timeline.js b/test/wpt/test-performance-timeline.js index 7752a4e72f1b0c..dddce0dab8a7da 100644 --- a/test/wpt/test-performance-timeline.js +++ b/test/wpt/test-performance-timeline.js @@ -1,5 +1,5 @@ 'use strict'; -require('../common'); + const { WPTRunner } = require('../common/wpt'); const runner = new WPTRunner('performance-timeline'); diff --git a/test/wpt/test-resource-timing.js b/test/wpt/test-resource-timing.js index 881888b1fd601c..9f9aab55dc498f 100644 --- a/test/wpt/test-resource-timing.js +++ b/test/wpt/test-resource-timing.js @@ -1,5 +1,5 @@ 'use strict'; -require('../common'); + const { WPTRunner } = require('../common/wpt'); const runner = new WPTRunner('resource-timing'); diff --git a/test/wpt/test-streams.js b/test/wpt/test-streams.js index 2b5da78b846a5b..faf906efb2ef74 100644 --- a/test/wpt/test-streams.js +++ b/test/wpt/test-streams.js @@ -1,6 +1,5 @@ 'use strict'; -require('../common'); const { WPTRunner } = require('../common/wpt'); const runner = new WPTRunner('streams'); diff --git a/test/wpt/test-structured-clone.js b/test/wpt/test-structured-clone.js index 57b990c23cdfb5..26edf0607083a9 100644 --- a/test/wpt/test-structured-clone.js +++ b/test/wpt/test-structured-clone.js @@ -1,6 +1,5 @@ 'use strict'; -require('../common'); const { WPTRunner } = require('../common/wpt'); const runner = new WPTRunner('html/webappapis/structured-clone'); diff --git a/test/wpt/test-timers.js b/test/wpt/test-timers.js index 7736d540a2aa28..86b1cf35b80629 100644 --- a/test/wpt/test-timers.js +++ b/test/wpt/test-timers.js @@ -1,6 +1,5 @@ 'use strict'; -require('../common'); const { WPTRunner } = require('../common/wpt'); const runner = new WPTRunner('html/webappapis/timers'); diff --git a/test/wpt/test-url.js b/test/wpt/test-url.js index 1998ea5bf43798..f8ba3c3839d642 100644 --- a/test/wpt/test-url.js +++ b/test/wpt/test-url.js @@ -1,6 +1,5 @@ 'use strict'; -require('../common'); const { WPTRunner } = require('../common/wpt'); const runner = new WPTRunner('url'); diff --git a/test/wpt/test-user-timing.js b/test/wpt/test-user-timing.js index 45173142461d8c..151c06a86d01b3 100644 --- a/test/wpt/test-user-timing.js +++ b/test/wpt/test-user-timing.js @@ -1,6 +1,5 @@ 'use strict'; -require('../common'); const { WPTRunner } = require('../common/wpt'); const runner = new WPTRunner('user-timing'); diff --git a/test/wpt/test-wasm-webapi.js b/test/wpt/test-wasm-webapi.js index fecc6e89a3fe1a..2ffccd31267d32 100644 --- a/test/wpt/test-wasm-webapi.js +++ b/test/wpt/test-wasm-webapi.js @@ -1,6 +1,5 @@ 'use strict'; -require('../common'); const { WPTRunner } = require('../common/wpt'); const runner = new WPTRunner('wasm/webapi');