From 9f64baa8e1c81ab1bf9ff99761b51cab969cb528 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tom=C3=A1=C5=A1=20Duda?= Date: Tue, 13 Sep 2016 23:10:10 +0200 Subject: [PATCH] Extend NodeLinter to support local node_modules --- README.md | 7 ++++++- linter.py | 4 ++-- 2 files changed, 8 insertions(+), 3 deletions(-) diff --git a/README.md b/README.md index 71e2094..fe36431 100644 --- a/README.md +++ b/README.md @@ -13,10 +13,15 @@ Before using this plugin, you must ensure that `htmlhint` is installed on your s 1. Install [Node.js](http://nodejs.org) (and [npm](https://github.com/joyent/node/wiki/Installing-Node.js-via-package-manager) on Linux). -1. Install the latest `htmlhint` by typing the following in a terminal: +1. Install the latest `htmlhint` globally by typing the following in a terminal: ``` npm install -g htmlhint@latest ``` +Or install `htmlhint` locally in your project folder (**you must have package.json file there**): + ``` + npm init -f + npm install htmlhint@latest + ``` 1. If you are using `nvm` and `zsh`, ensure that the line to load `nvm` is in `.zshenv` and not `.zshrc`. diff --git a/linter.py b/linter.py index fd33548..5349d78 100644 --- a/linter.py +++ b/linter.py @@ -11,10 +11,10 @@ """This module exports the Htmlhint plugin class.""" import sublime -from SublimeLinter.lint import Linter, persist +from SublimeLinter.lint import NodeLinter, persist -class Htmlhint(Linter): +class Htmlhint(NodeLinter): """Provides an interface to htmlhint."""