<commit_before>'use strict';

var helpers = require('../helpers');

module.exports = {
  'name': 'trailing-semicolon',
  'defaults': {
    'include': true
  },
  'detect': function (ast, parser) {
    var result = [];

    if (ast.syntax !== 'sass') {
      ast.traverseByType('block', function (block) {
        var last,
            next;

        try {
          last = block.last('declaration');
        }
        catch (e) {
          return;
        }

        block.forEach('declaration', function (item, i, parent) {
          if (item.contains('value')) {
            if (!item.last('value').contains('block')) {
              if (helpers.isEqual(last, item)) {
                if (parent.content[i + 1]) {
                  next = parent.content[i + 1];

                  if (next.type === 'declarationDelimiter') {
                    if (!parser.options.include) {
                      result = helpers.addUnique(result, {<commit_msg>Replace type checking with .is<commit_after>'use strict';

var helpers = require('../helpers');

module.exports = {
  'name': 'trailing-semicolon',
  'defaults': {
    'include': true
  },
  'detect': function (ast, parser) {
    var result = [];

    if (ast.syntax !== 'sass') {
      ast.traverseByType('block', function (block) {
        var last,
            next;

        try {
          last = block.last('declaration');
        }
        catch (e) {
          return;
        }

        block.forEach('declaration', function (item, i, parent) {
          if (item.contains('value')) {
            if (!item.last('value').contains('block')) {
              if (helpers.isEqual(last, item)) {
                if (parent.content[i + 1]) {
                  next = parent.content[i + 1];

                  if (next.is('declarationDelimiter')) {
                    if (!parser.options.include) {
                      result = helpers.addUnique(result, {
{'fraction_non_alphanumeric': 0.15723270440251572, 'fraction_numerical': 0.0020964360587002098, 'mean_word_length': 1.742816091954023, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '1984028', 'n_tokens_mistral': 563, 'n_tokens_neox': 548, 'n_words': 117}