eslint-plugin-sonarjs
Version:
28 lines (27 loc) • 1.46 kB
JavaScript
;
/*
* SonarQube JavaScript Plugin
* Copyright (C) SonarSource Sàrl
* mailto:info AT sonarsource DOT com
*
* You can redistribute and/or modify this program under the terms of
* the Sonar Source-Available License Version 1, as published by SonarSource Sàrl.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
* See the Sonar Source-Available License for more details.
*
* You should have received a copy of the Sonar Source-Available License
* along with this program; if not, see https://sonarsource.com/license/ssal/
*/
Object.defineProperty(exports, "__esModule", { value: true });
exports.isSortUsedForNormalizationComparison = isSortUsedForNormalizationComparison;
const compared_normalizer_js_1 = require("./compared-normalizer.js");
const json_stringify_sort_comparison_js_1 = require("./json-stringify-sort-comparison.js");
const string_join_sort_comparison_js_1 = require("./string-join-sort-comparison.js");
function isSortUsedForNormalizationComparison(call, ruleContext) {
return ((0, json_stringify_sort_comparison_js_1.isSortUsedInJsonStringifyComparison)(call, ruleContext) ||
(0, string_join_sort_comparison_js_1.isSortUsedInStringJoinComparison)(call, ruleContext) ||
(0, compared_normalizer_js_1.isSortReturnedByComparedNormalizer)(call, ruleContext));
}