Skip to content

vue/experimental-script-setup-vars

prevent variables defined in <script setup> to be marked as undefined

  • ⛔ This rule was removed in eslint-plugin-vue v9.0.0.

This rule will find variables defined in <script setup="args"> and mark them as defined variables.

This rule only has an effect when the no-undef rule is enabled.

WARNING

<script setup="args"> syntax was rejected by Vue's RFC. Check out the new syntax.

📖 Rule Details

Without this rule this code triggers warning:

Now loading...

After turning on, props and emit are being marked as defined and no-undef rule doesn't report an issue.

🚀 Version

This rule was introduced in eslint-plugin-vue v7.0.0

🔍 Implementation