Skip to content

Plato is listing LintErrors not found with ESLint #211

Description

@matteozambon89

My gulpfile.js

/**
 * @Author: Matteo Zambon <Matteo>
 * @Date:   2017-07-29 03:24:19
 * @Last modified by:   Matteo
 * @Last modified time: 2017-07-29 09:41:36
 */

const gulp = require('gulp')
const $ = require('gulp-load-plugins')()
const plato = require('plato')
const _ = require('lodash')

const paths = {
  'platoInput': [
    'index.js',
    'gulpfile.js',
    'config/*.js',
    'config/**/*.js',
    'api/*.js',
    'api/**/*.js'
  ],
  'platoOutput': './plato'
}

gulp.task('plato', () => {
  const asyncPipeOpts = {
    'oneTimeRun': true,
    'passThrough': true
  }

  function asyncPipeTask(opts, chunk, cb) {
    const platoOpts = {
      'jshint': null,
      'eslint': require('./.eslintrc.json')
    }
    function callback(report) {
      $.util.log('Report created!')

      cb()
    }

    plato.inspect(paths.platoInput, paths.platoOutput, platoOpts, callback)
  }

  function asyncPipeDone(errs, data) {
    _.each(errs, (err) => {
      if (err.message) {
        $.util.log('Error! ' + err.message)
      }
      else {
        $.util.log('Error!')
      }

      $.util.log(err)
    })
  }

  return gulp.src('./index.js')
    .pipe($.asyncFuncRunner(asyncPipeOpts, asyncPipeTask, asyncPipeDone))
})

This my .eslintrc.json

{
  "extends": "trails",
  "plugins": [
    "markdown",
    "json",
    "mocha"
  ],
  "globals": {
    "test": true
  },
  "rules": {
    "brace-style": [
      "warn",
      "stroustrup",
      {
        "allowSingleLine": true
      }
    ],
    "linebreak-style": [
      "error",
      "unix"
    ]
  }
}

some of the files are shows with 1 lint error but I don't understand which error is since ESLint doesn't show any

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions