question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Supports for <script setup> and <style> variable injection

See original GitHub issue

Vue.js 3.0 is about to include <script setup> and <style vars> as experimental features. (refer to https://github.com/vuejs/rfcs/issues/189)

It seems that can write script like function arguments in <script setup="..."> and script like object expression in <style vars="...">.

Can vue-eslint-parser be changed to support these parsers?

If the parser supports these parses then, I have one more question to ask.
Perhaps the arguments given to <script setup> will need to be registered with the scope manager as global variables.
Should the parser register this global variable? Or is it okay if the vue/experimental-script-setup-vars rules etc. register (and remove from through) global variables?


EIDT:


Related to https://github.com/vuejs/eslint-plugin-vue/issues/1248.

Issue Analytics

  • State:closed
  • Created 3 years ago
  • Reactions:3
  • Comments:5 (2 by maintainers)

github_iconTop GitHub Comments

3reactions
aggmoulikcommented, Oct 19, 2020

Okay, So let’s do that discussion.

2reactions
aggmoulikcommented, Oct 17, 2020

Anyone is working on this issue ?

Read more comments on GitHub >

github_iconTop Results From Across the Web

Supports for <script setup> and <style> variable injection #1248
Add valid-style-vars rule that checks whether <style vars="..."> is valid expression. Add no-vars-setup-export-default rule that disallows ...
Read more >
<script setup> | Vue.js
<script setup> is a compile-time syntactic sugar for using Composition API inside Single-File Components (SFCs). It is the recommended syntax if you are ......
Read more >
Vue 3: Support new <script setup> without ref sugar - YouTrack
PhpStorm keeps telling me I'm using undefined variables and deletes component imports..
Read more >
Define variables - Azure Pipelines | Microsoft Learn
Azure Pipelines supports three different ways to reference variables: macro, template expression, and runtime expression.
Read more >
Where variables can be used - GitLab Docs
Not supported: variables defined inside of scripts (for example, export MY_VARIABLE="test" ). The runner uses Go's os.Expand() method for variable expansion. It ...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found