Skip to content

Commit 894e402

Browse files
committed
remove remaining tslint references
1 parent 7912989 commit 894e402

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

42 files changed

+45
-239
lines changed

.eslintrc.js

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -87,6 +87,12 @@ module.exports = {
8787
'simple-import-sort/sort': 'error',
8888
'sort-imports': 'off',
8989
'import/order': 'off',
90+
91+
// Disallow delete operator. We should make this operation opt in (by disabling this rule).
92+
'@typescript-eslint/no-dynamic-delete': 'error',
93+
94+
// We should prevent against overloads unless necessary.
95+
'@typescript-eslint/unified-signatures': 'error',
9096
},
9197
},
9298
{
@@ -102,6 +108,9 @@ module.exports = {
102108
'error',
103109
{ require: { ClassDeclaration: true, MethodDefinition: true }, checkConstructors: false },
104110
],
111+
112+
// All imports should be accounted for
113+
'import/no-extraneous-dependencies': 'error',
105114
},
106115
},
107116
{
@@ -164,5 +173,8 @@ module.exports = {
164173

165174
// imports should be ordered.
166175
'import/order': ['error', { 'newlines-between': 'always' }],
176+
177+
// Make sure for in loops check for properties
178+
'guard-for-in': 'error',
167179
},
168180
};

.vscode/extensions.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
{
22
// See http://go.microsoft.com/fwlink/?LinkId=827846
33
// for the documentation about the extensions.json format
4-
"recommendations": ["esbenp.prettier-vscode", "ms-vscode.vscode-typescript-tslint-plugin", "dbaeumer.vscode-eslint"]
4+
"recommendations": ["esbenp.prettier-vscode", "dbaeumer.vscode-eslint"]
55
}

.vscode/settings.json

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,6 @@
1313
"**/dist/": true
1414
},
1515
"typescript.tsdk": "./node_modules/typescript/lib",
16-
"tslint.autoFixOnSave": true,
1716
"[json]": {
1817
"editor.formatOnType": false,
1918
"editor.formatOnPaste": false,

package.json

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -43,8 +43,8 @@
4343
"@types/mocha": "^5.2.0",
4444
"@types/node": "^11.13.7",
4545
"@types/sinon": "^7.0.11",
46-
"@typescript-eslint/eslint-plugin": "^3.7.1",
47-
"@typescript-eslint/parser": "^3.7.1",
46+
"@typescript-eslint/eslint-plugin": "^3.9.0",
47+
"@typescript-eslint/parser": "^3.9.0",
4848
"chai": "^4.1.2",
4949
"codecov": "^3.6.5",
5050
"danger": "^7.1.3",
@@ -68,10 +68,8 @@
6868
"sinon": "^7.3.2",
6969
"size-limit": "^4.5.5",
7070
"ts-jest": "^24.0.2",
71-
"tslint": "5.16.0",
7271
"typedoc": "^0.14.2",
73-
"typescript": "3.4.5",
74-
"typescript-tslint-plugin": "^0.3.1"
72+
"typescript": "3.4.5"
7573
},
7674
"resolutions": {
7775
"**/agent-base": "5"

packages/angular/package.json

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,6 @@
3030
"prettier": "^1.17.0",
3131
"prettier-check": "^2.0.0",
3232
"rimraf": "^2.6.3",
33-
"tslint": "^5.16.0",
3433
"typescript": "^3.5.1"
3534
},
3635
"scripts": {

packages/angular/src/errorhandler.ts

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -78,7 +78,6 @@ class SentryErrorHandler implements AngularErrorHandler {
7878
// Allow custom overrides of extracting function
7979
if (this._options.extractor) {
8080
const defaultExtractor = this._defaultExtractor.bind(this);
81-
// tslint:disable-next-line:no-unsafe-any
8281
return this._options.extractor(error, defaultExtractor);
8382
}
8483

packages/angular/src/tracing.ts

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -148,7 +148,6 @@ export function TraceClassDecorator(): ClassDecorator {
148148

149149
// eslint-disable-next-line @typescript-eslint/explicit-function-return-type
150150
return target => {
151-
// tslint:disable-next-line:no-unsafe-any
152151
const originalOnInit = target.prototype.ngOnInit;
153152
// eslint-disable-next-line @typescript-eslint/no-explicit-any
154153
target.prototype.ngOnInit = function(...args: any[]): ReturnType<typeof originalOnInit> {
@@ -171,7 +170,6 @@ export function TraceClassDecorator(): ClassDecorator {
171170
tracingSpan.finish();
172171
}
173172
if (originalAfterViewInit) {
174-
// tslint:disable-next-line:no-unsafe-any
175173
return originalAfterViewInit.apply(this, args);
176174
}
177175
};
@@ -198,7 +196,6 @@ export function TraceMethodDecorator(): MethodDecorator {
198196
});
199197
}
200198
if (originalMethod) {
201-
// tslint:disable-next-line:no-unsafe-any
202199
return originalMethod.apply(this, args);
203200
}
204201
};

packages/apm/package.json

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,6 @@
3636
"rollup-plugin-node-resolve": "^4.2.3",
3737
"rollup-plugin-terser": "^4.0.4",
3838
"rollup-plugin-typescript2": "^0.21.0",
39-
"tslint": "5.16.0",
4039
"typescript": "3.4.5"
4140
},
4241
"scripts": {

packages/apm/src/index.bundle.ts

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -61,12 +61,10 @@ export { Span, TRACEPARENT_REGEXP } from './span';
6161
let windowIntegrations = {};
6262

6363
// This block is needed to add compatibility with the integrations packages when used with a CDN
64-
// tslint:disable: no-unsafe-any
6564
const _window = getGlobalObject<Window>();
6665
if (_window.Sentry && _window.Sentry.Integrations) {
6766
windowIntegrations = _window.Sentry.Integrations;
6867
}
69-
// tslint:enable: no-unsafe-any
7068

7169
const INTEGRATIONS = {
7270
...windowIntegrations,

packages/apm/src/integrations/tracing.ts

Lines changed: 1 addition & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -315,7 +315,7 @@ export class Tracing implements Integration {
315315
}
316316
span.finish();
317317
}
318-
// tslint:disable-next-line: no-dynamic-delete
318+
// eslint-disable-next-line @typescript-eslint/no-dynamic-delete
319319
delete Tracing._activities[id];
320320
}
321321

@@ -698,7 +698,6 @@ export class Tracing implements Integration {
698698
}
699699

700700
Tracing._performanceCursor = Math.max(performance.getEntries().length - 1, 0);
701-
// tslint:enable: no-unsafe-any
702701
}
703702

704703
/**
@@ -792,7 +791,6 @@ export class Tracing implements Integration {
792791
}
793792
debugData['Date.now()'] = Date.now();
794793
span.setData('sentry_debug', debugData);
795-
// tslint:enable: no-unsafe-any
796794
}
797795

798796
/**
@@ -945,12 +943,10 @@ function xhrCallback(handlerData: { [key: string]: any }): void {
945943
return;
946944
}
947945

948-
// tslint:disable-next-line: no-unsafe-any
949946
if (!handlerData || !handlerData.xhr || !handlerData.xhr.__sentry_xhr__) {
950947
return;
951948
}
952949

953-
// tslint:disable: no-unsafe-any
954950
const xhr = handlerData.xhr.__sentry_xhr__;
955951

956952
if (!Tracing.options.shouldCreateSpanForRequest(xhr.url)) {
@@ -988,15 +984,13 @@ function xhrCallback(handlerData: { [key: string]: any }): void {
988984
}
989985
}
990986
}
991-
// tslint:enable: no-unsafe-any
992987
}
993988

994989
/**
995990
* Creates breadcrumbs from fetch API calls
996991
*/
997992
// eslint-disable-next-line @typescript-eslint/no-explicit-any
998993
function fetchCallback(handlerData: { [key: string]: any }): void {
999-
// tslint:disable: no-unsafe-any
1000994
if (!Tracing.options.traceFetch) {
1001995
return;
1002996
}
@@ -1043,7 +1037,6 @@ function fetchCallback(handlerData: { [key: string]: any }): void {
10431037
}
10441038
}
10451039
}
1046-
// tslint:enable: no-unsafe-any
10471040
}
10481041

10491042
/**

0 commit comments

Comments
 (0)