Skip to content

Revert "build(deps-dev): bump prettier from 2.8.7 to 3.0.3 (#825)" #826

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Oct 3, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1,069 changes: 634 additions & 435 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