apply eslint and prettier rules

This commit is contained in:
Sebastian Sdorra
2019-10-21 10:57:56 +02:00
parent 85773186db
commit 4bb8e6153b
227 changed files with 1147 additions and 4076 deletions

View File

@@ -16,12 +16,7 @@ describe("DeletePermissionButton", () => {
_links: {}
};
const navLink = shallow(
<DeletePermissionButton
permission={permission}
deletePermission={() => {}}
/>
);
const navLink = shallow(<DeletePermissionButton permission={permission} deletePermission={() => {}} />);
expect(navLink.text()).toBe("");
});
@@ -34,12 +29,7 @@ describe("DeletePermissionButton", () => {
}
};
const deleteIcon = mount(
<DeletePermissionButton
permission={permission}
deletePermission={() => {}}
/>
);
const deleteIcon = mount(<DeletePermissionButton permission={permission} deletePermission={() => {}} />);
expect(deleteIcon.html()).not.toBe("");
});
@@ -52,12 +42,7 @@ describe("DeletePermissionButton", () => {
}
};
const button = mount(
<DeletePermissionButton
permission={permission}
deletePermission={() => {}}
/>
);
const button = mount(<DeletePermissionButton permission={permission} deletePermission={() => {}} />);
button.find(".fa-trash").simulate("click");
expect(confirmAlert.mock.calls.length).toBe(1);
@@ -78,11 +63,7 @@ describe("DeletePermissionButton", () => {
}
const button = mount(
<DeletePermissionButton
permission={permission}
confirmDialog={false}
deletePermission={capture}
/>
<DeletePermissionButton permission={permission} confirmDialog={false} deletePermission={capture} />
);
button.find(".fa-trash").simulate("click");

View File

@@ -9,11 +9,7 @@ type Props = {
repoName: string;
confirmDialog?: boolean;
t: (p: string) => string;
deletePermission: (
permission: Permission,
namespace: string,
repoName: string
) => void;
deletePermission: (permission: Permission, namespace: string, repoName: string) => void;
loading: boolean;
};
@@ -23,11 +19,7 @@ class DeletePermissionButton extends React.Component<Props> {
};
deletePermission = () => {
this.props.deletePermission(
this.props.permission,
this.props.namespace,
this.props.repoName
);
this.props.deletePermission(this.props.permission, this.props.namespace, this.props.repoName);
};
confirmDelete = () => {