Skip to content

Commit 11ff81d

Browse files
committed
make necessary fixes
1 parent 026e6e0 commit 11ff81d

File tree

9 files changed

+17
-6
lines changed

9 files changed

+17
-6
lines changed

packages/eslint-config-sdk/src/index.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -163,7 +163,7 @@ module.exports = {
163163
env: {
164164
jest: true,
165165
},
166-
files: ['*.test.ts', '*.test.tsx', '*.test.js', '*.test.jsx'],
166+
files: ['*.test.ts', '*.test.tsx', '*.test.js', '*.test.jsx', 'test/**/*.ts', 'test/**/*.js'],
167167
rules: {
168168
'max-lines': 'off',
169169

packages/react/test/errorboundary.test.tsx

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
11
import { Scope } from '@sentry/browser';
2-
import { Event, Severity } from '@sentry/types';
32
import { fireEvent, render, screen } from '@testing-library/react';
43
import * as React from 'react';
54
import { useState } from 'react';

packages/types/.eslintrc.js

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,7 @@
11
module.exports = {
22
extends: ['../../.eslintrc.js'],
3+
rules: {
4+
'@typescript-eslint/no-explicit-any': 'off',
5+
}
36
};
47

packages/utils/src/instrument.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
/* eslint-disable max-lines */
12
/* eslint-disable @typescript-eslint/no-explicit-any */
23
/* eslint-disable @typescript-eslint/ban-types */
34
import { WrappedFunction } from '@sentry/types';

packages/utils/src/object.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
/* eslint-disable max-lines */
12
/* eslint-disable @typescript-eslint/no-explicit-any */
23
import { ExtendedError, WrappedFunction } from '@sentry/types';
34

packages/vue/src/components.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,9 @@ export const generateComponentTrace = (vm?: ViewModel): string => {
5252
let currentRecursiveSequence = 0;
5353
while (vm) {
5454
if (tree.length > 0) {
55+
// eslint-disable-next-line @typescript-eslint/no-explicit-any
5556
const last = tree[tree.length - 1] as any;
57+
// eslint-disable-next-line @typescript-eslint/no-unsafe-member-access
5658
if (last.constructor === vm.constructor) {
5759
currentRecursiveSequence += 1;
5860
vm = vm.$parent; // eslint-disable-line no-param-reassign

packages/vue/src/errorhandler.ts

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,8 @@ import { getCurrentHub } from '@sentry/browser';
33
import { formatComponentName, generateComponentTrace } from './components';
44
import { Options, ViewModel, Vue } from './types';
55

6+
type UnknownFunc = (...args: unknown[]) => void;
7+
68
export const attachErrorHandler = (app: Vue, options: Options): void => {
79
const { errorHandler, warnHandler, silent } = app.config;
810

@@ -30,15 +32,15 @@ export const attachErrorHandler = (app: Vue, options: Options): void => {
3032
});
3133

3234
if (typeof errorHandler === 'function') {
33-
errorHandler.call(app, error, vm, lifecycleHook);
35+
(errorHandler as UnknownFunc).call(app, error, vm, lifecycleHook);
3436
}
3537

3638
if (options.logErrors) {
3739
const hasConsole = typeof console !== 'undefined';
3840
const message = `Error in ${lifecycleHook}: "${error && error.toString()}"`;
3941

4042
if (warnHandler) {
41-
warnHandler.call(null, message, vm, trace);
43+
(warnHandler as UnknownFunc).call(null, message, vm, trace);
4244
} else if (hasConsole && !silent) {
4345
// eslint-disable-next-line no-console
4446
console.error(`[Vue warn]: ${message}${trace}`);

packages/vue/src/router.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
/* eslint-disable @typescript-eslint/no-explicit-any */
12
import { captureException } from '@sentry/browser';
23
import { Transaction, TransactionContext } from '@sentry/types';
34

@@ -61,6 +62,7 @@ export function vueRouterInstrumentation(router: VueRouter): VueRouterInstrument
6162

6263
if (startTransactionOnLocationChange && !isPageLoadNavigation) {
6364
startTransaction({
65+
// eslint-disable-next-line @typescript-eslint/no-unsafe-member-access
6466
name: to.name || (to.matched[0] && to.matched[0].path) || to.path,
6567
op: 'navigation',
6668
tags,

packages/vue/src/types.ts

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,14 @@
1+
/* eslint-disable @typescript-eslint/no-explicit-any */
12
import { BrowserOptions } from '@sentry/browser';
23

3-
// This is not great, but kinda nacessary to make it woth with Vue@2 and Vue@3 at the same time.
4+
// This is not great, but kinda necessary to make it woth with Vue@2 and Vue@3 at the same time.
45
export interface Vue {
56
config: {
67
errorHandler?: any;
78
warnHandler?: any;
89
silent?: boolean;
910
};
10-
mixin: (mixins: any) => void;
11+
mixin: (mixins: Partial<Record<Hook, any>>) => void;
1112
}
1213

1314
export type ViewModel = {

0 commit comments

Comments
 (0)