def get_local_eslint(dirname):
pkg = PluginUtils.findup('node_modules/eslint', dirname)
if pkg == None:
return None
else:
path = PluginUtils.get_pref("local_eslint_path").get(sublime.platform())
d = os.path.dirname(os.path.dirname(pkg))
esl = os.path.join(d, path)
if os.path.isfile(esl):
return esl
else:
return None
评论列表
文章目录