Skip to content

Commit

Permalink
add inline rules readme
Browse files Browse the repository at this point in the history
  • Loading branch information
yaniswang committed Oct 7, 2015
1 parent 8c498ee commit 11662db
Show file tree
Hide file tree
Showing 4 changed files with 16 additions and 9 deletions.
11 changes: 9 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ Quick start
htmlhint --help
htmlhint test.html

2. result
2. results

test.html
L5 | </head>
Expand All @@ -35,7 +35,7 @@ Quick start

3. config rules

search `.htmlhintrc` file in current directory and all parents directory:
search `.htmlhintrc` file in current directory and all parent directorys:

htmlhint
htmlhint test.html
Expand All @@ -48,6 +48,13 @@ Quick start

htmlhint --rules tag-pair,id-class-value=underline test.html

Inline rules in `test.html`:

<!--htmlhint tag-pair,id-class-value:underline -->
<html>
<head>
...

Guide
=======================

Expand Down
8 changes: 4 additions & 4 deletions bin/htmlhint
Original file line number Diff line number Diff line change
Expand Up @@ -22,15 +22,15 @@ function map(val) {
program.on('--help', function(){
console.log(' Examples:');
console.log('');
console.log(' htmlhint -l');
console.log(' htmlhint -r tag-pair,id-class-value=underline test.html');
console.log(' htmlhint -c .htmlhintrc test.html');
console.log(' htmlhint --list');
console.log(' htmlhint --rules tag-pair,id-class-value=underline test.html');
console.log(' htmlhint --config .htmlhintrc test.html');
console.log('');
});

program
.version(pkg.version)
.usage('[options] <file ...>')
.usage('<file ...> [options]')
.option('-l, --list', 'show all of the rules available.')
.option('-c, --config <file>', 'custom configuration file.')
.option('-r, --rules <ruleid, ruleid=value ...>', 'set all of the rules available.', map)
Expand Down
Loading

0 comments on commit 11662db

Please sign in to comment.