This repository has been archived by the owner on Apr 19, 2022. It is now read-only.
-
-
Notifications
You must be signed in to change notification settings - Fork 4
Bug: <template> cannot be placed not in first place of SFC #128
Labels
bug
Something isn't working
Comments
Are you interested in creating a PR and take credits to fix this bug? 🙂 |
I am not sure I can fix this by myself |
@Grawl I would assume it has something todo with this part eslint-plugin-vue-pug-sfc/src/utils/index.ts Lines 198 to 231 in afec94f
|
I can confirm this bug is fixed https://github.com/Grawl/eslint-plugin-vue-pug-sfc-demo/tree/476454ac8929f776db25cbfe4bed99e2d35ec95c |
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
If I place
<template>
tag in first place of SFC,eslint-plugin-vue-pug-sfc
shows me the right error in the right place. I'm very happy to finally lint my Pug code in Vue SFC!But if I place
<template>
after<script>
, error shows me the wrong place of lint warning. It shows the place where warning will be if template placed on the first place of SFC.Info
Eslint config
Input
Output or Error
Expected Output
Additional Context
I created a repository to demonstrate this bug (and other/future bugs maybe), here is two commits I pushed:
init
shows the right place of lint warning because template tag is placed on the first placedemonstrate eslint-plugin-vue-pug-sfc bug
shows misplaced lint warning because template tag is placed after scriptThe text was updated successfully, but these errors were encountered: