Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add support for scope analysis of <script setup> #144

Merged
merged 8 commits into from Mar 15, 2022
Merged

Add support for scope analysis of <script setup> #144

merged 8 commits into from Mar 15, 2022

Conversation

ota-meshi
Copy link
Member

@ota-meshi ota-meshi commented Feb 5, 2022

This PR adds support for scope analysis of <script setup>.

I plan to solve two main problems.

  • False positives for @typescript-eslint/consistent-type-imports

By marking how the variable was used in the template, I'm hoping that the rules that use the scope manager will work.
This change will probably make no-unused-vars rule work fine even if we remove the vue/script-setup-uses-vars rule.

Refs typescript-eslint/typescript-eslint#4508, vuejs/eslint-plugin-vue#1784

  • Compiler macros

I think that by registering the function of the compiler macro globally, it is possible to prevent false positives of the no-undef rule.
It may be possible to deprecate the 'vue/setup-compiler-macros' environment.


I think that perhaps these changes will be marked as breaking changes.

@ota-meshi ota-meshi changed the title WIP: Add support for scope analysis of <script setup> Add support for scope analysis of <script setup> Feb 7, 2022
@ota-meshi ota-meshi marked this pull request as ready for review February 7, 2022 07:21
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

1 participant