feat(no-navigation-without-resolve): add allowSuffix option
#1381
allowSuffix optionPull request
🦋 Changeset detected
Latest commit: db65d65
The changes in this PR will be included in the next version bump.
This PR includes changesets to release 1 package
| Name | Type |
|---|---|
| eslint-plugin-svelte | Patch |
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 Playground
Install the Instant Preview to Your Local
npm i https://pkg.pr.new/eslint-plugin-svelte@db65d65
Published Instant Preview Packages:
- eslint-plugin-svelte:
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, thanks for the PR, it generally looks like the right idea. Several points about the design
- I think this doesn't need an option gating it, suffixes should always be allowed
- I think this should be checked for both
resolve()as well asasset()- while not common, even assets can have query options.
Those 2 should simplify the code significantly. On the other hand, one more complication:
- I don't think we should just allow any suffix. My first idea would be to check that the suffix starts with either a
?or a#- I think that would be a reasonable trade-off between complexity and correctness
close in favor of #1651