'use strict';

module.exports = {
    name: 'singleLinePerSelector',
    nodeTypes: ['ruleset'],
    message: 'Each selector should be on its own line.',

    lint: function singleLinePerSelectorLinter (config, node) {
        var report = false;
        var results = [];
        var self = this;

        node.forEach('delimiter', function (element, index) {
            element = node.get(index + 1);

            // Check if the delimiter is on the next line
            if (!element.is('space')) {
                element = node.get(index - 1);
            }

<<<<<<< HEAD
            if (element.content.indexOf('\n') === -1) {
=======
            switch (config.style) {
                case '18f':
                    node.forEach('selector', function (selector) {
                        selector = selector.first().first('ident').content;

                        if (selector.length >= 5) {
                            report = true;
                            return;
                        }
                    });

                    break;
                default:
                    report = true;

                    break;
            }

            if (report && element.content.indexOf('\n') === -1) {
>>>>>>> singleLinePerSelector-18f-option
                results.push({
                    column: element.start.column,
                    line: element.start.line,
                    message: self.message
                });
            }
        });

        if (results.length) {
            return results;
        }
    }
};

@@ -562,85 +562,8 @@
  %7D%0A%0A
-%3C%3C%3C%3C%3C%3C%3C HEAD%0A            if (element.content.indexOf('%5Cn') === -1) %7B%0A=======%0A
     
@@ -1148,49 +1148,8 @@
 ) %7B%0A
-%3E%3E%3E%3E%3E%3E%3E singleLinePerSelector-18f-option%0A
     

Remove stray Git conflict markers