Skip to content

build: Remove @sentry-internal/sdk/no-async-await rule #6797

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 2 commits into from
Jan 16, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 0 additions & 3 deletions packages/eslint-config-sdk/src/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -143,8 +143,6 @@ module.exports = {
},
],

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

// JSDOC comments are required for classes and methods. As we have a public facing codebase, documentation,
Expand Down Expand Up @@ -178,7 +176,6 @@ module.exports = {
'@typescript-eslint/no-explicit-any': 'off',
'@typescript-eslint/no-non-null-assertion': 'off',
'@typescript-eslint/no-empty-function': 'off',
'@sentry-internal/sdk/no-async-await': 'off',
'@sentry-internal/sdk/no-optional-chaining': 'off',
},
},
Expand Down
1 change: 0 additions & 1 deletion packages/eslint-plugin-sdk/src/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,6 @@

module.exports = {
rules: {
'no-async-await': require('./rules/no-async-await'),
'no-optional-chaining': require('./rules/no-optional-chaining'),
'no-eq-empty': require('./rules/no-eq-empty'),
},
Expand Down
57 changes: 0 additions & 57 deletions packages/eslint-plugin-sdk/src/rules/no-async-await.js

This file was deleted.

50 changes: 0 additions & 50 deletions packages/eslint-plugin-sdk/test/lib/rules/no-async-await.js

This file was deleted.

1 change: 0 additions & 1 deletion packages/nextjs/.eslintrc.js
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,6 @@ module.exports = {
ignorePatterns: ['test/integration/**'],
extends: ['../../.eslintrc.js'],
rules: {
'@sentry-internal/sdk/no-async-await': 'off',
'@sentry-internal/sdk/no-optional-chaining': 'off',
},
overrides: [
Expand Down
1 change: 0 additions & 1 deletion packages/node/.eslintrc.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@ module.exports = {
},
extends: ['../../.eslintrc.js'],
rules: {
'@sentry-internal/sdk/no-async-await': 'off',
'@sentry-internal/sdk/no-optional-chaining': 'off',
},
};
1 change: 0 additions & 1 deletion packages/opentelemetry-node/.eslintrc.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@ module.exports = {
},
extends: ['../../.eslintrc.js'],
rules: {
'@sentry-internal/sdk/no-async-await': 'off',
'@sentry-internal/sdk/no-optional-chaining': 'off',
},
};
1 change: 0 additions & 1 deletion packages/remix/.eslintrc.js
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,6 @@ module.exports = {
ignorePatterns: ['playwright.config.ts', 'test/integration/**'],
extends: ['../../.eslintrc.js'],
rules: {
'@sentry-internal/sdk/no-async-await': 'off',
'@sentry-internal/sdk/no-optional-chaining': 'off',
},
overrides: [
Expand Down
7 changes: 0 additions & 7 deletions packages/replay/.eslintrc.js
Original file line number Diff line number Diff line change
Expand Up @@ -20,13 +20,6 @@ module.exports = {
sourceType: 'module',
},
},
{
files: ['*.ts', '*.tsx', '*.d.ts'],
rules: {
// Since we target only es6 here, we can leave this off
'@sentry-internal/sdk/no-async-await': 'off',
},
},
{
files: ['jest.setup.ts', 'jest.config.ts'],
parserOptions: {
Expand Down
1 change: 0 additions & 1 deletion packages/serverless/.eslintrc.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@ module.exports = {
},
extends: ['../../.eslintrc.js'],
rules: {
'@sentry-internal/sdk/no-async-await': 'off',
'@sentry-internal/sdk/no-optional-chaining': 'off',
},
overrides: [
Expand Down
1 change: 0 additions & 1 deletion packages/utils/src/buildPolyfills/_asyncNullishCoalesce.ts
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,6 @@ import { _nullishCoalesce } from './_nullishCoalesce';
* @param rhsFn A function returning the value of the expression to the right of the `??`
* @returns The LHS value, unless it's `null` or `undefined`, in which case, the RHS value
*/
// eslint-disable-next-line @sentry-internal/sdk/no-async-await
export async function _asyncNullishCoalesce(lhs: unknown, rhsFn: () => unknown): Promise<unknown> {
return _nullishCoalesce(lhs, rhsFn);
}
Expand Down
1 change: 0 additions & 1 deletion packages/utils/src/buildPolyfills/_asyncOptionalChain.ts
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,6 @@ import type { GenericFunction } from './types';
* @param ops Array result of expression conversion
* @returns The value of the expression
*/
// eslint-disable-next-line @sentry-internal/sdk/no-async-await
export async function _asyncOptionalChain(ops: unknown[]): Promise<unknown> {
let lastAccessLHS: unknown = undefined;
let value = ops[0];
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,6 @@ import { _asyncOptionalChain } from './_asyncOptionalChain';
* property (one which can't be deleted or turned into an accessor, and whose enumerability can't be changed), in which
* case `false`.
*/
// eslint-disable-next-line @sentry-internal/sdk/no-async-await
export async function _asyncOptionalChainDelete(ops: unknown[]): Promise<boolean> {
const result = (await _asyncOptionalChain(ops)) as Promise<boolean | null>;
// If `result` is `null`, it means we didn't get to the end of the chain and so nothing was deleted (in which case,
Expand Down