You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Upgrade to the latest version of eslint-plugin-react. We need to do this for our eslint upgrade, and it gives us additional linting benefits. Namely, prop types on functional components are now linted fully (it seems that nested objects were not being properly linted). This means we hit a few linter errors. I fixed a few that were in the student learning/vague ownership space. The rest seem to be teacher tools components, I've started a thread here on those.
The only other changes this enforced was adding rel="noreferrer" to links with target="_blank" (reasoning), and renaming a lifecycle method to the UNSAFE_ version.
What lint errors are you seeing for the components that need to be skipped? I spot checked a couple and they do have prop types (example 1, example 2). I know I've also seen linter errors when props aren't listed, I think for functional components, so I think I'm missing what's changed?
What lint errors are you seeing for the components that need to be skipped? I spot checked a couple and they do have prop types (example 1, example 2). I know I've also seen linter errors when props aren't listed, I think for functional components, so I think I'm missing what's changed?
@bethanyaconnor it's a bit subtle, I should have clarified. A lot of the issues are because a prop in a nested object isn't defined (so maybe my statement about not checking props in functional components was overly broad). In (example 1, programmingExpression.blockName is not part of programmingExpressionShape. Example 2 has the same problem, and also hasn't defined programmingExpression.name. There was at least one case of non-nested props not being defined (InstructorsOnly), so linting was at least being applied inconsistently.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Upgrade to the latest version of
eslint-plugin-react. We need to do this for our eslint upgrade, and it gives us additional linting benefits. Namely, prop types on functional components are now linted fully (it seems that nested objects were not being properly linted). This means we hit a few linter errors. I fixed a few that were in the student learning/vague ownership space. The rest seem to be teacher tools components, I've started a thread here on those.The only other changes this enforced was adding
rel="noreferrer"to links withtarget="_blank"(reasoning), and renaming a lifecycle method to theUNSAFE_version.Links
Testing story
Most of the changes here are adding ignores, and the other changes seem safe. I am relying on drone to validate this.
PR Checklist: