Skip to content

Commit 80682db

Browse files
authored
Added dot-notation eslint rule (#16989)
* Added dot-notation eslint rule and ran --fix * Alpha
1 parent dbfb58c commit 80682db

File tree

6 files changed

+7
-6
lines changed

6 files changed

+7
-6
lines changed

airbyte-webapp/.eslintrc

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,7 @@
2222
"css-modules/no-undef-class": ["error", { "camelCase": true }],
2323
"css-modules/no-unused-class": ["error", { "camelCase": true }],
2424
"dot-location": "warn",
25+
"dot-notation": "warn",
2526
"eqeqeq": "error",
2627
"prettier/prettier": "warn",
2728
"unused-imports/no-unused-imports": "warn",

airbyte-webapp/src/components/TextWithHTML/TextWithHTML.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ interface IProps {
77

88
const allowedAttributes = {
99
...sanitizeHtml.defaults.allowedAttributes,
10-
a: [...sanitizeHtml.defaults.allowedAttributes["a"], "rel"],
10+
a: [...sanitizeHtml.defaults.allowedAttributes.a, "rel"],
1111
};
1212

1313
const TextWithHTML: React.FC<IProps> = ({ text }) => {

airbyte-webapp/src/components/base/DropDown/SelectContainer.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ export const SelectContainer: React.FC<
1313
> = (props) => {
1414
const wrapperProps = {
1515
"data-testid": props.selectProps["data-testid"],
16-
role: props.selectProps["role"] || "combobox",
16+
role: props.selectProps.role || "combobox",
1717
};
1818
return <components.SelectContainer {...props} innerProps={{ ...props.innerProps, ...wrapperProps }} />;
1919
};

airbyte-webapp/src/core/jsonSchema/utils.test.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -185,7 +185,7 @@ it("apply func at", () => {
185185

186186
sch.properties = sch.properties ?? {};
187187

188-
sch.properties["marked"] = {
188+
sch.properties.marked = {
189189
type: "string",
190190
};
191191

airbyte-webapp/src/hooks/services/Connection/ConnectionFormService.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,7 @@ const useConnectionForm = ({
5454
const onFormSubmit = useCallback(
5555
async (values: FormikConnectionFormValues, formikHelpers: FormikHelpers<FormikConnectionFormValues>) => {
5656
// Set the scheduleType based on the schedule value
57-
values["scheduleType"] = values.scheduleData?.basicSchedule
57+
values.scheduleType = values.scheduleData?.basicSchedule
5858
? ConnectionScheduleType.basic
5959
: ConnectionScheduleType.manual;
6060

airbyte-webapp/src/views/Connection/ConnectionForm/formConfig.test.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ describe("#useFrequencyDropdownData", () => {
2424
const additionalFrequency = {
2525
basicSchedule: {
2626
units: 1,
27-
timeUnit: ConnectionScheduleTimeUnit["hours"],
27+
timeUnit: ConnectionScheduleTimeUnit.hours,
2828
},
2929
};
3030
const { result } = renderHook(() => useFrequencyDropdownData(additionalFrequency), { wrapper });
@@ -35,7 +35,7 @@ describe("#useFrequencyDropdownData", () => {
3535
const additionalFrequency = {
3636
basicSchedule: {
3737
units: 7,
38-
timeUnit: ConnectionScheduleTimeUnit["minutes"],
38+
timeUnit: ConnectionScheduleTimeUnit.minutes,
3939
},
4040
};
4141
const { result } = renderHook(() => useFrequencyDropdownData(additionalFrequency), { wrapper });

0 commit comments

Comments
 (0)