Skip to content

Commit 20aa305

Browse files
author
Kent C. Dodds
committed
run prettier
1 parent eda7158 commit 20aa305

File tree

8 files changed

+210
-198
lines changed

8 files changed

+210
-198
lines changed

website/README.md

Lines changed: 24 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -72,11 +72,13 @@ title: This Doc Needs To Be Edited
7272
Edit me...
7373
```
7474

75-
For more information about docs, click [here](https://docusaurus.io/docs/en/navigation)
75+
For more information about docs, click
76+
[here](https://docusaurus.io/docs/en/navigation)
7677

7778
## Editing an existing blog post
7879

79-
Edit blog posts by navigating to `website/blog` and editing the corresponding post:
80+
Edit blog posts by navigating to `website/blog` and editing the corresponding
81+
post:
8082

8183
`website/blog/post-to-be-edited.md`
8284

@@ -89,13 +91,15 @@ title: This Blog Post Needs To Be Edited
8991
Edit me...
9092
```
9193

92-
For more information about blog posts, click [here](https://docusaurus.io/docs/en/adding-blog)
94+
For more information about blog posts, click
95+
[here](https://docusaurus.io/docs/en/adding-blog)
9396

9497
# Adding Content
9598

9699
## Adding a new docs page to an existing sidebar
97100

98-
1. Create the doc as a new markdown file in `/docs`, example `docs/newly-created-doc.md`:
101+
1. Create the doc as a new markdown file in `/docs`, example
102+
`docs/newly-created-doc.md`:
99103

100104
```md
101105
---
@@ -122,7 +126,8 @@ My new content here..
122126
}
123127
```
124128

125-
For more information about adding new docs, click [here](https://docusaurus.io/docs/en/navigation)
129+
For more information about adding new docs, click
130+
[here](https://docusaurus.io/docs/en/navigation)
126131

127132
## Adding a new blog post
128133

@@ -138,7 +143,8 @@ headerLinks: [
138143
]
139144
```
140145

141-
2. Create the blog post with the format `YYYY-MM-DD-My-Blog-Post-Title.md` in `website/blog`:
146+
2. Create the blog post with the format `YYYY-MM-DD-My-Blog-Post-Title.md` in
147+
`website/blog`:
142148

143149
`website/blog/2018-05-21-New-Blog-Post.md`
144150

@@ -153,11 +159,13 @@ title: New Blog Post
153159
Lorem Ipsum...
154160
```
155161

156-
For more information about blog posts, click [here](https://docusaurus.io/docs/en/adding-blog)
162+
For more information about blog posts, click
163+
[here](https://docusaurus.io/docs/en/adding-blog)
157164

158165
## Adding items to your site's top navigation bar
159166

160-
1. Add links to docs, custom pages or external links by editing the headerLinks field of `website/siteConfig.js`:
167+
1. Add links to docs, custom pages or external links by editing the headerLinks
168+
field of `website/siteConfig.js`:
161169

162170
`website/siteConfig.js`
163171

@@ -177,12 +185,15 @@ For more information about blog posts, click [here](https://docusaurus.io/docs/e
177185
}
178186
```
179187

180-
For more information about the navigation bar, click [here](https://docusaurus.io/docs/en/navigation)
188+
For more information about the navigation bar, click
189+
[here](https://docusaurus.io/docs/en/navigation)
181190

182191
## Adding custom pages
183192

184-
1. Docusaurus uses React components to build pages. The components are saved as .js files in `website/pages/en`:
185-
1. If you want your page to show up in your navigation header, you will need to update `website/siteConfig.js` to add to the `headerLinks` element:
193+
1. Docusaurus uses React components to build pages. The components are saved as
194+
.js files in `website/pages/en`:
195+
1. If you want your page to show up in your navigation header, you will need to
196+
update `website/siteConfig.js` to add to the `headerLinks` element:
186197

187198
`website/siteConfig.js`
188199

@@ -197,7 +208,8 @@ For more information about the navigation bar, click [here](https://docusaurus.i
197208
}
198209
```
199210

200-
For more information about custom pages, click [here](https://docusaurus.io/docs/en/custom-pages).
211+
For more information about custom pages, click
212+
[here](https://docusaurus.io/docs/en/custom-pages).
201213

202214
# Full Documentation
203215

website/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@
2121
"lint-staged": {
2222
"linters": {
2323
"*.js": ["prettier --write", "git add"],
24-
"../docs/*.md": ["prettier --write --parser=markdown", "git add"],
24+
"../docs/**/*.md": ["prettier --write --parser=markdown", "git add"],
2525
"*.md": ["prettier --write --parser=markdown", "git add"],
2626
"*.json": ["prettier --write --parser=json", "git add"]
2727
}

website/pages/en/cypress.js

Lines changed: 45 additions & 45 deletions
Original file line numberDiff line numberDiff line change
@@ -5,29 +5,29 @@
55
* LICENSE file in the root directory of this source tree.
66
*/
77

8-
const React = require("react");
8+
const React = require('react')
99

10-
const CompLibrary = require("../../core/CompLibrary.js");
10+
const CompLibrary = require('../../core/CompLibrary.js')
1111

12-
const MarkdownBlock = CompLibrary.MarkdownBlock; /* Used to read markdown */
13-
const Container = CompLibrary.Container;
14-
const GridBlock = CompLibrary.GridBlock;
12+
const MarkdownBlock = CompLibrary.MarkdownBlock /* Used to read markdown */
13+
const Container = CompLibrary.Container
14+
const GridBlock = CompLibrary.GridBlock
1515

1616
class HomeSplash extends React.Component {
1717
render() {
18-
const { siteConfig, language = "" } = this.props;
19-
const { baseUrl, docsUrl } = siteConfig;
20-
const docsPart = `${docsUrl ? `${docsUrl}/` : ""}`;
21-
const langPart = `${language ? `${language}/` : ""}`;
22-
const docUrl = doc => `${baseUrl}${docsPart}${langPart}${doc}`;
18+
const { siteConfig, language = '' } = this.props
19+
const { baseUrl, docsUrl } = siteConfig
20+
const docsPart = `${docsUrl ? `${docsUrl}/` : ''}`
21+
const langPart = `${language ? `${language}/` : ''}`
22+
const docUrl = doc => `${baseUrl}${docsPart}${langPart}${doc}`
2323

2424
const SplashContainer = props => (
2525
<div className="homeContainer">
2626
<div className="homeSplashFade">
2727
<div className="wrapper homeWrapper">{props.children}</div>
2828
</div>
2929
</div>
30-
);
30+
)
3131

3232
const Logo = props => (
3333
<div className="projectLogo">
@@ -37,77 +37,77 @@ class HomeSplash extends React.Component {
3737
height={props.height || 128}
3838
/>
3939
</div>
40-
);
40+
)
4141

4242
const ProjectTitle = () => (
4343
<div>
4444
<h2 className="projectTitle">Cypress Testing Library</h2>
4545
<div className="projectTaglineWrapper">
4646
<p className="projectTagline">
47-
dom-testing-library queries for end-to-end testing with{" "}
47+
dom-testing-library queries for end-to-end testing with{' '}
4848
<a href="https://cypress.io">
49-
<img src={`${baseUrl}img/cypress-403x135.png`} height={"32px"} />
49+
<img src={`${baseUrl}img/cypress-403x135.png`} height={'32px'} />
5050
</a>
5151
</p>
5252
</div>
5353
</div>
54-
);
54+
)
5555

5656
const PromoSection = props => (
5757
<div className="section promoSection">
5858
<div className="promoRow">
5959
<div className="pluginRowBlock">{props.children}</div>
6060
</div>
6161
</div>
62-
);
62+
)
6363

6464
const Button = props => (
6565
<div className="pluginWrapper buttonWrapper">
6666
<a className="button" href={props.href} target={props.target}>
6767
{props.children}
6868
</a>
6969
</div>
70-
);
70+
)
7171

7272
return (
7373
<SplashContainer>
7474
<Logo img_src={`${baseUrl}img/evergreen-128x128.png`} height={128} />
7575
<div className="inner">
7676
<ProjectTitle siteConfig={siteConfig} />
7777
<PromoSection>
78-
<Button href={docUrl("cypress-testing-library/intro")}>
78+
<Button href={docUrl('cypress-testing-library/intro')}>
7979
Read the Docs
8080
</Button>
8181
</PromoSection>
8282
</div>
8383
</SplashContainer>
84-
);
84+
)
8585
}
8686
}
8787

8888
class Index extends React.Component {
8989
render() {
90-
const { config: siteConfig, language = "" } = this.props;
91-
const { baseUrl } = siteConfig;
90+
const { config: siteConfig, language = '' } = this.props
91+
const { baseUrl } = siteConfig
9292

9393
const Block = props => (
9494
<Container
95-
padding={["bottom", "top"]}
95+
padding={['bottom', 'top']}
9696
id={props.id}
9797
background={props.background}
9898
>
9999
<GridBlock
100-
align={props.align || "center"}
101-
imageAlign={props.imageAlign || "center"}
100+
align={props.align || 'center'}
101+
imageAlign={props.imageAlign || 'center'}
102102
contents={props.children}
103103
layout={props.layout}
104104
/>
105105
</Container>
106-
);
106+
)
107107

108108
const FeatureCallout = () => (
109-
<Container className="" background={"light"} padding={["top", "bottom"]}>
110-
<div style={{ textAlign: "center" }}>
109+
<Container className="" background={'light'} padding={['top', 'bottom']}>
110+
<div style={{ textAlign: 'center' }}>
111111
<p>
112112
<i>
113113
The more your tests resemble the way your software is used, <br />
@@ -119,49 +119,49 @@ class Index extends React.Component {
119119
</MarkdownBlock>
120120
</div>
121121
</Container>
122-
);
122+
)
123123

124124
const TryOut = () => (
125125
<Block id="try">
126126
{[
127127
{
128128
content: exampleCode,
129129
image: `${baseUrl}img/hammer-wrench-128x128.png`,
130-
imageAlign: "left",
131-
title: "Try it Out"
132-
}
130+
imageAlign: 'left',
131+
title: 'Try it Out',
132+
},
133133
]}
134134
</Block>
135-
);
135+
)
136136

137137
const Features = () => (
138138
<React.Fragment>
139139
<Block layout="twoColumn">
140140
{[
141141
{
142142
content:
143-
"Tests only break when your app breaks, not implementation details",
143+
'Tests only break when your app breaks, not implementation details',
144144
image: `${baseUrl}img/wrench-128x128.png`,
145-
imageAlign: "top",
146-
title: "Write Maintainable Tests"
145+
imageAlign: 'top',
146+
title: 'Write Maintainable Tests',
147147
},
148148
{
149-
content: "Interact with your app the same way as your users",
149+
content: 'Interact with your app the same way as your users',
150150
image: `${baseUrl}img/check-128x128.png`,
151-
imageAlign: "top",
152-
title: "Develop with Confidence"
151+
imageAlign: 'top',
152+
title: 'Develop with Confidence',
153153
},
154154
{
155155
content:
156-
"Built-in selectors use semantic HTML and ARIA roles to help you write inclusive code",
156+
'Built-in selectors use semantic HTML and ARIA roles to help you write inclusive code',
157157
image: `${baseUrl}img/tada-128x128.png`,
158-
imageAlign: "top",
159-
title: "Accessible by Default"
160-
}
158+
imageAlign: 'top',
159+
title: 'Accessible by Default',
160+
},
161161
]}
162162
</Block>
163163
</React.Fragment>
164-
);
164+
)
165165

166166
return (
167167
<div>
@@ -171,8 +171,8 @@ class Index extends React.Component {
171171
<Features />
172172
</div>
173173
</div>
174-
);
174+
)
175175
}
176176
}
177177

178-
module.exports = Index;
178+
module.exports = Index

website/pages/en/help.js

Lines changed: 20 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -5,46 +5,46 @@
55
* LICENSE file in the root directory of this source tree.
66
*/
77

8-
const React = require("react");
8+
const React = require('react')
99

10-
const CompLibrary = require("../../core/CompLibrary.js");
10+
const CompLibrary = require('../../core/CompLibrary.js')
1111

12-
const Container = CompLibrary.Container;
13-
const GridBlock = CompLibrary.GridBlock;
12+
const Container = CompLibrary.Container
13+
const GridBlock = CompLibrary.GridBlock
1414

1515
const ExternalLink = props => (
1616
<a target="_blank" rel="noreferrer noopener" {...props} />
17-
);
18-
const Link = props => <a {...props} />;
17+
)
18+
const Link = props => <a {...props} />
1919

2020
function Help(props) {
21-
const { config: siteConfig, language = "" } = props;
22-
const { baseUrl, docsUrl } = siteConfig;
23-
const docsPart = `${docsUrl ? `${docsUrl}/` : ""}`;
24-
const langPart = `${language ? `${language}/` : ""}`;
25-
const docUrl = doc => `${baseUrl}${docsPart}${langPart}${doc}`;
21+
const { config: siteConfig, language = '' } = props
22+
const { baseUrl, docsUrl } = siteConfig
23+
const docsPart = `${docsUrl ? `${docsUrl}/` : ''}`
24+
const langPart = `${language ? `${language}/` : ''}`
25+
const docUrl = doc => `${baseUrl}${docsPart}${langPart}${doc}`
2626

2727
const supportLinks = [
2828
{
2929
content: `Ask a question on [Stack Overflow](https://stackoverflow.com/questions/tagged/react-testing-library)`,
30-
title: "Stack Overflow"
30+
title: 'Stack Overflow',
3131
},
3232
{
3333
content:
34-
"Discuss issues with community members on [Spectrum](https://spectrum.chat/react-testing-library)",
35-
title: "Spectrum"
34+
'Discuss issues with community members on [Spectrum](https://spectrum.chat/react-testing-library)',
35+
title: 'Spectrum',
3636
},
3737
{
3838
content: `Chat on [Discord](https://www.reactiflux.com/)`,
39-
title: "Discord"
39+
title: 'Discord',
4040
},
4141
{
4242
content: `Stay up to date by following the [blog](${
4343
props.config.baseUrl
4444
}blog)`,
45-
title: "Blog"
46-
}
47-
];
45+
title: 'Blog',
46+
},
47+
]
4848

4949
return (
5050
<div className="docMainWrapper wrapper">
@@ -73,7 +73,7 @@ function Help(props) {
7373
</div>
7474
</Container>
7575
</div>
76-
);
76+
)
7777
}
7878

79-
module.exports = Help;
79+
module.exports = Help

0 commit comments

Comments
 (0)