Skip to content

Commit e491e60

Browse files
authored
build: Remove @sentry-internal/sdk/no-async-await rule (#6797)
1 parent 461afdf commit e491e60

File tree

13 files changed

+0
-126
lines changed

13 files changed

+0
-126
lines changed

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

-3
Original file line numberDiff line numberDiff line change
@@ -143,8 +143,6 @@ module.exports = {
143143
},
144144
],
145145

146-
// We want to prevent async await & optional chaining usage in our files to prevent uncessary bundle size. Turned off in tests.
147-
'@sentry-internal/sdk/no-async-await': 'error',
148146
'@sentry-internal/sdk/no-optional-chaining': 'error',
149147

150148
// JSDOC comments are required for classes and methods. As we have a public facing codebase, documentation,
@@ -178,7 +176,6 @@ module.exports = {
178176
'@typescript-eslint/no-explicit-any': 'off',
179177
'@typescript-eslint/no-non-null-assertion': 'off',
180178
'@typescript-eslint/no-empty-function': 'off',
181-
'@sentry-internal/sdk/no-async-await': 'off',
182179
'@sentry-internal/sdk/no-optional-chaining': 'off',
183180
},
184181
},

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

-1
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,6 @@
1010

1111
module.exports = {
1212
rules: {
13-
'no-async-await': require('./rules/no-async-await'),
1413
'no-optional-chaining': require('./rules/no-optional-chaining'),
1514
'no-eq-empty': require('./rules/no-eq-empty'),
1615
},

packages/eslint-plugin-sdk/src/rules/no-async-await.js

-57
This file was deleted.

packages/eslint-plugin-sdk/test/lib/rules/no-async-await.js

-50
This file was deleted.

packages/nextjs/.eslintrc.js

-1
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,6 @@ module.exports = {
99
ignorePatterns: ['test/integration/**'],
1010
extends: ['../../.eslintrc.js'],
1111
rules: {
12-
'@sentry-internal/sdk/no-async-await': 'off',
1312
'@sentry-internal/sdk/no-optional-chaining': 'off',
1413
},
1514
overrides: [

packages/node/.eslintrc.js

-1
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,6 @@ module.exports = {
44
},
55
extends: ['../../.eslintrc.js'],
66
rules: {
7-
'@sentry-internal/sdk/no-async-await': 'off',
87
'@sentry-internal/sdk/no-optional-chaining': 'off',
98
},
109
};

packages/opentelemetry-node/.eslintrc.js

-1
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,6 @@ module.exports = {
44
},
55
extends: ['../../.eslintrc.js'],
66
rules: {
7-
'@sentry-internal/sdk/no-async-await': 'off',
87
'@sentry-internal/sdk/no-optional-chaining': 'off',
98
},
109
};

packages/remix/.eslintrc.js

-1
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,6 @@ module.exports = {
99
ignorePatterns: ['playwright.config.ts', 'test/integration/**'],
1010
extends: ['../../.eslintrc.js'],
1111
rules: {
12-
'@sentry-internal/sdk/no-async-await': 'off',
1312
'@sentry-internal/sdk/no-optional-chaining': 'off',
1413
},
1514
overrides: [

packages/replay/.eslintrc.js

-7
Original file line numberDiff line numberDiff line change
@@ -20,13 +20,6 @@ module.exports = {
2020
sourceType: 'module',
2121
},
2222
},
23-
{
24-
files: ['*.ts', '*.tsx', '*.d.ts'],
25-
rules: {
26-
// Since we target only es6 here, we can leave this off
27-
'@sentry-internal/sdk/no-async-await': 'off',
28-
},
29-
},
3023
{
3124
files: ['jest.setup.ts', 'jest.config.ts'],
3225
parserOptions: {

packages/serverless/.eslintrc.js

-1
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,6 @@ module.exports = {
44
},
55
extends: ['../../.eslintrc.js'],
66
rules: {
7-
'@sentry-internal/sdk/no-async-await': 'off',
87
'@sentry-internal/sdk/no-optional-chaining': 'off',
98
},
109
overrides: [

packages/utils/src/buildPolyfills/_asyncNullishCoalesce.ts

-1
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,6 @@ import { _nullishCoalesce } from './_nullishCoalesce';
1515
* @param rhsFn A function returning the value of the expression to the right of the `??`
1616
* @returns The LHS value, unless it's `null` or `undefined`, in which case, the RHS value
1717
*/
18-
// eslint-disable-next-line @sentry-internal/sdk/no-async-await
1918
export async function _asyncNullishCoalesce(lhs: unknown, rhsFn: () => unknown): Promise<unknown> {
2019
return _nullishCoalesce(lhs, rhsFn);
2120
}

packages/utils/src/buildPolyfills/_asyncOptionalChain.ts

-1
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,6 @@ import type { GenericFunction } from './types';
1010
* @param ops Array result of expression conversion
1111
* @returns The value of the expression
1212
*/
13-
// eslint-disable-next-line @sentry-internal/sdk/no-async-await
1413
export async function _asyncOptionalChain(ops: unknown[]): Promise<unknown> {
1514
let lastAccessLHS: unknown = undefined;
1615
let value = ops[0];

packages/utils/src/buildPolyfills/_asyncOptionalChainDelete.ts

-1
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,6 @@ import { _asyncOptionalChain } from './_asyncOptionalChain';
1212
* property (one which can't be deleted or turned into an accessor, and whose enumerability can't be changed), in which
1313
* case `false`.
1414
*/
15-
// eslint-disable-next-line @sentry-internal/sdk/no-async-await
1615
export async function _asyncOptionalChainDelete(ops: unknown[]): Promise<boolean> {
1716
const result = (await _asyncOptionalChain(ops)) as Promise<boolean | null>;
1817
// If `result` is `null`, it means we didn't get to the end of the chain and so nothing was deleted (in which case,

0 commit comments

Comments
 (0)