Skip to content
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

Cell generator creates unused import in test #5060

Closed
Philzen opened this issue Apr 5, 2022 · 2 comments · Fixed by #5827
Closed

Cell generator creates unused import in test #5060

Philzen opened this issue Apr 5, 2022 · 2 comments · Fixed by #5827

Comments

@Philzen
Copy link
Contributor

Philzen commented Apr 5, 2022

When creating a cell, the test file reads:

import { render, screen } from '@redwoodjs/testing/web'

at the top. However, screen is unused in the generated test and thus ESLint complains:

'screen' is defined but never used. Allowed unused vars must match /^_/u.eslint[@typescript-eslint/no-unused-vars](https://typescript-eslint.io/rules/no-unused-vars)

Fun fact: This does not happen when generating pages or components.

@jtoar
Copy link
Contributor

jtoar commented May 11, 2022

Confirmed this one, and it looks like this is only for TS projects for some reason.

@Hanaffi
Copy link

Hanaffi commented Jun 11, 2022

Can you give a hint on this?
I want to handle it but never got to touch generators

Philzen added a commit to Philzen/redwood that referenced this issue Jun 25, 2022
Philzen added a commit to Philzen/redwood that referenced this issue Jul 4, 2022
Philzen added a commit to Philzen/redwood that referenced this issue Jul 10, 2022
Philzen added a commit to Philzen/redwood that referenced this issue Aug 8, 2022
Philzen added a commit to Philzen/redwood that referenced this issue Aug 8, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
4 participants