-
Notifications
You must be signed in to change notification settings - Fork 1k
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
Avoid non-autofixable ESLint errors in code generated around dbAuth #6061
Conversation
☁️ Nx Cloud ReportCI is running/has finished running commands for commit 6cf7230. As they complete they will appear below. Click to see the status, the terminal output, and the build insights. 📂 See all runs for this branch ✅ Successfully ran 14 targets
Sent with 💌 from NxCloud. |
✅ Deploy Preview for redwoodjs-docs canceled.
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Quick comment about the react-hooks rule. Maybe we should fix that one instead?
packages/cli/src/commands/generate/dbAuth/templates/resetPassword.tsx.template
Outdated
Show resolved
Hide resolved
c4c4766
to
ff02b0d
Compare
6390973
to
bff99e2
Compare
bff99e2
to
94adc37
Compare
While finalizing this i briefly went through the other files – some of them i never looked at before b/c the stuff i initially wanted to fix in this PR were errors in my project, which doesn't (a) use strict mode and (b) doesn't use webAuthn, which just landed. Regarding (a) i comitted another quick fix that i found in 94adc37, which adds to #5491 |
94adc37
to
b0ffe26
Compare
ea8e9f3
to
e8c4784
Compare
Just a CI side-note: is there a reason i cannot see my changes in the netlify preview deploy? https://deploy-preview-6045--redwoodjs-docs.netlify.app/docs/tutorial/chapter6/comments-schema |
bb83b3e
to
0fb0909
Compare
@Philzen You need to switch from v2.2 to Canary in the dropdown up top |
🤦 Duh, it's too hot. Thanks. |
0fb0909
to
76b7c22
Compare
packages/cli/src/commands/setup/auth/templates/dbAuth.function.ts.template
Outdated
Show resolved
Hide resolved
packages/cli/src/commands/setup/auth/templates/dbAuth.function.ts.template
Outdated
Show resolved
Hide resolved
76b7c22
to
77d432f
Compare
…ord page Adds to / completes redwoodjs#5491
77d432f
to
84f2089
Compare
84f2089
to
0206348
Compare
Adds to / completes 3fe7dca
0206348
to
6cf7230
Compare
There's some additional variables added to the @dac09 are you okay with adding lint/TS override comments in generated code? I remember someone being particularly adverse to shipping code with those in there, and I'm 60% sure it was you? |
@cannikin i admit i did not test it but merely followed the advice i was given. Personally, i'd prefer adding
Actually, there already are numerous occasions of these kinds of comments in the code-base, particularly in templates (just make a full-text-search for "no-unused-vars"). I could even find an occasion of redwood/packages/cli/src/commands/setup/i18n/templates/storybook.preview.js.template Lines 32 to 35 in 1fecb03
Maybe the core team could re-discuss this and come to a consensus? If comments were deemed OK, i could also immediately fix #6171 as part of this PR. |
I found this old PR. It had a bunch of merge conflicts that couldn't be automatically resolved by GH, so I fixed those.
The additions are correct. If for example
We're only making existing comments more specific, not adding any new ones. Personally I'd prefer a different solution to the problem, so we could get rid of the comments entirely, but that's for another PR 🙂 |
@Tobbe did you want this one to go in? I just triggered CI as I assume it was failing due to the flaky tests we resolved last week. |
@thedavidprice Thanks for the ping! |
🚀 |
While upgrading to v2.0.0 and running the
yarn rw lint --fix
command, i bumped into one unfixable "error" and warning each. The error makes the command return an error code (=fail) and thus degrade the smoothness of the DX.Issues:
…/api/src/functions/auth.ts 105:49 error 'userAttributes' is defined but never used. Allowed unused args must match /^_/u @typescript-eslint/no-unused-vars
→ fixed in 21c4121
→ fixed in 6f86667
Although it is too late for folks with an existing codebase on the upgrade path to v2.0.0, new RedwoodJS users may benefit from these changes as code generated for dbAuth won't show any ESLint errors.