Socket
Socket
Sign inDemoInstall

eslint-plugin-vue

Package Overview
Dependencies
Maintainers
5
Versions
170
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

eslint-plugin-vue - npm Package Compare versions

Comparing version 6.1.0 to 6.1.1

18

lib/rules/component-definition-name-casing.js

@@ -76,17 +76,11 @@ /**

return Object.assign({},
{
"CallExpression > MemberExpression > Identifier[name='component']" (node) {
const parent = node.parent.parent
const calleeObject = utils.unwrapTypes(parent.callee.object)
utils.executeOnCallVueComponent(context, (node) => {
if (node.arguments.length === 2) {
const argument = node.arguments[0]
if (calleeObject.type === 'Identifier' && calleeObject.name === 'Vue') {
if (parent.arguments && parent.arguments.length === 2) {
const argument = parent.arguments[0]
if (canConvert(argument)) {
convertName(argument)
}
}
if (canConvert(argument)) {
convertName(argument)
}
}
},
}),
utils.executeOnVue(context, (obj) => {

@@ -93,0 +87,0 @@ const node = obj.properties

@@ -104,17 +104,11 @@ /**

return Object.assign({},
{
"CallExpression > MemberExpression > Identifier[name='component']" (node) {
const parent = node.parent.parent
const calleeObject = utils.unwrapTypes(parent.callee.object)
utils.executeOnCallVueComponent(context, (node) => {
if (node.arguments.length === 2) {
const argument = node.arguments[0]
if (calleeObject.type === 'Identifier' && calleeObject.name === 'Vue') {
if (parent.arguments && parent.arguments.length === 2) {
const argument = parent.arguments[0]
if (canVerify(argument)) {
verifyName(argument)
}
}
if (canVerify(argument)) {
verifyName(argument)
}
}
},
}),
utils.executeOnVue(context, (object) => {

@@ -121,0 +115,0 @@ const node = object.properties

@@ -89,20 +89,11 @@ /**

return Object.assign({},
{
"CallExpression > MemberExpression > Identifier[name='component']" (node) {
const parent = node.parent.parent
const calleeObject = utils.unwrapTypes(parent.callee.object)
utils.executeOnCallVueComponent(context, (node) => {
if (node.arguments.length === 2) {
const argument = node.arguments[0]
if (calleeObject.type === 'Identifier' &&
calleeObject.name === 'Vue' &&
parent.arguments &&
parent.arguments.length === 2
) {
const argument = parent.arguments[0]
if (canVerify(argument)) {
reportIfInvalid(argument)
}
if (canVerify(argument)) {
reportIfInvalid(argument)
}
}
},
}),
utils.executeOnVue(context, (obj) => {

@@ -109,0 +100,0 @@ // Report if a component has been registered locally with a reserved name.

@@ -639,2 +639,26 @@ /**

/**
* Check call `Vue.component` and call callback.
* @param {RuleContext} _context The ESLint rule context object.
* @param {Function} cb Callback function
*/
executeOnCallVueComponent (_context, cb) {
return {
"CallExpression > MemberExpression > Identifier[name='component']": (node) => {
const callExpr = node.parent.parent
const callee = callExpr.callee
if (callee.type === 'MemberExpression') {
const calleeObject = this.unwrapTypes(callee.object)
if (calleeObject.type === 'Identifier' &&
calleeObject.name === 'Vue' &&
callee.property === node &&
callExpr.arguments.length >= 1) {
cb(callExpr)
}
}
}
}
},
/**
* Return generator with all properties

@@ -641,0 +665,0 @@ * @param {ASTNode} node Node to check

{
"name": "eslint-plugin-vue",
"version": "6.1.0",
"version": "6.1.1",
"description": "Official ESLint plugin for Vue.js",

@@ -5,0 +5,0 @@ "main": "lib/index.js",

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc