Bump packages to fix linter

This commit is contained in:
Henry Mercer 2023-01-18 20:50:03 +00:00
parent ed9506bbaf
commit 0a11e3fdd9
6063 changed files with 378752 additions and 306784 deletions

View file

@ -134,13 +134,13 @@ function isPropertyDescriptor(node) {
// Rule Definition
//------------------------------------------------------------------------------
/** @type {import('../shared/types').Rule} */
module.exports = {
meta: {
type: "suggestion",
docs: {
description: "enforce getter and setter pairs in objects and classes",
category: "Best Practices",
description: "Enforce getter and setter pairs in objects and classes",
recommended: false,
url: "https://eslint.org/docs/rules/accessor-pairs"
},
@ -299,12 +299,12 @@ module.exports = {
* @private
*/
function checkPropertyDescriptor(node) {
const namesToCheck = node.properties
const namesToCheck = new Set(node.properties
.filter(p => p.type === "Property" && p.kind === "init" && !p.computed)
.map(({ key }) => key.name);
.map(({ key }) => key.name));
const hasGetter = namesToCheck.includes("get");
const hasSetter = namesToCheck.includes("set");
const hasGetter = namesToCheck.has("get");
const hasSetter = namesToCheck.has("set");
if (checkSetWithoutGet && hasSetter && !hasGetter) {
report(node, "missingGetter");