Skip to content

Commit ab16f91

Browse files
committed
Fix linting
Signed-off-by: Luciano Resende <[email protected]>
1 parent 3339e62 commit ab16f91

File tree

35 files changed

+203
-217
lines changed

35 files changed

+203
-217
lines changed

examples/create-react-app/src/index.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,5 +24,5 @@ ReactDOM.render(
2424
<StrictMode>
2525
<App />
2626
</StrictMode>,
27-
rootElement
27+
rootElement,
2828
);

jest.config.base.js

Lines changed: 6 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -23,13 +23,11 @@ module.exports = {
2323
// Ignore snapshot tests.
2424
"!**/*.snap.test.{ts,tsx}",
2525
],
26-
transformIgnorePatterns: [
27-
"node_modules/(?!(uuid|@elyra/canvas)/)"
28-
],
29-
extensionsToTreatAsEsm: ['.ts', '.tsx'],
26+
transformIgnorePatterns: ["node_modules/(?!(uuid|@elyra/canvas)/)"],
27+
extensionsToTreatAsEsm: [".ts", ".tsx"],
3028
globals: {
31-
'ts-jest': {
32-
useESM: true
33-
}
34-
}
29+
"ts-jest": {
30+
useESM: true,
31+
},
32+
},
3533
};

packages/pipeline-editor/src/CustomFormControls/CustomArray.tsx

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ import { ArrayFieldTemplateProps } from "@rjsf/core";
2020

2121
const renderDefaults = (
2222
items: any[],
23-
props: any
23+
props: any,
2424
): React.ReactElement | undefined => {
2525
const allRendered = [];
2626
if (items.length === 0) {
@@ -39,14 +39,14 @@ const renderDefaults = (
3939
{props.schema.items.properties[key].title}
4040
</span>
4141
</label>
42-
</div>
42+
</div>,
4343
);
4444
} else {
4545
itemRendered.push(
4646
<div key={`${key}-defaultValue`} style={{ margin: "5px" }}>
4747
<label className="control-label">{`${props.schema.items.properties[key].title}: `}</label>
4848
<input readOnly value={item[key]} className="form-control" />
49-
</div>
49+
</div>,
5050
);
5151
}
5252
}
@@ -59,7 +59,7 @@ const renderDefaults = (
5959
(pipeline default)
6060
</label>
6161
{itemRendered}
62-
</div>
62+
</div>,
6363
);
6464
}
6565
} else {
@@ -86,7 +86,7 @@ const renderDefaults = (
8686
export const ArrayTemplate: React.FC<ArrayFieldTemplateProps> = (props) => {
8787
const renderedDefaults = renderDefaults(
8888
props.uiSchema.pipeline_defaults ?? [],
89-
props
89+
props,
9090
);
9191
const handleChooseFile = useCallback(async () => {
9292
props.formContext.onFileRequested({
@@ -126,7 +126,7 @@ export const ArrayTemplate: React.FC<ArrayFieldTemplateProps> = (props) => {
126126
style={{ marginLeft: "5px" }}
127127
onClick={() =>
128128
props.formContext?.onPropertiesUpdateRequested(
129-
props.formContext.formData
129+
props.formContext.formData,
130130
)
131131
}
132132
>

packages/pipeline-editor/src/CustomFormControls/CustomOneOf.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -63,7 +63,7 @@ export const CustomOneOf: Field = (props) => {
6363
defaults = utils.getDefaultFormState(
6464
options[selectedOption],
6565
undefined,
66-
rootSchema
66+
rootSchema,
6767
);
6868
} catch {}
6969
props.onChange(defaults);
@@ -75,7 +75,7 @@ export const CustomOneOf: Field = (props) => {
7575
const Widget = utils.getWidget(
7676
{ type: "number" },
7777
"select",
78-
widgets
78+
widgets,
7979
) as React.FC<WidgetProps>;
8080

8181
const option = options[findOption()] || null;

packages/pipeline-editor/src/NodeTooltip/index.test.tsx

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ it("renders one item", () => {
2222
<NodeTooltip
2323
properties={[{ label: "Label", value: "some value" }]}
2424
nodeLabel="Component Type"
25-
/>
25+
/>,
2626
);
2727
expect(container.firstChild).toHaveTextContent(/label/i);
2828
expect(container.firstChild).toHaveTextContent(/some value/i);
@@ -37,7 +37,7 @@ it("renders multiple items", () => {
3737
{ label: "Array", value: ["one", "two"] },
3838
]}
3939
nodeLabel="Component Type"
40-
/>
40+
/>,
4141
);
4242

4343
expect(container.firstChild).toHaveTextContent(/label/i);
@@ -55,7 +55,7 @@ it("renders with errors", () => {
5555
error="this is an error"
5656
properties={[]}
5757
nodeLabel="Component type"
58-
/>
58+
/>,
5959
);
6060

6161
expect(container.firstChild).toHaveTextContent(/error/i);
@@ -68,7 +68,7 @@ it("renders with errors and properties", () => {
6868
<NodeTooltip
6969
error="this is an error"
7070
properties={[{ label: "Label", value: "some value" }]}
71-
/>
71+
/>,
7272
);
7373

7474
expect(container.firstChild).toHaveTextContent(/error/i);

packages/pipeline-editor/src/PalettePanel/index.test.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ it("can drag node", () => {
3838
},
3939
},
4040
]}
41-
/>
41+
/>,
4242
);
4343

4444
const setDragImage = jest.fn();

packages/pipeline-editor/src/PipelineController/index.test.ts

Lines changed: 17 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -146,7 +146,7 @@ describe("open", () => {
146146
expect(open).not.toThrow();
147147
expect(controller.getPipelineFlow().pipelines).toHaveLength(1);
148148
expect(controller.getPipelineFlow().pipelines[0].app_data?.version).toBe(
149-
PIPELINE_CURRENT_VERSION
149+
PIPELINE_CURRENT_VERSION,
150150
);
151151
});
152152

@@ -159,7 +159,7 @@ describe("open", () => {
159159
expect(open).not.toThrow();
160160
expect(controller.getPipelineFlow().pipelines).toHaveLength(1);
161161
expect(controller.getPipelineFlow().pipelines[0].app_data?.version).toBe(
162-
PIPELINE_CURRENT_VERSION
162+
PIPELINE_CURRENT_VERSION,
163163
);
164164
});
165165

@@ -172,7 +172,7 @@ describe("open", () => {
172172
expect(open).not.toThrow();
173173
expect(controller.getPipelineFlow().pipelines).toHaveLength(1);
174174
expect(controller.getPipelineFlow().pipelines[0].app_data?.version).toBe(
175-
PIPELINE_CURRENT_VERSION
175+
PIPELINE_CURRENT_VERSION,
176176
);
177177
});
178178

@@ -214,7 +214,7 @@ describe("addNode", () => {
214214
label: "example-label",
215215
description: "example-description",
216216
},
217-
])
217+
]),
218218
);
219219

220220
const editActionHandler = jest.fn();
@@ -241,7 +241,7 @@ describe("addNode", () => {
241241
label: "example-label",
242242
description: "example-description",
243243
},
244-
])
244+
]),
245245
);
246246

247247
const editActionHandler = jest.fn();
@@ -360,7 +360,7 @@ describe("setNodeErrors", () => {
360360
pipeline2: ["node2", "node3"],
361361
},
362362
expect.anything(),
363-
true
363+
true,
364364
);
365365

366366
expect(setNodeDecorations).toHaveBeenCalledTimes(3);
@@ -404,7 +404,7 @@ describe("setLinkErrors", () => {
404404
pipeline2: ["link2", "link3"],
405405
},
406406
expect.anything(),
407-
true
407+
true,
408408
);
409409
});
410410
});
@@ -1071,7 +1071,7 @@ describe("resetStyles", () => {
10711071

10721072
const flow = controller.getPipelineFlow();
10731073
expect(flow.pipelines[0].nodes[0].app_data?.ui_data?.label).toBe(
1074-
"Notebook Label"
1074+
"Notebook Label",
10751075
);
10761076
});
10771077

@@ -1110,7 +1110,7 @@ describe("resetStyles", () => {
11101110

11111111
const flow = controller.getPipelineFlow();
11121112
expect(flow.pipelines[0].nodes[0].app_data?.ui_data?.label).toBe(
1113-
"example.py"
1113+
"example.py",
11141114
);
11151115
});
11161116

@@ -1148,7 +1148,7 @@ describe("resetStyles", () => {
11481148

11491149
const flow = controller.getPipelineFlow();
11501150
expect(flow.pipelines[0].nodes[0].app_data?.ui_data?.label).toBe(
1151-
"user label"
1151+
"user label",
11521152
);
11531153
});
11541154

@@ -1223,7 +1223,7 @@ describe("resetStyles", () => {
12231223
const flow = controller.getPipelineFlow();
12241224
expect(flow.pipelines[0].nodes[0].app_data?.filename).toBe("example.py");
12251225
expect(
1226-
flow.pipelines[0].nodes[0].app_data?.invalidNodeError
1226+
flow.pipelines[0].nodes[0].app_data?.invalidNodeError,
12271227
).toBeUndefined();
12281228
});
12291229
});
@@ -1287,13 +1287,13 @@ describe("validate", () => {
12871287

12881288
const flow = controller.getPipelineFlow();
12891289
expect(
1290-
flow.pipelines[0].nodes[0].app_data?.invalidNodeError
1290+
flow.pipelines[0].nodes[0].app_data?.invalidNodeError,
12911291
).toBeUndefined();
12921292
expect(
1293-
flow.pipelines[0].nodes[1].app_data?.invalidNodeError
1293+
flow.pipelines[0].nodes[1].app_data?.invalidNodeError,
12941294
).toBeUndefined();
12951295
expect(
1296-
flow.pipelines[0].nodes[2].app_data?.invalidNodeError
1296+
flow.pipelines[0].nodes[2].app_data?.invalidNodeError,
12971297
).toBeUndefined();
12981298
});
12991299

@@ -1324,14 +1324,14 @@ describe("validate", () => {
13241324
description: "",
13251325
label: "",
13261326
},
1327-
])
1327+
]),
13281328
);
13291329

13301330
controller.validate();
13311331

13321332
const flow = controller.getPipelineFlow();
13331333
expect(
1334-
flow.pipelines[0].nodes[0].app_data?.invalidNodeError
1334+
flow.pipelines[0].nodes[0].app_data?.invalidNodeError,
13351335
).toBeUndefined();
13361336
});
13371337
});
@@ -1389,7 +1389,7 @@ describe("updateProperties", () => {
13891389

13901390
expect(
13911391
controller.getPipelineFlow().pipelines[0].nodes[0].app_data
1392-
?.component_parameters
1392+
?.component_parameters,
13931393
).toStrictEqual({});
13941394
});
13951395
});

0 commit comments

Comments
 (0)