Skip to content

Commit

Permalink
doc add descriptions to vue-strong rules
Browse files Browse the repository at this point in the history
  • Loading branch information
rrd108 committed Aug 6, 2024
1 parent 2f59516 commit c7779c9
Show file tree
Hide file tree
Showing 6 changed files with 36 additions and 0 deletions.
5 changes: 5 additions & 0 deletions docs/rules/vue-strong/directive-shorthands.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,3 +6,8 @@ Checks if the template is using directive shorthands. &nbsp;&nbsp;<br />
::: warning
This rule enforces using directive shorthands for better readability. While the official style guide allows using shorthands "**always** or **never**", this rule will flag non-shorthands as code smell.
:::

## ❓ Why it's good to follow this rule?

- **Readability:** Directive shorthands are easier to read and understand and result in a shorter block of code.
- **Consistency:** Using shorthands makes the code more consistent and easier to maintain.
5 changes: 5 additions & 0 deletions docs/rules/vue-strong/prop-name-casing.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,3 +2,8 @@

Checks if the props name is in camelCase. &nbsp;&nbsp;<br />
👉 https://vuejs.org/style-guide/rules-strongly-recommended.html#prop-name-casing

## ❓ Why it's good to follow this rule?

- **Readability**: CamelCase prop names are easier to read and understand.
- **Consistency**: CamelCase prop names are consistent with the naming of files and folders.
5 changes: 5 additions & 0 deletions docs/rules/vue-strong/quoted-attribute-values.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,3 +2,8 @@

Checks if the template is using quoted attribute values. &nbsp;&nbsp;<br />
👉 https://vuejs.org/style-guide/rules-strongly-recommended.html#quoted-attribute-values

## ❓ Why it's good to follow this rule?

- **Readability:** Quoted attribute values are easier to read and understand.
- **Consistency:** Using quoted attribute values makes the code more consistent and easier to maintain.
5 changes: 5 additions & 0 deletions docs/rules/vue-strong/self-closing-components.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,3 +2,8 @@

Checks if the template is using self-closing components. &nbsp;&nbsp;<br />
👉 https://vuejs.org/style-guide/rules-strongly-recommended.html#self-closing-components

## ❓ Why it's good to follow this rule?

- **Readability:** Self-closing components are easier to read and understand and result in a shorted code block.
- **Consistency:** Using self-closing components makes the code more consistent and easier to maintain.
10 changes: 10 additions & 0 deletions docs/rules/vue-strong/simple-computed.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,3 +2,13 @@

Checks if any computed properties are bigger than 5 lines. &nbsp;&nbsp;<br />
👉 https://vuejs.org/style-guide/rules-strongly-recommended.html#simple-computed-properties

## ❓ Why it's good to follow this rule?

- **Simple Responsibility:** Shorter computed properties have a single responsibility and can be really focused.
- **Readability:** Shorter computed properties are easier to read and understand.
- **Maintainability:** Shorter computed properties are easier to maintain and refactor.
- **Performance:** Shorter computed properties are faster to compute.
- **Consistency:** Shorter computed properties are consistent with the naming of files and folders.
- **Debugging:** Shorter computed properties are easier to debug.
- **Testing:** Shorter computed properties are easier to test.
6 changes: 6 additions & 0 deletions docs/rules/vue-strong/template-simple-expression.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,3 +2,9 @@

Checks if the template is using only simple expressions. &nbsp;&nbsp;<br />
👉 https://vuejs.org/style-guide/rules-strongly-recommended.html#simple-expressions-in-templates

## ❓ Why it's good to follow this rule?

- **Simplicity:** Simple expressions are easier to read and understand.
- **Readability:** Simple expressions are easier to read and understand.
- **Consistency:** Using simple expressions makes the code more consistent and easier to maintain.

0 comments on commit c7779c9

Please sign in to comment.