Skip to content

Commit bb5383a

Browse files
authored
Merge pull request #6 from TomasDuda/master
Extend NodeLinter to support local node_modules
2 parents 8cafdfc + 9f64baa commit bb5383a

File tree

2 files changed

+8
-3
lines changed

2 files changed

+8
-3
lines changed

README.md

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,10 +13,15 @@ Before using this plugin, you must ensure that `htmlhint` is installed on your s
1313

1414
1. Install [Node.js](http://nodejs.org) (and [npm](https://github.com/joyent/node/wiki/Installing-Node.js-via-package-manager) on Linux).
1515

16-
1. Install the latest `htmlhint` by typing the following in a terminal:
16+
1. Install the latest `htmlhint` globally by typing the following in a terminal:
1717
```
1818
npm install -g htmlhint@latest
1919
```
20+
Or install `htmlhint` locally in your project folder (**you must have package.json file there**):
21+
```
22+
npm init -f
23+
npm install htmlhint@latest
24+
```
2025

2126
1. If you are using `nvm` and `zsh`, ensure that the line to load `nvm` is in `.zshenv` and not `.zshrc`.
2227

linter.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,10 +11,10 @@
1111
"""This module exports the Htmlhint plugin class."""
1212

1313
import sublime
14-
from SublimeLinter.lint import Linter, persist
14+
from SublimeLinter.lint import NodeLinter, persist
1515

1616

17-
class Htmlhint(Linter):
17+
class Htmlhint(NodeLinter):
1818

1919
"""Provides an interface to htmlhint."""
2020

0 commit comments

Comments
 (0)