From 78fde86c157b2655dd6ac43a0427a666b8990f7c Mon Sep 17 00:00:00 2001 From: Punya Biswal Date: Wed, 24 Jul 2024 14:53:52 +0000 Subject: [PATCH] fix: migrate eslint ignores --- scripts/index.ts | 2 +- src/plugins/plugin-connect.ts | 2 +- src/plugins/plugin-hapi.ts | 2 +- src/plugins/plugin-http2.ts | 2 +- src/plugins/plugin-koa.ts | 2 +- src/trace-writer.ts | 2 +- test/non-interference/http-e2e.js | 2 +- test/non-interference/start-agent.js | 4 ++-- test/plugins/test-trace-http2.ts | 4 ++-- test/plugins/test-trace-node-fetch.ts | 2 +- 10 files changed, 12 insertions(+), 12 deletions(-) diff --git a/scripts/index.ts b/scripts/index.ts index 4119a4a82..6fbd83fb8 100644 --- a/scripts/index.ts +++ b/scripts/index.ts @@ -87,6 +87,6 @@ async function run(steps: string[]) { run(steps).catch(err => { console.error(err); - // eslint-disable-next-line no-process-exit + // eslint-disable-next-line n/no-process-exit process.exit(1); }); diff --git a/src/plugins/plugin-connect.ts b/src/plugins/plugin-connect.ts index b6b6aac06..8ef97a44c 100644 --- a/src/plugins/plugin-connect.ts +++ b/src/plugins/plugin-connect.ts @@ -13,7 +13,7 @@ // limitations under the License. import {IncomingMessage, ServerResponse} from 'http'; -// eslint-disable-next-line node/no-deprecated-api +// eslint-disable-next-line n/no-deprecated-api import {parse as urlParse} from 'url'; import {PluginTypes} from '..'; diff --git a/src/plugins/plugin-hapi.ts b/src/plugins/plugin-hapi.ts index a336a9753..71b49cda4 100644 --- a/src/plugins/plugin-hapi.ts +++ b/src/plugins/plugin-hapi.ts @@ -14,7 +14,7 @@ import {ServerResponse} from 'http'; import * as shimmer from 'shimmer'; -// eslint-disable-next-line node/no-deprecated-api +// eslint-disable-next-line n/no-deprecated-api import {parse as urlParse} from 'url'; import {PluginTypes} from '..'; diff --git a/src/plugins/plugin-http2.ts b/src/plugins/plugin-http2.ts index 0a629ad4f..b8137c877 100644 --- a/src/plugins/plugin-http2.ts +++ b/src/plugins/plugin-http2.ts @@ -15,7 +15,7 @@ // This is imported only for types. Generated .js file should NOT load 'http2'. // `http2` must be used only in type annotations, not in expressions. -// eslint-disable-next-line node/no-unsupported-features/node-builtins +// eslint-disable-next-line n/no-unsupported-features/node-builtins import * as http2 from 'http2'; import * as shimmer from 'shimmer'; import {URL} from 'url'; diff --git a/src/plugins/plugin-koa.ts b/src/plugins/plugin-koa.ts index 02a339c8a..1fb49b8d0 100644 --- a/src/plugins/plugin-koa.ts +++ b/src/plugins/plugin-koa.ts @@ -14,7 +14,7 @@ import {ServerResponse} from 'http'; import * as shimmer from 'shimmer'; -// eslint-disable-next-line node/no-deprecated-api +// eslint-disable-next-line n/no-deprecated-api import {parse as urlParse} from 'url'; import {PluginTypes} from '..'; diff --git a/src/trace-writer.ts b/src/trace-writer.ts index ff35cd619..661701e2b 100644 --- a/src/trace-writer.ts +++ b/src/trace-writer.ts @@ -152,7 +152,7 @@ export class TraceWriter extends Service { this.flushBuffer(); if (onUncaughtException === 'flushAndExit') { setTimeout(() => { - // eslint-disable-next-line no-process-exit + // eslint-disable-next-line n/no-process-exit process.exit(1); }, 2000); } diff --git a/test/non-interference/http-e2e.js b/test/non-interference/http-e2e.js index 33602945a..ba79ac509 100644 --- a/test/non-interference/http-e2e.js +++ b/test/non-interference/http-e2e.js @@ -44,7 +44,7 @@ const testCommonPath = [ }); if (!testCommonPath) { console.error('No common.js or common/index.js found in test directory'); - // eslint-disable-next-line no-process-exit + // eslint-disable-next-line n/no-process-exit process.exit(1); } cp.execFileSync('sed', [ diff --git a/test/non-interference/start-agent.js b/test/non-interference/start-agent.js index 273ae9656..8a6d85534 100644 --- a/test/non-interference/start-agent.js +++ b/test/non-interference/start-agent.js @@ -15,7 +15,7 @@ 'use strict'; const shimmer = require('shimmer'); -// eslint-disable-next-line node/no-missing-require +// eslint-disable-next-line n/no-missing-require const util = require('../../build/src/util.js'); // Stub generateTraceContext so that it always returns the same thing. // This is because web framework unit tests check that similar/identical @@ -29,7 +29,7 @@ shimmer.wrap(util, 'generateTraceContext', () => { return 'ffeeddccbbaa99887766554433221100/0?o=1'; }; }); -// eslint-disable-next-line node/no-missing-require +// eslint-disable-next-line n/no-missing-require require('../..').start({ projectId: '0', logLevel: 1, diff --git a/test/plugins/test-trace-http2.ts b/test/plugins/test-trace-http2.ts index e8e3c468e..e6f2bfd17 100644 --- a/test/plugins/test-trace-http2.ts +++ b/test/plugins/test-trace-http2.ts @@ -16,7 +16,7 @@ import * as assert from 'assert'; import {describe, it, after, afterEach, before} from 'mocha'; // This is imported only for types. Generated .js file should NOT load 'http2' // in this place. It is dynamically loaded later from each test suite below. -// eslint-disable-next-line node/no-unsupported-features/node-builtins +// eslint-disable-next-line n/no-unsupported-features/node-builtins import * as http2Types from 'http2'; import * as semver from 'semver'; import * as stream from 'stream'; @@ -46,7 +46,7 @@ maybeSkipHttp2('Trace Agent integration with http2', () => { traceTestModule.setPluginLoaderForTest(); traceTestModule.setCLSForTest(); traceTestModule.start(); - // eslint-disable-next-line node/no-unsupported-features/node-builtins + // eslint-disable-next-line n/no-unsupported-features/node-builtins http2 = require('http2'); }); diff --git a/test/plugins/test-trace-node-fetch.ts b/test/plugins/test-trace-node-fetch.ts index 2380fe500..3f8798dca 100644 --- a/test/plugins/test-trace-node-fetch.ts +++ b/test/plugins/test-trace-node-fetch.ts @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -// eslint-disable-next-line node/no-extraneous-import +// eslint-disable-next-line n/no-extraneous-import import * as fetchTypes from 'node-fetch'; // For types only. import * as testTraceModule from '../trace'; import * as assert from 'assert';