Skip to content

ref: Cleanup lint warnings #8972

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Sep 8, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions packages/nextjs/src/common/utils/wrapperUtils.ts
Original file line number Diff line number Diff line change
Expand Up @@ -188,6 +188,7 @@ export function withTracedServerSideDataFetcher<F extends (...args: any[]) => Pr
* We only do the following until we move transaction creation into this function: When called, the wrapped function
* will also update the name of the active transaction with a parameterized route provided via the `options` argument.
*/
// eslint-disable-next-line @typescript-eslint/no-explicit-any
export async function callDataFetcherTraced<F extends (...args: any[]) => Promise<any> | any>(
origFunction: F,
origFunctionArgs: Parameters<F>,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,11 +11,13 @@ type EdgeRequest = {
/**
* Wraps a function with Sentry crons instrumentation by automaticaly sending check-ins for the given Vercel crons config.
*/
// eslint-disable-next-line @typescript-eslint/no-explicit-any
export function wrapApiHandlerWithSentryVercelCrons<F extends (...args: any[]) => any>(
handler: F,
vercelCronsConfig: VercelCronsConfig,
): F {
return new Proxy(handler, {
// eslint-disable-next-line @typescript-eslint/no-explicit-any
apply: (originalFunction, thisArg, args: any[]) => {
return runWithAsyncContext(() => {
if (!args || !args[0]) {
Expand Down
3 changes: 3 additions & 0 deletions packages/nextjs/src/config/loaders/wrappingLoader.ts
Original file line number Diff line number Diff line change
Expand Up @@ -72,6 +72,7 @@ function moduleExists(id: string): boolean {
export default function wrappingLoader(
this: LoaderThis<LoaderOptions>,
userCode: string,
// eslint-disable-next-line @typescript-eslint/no-explicit-any
userModuleSourceMap: any,
): void {
// We know one or the other will be defined, depending on the version of webpack being used
Expand Down Expand Up @@ -276,7 +277,9 @@ export default function wrappingLoader(
async function wrapUserCode(
wrapperCode: string,
userModuleCode: string,
// eslint-disable-next-line @typescript-eslint/no-explicit-any
userModuleSourceMap: any,
// eslint-disable-next-line @typescript-eslint/no-explicit-any
): Promise<{ code: string; map?: any }> {
const wrap = (withDefaultExport: boolean): Promise<RollupBuild> =>
rollup({
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@ const origGetInitialProps = pageComponent ? pageComponent.getInitialProps : unde
const origGetStaticProps = userPageModule ? userPageModule.getStaticProps : undefined;
const origGetServerSideProps = userPageModule ? userPageModule.getServerSideProps : undefined;

// eslint-disable-next-line @typescript-eslint/no-explicit-any
const getInitialPropsWrappers: Record<string, any> = {
'/_app': Sentry.wrapAppGetInitialPropsWithSentry,
'/_document': Sentry.wrapDocumentGetInitialPropsWithSentry,
Expand Down
1 change: 1 addition & 0 deletions packages/nextjs/src/index.types.ts
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
/* eslint-disable @typescript-eslint/no-explicit-any */
/* eslint-disable import/export */

// We export everything from both the client part of the SDK and from the server part. Some of the exports collide,
Expand Down
1 change: 1 addition & 0 deletions packages/nextjs/src/server/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,7 @@ export const ErrorBoundary = (props: React.PropsWithChildren<unknown>): React.Re
* A passthrough error boundary wrapper for the server that doesn't depend on any react. Error boundaries don't catch
* SSR errors so they should simply be a passthrough.
*/
// eslint-disable-next-line @typescript-eslint/no-explicit-any
export function withErrorBoundary<P extends Record<string, any>>(
WrappedComponent: React.ComponentType<P>,
): React.FC<P> {
Expand Down
2 changes: 1 addition & 1 deletion packages/node/test/transports/http.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -212,7 +212,7 @@ describe('makeNewHttpTransport()', () => {
describe('proxy', () => {
const proxyAgentSpy = jest
.spyOn(httpProxyAgent, 'HttpsProxyAgent')
// @ts-expect-error
// @ts-expect-error using http agent as https proxy agent
.mockImplementation(() => new http.Agent({ keepAlive: false, maxSockets: 30, timeout: 2000 }));

it('can be configured through option', () => {
Expand Down
2 changes: 1 addition & 1 deletion packages/node/test/transports/https.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -183,7 +183,7 @@ describe('makeNewHttpsTransport()', () => {
describe('proxy', () => {
const proxyAgentSpy = jest
.spyOn(httpProxyAgent, 'HttpsProxyAgent')
// @ts-expect-error
// @ts-expect-error using http agent as https proxy agent
.mockImplementation(() => new http.Agent({ keepAlive: false, maxSockets: 30, timeout: 2000 }));

it('can be configured through option', () => {
Expand Down
1 change: 1 addition & 0 deletions packages/remix/src/utils/vendor/response.ts
Original file line number Diff line number Diff line change
Expand Up @@ -128,6 +128,7 @@ export function getRequestMatch(url: URL, matches: RouteMatch<ServerRoute>[]): R
/**
* https://github.com/remix-run/remix/blob/3e589152bc717d04e2054c31bea5a1056080d4b9/packages/remix-server-runtime/responses.ts#L75-L85
*/
// eslint-disable-next-line @typescript-eslint/no-explicit-any
export function isDeferredData(value: any): value is DeferredData {
const deferred: DeferredData = value;
return (
Expand Down