cypress-io / cypress-example-kitchensink

This is an example app used to showcase Cypress.io testing.
https://example.cypress.io/
MIT License
1.2k stars 2.2k forks source link

fix: clean unused eslint disables #837

Closed MikeMcC399 closed 4 months ago

MikeMcC399 commented 4 months ago

Issue

ESLint 9.x identifies usages in the repo of unnecessary ESLint rule disables.

This affects the following instances:

/* eslint-disable-next-line no-console */ in

The ESLint no-console rule does not belong to the set of recommended rules in ESLint 8.x or 9.x and so disabling it in-line was not necessary.

/* eslint-disable no-unused-vars */ in

ESLint finds no unused variables in the marked section.

Process

By temporarily updating to ESLint 9.x, unnecessary rule disables are identified and automatically removed by eslint --fix

Run ESLint 9.x:

npm ci
npm install eslint@9 --force
npm run lint

Revert to ESLint 8.x and check that linting still works:

git restore package.json package-lock.json
npm ci
npm run lint

Changes

This prepares the Cypress test specs so that they will pass linting when the repo is migrated to ESLint 9.x.

Verification

On Ubuntu 22.04.4 LTS, Node.js v20.12.2 LTS

npm ci
npm run lint
npm run local:run
cypress-app-bot commented 4 months ago
cypress-app-bot commented 4 months ago

:tada: This PR is included in version 2.0.7 :tada:

The release is available on:

Your semantic-release bot :package::rocket: