-
-
Notifications
You must be signed in to change notification settings - Fork 693
Open
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
const COMPONENT_NAME = 'ElForm'
defineOptions({
name: COMPONENT_NAME, // ❌ ESLint: referencing locally declared variables
})
config:
{
"vue/valid-define-options": [
"error",
{ "allowVariableNamePattern": "^[A-Z_]+$" }
]
}
after
const COMPONENT_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