securityos/node_modules/eslint-plugin-unicorn/rules/fix/remove-member-expression-pr...

12 lines
376 B
JavaScript
Raw Normal View History

2024-09-06 15:32:35 +00:00
'use strict';
const {getParenthesizedRange} = require('../utils/parentheses.js');
function removeMemberExpressionProperty(fixer, memberExpression, sourceCode) {
const [, start] = getParenthesizedRange(memberExpression.object, sourceCode);
const [, end] = memberExpression.range;
return fixer.removeRange([start, end]);
}
module.exports = removeMemberExpressionProperty;