Skip to content

Commit f1acd0c

Browse files
fix: bump the lint group across 1 directory with 8 updates (#1111)
* fix: bump the lint group across 1 directory with 8 updates Bumps the lint group with 7 updates in the / directory: | Package | From | To | | --- | --- | --- | | [@typescript-eslint/eslint-plugin](https://github.com/typescript-eslint/typescript-eslint/tree/HEAD/packages/eslint-plugin) | `8.41.0` | `8.54.0` | | [eslint-plugin-compat](https://github.com/amilajack/eslint-plugin-compat) | `6.0.2` | `6.1.0` | | [eslint-plugin-jest](https://github.com/jest-community/eslint-plugin-jest) | `29.0.1` | `29.12.1` | | [eslint-plugin-prettier](https://github.com/prettier/eslint-plugin-prettier) | `5.5.4` | `5.5.5` | | [eslint-plugin-react-hooks](https://github.com/facebook/react/tree/HEAD/packages/eslint-plugin-react-hooks) | `5.2.0` | `7.0.1` | | [eslint-plugin-testing-library](https://github.com/testing-library/eslint-plugin-testing-library) | `7.6.6` | `7.15.4` | | [prettier](https://github.com/prettier/prettier) | `3.6.2` | `3.8.1` | Updates `@typescript-eslint/eslint-plugin` from 8.41.0 to 8.54.0 - [Release notes](https://github.com/typescript-eslint/typescript-eslint/releases) - [Changelog](https://github.com/typescript-eslint/typescript-eslint/blob/main/packages/eslint-plugin/CHANGELOG.md) - [Commits](https://github.com/typescript-eslint/typescript-eslint/commits/v8.54.0/packages/eslint-plugin) Updates `@typescript-eslint/parser` from 8.41.0 to 8.54.0 - [Release notes](https://github.com/typescript-eslint/typescript-eslint/releases) - [Changelog](https://github.com/typescript-eslint/typescript-eslint/blob/main/packages/parser/CHANGELOG.md) - [Commits](https://github.com/typescript-eslint/typescript-eslint/commits/v8.54.0/packages/parser) Updates `eslint-plugin-compat` from 6.0.2 to 6.1.0 - [Release notes](https://github.com/amilajack/eslint-plugin-compat/releases) - [Changelog](https://github.com/amilajack/eslint-plugin-compat/blob/main/CHANGELOG.md) - [Commits](amilajack/eslint-plugin-compat@v6.0.2...v6.1.0) Updates `eslint-plugin-jest` from 29.0.1 to 29.12.1 - [Release notes](https://github.com/jest-community/eslint-plugin-jest/releases) - [Changelog](https://github.com/jest-community/eslint-plugin-jest/blob/main/CHANGELOG.md) - [Commits](jest-community/eslint-plugin-jest@v29.0.1...v29.12.1) Updates `eslint-plugin-prettier` from 5.5.4 to 5.5.5 - [Release notes](https://github.com/prettier/eslint-plugin-prettier/releases) - [Changelog](https://github.com/prettier/eslint-plugin-prettier/blob/main/CHANGELOG.md) - [Commits](prettier/eslint-plugin-prettier@v5.5.4...v5.5.5) Updates `eslint-plugin-react-hooks` from 5.2.0 to 7.0.1 - [Release notes](https://github.com/facebook/react/releases) - [Changelog](https://github.com/facebook/react/blob/main/packages/eslint-plugin-react-hooks/CHANGELOG.md) - [Commits](https://github.com/facebook/react/commits/HEAD/packages/eslint-plugin-react-hooks) Updates `eslint-plugin-testing-library` from 7.6.6 to 7.15.4 - [Release notes](https://github.com/testing-library/eslint-plugin-testing-library/releases) - [Changelog](https://github.com/testing-library/eslint-plugin-testing-library/blob/main/release.config.js) - [Commits](testing-library/eslint-plugin-testing-library@v7.6.6...v7.15.4) Updates `prettier` from 3.6.2 to 3.8.1 - [Release notes](https://github.com/prettier/prettier/releases) - [Changelog](https://github.com/prettier/prettier/blob/main/CHANGELOG.md) - [Commits](prettier/prettier@3.6.2...3.8.1) --- updated-dependencies: - dependency-name: "@typescript-eslint/eslint-plugin" dependency-version: 8.54.0 dependency-type: direct:development update-type: version-update:semver-minor dependency-group: lint - dependency-name: "@typescript-eslint/parser" dependency-version: 8.54.0 dependency-type: direct:development update-type: version-update:semver-minor dependency-group: lint - dependency-name: eslint-plugin-compat dependency-version: 6.1.0 dependency-type: direct:development update-type: version-update:semver-minor dependency-group: lint - dependency-name: eslint-plugin-jest dependency-version: 29.12.1 dependency-type: direct:development update-type: version-update:semver-minor dependency-group: lint - dependency-name: eslint-plugin-prettier dependency-version: 5.5.5 dependency-type: direct:development update-type: version-update:semver-patch dependency-group: lint - dependency-name: eslint-plugin-react-hooks dependency-version: 7.0.1 dependency-type: direct:development update-type: version-update:semver-major dependency-group: lint - dependency-name: eslint-plugin-testing-library dependency-version: 7.15.4 dependency-type: direct:development update-type: version-update:semver-minor dependency-group: lint - dependency-name: prettier dependency-version: 3.8.1 dependency-type: direct:development update-type: version-update:semver-minor dependency-group: lint ... Signed-off-by: dependabot[bot] <support@github.com> * Fix linter and direct node access Disable eslint react-hooks/refs for SnakeGame --------- Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Co-authored-by: Francesco Lodolo <flod@lodolo.net>
1 parent 7b9260e commit f1acd0c

17 files changed

Lines changed: 755 additions & 618 deletions

File tree

package-lock.json

Lines changed: 646 additions & 480 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -50,8 +50,8 @@
5050
"@babel/core": "^7.27.4",
5151
"@babel/preset-env": "^7.27.2",
5252
"@emotion/eslint-plugin": "^11.12.0",
53-
"@testing-library/jest-dom": "^6.6.3",
54-
"@testing-library/react": "^16.3.0",
53+
"@testing-library/jest-dom": "^6.9.1",
54+
"@testing-library/react": "^16.3.2",
5555
"@tsconfig/recommended": "^1.0.13",
5656
"@types/dompurify": "^3.2.0",
5757
"@types/eslint": "^8.56.12",
@@ -64,22 +64,22 @@
6464
"@types/urijs": "^1.19.26",
6565
"@types/webextension-polyfill": "^0.12.4",
6666
"@types/webpack": "^5.28.5",
67-
"@typescript-eslint/eslint-plugin": "^8.41.0",
67+
"@typescript-eslint/eslint-plugin": "^8.54.0",
6868
"@typescript-eslint/parser": "^8.31.1",
6969
"copy-webpack-plugin": "^13.0.1",
7070
"cross-env": "^10.1.0",
7171
"css-loader": "^7.1.3",
7272
"eslint": "^8.57.1",
7373
"eslint-config-prettier": "^10.1.8",
7474
"eslint-import-resolver-typescript": "^4.4.4",
75-
"eslint-plugin-compat": "^6.0.2",
75+
"eslint-plugin-compat": "^6.1.0",
7676
"eslint-plugin-import": "^2.32.0",
77-
"eslint-plugin-jest": "^29.0.1",
77+
"eslint-plugin-jest": "^29.12.1",
7878
"eslint-plugin-jsx-a11y": "^6.10.2",
79-
"eslint-plugin-prettier": "^5.5.4",
79+
"eslint-plugin-prettier": "^5.5.5",
8080
"eslint-plugin-react": "^7.37.5",
81-
"eslint-plugin-react-hooks": "^5.2.0",
82-
"eslint-plugin-testing-library": "^7.6.6",
81+
"eslint-plugin-react-hooks": "^7.0.1",
82+
"eslint-plugin-testing-library": "^7.15.4",
8383
"flush-promises": "^1.0.2",
8484
"generate-json-webpack-plugin": "^2.0.0",
8585
"html-webpack-plugin": "^5.6.6",
@@ -94,7 +94,7 @@
9494
"npm-run-all": "^4.1.5",
9595
"package-json-type": "^1.1.2",
9696
"postcss-styled-syntax": "^0.7.1",
97-
"prettier": "^3.6.2",
97+
"prettier": "^3.8.1",
9898
"rimraf": "^6.1.2",
9999
"striptags": "^3.2.0",
100100
"ts-jest": "^28.0.8",

src/frontend/address-bar/App/spec.tsx

Lines changed: 12 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -87,10 +87,8 @@ describe('address-bar/App', () => {
8787
await flushPromises();
8888
});
8989

90-
await act(async () => {
91-
screen.getByText('Open Some Project dashboard for Czech').click();
92-
await flushPromises();
93-
});
90+
(await screen.findByText('Open Some Project dashboard for Czech')).click();
91+
await flushPromises();
9492

9593
expect(openNewPontoonTabSpy).toHaveBeenCalledWith(
9694
pontoonTeamsProject('https://localhost', { code: 'cs' }, project),
@@ -103,10 +101,10 @@ describe('address-bar/App', () => {
103101
await flushPromises();
104102
});
105103

106-
await act(async () => {
107-
screen.getByText('Open Some Project translation view for Czech').click();
108-
await flushPromises();
109-
});
104+
(
105+
await screen.findByText('Open Some Project translation view for Czech')
106+
).click();
107+
await flushPromises();
110108

111109
expect(openNewPontoonTabSpy).toHaveBeenCalledWith(
112110
pontoonProjectTranslationView(
@@ -123,12 +121,12 @@ describe('address-bar/App', () => {
123121
await flushPromises();
124122
});
125123

126-
await act(async () => {
127-
screen
128-
.getByText('Report bug for localization of Some Project to Czech')
129-
.click();
130-
await flushPromises();
131-
});
124+
(
125+
await screen.findByText(
126+
'Report bug for localization of Some Project to Czech',
127+
)
128+
).click();
129+
await flushPromises();
132130

133131
expect(openNewTab).toHaveBeenCalledWith(
134132
newLocalizationBug({

src/frontend/address-bar/PanelListItem/spec.tsx

Lines changed: 5 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,13 @@
11
import React from 'react';
2-
import { render, screen, act } from '@testing-library/react';
2+
import { render, screen } from '@testing-library/react';
33

44
import { PanelListItem } from '.';
55

66
describe('PanelListItem', () => {
7-
it('has class to style in Firefox', () => {
7+
it('has class to style in Firefox', async () => {
88
render(<PanelListItem onClick={jest.fn()} />);
99

10-
expect(screen.getByRole('listitem')).toHaveClass('panel-list-item');
10+
expect(await screen.findByRole('listitem')).toHaveClass('panel-list-item');
1111
});
1212

1313
it('renders children', () => {
@@ -16,13 +16,11 @@ describe('PanelListItem', () => {
1616
expect(screen.getByRole('listitem')).toHaveTextContent('Text');
1717
});
1818

19-
it('calls the onClick handler', () => {
19+
it('calls the onClick handler', async () => {
2020
const onClick = jest.fn();
2121
render(<PanelListItem onClick={onClick}>Text</PanelListItem>);
2222

23-
act(() => {
24-
screen.getByText('Text').click();
25-
});
23+
(await screen.findByText('Text')).click();
2624

2725
expect(onClick).toHaveBeenCalled();
2826
});

src/frontend/options/Checkbox/index.tsx

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,8 +5,10 @@ import { getOneOption, setOption } from '@commons/options';
55
import { InputLabel } from '@frontend/commons/components/pontoon/InputLabel';
66
import { CheckboxInput } from '@frontend/commons/components/pontoon/CheckboxInput';
77

8-
interface Props
9-
extends Pick<React.ComponentProps<typeof InputLabel>, 'children'> {
8+
interface Props extends Pick<
9+
React.ComponentProps<typeof InputLabel>,
10+
'children'
11+
> {
1012
optionKey: OptionId;
1113
}
1214

src/frontend/privacy-policy/MarkdownContent/index.tsx

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,14 @@
11
import type { ComponentProps } from 'react';
22
import React, { useEffect, useState } from 'react';
33
import { marked, Renderer } from 'marked';
4-
import DOMPurify from 'dompurify';
4+
import DOMPurifyDefault from 'dompurify';
55
import type { DOMNode } from 'html-react-parser';
66
import parse, { domToReact, Element } from 'html-react-parser';
77

88
import { NativeLink } from '@frontend/commons/components/pontoon/NativeLink';
99

10+
const DOMPurify = DOMPurifyDefault;
11+
1012
async function renderMarkdown(markdown: string) {
1113
const renderer = new Renderer();
1214
const defaultLinkRenderer = renderer.link;

src/frontend/snake-game/SnakeGameBoard/index.tsx

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
import React, { useMemo } from 'react';
2+
/* eslint-disable react-hooks/refs */
23
import { css } from '@emotion/react';
34
import type { IOptions } from 'react-game-snake';
45
import { SnakeGame } from 'react-game-snake';

src/frontend/snake-game/SnakeGameBoard/spec.tsx

Lines changed: 5 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
import React from 'react';
2-
import { screen, within, act } from '@testing-library/react';
2+
import { screen, within } from '@testing-library/react';
33

44
import { renderInSnakeGameContext } from '../test/SnakeGameContextMock';
55
import { GameState } from '../SnakeGameContext';
@@ -41,17 +41,15 @@ describe('SnakeGameBoard', () => {
4141
).not.toBeInTheDocument();
4242
});
4343

44-
it('start game button starts the game', () => {
44+
it('start game button starts the game', async () => {
4545
const startGame = jest.fn();
4646
renderInSnakeGameContext({
4747
children: <SnakeGameBoard />,
4848
gameState: GameState.NOT_STARTED,
4949
startGame,
5050
});
5151

52-
act(() => {
53-
within(wrapper()).getByText('START GAME').click();
54-
});
52+
(await screen.findByText('START GAME')).click();
5553

5654
expect(startGame).toHaveBeenCalled();
5755
});
@@ -78,17 +76,15 @@ describe('SnakeGameBoard', () => {
7876
).not.toBeInTheDocument();
7977
});
8078

81-
it('try again button restarts the game', () => {
79+
it('try again button restarts the game', async () => {
8280
const restartGame = jest.fn();
8381
renderInSnakeGameContext({
8482
children: <SnakeGameBoard />,
8583
gameState: GameState.LOST,
8684
restartGame,
8785
});
8886

89-
act(() => {
90-
within(wrapper()).getByText('TRY AGAIN').click();
91-
});
87+
(await screen.findByText('TRY AGAIN')).click();
9288

9389
expect(restartGame).toHaveBeenCalled();
9490
});

src/frontend/snake-game/SnakeGameInfo/index.tsx

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
import React from 'react';
2+
/* eslint-disable react-hooks/refs */
23
import { css } from '@emotion/react';
34

45
import { Button } from '@frontend/commons/components/pontoon/Button';

src/frontend/snake-game/SnakeGameInfo/spec.tsx

Lines changed: 5 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
import React from 'react';
2-
import { screen, within, act } from '@testing-library/react';
2+
import { screen, within } from '@testing-library/react';
33

44
import { renderInSnakeGameContext } from '../test/SnakeGameContextMock';
55
import { GameState } from '../SnakeGameContext';
@@ -39,17 +39,15 @@ describe('SnakeGameInfo', () => {
3939
expect(within(wrapper()).getByRole('button')).toHaveTextContent('PAUSE');
4040
});
4141

42-
it('pause button pauses the game', () => {
42+
it('pause button pauses the game', async () => {
4343
const pauseGame = jest.fn();
4444
renderInSnakeGameContext({
4545
children: <SnakeGameInfo />,
4646
gameState: GameState.RUNNING,
4747
pauseGame,
4848
});
4949

50-
act(() => {
51-
within(wrapper()).getByText('PAUSE').click();
52-
});
50+
(await screen.findByText('PAUSE')).click();
5351

5452
expect(pauseGame).toHaveBeenCalled();
5553
});
@@ -71,17 +69,15 @@ describe('SnakeGameInfo', () => {
7169
expect(within(wrapper()).getByRole('button')).toHaveTextContent('RESUME');
7270
});
7371

74-
it('resume button resumes the game', () => {
72+
it('resume button resumes the game', async () => {
7573
const resumeGame = jest.fn();
7674
renderInSnakeGameContext({
7775
children: <SnakeGameInfo />,
7876
gameState: GameState.PAUSED,
7977
resumeGame,
8078
});
8179

82-
act(() => {
83-
within(wrapper()).getByText('RESUME').click();
84-
});
80+
(await screen.findByText('RESUME')).click();
8581

8682
expect(resumeGame).toHaveBeenCalled();
8783
});

0 commit comments

Comments
 (0)