Skip to content

Commit 4d0ed96

Browse files
watsonrochdev
authored andcommitted
ESLint: Clean up Node.js built-in ignores (#6059)
1 parent f9b8e8c commit 4d0ed96

File tree

4 files changed

+7
-17
lines changed

4 files changed

+7
-17
lines changed

eslint.config.mjs

Lines changed: 7 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -339,6 +339,7 @@ export default [
339339
'n/no-process-exit': 'off', // TODO: Enable this rule once we have a plan to address it
340340
'n/no-unsupported-features/node-builtins': ['error', {
341341
ignores: [
342+
'Request',
342343
'Response',
343344
'async_hooks.createHook',
344345
'async_hooks.executionAsyncId',
@@ -502,7 +503,12 @@ export default [
502503
}
503504
},
504505
rules: {
505-
'n/no-unsupported-features/node-builtins': ['error', { allowExperimental: true }]
506+
'n/no-unsupported-features/node-builtins': ['error', {
507+
allowExperimental: true,
508+
ignores: [
509+
'module.register'
510+
]
511+
}]
506512
}
507513
},
508514
{
@@ -525,15 +531,6 @@ export default [
525531
'n/no-missing-require': 'off'
526532
}
527533
},
528-
{
529-
name: 'dd-trace/scripts',
530-
files: [
531-
'scripts/**/*'
532-
],
533-
rules: {
534-
'n/no-unsupported-features/node-builtins': ['error', { allowExperimental: true }]
535-
}
536-
},
537534
{
538535
name: 'dd-trace/tests/all',
539536
files: TEST_FILES,
@@ -561,7 +558,6 @@ export default [
561558
'mocha/no-top-level-hooks': 'off',
562559
'n/handle-callback-err': 'off',
563560
'n/no-missing-require': 'off',
564-
'n/no-unsupported-features/node-builtins': ['error', { allowExperimental: true }],
565561
'require-await': 'off'
566562
}
567563
},

integration-tests/appsec/esm-app/index.mjs

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,3 @@
1-
/* eslint n/no-unsupported-features/node-builtins: ['error', { ignores: ['module.register'] }] */
2-
31
import childProcess from 'node:child_process'
42
import express from 'express'
53
import Module from 'node:module'

packages/datadog-instrumentations/src/fetch.js

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,5 @@
11
'use strict'
22

3-
/* eslint n/no-unsupported-features/node-builtins: ['error', { ignores: ['fetch', 'Request'] }] */
4-
53
const { isInServerlessEnvironment } = require('../../dd-trace/src/serverless')
64

75
if (globalThis.fetch) {

packages/dd-trace/src/runtime_metrics/runtime_metrics.js

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,5 @@
11
'use strict'
22

3-
/* eslint n/no-unsupported-features/node-builtins: ['error', { ignores: ['v8.GCProfiler'] }] */
4-
53
// TODO: capture every second and flush every 10 seconds
64

75
const v8 = require('v8')

0 commit comments

Comments
 (0)