feat(no-navigation-without-resolve): add allowSuffix option#1381
feat(no-navigation-without-resolve): add allowSuffix option#1381baseballyama wants to merge 1 commit intomainfrom
allowSuffix option#1381Conversation
🦋 Changeset detectedLatest commit: db65d65 The changes in this PR will be included in the next version bump. This PR includes changesets to release 1 package
Not sure what this means? Click here to learn what changesets are. Click here if you're a maintainer who wants to add another changeset to this PR |
Try the Instant Preview in Online PlaygroundInstall the Instant Preview to Your LocalPublished Instant Preview Packages:
|
425224c to
db65d65
Compare
|
I think this should be the default behaviour. I'll take a look at the code in a few days - I have some other ideas for improvements as well, so would like to push it in a certain way... |
|
Hi,
Those 2 should simplify the code significantly. On the other hand, one more complication:
|
There was a problem hiding this comment.
This shouldn't be in this PR? I am confused.
| return isResolveCall(ctx, variable.identifiers[0].parent.init, resolveReferences); | ||
| } | ||
|
|
||
| function isResolveWithOptionalSuffix( |
There was a problem hiding this comment.
2 notes on the design:
- Can we split this function so that it has just 1 responsibility? Now it's checking for resolve and the suffix, IMO it would be better to have 2 functions (and we already have one of them...)
- I'd prefer to split this function by expression type, it feels easier to read the code that way
| }) | ||
| ); | ||
|
|
||
| function onlyCallExpressions(list: TrackedReferences<boolean>[]): TSESTree.CallExpression[] { |
There was a problem hiding this comment.
Can you please explain why this is needed? I don't get it :/
| ); | ||
| } | ||
|
|
||
| function expressionIsAbsolute( |
There was a problem hiding this comment.
I think this PR should remove/repurpose this function
| ); | ||
| } | ||
|
|
||
| function urlValueIsAbsolute(url: string): boolean { |
There was a problem hiding this comment.
I think this PR should remove/repurpose this function
close part of #1353
close part of #1327