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:
parent
3207afce90
commit
4000b8d5e5
14 changed files with 55 additions and 47 deletions
|
|
@ -725,7 +725,7 @@ describe('Step Packages', () => {
|
|||
screen.getByRole('button', { name: /Next/ }).click();
|
||||
|
||||
// await screen.findByTestId('chosen-packages-count');
|
||||
let chosen = await screen.findByTestId('chosen-packages-count');
|
||||
const chosen = await screen.findByTestId('chosen-packages-count');
|
||||
expect(chosen).toHaveTextContent('2');
|
||||
});
|
||||
|
||||
|
|
@ -1213,7 +1213,7 @@ describe('Click through all steps', () => {
|
|||
expect(within(revtbody).getAllByRole('row')).toHaveLength(3);
|
||||
|
||||
// mock the backend API
|
||||
let ids = [];
|
||||
const ids = [];
|
||||
const customizations = {
|
||||
payload_repositories: [
|
||||
{
|
||||
|
|
|
|||
|
|
@ -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) => {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue