Skip to content

Commit faad5a3

Browse files
authored
Update README.md (#1526)
1 parent 440f593 commit faad5a3

File tree

1 file changed

+14
-13
lines changed

1 file changed

+14
-13
lines changed

README.md

Lines changed: 14 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -42,42 +42,43 @@ There are two ways to install HTMLHint: globally and locally.
4242

4343
In case you want to include HTMLHint as part of your project, you can install it locally using npm:
4444

45-
```
45+
```bash
4646
$ npm install htmlhint --save-dev
4747
```
4848

4949
After that, You can run HTMLHint on any file or directory like this:
5050

51-
```
51+
```bash
5252
$ ./node_modules/.bin/htmlhint www/index.html
5353
$ ./node_modules/.bin/htmlhint www/**/*.html
5454
```
5555

56-
Or, you can use HTMLHint linter programatically, like this:
57-
```
58-
import { HTMLHint } from 'htmlhint';
59-
const htmlVerificationHints = HTMLHint.verify(localHtmlContent);
60-
console.log('htmlVerificationHints', htmlVerificationHints); // this logs a list of `Hint`s which contain information on all linting errors
56+
Or, you can use HTMLHint linter programmatically, like this:
57+
58+
```js
59+
import { HTMLHint } from 'htmlhint'
60+
const htmlVerificationHints = HTMLHint.verify(localHtmlContent)
61+
console.log('htmlVerificationHints', htmlVerificationHints) // this logs a list of `Hint`s which contain information on all linting errors
6162
```
6263

6364
### Global Installation and Usage
6465

6566
If you want to make HTMLHint available to tools that run across all of your projects, you can install HTMLHint globally using npm:
6667

67-
```
68+
```bash
6869
$ npm install htmlhint -g
6970
```
7071

7172
After that, you can run HTMLHint on any file like this:
7273

73-
```
74+
```bash
7475
$ htmlhint www/index.html
7576
$ htmlhint www/**/*.html
7677
```
7778

7879
You can even launch HTMLHint to analyze an URL:
7980

80-
```
81+
```bash
8182
$ htmlhint https://htmlhint.com/
8283
```
8384

@@ -87,20 +88,20 @@ $ htmlhint https://htmlhint.com/
8788

8889
Search `.htmlhintrc` file in current directory and all parent directories:
8990

90-
```
91+
```bash
9192
$ htmlhint
9293
$ htmlhint test.html
9394
```
9495

9596
Custom config file:
9697

97-
```
98+
```bash
9899
$ htmlhint --config htmlhint.conf test.html
99100
```
100101

101102
Custom rules:
102103

103-
```
104+
```bash
104105
$ htmlhint --rules tag-pair,id-class-value=underline index.html
105106
```
106107

0 commit comments

Comments
 (0)