Skip to content

Commit

Permalink
Remove unused condition
Browse files Browse the repository at this point in the history
  • Loading branch information
hudochenkov committed Dec 28, 2019
1 parent 8ebf99c commit ccaab2e
Showing 1 changed file with 1 addition and 4 deletions.
5 changes: 1 addition & 4 deletions lib/assignDisabledRanges.js
Expand Up @@ -157,10 +157,7 @@ module.exports = function(root, result) {
/** @type {number} */ (comment.source && comment.source.end && comment.source.end.line);

if (ruleToEnable === ALL_RULES) {
if (
// @ts-ignore https://github.com/stylelint/stylelint/issues/4328
Object.values(disabledRanges).every((ranges) => _.isEmpty(ranges) || !!_.last(ranges.end))
) {
if (Object.values(disabledRanges).every((ranges) => _.isEmpty(ranges))) {
throw comment.error('No rules have been disabled', {
plugin: 'stylelint',
});
Expand Down

0 comments on commit ccaab2e

Please sign in to comment.