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

12 lines
294 B
JavaScript
Raw Normal View History

2024-09-06 15:32:35 +00:00
'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;