 
   deactivate: ->
     @shouldUpdatePublic = false
-    @emitter.dispose()
+    @subscriptions.dispose()
     @linterResponses.clear()
     @editorMessages.clear()
 

  constructor: ->
    @updated = false
    @publicMessages = []
    @emitter = new Emitter
    @linterResponses = new Map()
    @editorMessages = new Map()

    @shouldUpdatePublic = true
    requestAnimationFrame => @updatePublic()

  set: ({linter, messages, editor}) ->
    try validate.messages(messages) catch e then return helpers.error(e)
    if linter.scope is 'project'
      @linterResponses.set(linter, messages)
    else

{Emitter, TextEditor, CompositeDisposable} = require('atom')
validate = require('./validate')
helpers = require('./helpers')

