Skip to content

Commit

Permalink
build(deps-dev): bump prettier from 2.8.7 to 3.0.3 (#825)
Browse files Browse the repository at this point in the history
* build(deps-dev): bump prettier from 2.8.7 to 3.0.3

Bumps [prettier](https://github.com/prettier/prettier) from 2.8.7 to 3.0.3.
- [Release notes](https://github.com/prettier/prettier/releases)
- [Changelog](https://github.com/prettier/prettier/blob/main/CHANGELOG.md)
- [Commits](prettier/prettier@2.8.7...3.0.3)

---
updated-dependencies:
- dependency-name: prettier
  dependency-type: direct:development
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>

* style: format files

---------

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Mario Beltrán <belco90@gmail.com>
  • Loading branch information
dependabot[bot] and Belco90 authored Oct 2, 2023
1 parent 9c4aff3 commit 9ef055d
Show file tree
Hide file tree
Showing 63 changed files with 865 additions and 1,064 deletions.
1,069 changes: 435 additions & 634 deletions .all-contributorsrc

Large diffs are not rendered by default.

8 changes: 4 additions & 4 deletions docs/rules/await-async-utils.md
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ test('something incorrectly', async () => {
getByLabelText(container, 'username'),
getByLabelText(container, 'password'),
],
{ container }
{ container },
);

waitFor(() => {}, { timeout: 100 });
Expand All @@ -46,7 +46,7 @@ test('something incorrectly', async () => {
// wrap an async util within a function...
const makeCustomWait = () => {
return waitForElementToBeRemoved(() =>
document.querySelector('div.getOuttaHere')
document.querySelector('div.getOuttaHere'),
);
};
makeCustomWait(); // ...but not handling promise from it is incorrect
Expand All @@ -66,7 +66,7 @@ test('something correctly', async () => {
getByLabelText(container, 'username'),
getByLabelText(container, 'password'),
],
{ container }
{ container },
);

// `then` chained method is correct
Expand All @@ -77,7 +77,7 @@ test('something correctly', async () => {
// wrap an async util within a function...
const makeCustomWait = () => {
return waitForElementToBeRemoved(() =>
document.querySelector('div.getOuttaHere')
document.querySelector('div.getOuttaHere'),
);
};
await makeCustomWait(); // ...and handling promise from it is correct
Expand Down
12 changes: 6 additions & 6 deletions docs/rules/prefer-find-by.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,28 +18,28 @@ Examples of **incorrect** code for this rule
```js
// arrow functions with one statement, using screen and any sync query method
const submitButton = await waitFor(() =>
screen.getByRole('button', { name: /submit/i })
screen.getByRole('button', { name: /submit/i }),
);
const submitButton = await waitFor(() =>
screen.getAllByTestId('button', { name: /submit/i })
screen.getAllByTestId('button', { name: /submit/i }),
);

// arrow functions with one statement, calling any sync query method
const submitButton = await waitFor(() =>
queryByLabel('button', { name: /submit/i })
queryByLabel('button', { name: /submit/i }),
);

const submitButton = await waitFor(() =>
queryAllByText('button', { name: /submit/i })
queryAllByText('button', { name: /submit/i }),
);

// arrow functions with one statement, calling any sync query method with presence assertion
const submitButton = await waitFor(() =>
expect(queryByLabel('button', { name: /submit/i })).toBeInTheDocument()
expect(queryByLabel('button', { name: /submit/i })).toBeInTheDocument(),
);

const submitButton = await waitFor(() =>
expect(queryByLabel('button', { name: /submit/i })).not.toBeFalsy()
expect(queryByLabel('button', { name: /submit/i })).not.toBeFalsy(),
);
```

Expand Down
2 changes: 1 addition & 1 deletion lib/configs/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -20,5 +20,5 @@ export default SUPPORTED_TESTING_FRAMEWORKS.reduce(
...allConfigs,
[framework]: getConfigForFramework(framework),
}),
{}
{},
) as Record<SupportedTestingFramework, LinterConfigRules>;
Loading

0 comments on commit 9ef055d

Please sign in to comment.