Skip to content

What's up with vue/experimental-script-setup-vars? #1882

Closed
@FloEdelmann

Description

@FloEdelmann

The vue/experimental-script-setup-vars rule was deprecated in #1528 (first released in v7.13.0), but without any explanation or replacement rule.

It seems like vue/script-setup-uses-vars (added in #1529, will be deprecated in #1849) is actually the replacement rule, as it was also first released in v7.13.0.

However, in tests/lib/script-setup.js, vue/experimental-script-setup-vars is still hardcoded. When I try to replace it with vue/script-setup-uses-vars there, the test fails:

  1) script-setup test cases
       temporary supports.
         should not be marked.:

      AssertionError [ERR_ASSERTION]: Expected values to be strictly deep-equal:

+ expected
- actual

+[]
-[
-  {
-    "column": 37
-    "endColumn": 42
-    "endLine": 5
-    "line": 5
-    "message": "'props' is not defined."
-    "messageId": "undef"
-    "nodeType": "Identifier"
-    "ruleId": "no-undef"
-    "severity": 2
-  }
-  {
-    "column": 7
-    "endColumn": 11
-    "endLine": 6
-    "line": 6
-    "message": "'emit' is not defined."
-    "messageId": "undef"
-    "nodeType": "Identifier"
-    "ruleId": "no-undef"
-    "severity": 2
-  }
-]

CC @ota-meshi

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions