Skip to content

Commit def5db7

Browse files
committed
🎨 Running formatter
1 parent 44760e1 commit def5db7

File tree

11 files changed

+31
-31
lines changed

11 files changed

+31
-31
lines changed

theme/plugins/check-links/index.js

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ function getHeadingsMapKey(link, path) {
2727
return {
2828
key,
2929
hasHash,
30-
hashId
30+
hashId,
3131
}
3232
}
3333

@@ -57,7 +57,7 @@ module.exports = async (
5757
if (node.url.startsWith('#') || !/:[0-9]*\/\//.test(node.url)) {
5858
links.push({
5959
...node,
60-
frontmatter: markdownNode.frontmatter
60+
frontmatter: markdownNode.frontmatter,
6161
})
6262
}
6363
}
@@ -70,7 +70,7 @@ module.exports = async (
7070
path: withPathPrefix(slug),
7171
links,
7272
headings,
73-
setAt
73+
setAt,
7474
})
7575

7676
// wait to see if all of the Markdown and MDX has been visited
@@ -114,7 +114,7 @@ module.exports = async (
114114

115115
const linksForPath = linksMap[path]
116116
if (linksForPath.length) {
117-
const brokenLinks = linksForPath.filter(link => {
117+
const brokenLinks = linksForPath.filter((link) => {
118118
// return true for broken links, false = pass
119119
const { key, hasHash, hashId } = getHeadingsMapKey(link.url, path)
120120
if (prefixedExceptions.includes(key)) {
@@ -151,7 +151,7 @@ module.exports = async (
151151

152152
prefix = [
153153
String(line + offset).padStart(3, ' '),
154-
String(column).padEnd(4, ' ')
154+
String(column).padEnd(4, ' '),
155155
].join(':')
156156
}
157157
console.warn(`${prefix} ${link.url}`)

theme/plugins/fix-mermaid-post/index.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
const visit = require('unist-util-visit')
22
module.exports = ({ markdownAST }, pluginOptions) => {
3-
visit(markdownAST, 'html', node => {
3+
visit(markdownAST, 'html', (node) => {
44
let { value, lang } = node
55
if (lang === 'mermaid') {
66
// Remove first style tag - then we can just use a single import

theme/plugins/fix-mermaid-pre/index.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
const visit = require('unist-util-visit')
22
module.exports = ({ markdownAST }, pluginOptions) => {
3-
visit(markdownAST, 'code', node => {
3+
visit(markdownAST, 'code', (node) => {
44
let { value, lang } = node
55
if (lang === 'mermaid') {
66
value = value.replace(/<<(join|fork)>>/g, '[[$1]]', 'g')

theme/src/components/Tree.tsx

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ export const Tree = ({
1818
location,
1919
ignoreIndex = true,
2020
current = '',
21-
data
21+
data,
2222
}: TreeProps) => {
2323
const { navigate, collapsed, setCollapsed } = useContext(DocsContext)
2424
const isActive = (id: string) => current === id
@@ -29,18 +29,18 @@ export const Tree = ({
2929
location.pathname.startsWith(withPrefix(item.slug))) ||
3030
false
3131

32-
const toggle = id => {
32+
const toggle = (id) => {
3333
setCollapsed({
3434
...collapsed,
35-
[id]: !collapsed[id]
35+
[id]: !collapsed[id],
3636
})
3737
}
3838

3939
const navigateItem = (index: number) => {
4040
navigate(firstUrl(data.items[index]))
4141
}
4242

43-
const index = data.items.findIndex(item => isParent(item))
43+
const index = data.items.findIndex((item) => isParent(item))
4444

4545
const navigateDown = useCallback(() => {
4646
if (index === -1) {

theme/src/layout/docs.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ import '../style/mermaid.css'
55

66
export default ({ data }) => {
77
const {
8-
docs: { body, tableOfContents }
8+
docs: { body, tableOfContents },
99
} = data
1010
return <Markdown>{body}</Markdown>
1111
}

theme/src/layout/index.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
import React from 'react'
22
import { Layout } from '../components/Layout'
33

4-
export default props => {
4+
export default (props) => {
55
const { children, pageContext, location } = props
66

77
// Pass through when in print mode

theme/src/print/Classification.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,9 +2,9 @@ import React from 'react'
22
import { styled, Text } from '@committed/components'
33

44
const StyledText = styled(Text)({
5-
textTransform: 'uppercase'
5+
textTransform: 'uppercase',
66
})
77

8-
export const Classification = props => (
8+
export const Classification = (props) => (
99
<>{props.children && <StyledText {...props} />}</>
1010
)

theme/src/print/Footer.tsx

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -9,9 +9,9 @@ export const Footer = () => {
99
const {
1010
site: {
1111
siteMetadata: {
12-
print: { classification, reference }
13-
}
14-
}
12+
print: { classification, reference },
13+
},
14+
},
1515
} = useStaticQuery(
1616
graphql`
1717
query printFooterQuery {

theme/src/print/Header.tsx

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -7,9 +7,9 @@ export const Header = () => {
77
const {
88
site: {
99
siteMetadata: {
10-
print: { classification }
11-
}
12-
}
10+
print: { classification },
11+
},
12+
},
1313
} = useStaticQuery(
1414
graphql`
1515
query printHeaderQuery {

theme/src/print/Reference.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,6 @@ import { styled, Text } from '@committed/components'
33

44
const StyledText = styled(Text)({})
55

6-
export const Reference = props => (
6+
export const Reference = (props) => (
77
<>{props.children && <StyledText {...props} />}</>
88
)

0 commit comments

Comments
 (0)