Skip to content

Commit 5248c8a

Browse files
committed
FOrmatting fixes via yarn format
1 parent b96f0db commit 5248c8a

File tree

4 files changed

+58
-56
lines changed

4 files changed

+58
-56
lines changed

CODE_OF_CONDUCT.md

+27-25
Original file line numberDiff line numberDiff line change
@@ -5,43 +5,43 @@
55
In the interest of fostering an open and welcoming environment, we as
66
contributors and maintainers pledge to making participation in our project and
77
our community a harassment-free experience for everyone, regardless of age, body
8-
size, disability, ethnicity, sex characteristics, gender identity and expression,
9-
level of experience, education, socio-economic status, nationality, personal
10-
appearance, race, religion, or sexual identity and orientation.
8+
size, disability, ethnicity, sex characteristics, gender identity and
9+
expression, level of experience, education, socio-economic status, nationality,
10+
personal appearance, race, religion, or sexual identity and orientation.
1111

1212
## Our Standards
1313

1414
Examples of behavior that contributes to creating a positive environment
1515
include:
1616

17-
* Using welcoming and inclusive language
18-
* Being respectful of differing viewpoints and experiences
19-
* Gracefully accepting constructive criticism
20-
* Focusing on what is best for the community
21-
* Showing empathy towards other community members
17+
- Using welcoming and inclusive language
18+
- Being respectful of differing viewpoints and experiences
19+
- Gracefully accepting constructive criticism
20+
- Focusing on what is best for the community
21+
- Showing empathy towards other community members
2222

2323
Examples of unacceptable behavior by participants include:
2424

25-
* The use of sexualized language or imagery and unwelcome sexual attention or
26-
advances
27-
* Trolling, insulting/derogatory comments, and personal or political attacks
28-
* Public or private harassment
29-
* Publishing others' private information, such as a physical or electronic
30-
address, without explicit permission
31-
* Other conduct which could reasonably be considered inappropriate in a
32-
professional setting
25+
- The use of sexualized language or imagery and unwelcome sexual attention or
26+
advances
27+
- Trolling, insulting/derogatory comments, and personal or political attacks
28+
- Public or private harassment
29+
- Publishing others' private information, such as a physical or electronic
30+
address, without explicit permission
31+
- Other conduct which could reasonably be considered inappropriate in a
32+
professional setting
3333

3434
## Our Responsibilities
3535

3636
Project maintainers are responsible for clarifying the standards of acceptable
3737
behavior and are expected to take appropriate and fair corrective action in
3838
response to any instances of unacceptable behavior.
3939

40-
Project maintainers have the right and responsibility to remove, edit, or
41-
reject comments, commits, code, wiki edits, issues, and other contributions
42-
that are not aligned to this Code of Conduct, or to ban temporarily or
43-
permanently any contributor for other behaviors that they deem inappropriate,
44-
threatening, offensive, or harmful.
40+
Project maintainers have the right and responsibility to remove, edit, or reject
41+
comments, commits, code, wiki edits, issues, and other contributions that are
42+
not aligned to this Code of Conduct, or to ban temporarily or permanently any
43+
contributor for other behaviors that they deem inappropriate, threatening,
44+
offensive, or harmful.
4545

4646
## Scope
4747

@@ -58,17 +58,19 @@ Instances of abusive, harassing, or otherwise unacceptable behavior may be
5858
reported by contacting the project team at [email protected]. All
5959
complaints will be reviewed and investigated and will result in a response that
6060
is deemed necessary and appropriate to the circumstances. The project team is
61-
obligated to maintain confidentiality with regard to the reporter of an incident.
62-
Further details of specific enforcement policies may be posted separately.
61+
obligated to maintain confidentiality with regard to the reporter of an
62+
incident. Further details of specific enforcement policies may be posted
63+
separately.
6364

6465
Project maintainers who do not follow or enforce the Code of Conduct in good
6566
faith may face temporary or permanent repercussions as determined by other
6667
members of the project's leadership.
6768

6869
## Attribution
6970

70-
This Code of Conduct is adapted from the [Contributor Covenant][homepage], version 1.4,
71-
available at https://www.contributor-covenant.org/version/1/4/code-of-conduct.html
71+
This Code of Conduct is adapted from the [Contributor Covenant][homepage],
72+
version 1.4, available at
73+
https://www.contributor-covenant.org/version/1/4/code-of-conduct.html
7274

7375
[homepage]: https://www.contributor-covenant.org
7476

babel.config.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
module.exports = api => {
1+
module.exports = (api) => {
22
api.cache(true);
33

44
const presets = [

demo/src/index.tsx

+9-9
Original file line numberDiff line numberDiff line change
@@ -133,8 +133,8 @@ const App = (): JSX.Element => (
133133
<Accordion preExpanded={[placeholders[0].uuid]}>
134134
{placeholders.map((placeholder: Placeholder) => (
135135
<AccordionItem
136-
key={placeholder.heading}
137-
uuid={placeholder.uuid}
136+
key={placeholder.heading}
137+
uuid={placeholder.uuid}
138138
>
139139
<AccordionItemHeading>
140140
<AccordionItemButton>
@@ -147,7 +147,7 @@ const App = (): JSX.Element => (
147147
</Accordion>
148148

149149
<Code code={ExamplePreExpanded} />
150-
150+
151151
<h2 className="u-margin-top">Informative onChange</h2>
152152

153153
<p>
@@ -170,8 +170,8 @@ const App = (): JSX.Element => (
170170
>
171171
{placeholders.map((placeholder: Placeholder) => (
172172
<AccordionItem
173-
key={placeholder.heading}
174-
uuid={placeholder.uuid}
173+
key={placeholder.heading}
174+
uuid={placeholder.uuid}
175175
>
176176
<AccordionItemHeading>
177177
<AccordionItemButton>
@@ -182,7 +182,7 @@ const App = (): JSX.Element => (
182182
</AccordionItem>
183183
))}
184184
</Accordion>
185-
185+
186186
<Code code={ExampleOnChange} />
187187

188188
<h2 className="u-margin-top">Accessing Item State</h2>
@@ -222,8 +222,9 @@ const App = (): JSX.Element => (
222222
<h2 className="u-margin-top">Manual state</h2>
223223

224224
<p>
225-
When you use the <strong>dangerouslySetExpanded</strong> prop, you can
226-
manually override whether an <strong>AccordionItem</strong> is expanded.
225+
When you use the <strong>dangerouslySetExpanded</strong> prop, you
226+
can manually override whether an <strong>AccordionItem</strong> is
227+
expanded.
227228
</p>
228229

229230
<p>
@@ -238,7 +239,6 @@ const App = (): JSX.Element => (
238239
<AccordionItem
239240
key={placeholder.heading}
240241
uuid={placeholder.uuid}
241-
// Warning: This can impact accessibility negatively
242242
dangerouslySetExpanded={isExpanded}
243243
>
244244
<AccordionItemHeading>

integration/wai-aria.spec.js

+21-21
Original file line numberDiff line numberDiff line change
@@ -86,10 +86,10 @@ describe('WAI ARIA Spec', () => {
8686
function evaluateIsExpanded(buttonHandle) {
8787
return page
8888
.evaluate(
89-
heading => heading.getAttribute('aria-expanded'),
89+
(heading) => heading.getAttribute('aria-expanded'),
9090
buttonHandle,
9191
)
92-
.then(ariaExpanded => ariaExpanded === 'true');
92+
.then((ariaExpanded) => ariaExpanded === 'true');
9393
}
9494

9595
// ENTER key
@@ -132,7 +132,7 @@ describe('WAI ARIA Spec', () => {
132132
await firstButtonHandle.focus();
133133
await page.keyboard.press('Tab');
134134
const secondIsFocussed = await page.evaluate(
135-
button => document.activeElement === button,
135+
(button) => document.activeElement === button,
136136
secondButtonHandle,
137137
);
138138
expect(secondIsFocussed).toEqual(true);
@@ -150,7 +150,7 @@ describe('WAI ARIA Spec', () => {
150150
await page.keyboard.press('Tab');
151151
await page.keyboard.up('Shift');
152152
const firstIsFocussed = await page.evaluate(
153-
button => document.activeElement === button,
153+
(button) => document.activeElement === button,
154154
firstButtonHandle,
155155
);
156156
expect(firstIsFocussed).toEqual(true);
@@ -165,7 +165,7 @@ describe('WAI ARIA Spec', () => {
165165
await firstButtonHandle.focus();
166166
await page.keyboard.press('ArrowDown');
167167
const secondIsFocussed = await page.evaluate(
168-
button => document.activeElement === button,
168+
(button) => document.activeElement === button,
169169
secondButtonHandle,
170170
);
171171
expect(secondIsFocussed).toEqual(true);
@@ -185,7 +185,7 @@ describe('WAI ARIA Spec', () => {
185185
await secondButtonHandle.focus();
186186
await page.keyboard.press('ArrowUp');
187187
const firstIsFocussed = await page.evaluate(
188-
button => document.activeElement === button,
188+
(button) => document.activeElement === button,
189189
firstButtonHandle,
190190
);
191191
expect(firstIsFocussed).toEqual(true);
@@ -209,7 +209,7 @@ describe('WAI ARIA Spec', () => {
209209
await thirdButtonHandle.focus();
210210
await page.keyboard.press('Home');
211211
const firstIsFocussed = await page.evaluate(
212-
button => document.activeElement === button,
212+
(button) => document.activeElement === button,
213213
firstButtonHandle,
214214
);
215215
expect(firstIsFocussed).toEqual(true);
@@ -228,7 +228,7 @@ describe('WAI ARIA Spec', () => {
228228
await firstButtonHandle.focus();
229229
await page.keyboard.press('End');
230230
const thirdIsFocussed = await page.evaluate(
231-
button => document.activeElement === button,
231+
(button) => document.activeElement === button,
232232
thirdButtonHandle,
233233
);
234234
expect(thirdIsFocussed).toEqual(true);
@@ -246,7 +246,7 @@ describe('WAI ARIA Spec', () => {
246246
for (const buttonHandle of buttonsHandles) {
247247
expect(
248248
await page.evaluate(
249-
button => button.getAttribute('role'),
249+
(button) => button.getAttribute('role'),
250250
buttonHandle,
251251
),
252252
).toBe('button');
@@ -261,14 +261,14 @@ describe('WAI ARIA Spec', () => {
261261
for (const buttonHandle of buttonsHandles) {
262262
expect(
263263
await page.evaluate(
264-
button => button.parentElement.getAttribute('role'),
264+
(button) => button.parentElement.getAttribute('role'),
265265
buttonHandle,
266266
),
267267
).toBe('heading');
268268

269269
expect(
270270
await page.evaluate(
271-
button =>
271+
(button) =>
272272
button.parentElement.getAttribute('aria-level'),
273273
buttonHandle,
274274
),
@@ -292,14 +292,14 @@ describe('WAI ARIA Spec', () => {
292292
for (const handle of headingsHandles) {
293293
expect(
294294
await page.evaluate(
295-
heading => heading.childNodes.length === 1,
295+
(heading) => heading.childNodes.length === 1,
296296
handle,
297297
),
298298
).toEqual(true);
299299

300300
expect(
301301
await page.evaluate(
302-
heading =>
302+
(heading) =>
303303
heading.firstChild.getAttribute(
304304
'data-accordion-component',
305305
) === 'AccordionItemButton',
@@ -319,7 +319,7 @@ describe('WAI ARIA Spec', () => {
319319
// Before expanding
320320
expect(
321321
await page.evaluate(
322-
button => button.getAttribute('aria-expanded'),
322+
(button) => button.getAttribute('aria-expanded'),
323323
handle,
324324
),
325325
).toEqual('false');
@@ -330,7 +330,7 @@ describe('WAI ARIA Spec', () => {
330330
// After expanding
331331
expect(
332332
await page.evaluate(
333-
button => button.getAttribute('aria-expanded'),
333+
(button) => button.getAttribute('aria-expanded'),
334334
handle,
335335
),
336336
).toEqual('true');
@@ -351,11 +351,11 @@ describe('WAI ARIA Spec', () => {
351351
);
352352

353353
const buttonAriaControls = await page.evaluate(
354-
button => button.getAttribute('aria-controls'),
354+
(button) => button.getAttribute('aria-controls'),
355355
buttonHandle,
356356
);
357357
const panelId = await page.evaluate(
358-
panel => panel.id,
358+
(panel) => panel.id,
359359
panelHandle,
360360
);
361361

@@ -375,7 +375,7 @@ describe('WAI ARIA Spec', () => {
375375
await firstButtonHandle.click();
376376

377377
const buttonAriaDisabled = await page.evaluate(
378-
button => button.getAttribute('aria-disabled'),
378+
(button) => button.getAttribute('aria-disabled'),
379379
firstButtonHandle,
380380
);
381381

@@ -397,15 +397,15 @@ describe('WAI ARIA Spec', () => {
397397
);
398398

399399
const buttonId = await page.evaluate(
400-
button => button.id,
400+
(button) => button.id,
401401
buttonHandle,
402402
);
403403
const panelAriaLabelledBy = await page.evaluate(
404-
panel => panel.getAttribute('aria-labelledby'),
404+
(panel) => panel.getAttribute('aria-labelledby'),
405405
panelHandle,
406406
);
407407
const panelRole = await page.evaluate(
408-
panel => panel.getAttribute('role'),
408+
(panel) => panel.getAttribute('role'),
409409
panelHandle,
410410
);
411411

0 commit comments

Comments
 (0)