Uh oh!
There was an error while loading.Please reload this page.
- Notifications
You must be signed in to change notification settings - Fork698
Closed
Description
**What rule do you want to change?**valid-define-options
Does this change cause the rule to produce more or fewer warnings?
no
How will the change be implemented? (New option, new default behavior, etc.)?
Add option to ignoreVariables in valid-define-options
Please provide some example code that this change will affect:
before
constCOMPONENT_NAME='ElForm'defineOptions({name:COMPONENT_NAME,// ❌ ESLint: referencing locally declared variables})
config:
{"vue/valid-define-options": ["error", {"allowVariableNamePattern":"^[A-Z_]+$" } ]}after
constCOMPONENT_NAME='ElForm'defineOptions({name:COMPONENT_NAME,// ✅ allowed})
“Because the COMPONENT_NAME variable will be used multiple times in the <script> block, but it will never change.”
What does the rule currently do for this code?
What will the rule do after it's changed?
Additional context
Metadata
Metadata
Assignees
Labels
No labels