Skip to content

Commit

Permalink
feat: update set
Browse files Browse the repository at this point in the history
  • Loading branch information
waynzh committed Aug 30, 2024
1 parent 4a4ad4b commit ce2d8d5
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions lib/rules/no-deprecated-delete-set.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,9 @@
const utils = require('../utils')
const { findVariable } = require('@eslint-community/eslint-utils')

const deprecatedApis = ['set', 'delete']
const deprecatedApis = new Set(['set', 'delete'])
const deprecatedImportApis = new Set(['set', 'del'])
const deprecatedDollarApis = new Set(deprecatedApis.map((item) => `$${item}`))
const deprecatedDollarApis = new Set(['$set', '$delete'])

/**
* @param {Expression|Super} node
Expand Down Expand Up @@ -54,7 +54,7 @@ module.exports = {

// Vue 2 Global API: Vue.set()
if (
deprecatedApis.includes(identifier.name) &&
deprecatedApis.has(identifier.name) &&
identifier.parent.type === 'MemberExpression' &&
isVue(identifier.parent.object) &&
identifier.parent.parent.type === 'CallExpression' &&
Expand Down

0 comments on commit ce2d8d5

Please sign in to comment.