<commit_before>"use babel";
import { extname } from 'path';
import { rangeFromLineNumber, exec } from 'atom-linter';

export default {
  config: {
    rubyLintExecutablePath: {
      type: "string",
      default: "ruby-lint"
    },
    ignoredExtensions: {
      type: 'array',
      default: ['erb', 'md'],
      items: {
        type: 'string'
      }
    },
    ignoredFilenames: {
      type: 'array',
      default: ['Gemfile'],
      items: {
        type: 'string'
      }
    },
    skippedChecks: {
      type: 'array',
      default: [],
      items: {
        type: 'string'
      }
    }
  },

  activate: () => {
    require("atom-package-deps").install();
  },

  provideLinter: () => {
    return {
      name: "ruby-lint",
      grammarScopes: ["source.ruby", "source.ruby.rails", "source.ruby.rspec"],
      scope: "file",
      lintOnFly: false,
      lint: (activeEditor) => {
        const command = atom.config.get("linter-ruby-lint.rubyLintExecutablePath");
        const ignoredExts = atom.config.get("linter-ruby-lint.ignoredExtensions");
        const ignoredFiles = atom.config.get("linter-ruby-lint.ignoredFilenames");
        const skippedChecks = atom.config.get("linter-ruby-lint.skippedChecks");
        const filePath = activeEditor.getPath();
        const fileExtension = extname(filePath).substr(1);

        for (let extension of ignoredExts) {
          if (fileExtension === extension) return [];
        }
        for (let fileName of ignoredFiles) {
            if (filePath.endsWith(fileName)) return [];
        }

        return exec(command, [filePath, '-p=json'], { stream: 'both' }).then(output => {
          var toReturn = [];<commit_msg>Properly declare the member functions<commit_after>"use babel";
import { extname } from 'path';
import { rangeFromLineNumber, exec } from 'atom-linter';

export default {
  config: {
    rubyLintExecutablePath: {
      type: "string",
      default: "ruby-lint"
    },
    ignoredExtensions: {
      type: 'array',
      default: ['erb', 'md'],
      items: {
        type: 'string'
      }
    },
    ignoredFilenames: {
      type: 'array',
      default: ['Gemfile'],
      items: {
        type: 'string'
      }
    },
    skippedChecks: {
      type: 'array',
      default: [],
      items: {
        type: 'string'
      }
    }
  },

  activate() {
    require("atom-package-deps").install();
  },

  provideLinter() {
    return {
      name: "ruby-lint",
      grammarScopes: ["source.ruby", "source.ruby.rails", "source.ruby.rspec"],
      scope: "file",
      lintOnFly: false,
      lint: (activeEditor) => {
        const command = atom.config.get("linter-ruby-lint.rubyLintExecutablePath");
        const ignoredExts = atom.config.get("linter-ruby-lint.ignoredExtensions");
        const ignoredFiles = atom.config.get("linter-ruby-lint.ignoredFilenames");
        const skippedChecks = atom.config.get("linter-ruby-lint.skippedChecks");
        const filePath = activeEditor.getPath();
        const fileExtension = extname(filePath).substr(1);

        for (let extension of ignoredExts) {
          if (fileExtension === extension) return [];
        }
        for (let fileName of ignoredFiles) {
            if (filePath.endsWith(fileName)) return [];
        }

        return exec(command, [filePath, '-p=json'], { stream: 'both' }).then(output => {
          var toReturn = [];
{'fraction_non_alphanumeric': 0.1511216056670602, 'fraction_numerical': 0.0005903187721369539, 'mean_word_length': 2.378863409770688, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 9, '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': '45289', 'n_tokens_mistral': 1075, 'n_tokens_neox': 1042, 'n_words': 210}