wishthis/node_modules/fomantic-ui/.eslint/no-extra-parens-rule.js

18 lines
490 B
JavaScript
Raw Normal View History

2023-08-17 09:47:40 +00:00
const eslint = require('eslint');
const ruleComposer = require('eslint-rule-composer');
const rule = new eslint.Linter().getRules().get('no-extra-parens');
module.exports = ruleComposer.filterReports(
rule,
(problem) => {
if (problem.node.type === 'ConditionalExpression'
&& (problem.node.parent.type === 'ConditionalExpression' || problem.node.parent.type === 'SpreadElement')
) {
return false;
}
return problem;
}
);