Skip to content

Commit

Permalink
Update prettier
Browse files Browse the repository at this point in the history
  • Loading branch information
vivi committed Mar 22, 2020
1 parent 8c5a5d6 commit 061868d
Show file tree
Hide file tree
Showing 6 changed files with 12 additions and 15 deletions.
1 change: 1 addition & 0 deletions .prettierrc
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
{
"semi": false,
"trailingComma": "all",
"arrowParens": "avoid",
"quoteProps": "consistent"
}
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -105,7 +105,7 @@
"fake-indexeddb": "^3.0.0",
"html-webpack-plugin": "^3.2.0",
"jest": "^25.1.0",
"prettier": "^1.19.1",
"prettier": "^2.0.1",
"script-ext-html-webpack-plugin": "^2.1.4",
"source-map-loader": "^0.2.4",
"typescript": "^3.8.3",
Expand Down
10 changes: 5 additions & 5 deletions pnpm-lock.yaml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

6 changes: 3 additions & 3 deletions scripts/generateHljsLanguages.js
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ async function getDependencies(language) {
.slice("Requires:".length)
.split(",")
.map(file => file.trim().replace(".js", ""))
.sort((first, second) => ((first > second ? 1 : -1)))
.sort((first, second) => (first > second ? 1 : -1))
}

/** @type {(language: string) => Promise<Language>} */
Expand All @@ -44,7 +44,7 @@ async function getLanguage(language) {
.map(alias => alias.toLowerCase())
.filter(alias => alias !== language)
.filter((alias, index, array) => array.indexOf(alias) === index)
.sort((first, second) => ((first > second ? 1 : -1)))
.sort((first, second) => (first > second ? 1 : -1))

const dependencies = (await getDependencies(language)) || []

Expand All @@ -59,7 +59,7 @@ async function getLanguage(language) {
function* getAllLanguages() {
const languages = hljs
.listLanguages()
.sort((first, second) => ((first > second ? 1 : -1)))
.sort((first, second) => (first > second ? 1 : -1))

for (const language of languages) {
yield getLanguage(language)
Expand Down
4 changes: 1 addition & 3 deletions src/database/stores/DatabaseStore.ts
Original file line number Diff line number Diff line change
Expand Up @@ -29,9 +29,7 @@ export class DatabaseStore extends InitializableStore<Stores> {
async requestPersistence() {
if ("chrome" in window) {
await new Promise((resolve, reject) => {
Notification.requestPermission(resolve)
.then(resolve)
.catch(reject)
Notification.requestPermission(resolve).then(resolve).catch(reject)
})
}

Expand Down
4 changes: 1 addition & 3 deletions src/preview/components/RichEmbed.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -140,9 +140,7 @@ export function RichEmbed(props: RichEmbedProps) {
alt="Image"
hasThumbnail={Boolean(embed.thumbnail)}
/>
) : (
undefined
)}
) : undefined}
{embed.hasFooter && <EmbedFooter embed={embed} />}
{embed.thumbnail && (
<EmbedThumbnail src={embed.thumbnail} alt="Thumbnail" />
Expand Down

0 comments on commit 061868d

Please sign in to comment.