<commit_before>/**
 * Interactive Linter Copyright (c) 2015 <NAME>.
 *
 * Licensed under MIT
 */

define(function(require /*, exports, module*/) {
    "use strict";

    var utils          = require("libs/utils");
    var jshint         = require("../jshint/main");
    var reacttools     = require("jsx/libs/reacttools");
    var defaultOptions = JSON.parse(require("text!jsx/default.json"));
    var settings       = JSON.parse(require("text!jsx/settings.json"));


    function lint(source, options) {
        options = utils.mixin({}, defaultOptions, options);
        var result;

        try {
            result = reacttools.transform(source);
        }
        catch(ex) {
            return [{
                type: "error",
                reason: ex.description,
                token:{
                    start: {
                        line: ex.lineNumber - 1,
                        ch: ex.column ? ex.column - 1 : ex.column
                    },<commit_msg>tweaked how jshint is included in the jsx linter<commit_after>/**
 * Interactive Linter Copyright (c) 2015 <NAME>.
 *
 * Licensed under MIT
 */

define(function(require /*, exports, module*/) {
    "use strict";

    var utils          = require("libs/utils");
    var jshint         = require("jshint");
    var reacttools     = require("jsx/libs/reacttools");
    var defaultOptions = JSON.parse(require("text!jsx/default.json"));
    var settings       = JSON.parse(require("text!jsx/settings.json"));


    function lint(source, options) {
        options = utils.mixin({}, defaultOptions, options);
        var result;

        try {
            result = reacttools.transform(source);
        }
        catch(ex) {
            return [{
                type: "error",
                reason: ex.description,
                token:{
                    start: {
                        line: ex.lineNumber - 1,
                        ch: ex.column ? ex.column - 1 : ex.column
                    },
{'fraction_non_alphanumeric': 0.12733703890853967, 'fraction_numerical': 0.00606366851945427, 'mean_word_length': 1.643524699599466, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 5, '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': '7458019', 'n_tokens_mistral': 562, 'n_tokens_neox': 525, 'n_words': 124}