Back out "Upgrade Prettier from 1.17 to 2.0.2."
Differential Revision: D20639755 fbshipit-source-id: 5028563f9cf0527a30b4259daac50cdc03934bfd
This commit is contained in:
committed by
Facebook GitHub Bot
parent
5bf93e81ba
commit
0f08aa53da
@@ -32,6 +32,6 @@
|
|||||||
"develop": "gatsby develop"
|
"develop": "gatsby develop"
|
||||||
},
|
},
|
||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
"prettier": "2.0.2"
|
"prettier": "1.17.0"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@@ -27,11 +27,9 @@ export const JSEnumLookup = {
|
|||||||
};
|
};
|
||||||
|
|
||||||
function getEnum(yogaEnum: string, value: string | number): string {
|
function getEnum(yogaEnum: string, value: string | number): string {
|
||||||
return `yoga.${
|
return `yoga.${Object.keys(yoga)
|
||||||
Object.keys(yoga)
|
.filter(key => key.toLowerCase().startsWith(yogaEnum.toLowerCase()))
|
||||||
.filter(key => key.toLowerCase().startsWith(yogaEnum.toLowerCase()))
|
.find(key => yoga[key] === value) || value}`;
|
||||||
.find(key => yoga[key] === value) || value
|
|
||||||
}`;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
function setProperty(
|
function setProperty(
|
||||||
|
@@ -47,8 +47,8 @@ function dipOrPercent(value) {
|
|||||||
return value === 'auto'
|
return value === 'auto'
|
||||||
? 'Auto'
|
? 'Auto'
|
||||||
: typeof value === 'string' && /%$/.test(value)
|
: typeof value === 'string' && /%$/.test(value)
|
||||||
? 'Percent'
|
? 'Percent'
|
||||||
: 'Dip';
|
: 'Dip';
|
||||||
}
|
}
|
||||||
|
|
||||||
function getValue(value) {
|
function getValue(value) {
|
||||||
|
@@ -52,7 +52,9 @@ export default class URLShortener extends Component<{}, State> {
|
|||||||
}
|
}
|
||||||
|
|
||||||
fetch(
|
fetch(
|
||||||
`https://cors-anywhere.herokuapp.com/tinyurl.com/api-create.php?url=${window.location.href}`,
|
`https://cors-anywhere.herokuapp.com/tinyurl.com/api-create.php?url=${
|
||||||
|
window.location.href
|
||||||
|
}`,
|
||||||
)
|
)
|
||||||
.then(res => res.text())
|
.then(res => res.text())
|
||||||
.then(shortURL => this.setState({shortURL, loading: false}))
|
.then(shortURL => this.setState({shortURL, loading: false}))
|
||||||
|
@@ -57,7 +57,10 @@ export default class YogaEnumSelect extends Component<Props> {
|
|||||||
|
|
||||||
getTitle = (property: string, key: string): string => {
|
getTitle = (property: string, key: string): string => {
|
||||||
const replacer = new RegExp(`^${property}_`);
|
const replacer = new RegExp(`^${property}_`);
|
||||||
return key.replace(replacer, '').replace('_', ' ').toLowerCase();
|
return key
|
||||||
|
.replace(replacer, '')
|
||||||
|
.replace('_', ' ')
|
||||||
|
.toLowerCase();
|
||||||
};
|
};
|
||||||
|
|
||||||
render() {
|
render() {
|
||||||
|
@@ -49,16 +49,17 @@ export default ({data}) => (
|
|||||||
({node}) =>
|
({node}) =>
|
||||||
node.fileAbsolutePath.indexOf(`/${category}/`) > -1,
|
node.fileAbsolutePath.indexOf(`/${category}/`) > -1,
|
||||||
)
|
)
|
||||||
.map(({node}) =>
|
.map(
|
||||||
node.frontmatter.redirect ? (
|
({node}) =>
|
||||||
<a key={node.id} href={node.frontmatter.path}>
|
node.frontmatter.redirect ? (
|
||||||
{node.frontmatter.title}
|
<a key={node.id} href={node.frontmatter.path}>
|
||||||
</a>
|
{node.frontmatter.title}
|
||||||
) : (
|
</a>
|
||||||
<Link key={node.id} to={node.frontmatter.path}>
|
) : (
|
||||||
{node.frontmatter.title}
|
<Link key={node.id} to={node.frontmatter.path}>
|
||||||
</Link>
|
{node.frontmatter.title}
|
||||||
),
|
</Link>
|
||||||
|
),
|
||||||
)}
|
)}
|
||||||
</Col>
|
</Col>
|
||||||
),
|
),
|
||||||
|
@@ -6978,10 +6978,10 @@ preserve@^0.2.0:
|
|||||||
version "0.2.0"
|
version "0.2.0"
|
||||||
resolved "https://registry.yarnpkg.com/preserve/-/preserve-0.2.0.tgz#815ed1f6ebc65926f865b310c0713bcb3315ce4b"
|
resolved "https://registry.yarnpkg.com/preserve/-/preserve-0.2.0.tgz#815ed1f6ebc65926f865b310c0713bcb3315ce4b"
|
||||||
|
|
||||||
prettier@2.0.2:
|
prettier@1.17.0:
|
||||||
version "2.0.2"
|
version "1.17.0"
|
||||||
resolved "https://registry.yarnpkg.com/prettier/-/prettier-2.0.2.tgz#1ba8f3eb92231e769b7fcd7cb73ae1b6b74ade08"
|
resolved "https://registry.yarnpkg.com/prettier/-/prettier-1.17.0.tgz#53b303676eed22cc14a9f0cec09b477b3026c008"
|
||||||
integrity sha512-5xJQIPT8BraI7ZnaDwSbu5zLrB6vvi8hVV58yHQ+QK64qrY40dULy0HSRlQ2/2IdzeBpjhDkqdcFBnFeDEMVdg==
|
integrity sha512-sXe5lSt2WQlCbydGETgfm1YBShgOX4HxQkFPvbxkcwgDvGDeqVau8h+12+lmSVlP3rHPz0oavfddSZg/q+Szjw==
|
||||||
|
|
||||||
pretty-bytes@^4.0.2:
|
pretty-bytes@^4.0.2:
|
||||||
version "4.0.2"
|
version "4.0.2"
|
||||||
|
Reference in New Issue
Block a user