Skip to content

Instantly share code, notes, and snippets.

@ponko2
Created May 11, 2015 03:26
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save ponko2/da4f10e956f3c6de6ac2 to your computer and use it in GitHub Desktop.
Save ponko2/da4f10e956f3c6de6ac2 to your computer and use it in GitHub Desktop.
Atom linter-eslint plugin v0.5.4 + ESLint v0.21.0 でESLint Pluginが読み込まれない問題への応急処置
--- lib/linter-eslint.coffee
+++ lib/linter-eslint.coffee
@@ -71,6 +71,9 @@ class LinterESLint extends Linter
if @localEslint
options.plugins = config.plugins
engine = new CLIEngine(options)
+ config.plugins.forEach (key) ->
+ plugin = require(resolve("eslint-plugin-#{key}", {basedir: path.dirname(origPath)}))
+ engine.addPlugin(key, plugin)
else
isPluginRule = new RegExp("^(#{config.plugins.join('|')})/")
Object.keys(config.rules).forEach (key) ->
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment