Skip to content
Closed
Show file tree
Hide file tree
Changes from 2 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
2 changes: 1 addition & 1 deletion packages/connect-react/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@pipedream/connect-react",
"version": "1.0.0-preview.15",
"version": "1.0.0-preview.16",
"description": "Pipedream Connect library for React",
"files": [
"dist"
Expand Down
3 changes: 2 additions & 1 deletion packages/connect-react/src/hooks/form-context.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -129,12 +129,13 @@
configuredProps,
dynamicPropsId: dynamicProps?.id,
};
const queryKey = reloadPropIdx ? `dynamicProps:${reloadPropIdx}` : "dynamicProps"

Check failure on line 132 in packages/connect-react/src/hooks/form-context.tsx

View workflow job for this annotation

GitHub Actions / Lint Code Base

Expected newline between test and consequent of ternary expression

Check failure on line 132 in packages/connect-react/src/hooks/form-context.tsx

View workflow job for this annotation

GitHub Actions / Lint Code Base

Expected newline between consequent and alternate of ternary expression
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🛠️ Refactor suggestion

Refactor the ternary expression to satisfy lint requirements

Currently, the linter complains about the multiline ternary usage on this line. Splitting the condition, the true branch, and false branch across separate lines will fix the issue:

-const queryKey = reloadPropIdx ? `dynamicProps:${reloadPropIdx}` : "dynamicProps"
+const queryKey = reloadPropIdx
+  ? `dynamicProps:${reloadPropIdx}`
+  : "dynamicProps";
📝 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.

Suggested change
const queryKey = reloadPropIdx ? `dynamicProps:${reloadPropIdx}` : "dynamicProps"
const queryKey = reloadPropIdx
? `dynamicProps:${reloadPropIdx}`
: "dynamicProps";
🧰 Tools
🪛 eslint

[error] 132-132132: Expected newline between test and consequent of ternary expression.

(multiline-ternary)


[error] 132-132132: Expected newline between consequent and alternate of ternary expression.

(multiline-ternary)

🪛 GitHub Check: Lint Code Base

[failure] 132-132132:
Expected newline between test and consequent of ternary expression


[failure] 132-132132:
Expected newline between consequent and alternate of ternary expression

🪛 GitHub Actions: Pull Request Checks

[error] 132-132132: Expected newline between test and consequent of ternary expression (multiline-ternary)

const {
isFetching: dynamicPropsQueryIsFetching,
// TODO error
} = useQuery({
queryKey: [
"dynamicProps",
queryKey

Check failure on line 138 in packages/connect-react/src/hooks/form-context.tsx

View workflow job for this annotation

GitHub Actions / Lint Code Base

Missing trailing comma
],
queryFn: async () => {
const { dynamicProps } = await client.componentReloadProps(componentReloadPropsInput);
Expand Down
Loading