Skip to content

Commit

Permalink
fix: migrate eslint ignores
Browse files Browse the repository at this point in the history
  • Loading branch information
punya committed Jul 24, 2024
1 parent 8421850 commit c97a84d
Show file tree
Hide file tree
Showing 10 changed files with 12 additions and 12 deletions.
2 changes: 1 addition & 1 deletion scripts/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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);
});
2 changes: 1 addition & 1 deletion src/plugins/plugin-connect.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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 '..';
Expand Down
2 changes: 1 addition & 1 deletion src/plugins/plugin-hapi.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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 '..';
Expand Down
2 changes: 1 addition & 1 deletion src/plugins/plugin-http2.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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';
Expand Down
2 changes: 1 addition & 1 deletion src/plugins/plugin-koa.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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 '..';
Expand Down
2 changes: 1 addition & 1 deletion src/trace-writer.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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);
}
Expand Down
2 changes: 1 addition & 1 deletion test/non-interference/http-e2e.js
Original file line number Diff line number Diff line change
Expand Up @@ -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', [
Expand Down
4 changes: 2 additions & 2 deletions test/non-interference/start-agent.js
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
'use strict';

const shimmer = require('shimmer');
// eslint-disable-next-line node/no-missing-require
// eslint-disable-next-line e/no-missing-require

Check failure on line 18 in test/non-interference/start-agent.js

View workflow job for this annotation

GitHub Actions / lint

Definition for rule 'e/no-missing-require' was not found
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
Expand All @@ -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,
Expand Down
4 changes: 2 additions & 2 deletions test/plugins/test-trace-http2.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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';
Expand Down Expand Up @@ -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');
});

Expand Down
2 changes: 1 addition & 1 deletion test/plugins/test-trace-node-fetch.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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';
Expand Down

0 comments on commit c97a84d

Please sign in to comment.