diff --git a/CHANGE.md b/CHANGE.md index db1affe60..b29a642d7 100644 --- a/CHANGE.md +++ b/CHANGE.md @@ -1,6 +1,20 @@ HTMLHint change log ==================== +## ver 0.9.8 (2015-10-6) + +add: + +1. Search `.htmlhintrc` in parent directory +2. Allow comments in json +3. Support hint any file without `.html` or `.htm` extension, just like: `htmlhint test.xhtml` +4. Support json raw format in cli + +fix: + +1. fix issue: #77 `` +2. Made the descriptions and error messages of rules more clear to people + ## ver 0.9.7 (2015-3-8) fix: @@ -27,7 +41,7 @@ add: 1. add rule: src-not-empty fix: - + 1. fix attr-value-double-quotes rule: `` should result error ## ver 0.9.3 (2013-5-24) @@ -45,14 +59,14 @@ fix: add: -1. add rule: csslint +1. add rule: csslint 2. add rule: jshint 3. add rule: id-unique 4. add cli fix: -1. compatible with: +1. compatible with:
@@ -75,4 +89,4 @@ add: 10. add rule: style-disabled 11. add rule: tagname-lowercase 12. add rule: tag-pair -13. add rule: tag-self-close \ No newline at end of file +13. add rule: tag-self-close diff --git a/bin/htmlhint b/bin/htmlhint index 4b00f4f97..dab07890e 100755 --- a/bin/htmlhint +++ b/bin/htmlhint @@ -67,7 +67,16 @@ function listRules(){ function getConfig(configFile){ if(configFile === undefined){ - configFile = '.htmlhintrc'; + // find default config file in parent directory + var curDir = process.cwd(); + while(curDir){ + var tmpConfigFile = path.resolve(curDir+path.sep, '.htmlhintrc'); + if(fs.existsSync(tmpConfigFile)){ + configFile = tmpConfigFile; + break; + } + curDir = curDir.substring(0,curDir.lastIndexOf(path.sep)); + } } if(fs.existsSync(configFile)){ var config = fs.readFileSync(configFile, 'utf-8'),