Skip to content

Commit 2b6ad6b

Browse files
committed
cleanup/fix linting errors
1 parent ae469bf commit 2b6ad6b

File tree

6 files changed

+14
-21
lines changed

6 files changed

+14
-21
lines changed
+2-9
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,4 @@
11
export * from '@sentry/svelte';
22

3-
// The `withSentryConfig` is exported from the `@sentry/svelte` package, but it has
4-
// nothing to do with the SvelteKit withSentryConfig. (Bad naming on our part)
5-
// const { withSentryConfig, ...restOfTheSDK } = SvelteSDK;
6-
7-
// export { withSentryConfig as whatever };
8-
9-
// export {
10-
// ...restOfTheSDK,
11-
// };
3+
// Just here so that eslint is happy until we export more stuff here
4+
export const PLACEHOLDER_SERVER = 'PLACEHOLDER';

packages/sveltekit/src/config/vitePlugins.ts

+3-4
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,8 @@
1-
import type { Plugin, TransformResult } from 'vite';
2-
1+
import { logger } from '@sentry/utils';
32
import * as fs from 'fs';
4-
import * as path from 'path';
53
import MagicString from 'magic-string';
6-
import { logger } from '@sentry/utils';
4+
import * as path from 'path';
5+
import type { Plugin, TransformResult } from 'vite';
76

87
/**
98
* This plugin injects the `Sentry.init` calls from `sentry.(client|server).config.(ts|js)`

packages/sveltekit/src/config/withSentryViteConfig.ts

+2-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
1-
import { UserConfig, UserConfigExport } from 'vite';
1+
import type { UserConfig, UserConfigExport } from 'vite';
2+
23
import { injectSentryInitPlugin } from './vitePlugins';
34

45
/**

packages/sveltekit/src/index.types.ts

-1
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,6 @@ export * from './config';
88
export * from './server';
99

1010
import type { Integration, Options, StackParser } from '@sentry/types';
11-
import { UserConfig, UserConfigExport } from 'vite';
1211

1312
import type * as clientSdk from './client';
1413
import type * as serverSdk from './server';

packages/sveltekit/test/config/vitePlugins.test.ts

+5-5
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
1-
import { injectSentryInitPlugin } from '../../src/config/vitePlugins';
2-
31
import * as fs from 'fs';
42

3+
import { injectSentryInitPlugin } from '../../src/config/vitePlugins';
4+
55
describe('injectSentryInitPlugin', () => {
66
it('has its basic properties set', () => {
77
expect(injectSentryInitPlugin.name).toBe('sentry-init-injection-plugin');
@@ -19,7 +19,7 @@ describe('injectSentryInitPlugin', () => {
1919
// @ts-ignore -- transform is definitely defined and callable. Seems like TS doesn't know that.
2020
const result = injectSentryInitPlugin.transform(code, id);
2121

22-
expect(result.code).toMatch(/foo\(\);\n.*import \".*sentry\.server\.config\.ts\";/gm);
22+
expect(result.code).toMatch(/foo\(\);\n.*import ".*sentry\.server\.config\.ts";/gm);
2323
expect(result.map).toBeDefined();
2424
});
2525

@@ -30,7 +30,7 @@ describe('injectSentryInitPlugin', () => {
3030
// @ts-ignore -- transform is definitely defined and callable. Seems like TS doesn't know that.
3131
const result = injectSentryInitPlugin.transform(code, id);
3232

33-
expect(result.code).toMatch(/foo\(\);\n.*import \".*sentry\.client\.config\.ts\";/gm);
33+
expect(result.code).toMatch(/foo\(\);\n.*import ".*sentry\.client\.config\.ts";/gm);
3434
expect(result.map).toBeDefined();
3535
});
3636

@@ -41,7 +41,7 @@ describe('injectSentryInitPlugin', () => {
4141
// @ts-ignore -- transform is definitely defined and callable. Seems like TS doesn't know that.
4242
const result = injectSentryInitPlugin.transform(code, id);
4343

44-
expect(result.code).toMatch(/foo\(\);\n.*import \".*sentry\.client\.config\.ts\";/gm);
44+
expect(result.code).toMatch(/foo\(\);\n.*import ".*sentry\.client\.config\.ts";/gm);
4545
expect(result.map).toBeDefined();
4646
});
4747

packages/sveltekit/test/config/withSentryViteConfig.test.ts

+2-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
1-
import { UserConfig, Plugin } from 'vite';
1+
import type { Plugin, UserConfig } from 'vite';
2+
23
import { withSentryViteConfig } from '../../src/config/withSentryViteConfig';
34

45
describe('withSentryViteConfig', () => {

0 commit comments

Comments
 (0)