eslint-plugin-vue
eslint-plugin-vue copied to clipboard
Add `defaultOptions` to all rules
ESLint v9.17.0 introduced defaultOptions:
- Documentation: https://eslint.org/docs/latest/extend/custom-rules#option-defaults
- RFC: https://github.com/eslint/rfcs/tree/main/designs/2023-rule-options-defaults
Even though earlier ESLint versions don't have official support for this property (i.e. context.options returns the raw user-provided options rather than merged user options and default options), adding it shouldn't hurt.
In the future, we could write our own helper function to merge user options and default options and thus standardize how rules normalize the user-provided options. Also, we could automate (parts of) the rule docs' "Options" sections.