Skip to content

Commit a9aa2bd

Browse files
committed
Improve tests for name-property-casing & improve documentation
1 parent 49b40d6 commit a9aa2bd

30 files changed

+126
-53
lines changed

lib/rules/html-end-tags.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ const utils = require('../utils')
1919
* Creates AST event handlers for html-end-tags.
2020
*
2121
* @param {RuleContext} context - The rule context.
22-
* @returns {object} AST event handlers.
22+
* @returns {Object} AST event handlers.
2323
*/
2424
function create (context) {
2525
utils.registerTemplateBodyVisitor(context, {

lib/rules/html-no-self-closing.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ const utils = require('../utils')
1919
* Creates AST event handlers for html-no-self-closing.
2020
*
2121
* @param {RuleContext} context - The rule context.
22-
* @returns {object} AST event handlers.
22+
* @returns {Object} AST event handlers.
2323
*/
2424
function create (context) {
2525
utils.registerTemplateBodyVisitor(context, {

lib/rules/html-quotes.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ const utils = require('../utils')
1919
* Creates AST event handlers for html-quotes.
2020
*
2121
* @param {RuleContext} context - The rule context.
22-
* @returns {object} AST event handlers.
22+
* @returns {Object} AST event handlers.
2323
*/
2424
function create (context) {
2525
const sourceCode = context.getSourceCode()

lib/rules/name-property-casing.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -21,11 +21,11 @@ function create (context) {
2121

2222
return utils.executeOnVue(context, (obj) => {
2323
const node = obj.properties
24-
.filter(item => (
24+
.find(item => (
2525
item.type === 'Property' &&
2626
item.key.name === 'name' &&
2727
item.value.type === 'Literal'
28-
))[0]
28+
))
2929

3030
if (!node) return
3131

lib/rules/no-confusing-v-for-v-if.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ function isUsingIterationVar (vIf) {
3434
* Creates AST event handlers for no-confusing-v-for-v-if.
3535
*
3636
* @param {RuleContext} context - The rule context.
37-
* @returns {object} AST event handlers.
37+
* @returns {Object} AST event handlers.
3838
*/
3939
function create (context) {
4040
utils.registerTemplateBodyVisitor(context, {

lib/rules/no-duplicate-attributes.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ function getName (attribute) {
3434
* Creates AST event handlers for no-duplicate-attributes.
3535
*
3636
* @param {RuleContext} context - The rule context.
37-
* @returns {object} AST event handlers.
37+
* @returns {Object} AST event handlers.
3838
*/
3939
function create (context) {
4040
const names = new Set()

lib/rules/no-invalid-template-root.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ const utils = require('../utils')
1919
* Creates AST event handlers for no-invalid-template-root.
2020
*
2121
* @param {RuleContext} context - The rule context.
22-
* @returns {object} AST event handlers.
22+
* @returns {Object} AST event handlers.
2323
*/
2424
function create (context) {
2525
const sourceCode = context.getSourceCode()

lib/rules/no-invalid-v-bind.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ const VALID_MODIFIERS = new Set(['prop', 'camel', 'sync'])
2121
* Creates AST event handlers for no-invalid-v-bind.
2222
*
2323
* @param {RuleContext} context - The rule context.
24-
* @returns {object} AST event handlers.
24+
* @returns {Object} AST event handlers.
2525
*/
2626
function create (context) {
2727
utils.registerTemplateBodyVisitor(context, {

lib/rules/no-invalid-v-cloak.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ const utils = require('../utils')
1919
* Creates AST event handlers for no-invalid-v-cloak.
2020
*
2121
* @param {RuleContext} context - The rule context.
22-
* @returns {object} AST event handlers.
22+
* @returns {Object} AST event handlers.
2323
*/
2424
function create (context) {
2525
utils.registerTemplateBodyVisitor(context, {

lib/rules/no-invalid-v-else-if.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ const utils = require('../utils')
1919
* Creates AST event handlers for no-invalid-v-else-if.
2020
*
2121
* @param {RuleContext} context - The rule context.
22-
* @returns {object} AST event handlers.
22+
* @returns {Object} AST event handlers.
2323
*/
2424
function create (context) {
2525
utils.registerTemplateBodyVisitor(context, {

0 commit comments

Comments
 (0)