Bump packages to fix linter
This commit is contained in:
parent
ed9506bbaf
commit
0a11e3fdd9
6063 changed files with 378752 additions and 306784 deletions
12
node_modules/eslint/lib/rules/accessor-pairs.js
generated
vendored
12
node_modules/eslint/lib/rules/accessor-pairs.js
generated
vendored
|
|
@ -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");
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue