wishthis/node_modules/fomantic-ui/.eslint/eqeqeq-rule.js

19 lines
493 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('eqeqeq');
module.exports = ruleComposer.filterReports(
rule,
(problem) => {
if (problem.node.type === 'BinaryExpression'
&& (problem.node.operator === '==' || problem.node.operator === '!=')
&& problem.node.right.type === 'Literal'
) {
return problem;
}
return false;
}
);