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 9.17.0 to 9.18.0

lib/utils/vue-builtin-elements.js

3

lib/rules/component-name-in-template-casing.js

@@ -126,3 +126,4 @@ /**

utils.isHtmlWellKnownElementName(node.rawName) ||
utils.isSvgWellKnownElementName(node.rawName)
utils.isSvgWellKnownElementName(node.rawName) ||
utils.isVueBuiltInElementName(node.rawName)
) {

@@ -129,0 +130,0 @@ return false

@@ -50,3 +50,4 @@ /**

case 'runtime': {
if (node.typeParameters && node.typeParameters.params.length > 0) {
const typeArguments = node.typeArguments || node.typeParameters
if (typeArguments && typeArguments.params.length > 0) {
context.report({

@@ -53,0 +54,0 @@ node,

@@ -50,3 +50,4 @@ /**

case 'runtime': {
if (node.typeParameters && node.typeParameters.params.length > 0) {
const typeArguments = node.typeArguments || node.typeParameters
if (typeArguments && typeArguments.params.length > 0) {
context.report({

@@ -53,0 +54,0 @@ node,

@@ -37,5 +37,10 @@ /**

let exportDefaultDeclaration = null
/** @type {ImportDeclaration|null} */
let lastImportDeclaration = null
return utils.compositingVisitors(
utils.defineScriptSetupVisitor(context, {
ImportDeclaration(node) {
lastImportDeclaration = node
},
onDefineOptionsEnter(node) {

@@ -113,6 +118,9 @@ defineOptionsNode = node

/** @type {VStartTag | ImportDeclaration} */
const insertAfterTag = lastImportDeclaration || scriptSetup.startTag
return [
fixer.removeRange(removeRange),
fixer.insertTextAfter(
scriptSetup.startTag,
insertAfterTag,
`\ndefineOptions(${sourceCode.getText(node.declaration)})\n`

@@ -119,0 +127,0 @@ )

@@ -50,3 +50,4 @@ /**

"VElement[name='transition'] > VElement"(node) {
if (node.parent.children[0] !== node) {
const child = node.parent.children.find(utils.isVElement)
if (child !== node) {
return

@@ -53,0 +54,0 @@ }

@@ -86,3 +86,5 @@ /**

if (ref.node.typeParameters == null) {
const typeArguments =
ref.node.typeArguments || ref.node.typeParameters
if (typeArguments == null) {
if (

@@ -89,0 +91,0 @@ ref.node.parent.type === 'VariableDeclarator' &&

@@ -50,4 +50,5 @@ /**

const typeArguments = node.typeArguments || node.typeParameters
if (node.arguments.length > 0) {
if (node.typeParameters && node.typeParameters.params.length > 0) {
if (typeArguments && typeArguments.params.length > 0) {
// `defineEmits` has both a literal type and an argument.

@@ -63,6 +64,3 @@ context.report({

} else {
if (
!node.typeParameters ||
node.typeParameters.params.length === 0
) {
if (!typeArguments || typeArguments.params.length === 0) {
emptyDefineEmits = node

@@ -69,0 +67,0 @@ }

@@ -77,5 +77,6 @@ /**

if (node.typeParameters) {
const typeArguments = node.typeArguments || node.typeParameters
if (typeArguments) {
context.report({
node: node.typeParameters,
node: typeArguments,
messageId: 'typeArgs'

@@ -82,0 +83,0 @@ })

@@ -51,4 +51,5 @@ /**

const typeArguments = node.typeArguments || node.typeParameters
if (node.arguments.length > 0) {
if (node.typeParameters && node.typeParameters.params.length > 0) {
if (typeArguments && typeArguments.params.length > 0) {
// `defineProps` has both a literal type and an argument.

@@ -64,6 +65,3 @@ context.report({

} else {
if (
!node.typeParameters ||
node.typeParameters.params.length === 0
) {
if (!typeArguments || typeArguments.params.length === 0) {
emptyDefineProps = node

@@ -70,0 +68,0 @@ }

@@ -335,5 +335,6 @@ /**

'TSTypeReference, TSInstantiationExpression'(node) {
if (node.typeParameters) {
const typeArguments = node.typeArguments || node.typeParameters
if (typeArguments) {
const firstToken = tokenStore.getFirstToken(node)
setOffset(tokenStore.getFirstToken(node.typeParameters), 1, firstToken)
setOffset(tokenStore.getFirstToken(typeArguments), 1, firstToken)
}

@@ -340,0 +341,0 @@ },

@@ -433,6 +433,7 @@ const { findVariable } = require('@eslint-community/eslint-utils')

case 'NonNullable': {
if (node.typeParameters && node.typeParameters.params[0]) {
const typeArguments = node.typeArguments || node.typeParameters
if (typeArguments && typeArguments.params[0]) {
return inferRuntimeType(
context,
node.typeParameters.params[0],
typeArguments.params[0],
checked

@@ -444,8 +445,5 @@ ).filter((t) => t !== 'null')

case 'Extract': {
if (node.typeParameters && node.typeParameters.params[1]) {
return inferRuntimeType(
context,
node.typeParameters.params[1],
checked
)
const typeArguments = node.typeArguments || node.typeParameters
if (typeArguments && typeArguments.params[1]) {
return inferRuntimeType(context, typeArguments.params[1], checked)
}

@@ -456,8 +454,5 @@ break

case 'OmitThisParameter': {
if (node.typeParameters && node.typeParameters.params[0]) {
return inferRuntimeType(
context,
node.typeParameters.params[0],
checked
)
const typeArguments = node.typeArguments || node.typeParameters
if (typeArguments && typeArguments.params[0]) {
return inferRuntimeType(context, typeArguments.params[0], checked)
}

@@ -464,0 +459,0 @@ break

@@ -279,2 +279,3 @@ [

"InsHTMLAttributes",
"InputTypeHTMLAttribute",
"InputHTMLAttributes",

@@ -281,0 +282,0 @@ "KeygenHTMLAttributes",

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

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

Sorry, the diff of this file is too big to display

Sorry, the diff of this file is too big to display

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