Closed
Description
Please describe what the rule should do:
Enforce the various new recommendations from the official Vue Style Guide. This is probably closer to an epic to track being able to lint the below, as opposed to a single rule request
What category of rule is this?
- Enforces Code Style
- Warns about a potential error
- Suggests an alternative way of doing something
- Other (please specify)
Provide 2-3 code examples that this rule will warn about
- Multi-word Component Names (on/off)
- Component data (
no-shared-component-data
) - Prop Definitions (require type?)
- Keyed
v-for
(valid-v-for) -
scoped
styling (on/off with component name/glob ignores) - Private property names - Not sure if this one is do-able? Maybe check to see if a method starts with
_
,$
, or$_
and lint for$_PLUGIN_
- Component Files
- Single-file component filename casing
- Base component names - Maybe by glob with a prefix?
- Single-instance component names - Again, not sure if this is needed? Maybe lint to see if a component doesn't accept props, and if not, recommend that?
- Tightly coupled component names - Again, not entirely sure how to lint this. Maybe count places where a given component is used and recommend based on that?
- Order of words in component names - No idea how to actually do this
- Self-closing components may be covered in
html-self-closing
but may not? - Component name casing in templates
- Component name casing in JS/JSX
- Abbreviations in component names - Not sure how to actually do this
- Prop name casing partially in
name-property-casing
. Default should becamelCase
, and will need another for the actual HTML properties - Multi-attribute elements - Probably needs indent in place with updates to work
- Complex expressions in templates
- Complex computed properties
- Quote attribute values Resolved by
html-quotes
- Directive shorthands
- Component/instance options order
- Element attribute order
- Empty lines in component/instance options
- Single-file component top-level element order
Metadata
Metadata
Assignees
Labels
No labels