Closed
Description
eslint-plugin-vue should be change to support <script setup> and <style> variable injection.
I will list the work needed to support these on this issue.
These features were released as experimental features in Vue.js 3.0.
So I think that the inclusion or not of the changes listed here will not affect the release of eslint-plugin-vue 7.0.0.
Core
- Change the parser to parse multiple <script> blocks. (issue Supports for <script setup> and <style> variable injection vue-eslint-parser#78)
Change the parser to parse<style vars="...">
. (issue Supports for <script setup> and <style> variable injection vue-eslint-parser#78)Change the parser to parse<script setup="...">
. (issue Supports for <script setup> and <style> variable injection vue-eslint-parser#78)- more
Rules
- Add
vue/valid-define-props
rule #1560Add.no-refer-vars-script-setup-define-props
rule that disallows referencing variables indefineProps()
of<script setup>
- Add
vue/valid-define-emits
rule #1561Add.no-refer-vars-script-setup-define-emit
rule that disallows referencing variables indefineEmit()
of<script setup>
- Add
vue/no-export-in-script-setup
rule #1559 Addno-export-in-script-setup
rule that disallows ES export in<script setup>
. Change.no-parsing-error
rule to reports parsing errors in<script setup="...">
Change.no-parsing-error
rule to reports parsing errors in<style vars="...">
Addvalid-script-setup
rule that checks whether<script setup="...">
is valid arguments.Addvalid-style-vars
rule that checks whether<style vars="...">
is valid expression.Addno-vars-setup-export-default
rule that disallows referencing variables inexport default
of<script setup>
.- more
vuejs/rfcs#227
https://github.com/vuejs/rfcs/blob/script-setup-2/active-rfcs/0000-script-setup.md
vuejs/rfcs#231
https://github.com/vuejs/rfcs/blob/style-vars-2/active-rfcs/0000-sfc-style-variables.md
https://github.com/vuejs/rfcs/blob/sfc-improvements/active-rfcs/0000-sfc-script-setup.md
https://github.com/vuejs/rfcs/blob/sfc-improvements/active-rfcs/0000-sfc-style-variables.md