     TextBuffer = TextEditor.getBuffer()
     filePath = TextEditor.getPath()
     if filePath
-      # Lazy loading required plugins
-      mdast ?= require 'mdast'
-      lint ?= require 'mdast-lint'
-
-      # Load .mdastrc config for current file
-      conf = fin.getConfiguration filePath
-
-      # Load processor for current path
-      processor = mdast().use(lint, conf.plugins.lint)
-
-      source = TextEditor.getText()
 
       # Transform function needs to be created here
       # as we need the filePath in the errorMessage

          range: getRange message.name
        }

      new Promise (resolve, reject) ->
        processor.process source, conf.settings, (err, res, file) ->
          reject(err) if err


Configuration = require '../node_modules/mdast/lib/cli/configuration.js'

errorLoadingConfig = (error, filePath) ->
  return new Promise (resolve, reject) ->
    resolve [{
      type: 'Error'
      text: error.message
      filePath: filePath
      range: [[0,0],[0,0]]
    }]

module.exports = new class # This only needs to be a class to bind lint()

