securityos/node_modules/eslint-plugin-unicorn/rules/fix/remove-parentheses.js

12 lines
294 B
JavaScript

'use strict';
const {getParentheses} = require('../utils/parentheses.js');
function * removeParentheses(node, fixer, sourceCode) {
const parentheses = getParentheses(node, sourceCode);
for (const token of parentheses) {
yield fixer.remove(token);
}
}
module.exports = removeParentheses;