-
Couldn't load subscription status.
- Fork 5.5k
Require project environment in SDK #14679
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
Changes from 2 commits
186822e
d34e259
647e18c
d91741b
c1781ed
40bab31
7753a5b
a904e53
5efcc32
45b4875
7abedce
8de3f44
16704ee
9d5e709
d0362d0
2070190
87fb597
5b86f27
041a594
a171866
96fc56b
044daed
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change | ||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
|
|
@@ -353,7 +353,10 @@ | |||||||||||||||||
| * @param opts - The options for configuring the server client. | ||||||||||||||||||
| */ | ||||||||||||||||||
| constructor(opts: BackendClientOpts) { | ||||||||||||||||||
| this.environment = opts.environment ?? "production"; | ||||||||||||||||||
| if (!opts.environment || !["development", "production"].includes(opts.environment)) { | ||||||||||||||||||
|
Check failure on line 356 in packages/sdk/src/server/index.ts
|
||||||||||||||||||
|
||||||||||||||||||
| if (!opts.environment || !["development", "production"].includes(opts.environment)) { | |
| if ( | |
| !opts.environment || | |
| ![ | |
| "development", | |
| "production", | |
| ].includes(opts.environment) | |
| ) { |
🧰 Tools
🪛 eslint
[error] 356-356: A linebreak is required after '['.
(array-bracket-newline)
[error] 356-356: There should be a linebreak after this element.
(array-element-newline)
[error] 356-356: A linebreak is required before ']'.
(array-bracket-newline)
🪛 GitHub Check: Lint Code Base
[failure] 356-356:
A linebreak is required after '['
[failure] 356-356:
There should be a linebreak after this element
[failure] 356-356:
A linebreak is required before ']'
Outdated
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Add missing semicolon after assignment
The statement this.environment = opts.environment at line 359 is missing a semicolon. Depending on the project's linting rules, omitting semicolons may cause issues.
Apply this diff to fix the issue:
- this.environment = opts.environment
+ this.environment = opts.environment;📝 Committable suggestion
‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.
| this.environment = opts.environment | |
| this.environment = opts.environment; |
🧰 Tools
🪛 eslint
[error] 359-360: Missing semicolon.
(@typescript-eslint/semi)
🪛 GitHub Check: Lint Code Base
[failure] 359-359:
Missing semicolon
Uh oh!
There was an error while loading. Please reload this page.