chore: Upgrade Prettier 1.8 -> 2.0 (#1436)

This commit is contained in:
Tom Moor
2020-08-08 18:53:11 -07:00
committed by GitHub
parent 68dcb4de5f
commit e312b264a6
218 changed files with 1156 additions and 1169 deletions

View File

@@ -19,7 +19,7 @@ type Props = {
class CollectionFilter extends React.Component<Props> {
render() {
const { onSelect, collectionId, collections } = this.props;
const collectionOptions = collections.orderedData.map(user => ({
const collectionOptions = collections.orderedData.map((user) => ({
key: user.id,
label: user.name,
}));

View File

@@ -31,7 +31,7 @@ const FilterOption = ({ label, note, onSelect, active }: Props) => {
const Checkmark = styled(CheckmarkIcon)`
flex-shrink: 0;
padding-left: 4px;
fill: ${props => props.theme.text};
fill: ${(props) => props.theme.text};
`;
const Anchor = styled("a")`
@@ -39,7 +39,7 @@ const Anchor = styled("a")`
flex-direction: column;
font-size: 15px;
padding: 4px 8px;
color: ${props => props.theme.text};
color: ${(props) => props.theme.text};
min-height: 32px;
${HelpText} {
@@ -48,13 +48,13 @@ const Anchor = styled("a")`
}
&:hover {
background: ${props => props.theme.listItemHoverBackground};
background: ${(props) => props.theme.listItemHoverBackground};
}
`;
const ListItem = styled("li")`
list-style: none;
font-weight: ${props => (props.active ? "600" : "normal")};
font-weight: ${(props) => (props.active ? "600" : "normal")};
`;
export default FilterOption;

View File

@@ -32,7 +32,7 @@ const FilterOptions = ({
<DropdownButton label={activeKey ? selectedLabel : defaultLabel}>
{({ closeMenu }) => (
<List>
{options.map(option => (
{options.map((option) => (
<FilterOption
key={option.key}
onSelect={() => {
@@ -73,7 +73,7 @@ const StyledButton = styled(Button)`
}
`;
const SearchFilter = props => {
const SearchFilter = (props) => {
return (
<DropdownMenu
className={props.className}

View File

@@ -5,7 +5,7 @@ import { SearchIcon } from "outline-icons";
import Flex from "components/Flex";
type Props = {
onChange: string => void,
onChange: (string) => void,
defaultValue?: string,
theme: Object,
};
@@ -40,7 +40,7 @@ class SearchField extends React.Component<Props> {
/>
<StyledInput
{...this.props}
ref={ref => (this.input = ref)}
ref={(ref) => (this.input = ref)}
onChange={this.handleChange}
spellCheck="false"
placeholder="Search…"
@@ -64,26 +64,26 @@ const StyledInput = styled.input`
font-weight: 400;
outline: none;
border: 0;
background: ${props => props.theme.sidebarBackground};
transition: ${props => props.theme.backgroundTransition};
background: ${(props) => props.theme.sidebarBackground};
transition: ${(props) => props.theme.backgroundTransition};
border-radius: 4px;
color: ${props => props.theme.text};
color: ${(props) => props.theme.text};
::-webkit-search-cancel-button {
-webkit-appearance: none;
}
::-webkit-input-placeholder {
color: ${props => props.theme.placeholder};
color: ${(props) => props.theme.placeholder};
}
:-moz-placeholder {
color: ${props => props.theme.placeholder};
color: ${(props) => props.theme.placeholder};
}
::-moz-placeholder {
color: ${props => props.theme.placeholder};
color: ${(props) => props.theme.placeholder};
}
:-ms-input-placeholder {
color: ${props => props.theme.placeholder};
color: ${(props) => props.theme.placeholder};
}
`;

View File

@@ -23,7 +23,7 @@ class UserFilter extends React.Component<Props> {
render() {
const { onSelect, userId, users } = this.props;
const userOptions = users.all.map(user => ({
const userOptions = users.all.map((user) => ({
key: user.id,
label: user.name,
}));