Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Rename to
require-name-property
, remove literal value assertion, ad…
…d docs
- Loading branch information
1 parent
9ca878f
commit 2669078
Showing
3 changed files
with
77 additions
and
34 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,44 @@ | ||
--- | ||
pageClass: rule-details | ||
sidebarDepth: 0 | ||
title: vue/require-name-property | ||
description: require a component name property | ||
--- | ||
# vue/require-name-property | ||
> require a component name property | ||
## :book: Rule Details | ||
|
||
This rule requires a `name` property to be set on components. | ||
|
||
<eslint-code-block :rules="{'vue/require-name-property': ['error']}"> | ||
|
||
```vue | ||
<script> | ||
/* ✓ GOOD */ | ||
export default { | ||
name: 'OurButton' | ||
} | ||
/* ✗ BAD */ | ||
export default { | ||
name: 'OurButton' | ||
} | ||
/* ✗ BAD */ | ||
export default { | ||
notName: 'OurButton' | ||
} | ||
</script> | ||
``` | ||
|
||
</eslint-code-block> | ||
|
||
## :wrench: Options | ||
|
||
Nothing. | ||
|
||
## :mag: Implementation | ||
|
||
- [Rule source](https://github.com/vuejs/eslint-plugin-vue/blob/master/lib/rules/require-name-property.js) | ||
- [Test source](https://github.com/vuejs/eslint-plugin-vue/blob/master/tests/lib/rules/require-name-property.js) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters