blueprints/ember-cli-standard/index.js
function () {
    var promptRemove = this._promptRemove.bind(this)
    var removeFile = this._removeFile.bind(this)
    var ui = this.ui

    return this._findConfigFiles()
      .then(function (files) {
        if (files.length === 0) {
          ui.writeLine('No JSHint or ESLint config files found.')
          return RSVP.resolve({
            result: {
              deleteFiles: 'none'
            }
          })
        }

        ui.writeLine('\nI found the following JSHint and ESLint config files:')
        files.forEach(function (file) {
          ui.writeLine('  ' + file)
        })

        var promptPromise = ui.prompt({
          type: 'list',
          name: 'deleteFiles',
          message: 'What would you like to do?',
          choices: [
            { name: 'Remove them all', value: 'all' },
            { name: 'Remove individually', value: 'each' },
            { name: 'Nothing', value: 'none' }
          ]
        })

        return RSVP.hash({
          result: promptPromise,
          files: files
        })
      }).then(function (data) {
        var value = data.result.deleteFiles
        var files = data.files

        // Noop if we're not deleting any files
        if (value === 'none') {
          return RSVP.resolve()
        }

        if (value === 'all') {
          return RSVP.all(files.map(function (fileName) {
            return removeFile(fileName)
          }))
        }

        if (value === 'each') {
          return synchronize(files, function (fileName) {
            return promptRemove(fileName)
          })
        }
      })
  }
function () {
    var promptRemove = this._promptRemove.bind(this)
    var removeFile = this._removeFile.bind(this)
    var ui = this.ui

    return this._findConfigFiles()
      .then(function (files) {
        if (files.length === 0) {
          ui.writeLine('No JSHint or ESLint config files found.')
          return RSVP.resolve({
            result: {
              deleteFiles: 'none'
            }
          })
        }

        ui.writeLine('\nI found the following JSHint and ESLint config files:')
        files.forEach(function (file) {
          ui.writeLine('  ' + file)
        })

        var promptPromise = ui.prompt({
          type: 'list',
          name: 'deleteFiles',
          message: 'What would you like to do?',
          choices: [
            { name: 'Remove them all', value: 'all' },
            { name: 'Remove individually', value: 'each' },
            { name: 'Nothing', value: 'none' }
          ]
        })

        return RSVP.hash({
          result: promptPromise,
          files: files
        })
      }).then(function (data) {
        var value = data.result.deleteFiles
        var files = data.files

        // Noop if we're not deleting any files
        if (value === 'none') {
          return RSVP.resolve()
        }

        if (value === 'all') {
          return RSVP.all(files.map(function (fileName) {
            return removeFile(fileName)
          }))
        }

        if (value === 'each') {
          return synchronize(files, function (fileName) {
            return promptRemove(fileName)
          })
        }
      })
  }
function ( ) { var promptRemove = this . _promptRemove . bind ( this ) var removeFile = this . _removeFile . bind ( this ) var ui = this . ui return this . _findConfigFiles ( ) . then ( function ( files ) { if ( files . length === 0 ) { ui . writeLine ( 'No JSHint or ESLint config files found.' ) return RSVP . resolve ( { result : { deleteFiles : 'none' } } ) } ui . writeLine ( '\nI found the following JSHint and ESLint config files:' ) files . forEach ( function ( file ) { ui . writeLine ( '  ' + file ) } ) var promptPromise = ui . prompt ( { type : 'list' , name : 'deleteFiles' , message : 'What would you like to do?' , choices : [ { name : 'Remove them all' , value : 'all' } , { name : 'Remove individually' , value : 'each' } , { name : 'Nothing' , value : 'none' } ] } ) return RSVP . hash ( { result : promptPromise , files : files } ) } ) . then ( function ( data ) { var value = data . result . deleteFiles var files = data . files // Noop if we're not deleting any files if ( value === 'none' ) { return RSVP . resolve ( ) } if ( value === 'all' ) { return RSVP . all ( files . map ( function ( fileName ) { return removeFile ( fileName ) } ) ) } if ( value === 'each' ) { return synchronize ( files , function ( fileName ) { return promptRemove ( fileName ) } ) } } ) }
Find JSHint and ESLint configuration files and offer to remove them

@return {RSVP.Promise}
Find JSHint and ESLint configuration files and offer to remove them