<commit_before>const gulp = require('gulp');
const ts = require('gulp-typescript');
const plumber = require('gulp-plumber');
const del = require('del');
const eslint = require('gulp-eslint');
const ava = require('gulp-ava');

const tsFiles = ['src/**/*.ts', 'test/**/*.ts'];
const tsProject = ts.createProject('tsconfig.json');


gulp.task('compile', () => {
  return gulp.src(tsFiles, {base: './'})
    .pipe(plumber())
    .pipe(tsProject())
    .pipe(gulp.dest('build'));
});

gulp.task('watch', () => {
  gulp.watch(tsFiles, { ignoreInitial: false },  gulp.series('compile', 'test'));
});

gulp.task('clean', (done: any) => { 
  del(['build'], done);
});

gulp.task('test', (done: any) => {
  gulp.src('build/test/*.js')
    .pipe(ava());
  done();
});

gulp.task('lint', () => {
  const config = {
    "root": true,
    "ignorePath": ".gitignore",
    "useEslintrc": false,
    "extensions": [".ts"],
    "warnFileIgnored": true,
    "extends": [
     'eslint:recommended',
      'plugin:@typescript-eslint/eslint-recommended',
      'plugin:@typescript-eslint/recommended',
    ],
    envs: ["node"],
    "plugins": [
      "@typescript-eslint"
    ],
    "parser": "@typescript-eslint/parser",
    "parserOptions": {
      "project": "./tsconfig.json",
      "ecmaVersion": 6,
      "sourceType": "module",
      "ecmaFeatures": {
        "module": true
      },
    },
    "rules": {
      "require-jsdoc": "off",
      "spaced-comment": "off"
    }
  };
  return gulp.src(tsFiles)
    .pipe(eslint(config))
    .pipe(eslint.format())
    .pipe(eslint.failAfterError());
});

gulp.task('default', gulp.series('clean', 'compile', 'watch'));<commit_msg>minor gulp<commit_after>const gulp = require('gulp');
const ts = require('gulp-typescript');
const plumber = require('gulp-plumber');
const del = require('del');
const eslint = require('gulp-eslint');
const ava = require('gulp-ava');

const tsFiles = ['src/**/*.ts', 'test/**/*.ts'];
const tsProject = ts.createProject('tsconfig.json');


gulp.task('compile', () => {
  return gulp.src(tsFiles, {base: './'})
    .pipe(plumber())
    .pipe(tsProject())
    .pipe(gulp.dest('build'));
});

gulp.task('watch', () => {
  gulp.watch(tsFiles, { ignoreInitial: false },  gulp.series('compile', 'test'));
});

gulp.task('clean', (done: any) => { 
  del(['build']);
  done();
});

gulp.task('test', (done: any) => {
  gulp.src('build/test/*.js')
    .pipe(ava());
  done();
});

gulp.task('lint', () => {
  const config = {
    "root": true,
    "ignorePath": ".gitignore",
    "useEslintrc": false,
    "extensions": [".ts"],
    "warnFileIgnored": true,
    "extends": [
     'eslint:recommended',
      'plugin:@typescript-eslint/eslint-recommended',
      'plugin:@typescript-eslint/recommended',
    ],
    envs: ["node"],
    "plugins": [
      "@typescript-eslint"
    ],
    "parser": "@typescript-eslint/parser",
    "parserOptions": {
      "project": "./tsconfig.json",
      "ecmaVersion": 6,
      "sourceType": "module",
      "ecmaFeatures": {
        "module": true
      },
    },
    "rules": {
      "require-jsdoc": "off",
      "spaced-comment": "off"
    }
  };
  const lintFiles = tsFiles.concat(['gulpfile.ts'])
  return gulp.src(lintFiles)
    .pipe(eslint(config))
    .pipe(eslint.format())
    .pipe(eslint.result((result: any) => {
        console.log(`ESLint: ${result.filePath}`);
    }))
    .pipe(eslint.failAfterError());
});

gulp.task('default', gulp.series('clean', 'compile', 'test'));
{'fraction_non_alphanumeric': 0.23172135866436386, 'fraction_numerical': 0.0005757052389176742, 'mean_word_length': 3.3710691823899372, 'pattern_counts': {'":': 34, '<': 3, '<?xml version=': 0, '>': 14, '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': '5734785', 'n_tokens_mistral': 1259, 'n_tokens_neox': 1247, 'n_words': 199}