<commit_before>const gulp = require('gulp')
const tslint = require('gulp-tslint')
const tsLintLib = require('tslint')
const eslint = require('gulp-eslint')

const tslintProgram = tsLintLib.Linter.createProgram('./tsconfig.json')

gulp.task('lint', [
  'lint:ts',
  'lint:js:built',
  'lint:js:node',
  'lint:js:tests',
  'ts-types' // make sure typescript defs compile without errors
])

gulp.task('lint:ts', function() {
  return gulp.src([
    'src/**/*.ts',
    'plugins/**/*.ts'
  ])
    .pipe(
      tslint({ // will use tslint.json
        formatter: 'verbose',
        program: tslintProgram // for type-checking rules
      })
    )
    .pipe(tslint.report())
})

gulp.task('lint:js:built', [ 'webpack:dev' ], function() {
  return gulp.src([
    'dist/*.js',
    '!dist/*.min.js'
  ])
    .pipe(
      eslint({ // only checks that globals are properly accessed
        parserOptions: { 'ecmaVersion': 3 }, // for IE9
        envs: [ 'browser', 'commonjs', 'amd' ],
        rules: { 'no-undef': 2 }
      })
    )
    .pipe(eslint.format())
    .pipe(eslint.failAfterError())
})

gulp.task('lint:js:node', function() {
  return gulp.src([
    '*.js', // config files in root
    'tasks/**/*.js'
  ])
    .pipe(<commit_msg>lint better with release<commit_after>const gulp = require('gulp')
const tslint = require('gulp-tslint')
const tsLintLib = require('tslint')
const eslint = require('gulp-eslint')

const tslintProgram = tsLintLib.Linter.createProgram('./tsconfig.json')

gulp.task('lint', [
  'lint:ts',
  'lint:js:built',
  'lint:js:node',
  'lint:js:tests',
  'ts-types' // make sure typescript defs compile without errors
])

gulp.task('lint:ts', function() {
  return gulp.src([
    'src/**/*.ts',
    'plugins/**/*.ts'
  ])
    .pipe(
      tslint({ // will use tslint.json
        formatter: 'verbose',
        program: tslintProgram // for type-checking rules
      })
    )
    .pipe(tslint.report())
})

gulp.task('lint:js:built', [ 'webpack' ], function() {
  return gulp.src([
    'dist/*.js',
    '!dist/*.min.js'
  ])
    .pipe(
      eslint({ // only checks that globals are properly accessed
        parserOptions: { 'ecmaVersion': 3 }, // for IE9
        envs: [ 'browser', 'commonjs', 'amd' ],
        rules: { 'no-undef': 2 }
      })
    )
    .pipe(eslint.format())
    .pipe(eslint.failAfterError())
})

gulp.task('lint:js:node', function() {
  return gulp.src([
    '*.js', // config files in root
    'tasks/**/*.js'
  ])
    .pipe(
{'fraction_non_alphanumeric': 0.19497365220916094, 'fraction_numerical': 0.0024321037697608433, 'mean_word_length': 2.820433436532508, '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': '2586510', 'n_tokens_mistral': 898, 'n_tokens_neox': 886, 'n_words': 178}