Skip to content

Commit

Permalink
Remove unused condition
Browse files Browse the repository at this point in the history
  • Loading branch information
hudochenkov committed Jan 3, 2020
1 parent 2dfd779 commit 0cf39f6
Showing 1 changed file with 1 addition and 6 deletions.
7 changes: 1 addition & 6 deletions lib/assignDisabledRanges.js
Expand Up @@ -157,12 +157,7 @@ module.exports = function(root, result) {
/** @type {number} */ (comment.source && comment.source.end && comment.source.end.line);

if (ruleToEnable === ALL_RULES) {
if (
Object.values(disabledRanges).every(
// @ts-ignore https://github.com/stylelint/stylelint/issues/4328
(ranges) => _.isEmpty(ranges) || Boolean(_.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 0cf39f6

Please sign in to comment.