Skip to content

Commit 6f97b5f

Browse files
authored
ref: Cleanup lint warnings (#8972)
This pollutes the console when running the linter, hopefully also speeds up CI a little bit.
1 parent b190015 commit 6f97b5f

File tree

9 files changed

+12
-2
lines changed

9 files changed

+12
-2
lines changed

packages/nextjs/src/common/utils/wrapperUtils.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -188,6 +188,7 @@ export function withTracedServerSideDataFetcher<F extends (...args: any[]) => Pr
188188
* We only do the following until we move transaction creation into this function: When called, the wrapped function
189189
* will also update the name of the active transaction with a parameterized route provided via the `options` argument.
190190
*/
191+
// eslint-disable-next-line @typescript-eslint/no-explicit-any
191192
export async function callDataFetcherTraced<F extends (...args: any[]) => Promise<any> | any>(
192193
origFunction: F,
193194
origFunctionArgs: Parameters<F>,

packages/nextjs/src/common/wrapApiHandlerWithSentryVercelCrons.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,11 +11,13 @@ type EdgeRequest = {
1111
/**
1212
* Wraps a function with Sentry crons instrumentation by automaticaly sending check-ins for the given Vercel crons config.
1313
*/
14+
// eslint-disable-next-line @typescript-eslint/no-explicit-any
1415
export function wrapApiHandlerWithSentryVercelCrons<F extends (...args: any[]) => any>(
1516
handler: F,
1617
vercelCronsConfig: VercelCronsConfig,
1718
): F {
1819
return new Proxy(handler, {
20+
// eslint-disable-next-line @typescript-eslint/no-explicit-any
1921
apply: (originalFunction, thisArg, args: any[]) => {
2022
return runWithAsyncContext(() => {
2123
if (!args || !args[0]) {

packages/nextjs/src/config/loaders/wrappingLoader.ts

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -72,6 +72,7 @@ function moduleExists(id: string): boolean {
7272
export default function wrappingLoader(
7373
this: LoaderThis<LoaderOptions>,
7474
userCode: string,
75+
// eslint-disable-next-line @typescript-eslint/no-explicit-any
7576
userModuleSourceMap: any,
7677
): void {
7778
// We know one or the other will be defined, depending on the version of webpack being used
@@ -276,7 +277,9 @@ export default function wrappingLoader(
276277
async function wrapUserCode(
277278
wrapperCode: string,
278279
userModuleCode: string,
280+
// eslint-disable-next-line @typescript-eslint/no-explicit-any
279281
userModuleSourceMap: any,
282+
// eslint-disable-next-line @typescript-eslint/no-explicit-any
280283
): Promise<{ code: string; map?: any }> {
281284
const wrap = (withDefaultExport: boolean): Promise<RollupBuild> =>
282285
rollup({

packages/nextjs/src/config/templates/pageWrapperTemplate.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,7 @@ const origGetInitialProps = pageComponent ? pageComponent.getInitialProps : unde
2727
const origGetStaticProps = userPageModule ? userPageModule.getStaticProps : undefined;
2828
const origGetServerSideProps = userPageModule ? userPageModule.getServerSideProps : undefined;
2929

30+
// eslint-disable-next-line @typescript-eslint/no-explicit-any
3031
const getInitialPropsWrappers: Record<string, any> = {
3132
'/_app': Sentry.wrapAppGetInitialPropsWithSentry,
3233
'/_document': Sentry.wrapDocumentGetInitialPropsWithSentry,

packages/nextjs/src/index.types.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
/* eslint-disable @typescript-eslint/no-explicit-any */
12
/* eslint-disable import/export */
23

34
// We export everything from both the client part of the SDK and from the server part. Some of the exports collide,

packages/nextjs/src/server/index.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,7 @@ export const ErrorBoundary = (props: React.PropsWithChildren<unknown>): React.Re
3636
* A passthrough error boundary wrapper for the server that doesn't depend on any react. Error boundaries don't catch
3737
* SSR errors so they should simply be a passthrough.
3838
*/
39+
// eslint-disable-next-line @typescript-eslint/no-explicit-any
3940
export function withErrorBoundary<P extends Record<string, any>>(
4041
WrappedComponent: React.ComponentType<P>,
4142
): React.FC<P> {

packages/node/test/transports/http.test.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -212,7 +212,7 @@ describe('makeNewHttpTransport()', () => {
212212
describe('proxy', () => {
213213
const proxyAgentSpy = jest
214214
.spyOn(httpProxyAgent, 'HttpsProxyAgent')
215-
// @ts-expect-error
215+
// @ts-expect-error using http agent as https proxy agent
216216
.mockImplementation(() => new http.Agent({ keepAlive: false, maxSockets: 30, timeout: 2000 }));
217217

218218
it('can be configured through option', () => {

packages/node/test/transports/https.test.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -183,7 +183,7 @@ describe('makeNewHttpsTransport()', () => {
183183
describe('proxy', () => {
184184
const proxyAgentSpy = jest
185185
.spyOn(httpProxyAgent, 'HttpsProxyAgent')
186-
// @ts-expect-error
186+
// @ts-expect-error using http agent as https proxy agent
187187
.mockImplementation(() => new http.Agent({ keepAlive: false, maxSockets: 30, timeout: 2000 }));
188188

189189
it('can be configured through option', () => {

packages/remix/src/utils/vendor/response.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -128,6 +128,7 @@ export function getRequestMatch(url: URL, matches: RouteMatch<ServerRoute>[]): R
128128
/**
129129
* https://github.com/remix-run/remix/blob/3e589152bc717d04e2054c31bea5a1056080d4b9/packages/remix-server-runtime/responses.ts#L75-L85
130130
*/
131+
// eslint-disable-next-line @typescript-eslint/no-explicit-any
131132
export function isDeferredData(value: any): value is DeferredData {
132133
const deferred: DeferredData = value;
133134
return (

0 commit comments

Comments
 (0)