<commit_before>"use strict";
var gulp = require('gulp');
var tslint = require('gulp-tslint');
var ts = require('gulp-typescript');
var del = require('del');
var mocha = require('gulp-mocha');


var SRC = {
  base: 'src',
  ts: function() {
    return [
      this.base + '/**/*.ts',
      '!' + this.base + '/**/*.spec.ts'
    ];
  },
  spec: function() {
    return [this.base + '/**/*.spec.ts']
  },
  all: function() {
    return this.ts().concat(this.spec())
  }
};

var BUILD = {
  base: 'build',
  js: function() {
    return [
      this.base + '/**/*.js',
      '!' + this.base + '/**/*.spec.js'
    ];
  },
  spec: function() {
    return [this.base + '/**/*.spec.js']
  }
};

var DIST = {base: 'dist'};

var TS_PROJECT = ts.createProject('tsconfig.json', {
  typescript: require('typescript'),
});

//////////
// compile
gulp.task('compile:ts', function() {
  return gulp
    .src(SRC.ts())
    .pipe(ts(TS_PROJECT))
    .js
    .pipe(gulp.dest(BUILD.base))
    .pipe(gulp.dest(DIST.base));
});

gulp.task('compile:spec', function() {
  return gulp
    .src(SRC.spec())
    // swallow compiler errors/warnings, since we abuse the API here
    .pipe(ts(TS_PROJECT, undefined, ts.reporter.nullReporter))
    .js
    .pipe(gulp.dest(BUILD.base));
});

gulp.task('compile', gulp.series('compile:ts', 'compile:spec'));

///////
// lint
var tslint_stream = function(glob, rules) {
  var configuration = {
    tslint: require('tslint')
  };
  if (rules) {
    configuration.rules = rules;
  }
  return gulp.src(glob)
    .pipe(tslint({configuration}))
    .pipe(tslint.report('verbose', {
      summarizeFailureOutput: true,
      emitError: false
    }));
}

gulp.task('lint:ts', function(done) {<commit_msg>fixing harmony JS<commit_after>"use strict";
var gulp = require('gulp');
var tslint = require('gulp-tslint');
var ts = require('gulp-typescript');
var del = require('del');
var mocha = require('gulp-mocha');


var SRC = {
  base: 'src',
  ts: function() {
    return [
      this.base + '/**/*.ts',
      '!' + this.base + '/**/*.spec.ts'
    ];
  },
  spec: function() {
    return [this.base + '/**/*.spec.ts']
  },
  all: function() {
    return this.ts().concat(this.spec())
  }
};

var BUILD = {
  base: 'build',
  js: function() {
    return [
      this.base + '/**/*.js',
      '!' + this.base + '/**/*.spec.js'
    ];
  },
  spec: function() {
    return [this.base + '/**/*.spec.js']
  }
};

var DIST = {base: 'dist'};

var TS_PROJECT = ts.createProject('tsconfig.json', {
  typescript: require('typescript'),
});

//////////
// compile
gulp.task('compile:ts', function() {
  return gulp
    .src(SRC.ts())
    .pipe(ts(TS_PROJECT))
    .js
    .pipe(gulp.dest(BUILD.base))
    .pipe(gulp.dest(DIST.base));
});

gulp.task('compile:spec', function() {
  return gulp
    .src(SRC.spec())
    // swallow compiler errors/warnings, since we abuse the API here
    .pipe(ts(TS_PROJECT, undefined, ts.reporter.nullReporter))
    .js
    .pipe(gulp.dest(BUILD.base));
});

gulp.task('compile', gulp.series('compile:ts', 'compile:spec'));

///////
// lint
var tslint_stream = function(glob, rules) {
  var configuration = {
    tslint: require('tslint')
  };
  if (rules) {
    configuration.rules = rules;
  }
  return gulp.src(glob)
    .pipe(tslint({configuration: configuration}))
    .pipe(tslint.report('verbose', {
      summarizeFailureOutput: true,
      emitError: false
    }));
}

gulp.task('lint:ts', function(done) {
{'fraction_non_alphanumeric': 0.21696195178623293, 'fraction_numerical': 0.0, 'mean_word_length': 2.9047619047619047, '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': '1485717', 'n_tokens_mistral': 1274, 'n_tokens_neox': 1265, 'n_words': 237}