Skip to content

Commit b262b10

Browse files
authored
build(eslint): Create eslint-config-sentry-sdks (#2807)
* feat: Create packages for sentry eslint config * all packages use eslint * Pin typescript versions * use sentry-sdks instead of @sentry
1 parent 8eb7286 commit b262b10

Some content is hidden

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

52 files changed

+399
-218
lines changed

.eslintignore

Lines changed: 0 additions & 4 deletions
This file was deleted.

eslint-plugin-sentry-sdks/package.json

Lines changed: 0 additions & 11 deletions
This file was deleted.

package.json

Lines changed: 3 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,8 @@
2323
"packages/browser",
2424
"packages/core",
2525
"packages/ember",
26+
"packages/eslint-config-sentry-sdks",
27+
"packages/eslint-plugin-sentry-sdks",
2628
"packages/gatsby",
2729
"packages/hub",
2830
"packages/integrations",
@@ -43,26 +45,16 @@
4345
"@types/mocha": "^5.2.0",
4446
"@types/node": "^11.13.7",
4547
"@types/sinon": "^7.0.11",
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",
51-
"eslint": "^7.5.0",
52-
"eslint-config-prettier": "^6.11.0",
53-
"eslint-plugin-deprecation": "^1.1.0",
54-
"eslint-plugin-import": "^2.22.0",
55-
"eslint-plugin-jsdoc": "^30.0.3",
56-
"eslint-plugin-sentry-sdks": "file:./eslint-plugin-sentry-sdks",
57-
"eslint-plugin-simple-import-sort": "^5.0.3",
5851
"jest": "^24.7.1",
5952
"karma-browserstack-launcher": "^1.5.1",
6053
"karma-firefox-launcher": "^1.1.0",
6154
"lerna": "3.13.4",
6255
"mocha": "^6.1.4",
6356
"npm-run-all": "^4.1.2",
64-
"prettier": "^1.17.0",
65-
"prettier-check": "^2.0.0",
57+
"prettier": "1.17.0",
6658
"replace-in-file": "^4.0.0",
6759
"rimraf": "^2.6.3",
6860
"sinon": "^7.3.2",

packages/angular/.eslintrc.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ module.exports = {
77
parserOptions: {
88
ecmaVersion: 2018,
99
},
10-
extends: ['../../.eslintrc.js'],
10+
extends: ['sentry-sdks'],
1111
ignorePatterns: ['build/**/*', 'dist/**/*', 'esm/**/*', 'examples/**/*', 'scripts/**/*'],
1212
overrides: [
1313
{

packages/angular/package.json

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -26,11 +26,12 @@
2626
"tslib": "^1.9.3"
2727
},
2828
"devDependencies": {
29+
"eslint-config-sentry-sdks": "5.20.1",
30+
"eslint": "7.6.0",
2931
"npm-run-all": "^4.1.2",
30-
"prettier": "^1.17.0",
31-
"prettier-check": "^2.0.0",
32+
"prettier": "1.17.0",
3233
"rimraf": "^2.6.3",
33-
"typescript": "^3.5.1"
34+
"typescript": "3.4.5"
3435
},
3536
"scripts": {
3637
"build": "run-p build:es5 build:esm",
@@ -42,7 +43,7 @@
4243
"clean": "rimraf dist coverage build esm",
4344
"link:yarn": "yarn link",
4445
"lint": "run-s lint:prettier lint:eslint",
45-
"lint:prettier": "prettier-check \"{src,test}/**/*.ts\"",
46+
"lint:prettier": "prettier --check \"{src,test}/**/*.ts\"",
4647
"lint:eslint": "eslint . --cache --cache-location '../../eslintcache/' --format stylish",
4748
"fix": "run-s fix:eslint fix:prettier",
4849
"fix:prettier": "prettier --write \"{src,test}/**/*.ts\"",

packages/apm/.eslintrc.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ module.exports = {
66
parserOptions: {
77
ecmaVersion: 2018,
88
},
9-
extends: ['../../.eslintrc.js'],
9+
extends: ['sentry-sdks'],
1010
ignorePatterns: ['build/**/*', 'dist/**/*', 'esm/**/*', 'examples/**/*', 'scripts/**/*'],
1111
overrides: [
1212
{

packages/apm/package.json

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -24,11 +24,12 @@
2424
"tslib": "^1.9.3"
2525
},
2626
"devDependencies": {
27+
"eslint-config-sentry-sdks": "5.20.1",
2728
"@types/express": "^4.17.1",
29+
"eslint": "7.6.0",
2830
"jest": "^24.7.1",
2931
"npm-run-all": "^4.1.2",
30-
"prettier": "^1.17.0",
31-
"prettier-check": "^2.0.0",
32+
"prettier": "1.17.0",
3233
"rimraf": "^2.6.3",
3334
"rollup": "^1.10.1",
3435
"rollup-plugin-commonjs": "^9.3.4",
@@ -50,7 +51,7 @@
5051
"clean": "rimraf dist coverage build esm",
5152
"link:yarn": "yarn link",
5253
"lint": "run-s lint:prettier lint:eslint",
53-
"lint:prettier": "prettier-check \"{src,test}/**/*.ts\"",
54+
"lint:prettier": "prettier --check \"{src,test}/**/*.ts\"",
5455
"lint:eslint": "eslint . --cache --cache-location '../../eslintcache/' --format stylish",
5556
"fix": "run-s fix:eslint fix:prettier",
5657
"fix:prettier": "prettier --write \"{src,test}/**/*.ts\"",

packages/apm/src/integrations/tracing.ts

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -506,7 +506,9 @@ export class Tracing implements Integration {
506506
if (Tracing._heartbeatCounter >= 3) {
507507
if (Tracing._activeTransaction) {
508508
Tracing._log(
509-
`[Tracing] Transaction: ${SpanStatus.Cancelled} -> Heartbeat safeguard kicked in since content hasn't changed for 3 beats`,
509+
`[Tracing] Transaction: ${
510+
SpanStatus.Cancelled
511+
} -> Heartbeat safeguard kicked in since content hasn't changed for 3 beats`,
510512
);
511513
Tracing._activeTransaction.setStatus(SpanStatus.DeadlineExceeded);
512514
Tracing._activeTransaction.setTag('heartbeat', 'failed');

packages/browser/.eslintrc.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ module.exports = {
77
parserOptions: {
88
ecmaVersion: 2018,
99
},
10-
extends: ['../../.eslintrc.js'],
10+
extends: ['sentry-sdks'],
1111
ignorePatterns: ['build/**/*', 'dist/**/*', 'esm/**/*', 'examples/**/*', 'scripts/**/*', 'src/loader.js'],
1212
overrides: [
1313
{

packages/browser/package.json

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,8 @@
2424
"devDependencies": {
2525
"@types/eslint": "^7.2.0",
2626
"@types/md5": "2.1.33",
27+
"eslint-config-sentry-sdks": "5.20.1",
28+
"eslint": "7.6.0",
2729
"btoa": "^1.2.1",
2830
"chai": "^4.1.2",
2931
"chokidar": "^3.0.2",
@@ -40,8 +42,7 @@
4042
"karma-typescript-es6-transform": "^4.0.0",
4143
"node-fetch": "^2.6.0",
4244
"npm-run-all": "^4.1.2",
43-
"prettier": "^1.17.0",
44-
"prettier-check": "^2.0.0",
45+
"prettier": "1.17.0",
4546
"rimraf": "^2.6.3",
4647
"rollup": "^1.10.1",
4748
"rollup-plugin-commonjs": "^9.3.4",
@@ -65,7 +66,7 @@
6566
"clean": "rimraf dist coverage .rpt2_cache build esm",
6667
"link:yarn": "yarn link",
6768
"lint": "run-s lint:prettier lint:eslint",
68-
"lint:prettier": "prettier-check \"{src,test}/**/*.ts\"",
69+
"lint:prettier": "prettier --check \"{src,test}/**/*.ts\"",
6970
"lint:eslint": "eslint . --cache --cache-location '../../eslintcache/' --format stylish",
7071
"fix": "run-s fix:eslint fix:prettier",
7172
"fix:prettier": "prettier --write \"{src,test}/**/*.ts\"",

0 commit comments

Comments
 (0)