ESLint: Add prefer-const rule

Require const declarations for variables that are never reassigned after
being declared. If a variable is never reassigned, using the const
declaration is better. const declaration tells readers, “this variable
is never reassigned,” reducing cognitive load and improving
maintainability.
This commit is contained in:
lucasgarfield 2023-02-09 09:26:30 +01:00 committed by Lucas Garfield
parent 3207afce90
commit 4000b8d5e5
14 changed files with 55 additions and 47 deletions

View file

@ -1518,7 +1518,7 @@ describe('Click through all steps', () => {
expect(within(revtbody).getAllByRole('row')).toHaveLength(3);
// mock the backend API
let ids = [];
const ids = [];
const composeImage = jest
.spyOn(api, 'composeImage')
.mockImplementation((body) => {