Fix template-no-model-argument-in-route-templates: lint .gjs/.gts and unknown paths#2691
Open
johanrd wants to merge 1 commit intoember-cli:masterfrom
Open
Conversation
… unknown paths Upstream defaults to linting unknown paths (assumes route template) and runs in both modes. Port disabled itself on .gjs/.gts entirely and returned false for unknown paths. Mirror upstream's isRouteTemplate heuristic (also used by template-no-outlet-outside-routes), skip partials, and lint by default for unknown paths.
058ab65 to
a31a752
Compare
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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Summary
isRouteTemplateheuristic mirroring upstream (also used bytemplate-no-outlet-outside-routes).gjs/.gtsroute templates (e.g.app/routes/posts.gjs) are now linted-) are correctly excludedTest plan
app/routes/posts.gjswith{{@model.foo}}→ flagged + autofixed{{@model.foo}}→ flaggedapp/templates/-partial.hbs→ not flaggedapp/components/user-card.gjs→ not flagged