{"id":16935064,"url":"https://github.com/codeskyblue/jshunter","last_synced_at":"2026-05-19T02:45:30.773Z","repository":{"id":9165933,"uuid":"10963464","full_name":"codeskyblue/jshunter","owner":"codeskyblue","description":"javascript static check, based on jslint, output html report","archived":false,"fork":false,"pushed_at":"2013-10-16T03:36:52.000Z","size":4324,"stargazers_count":2,"open_issues_count":1,"forks_count":0,"subscribers_count":3,"default_branch":"master","last_synced_at":"2025-01-26T01:17:37.435Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":"LLNL/spack","license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/codeskyblue.png","metadata":{"files":{"readme":"README.md","changelog":"HISTORY","contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2013-06-26T09:07:43.000Z","updated_at":"2020-05-20T08:54:31.000Z","dependencies_parsed_at":"2022-09-01T09:20:51.874Z","dependency_job_id":null,"html_url":"https://github.com/codeskyblue/jshunter","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/codeskyblue%2Fjshunter","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/codeskyblue%2Fjshunter/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/codeskyblue%2Fjshunter/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/codeskyblue%2Fjshunter/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/codeskyblue","download_url":"https://codeload.github.com/codeskyblue/jshunter/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":244735976,"owners_count":20501384,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-10-13T20:53:36.312Z","updated_at":"2026-05-19T02:45:25.730Z","avatar_url":"https://github.com/codeskyblue.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"\t\t_   __  _  _\n\t\t|  /  \\ |  |            |\n\t\t|  \\__  |__|      __  __|__ __  | ~\n\t\t|     \\ |  | | | /  \\   |  /__\\ |/\n\t \\_ /  \\_ / |  | \\_/ |  |   \\_ \\__  |\n \n\nNotice: Only support linux platform.\n\n## Dependency\n* python \u003e= 2.6\n\n## Why need jshunter\njs是门优秀的语言。只是因为一些不好的特性，使得他的名声不是太好。\n*另外js不是java，我过去也弄混过。*\n\njava这门语言也确实搞过一些的web小应用，不过现在已经很难见到。只留下js这一门语言。\n也足以证明这门语法无比灵活的语言，生命力有多强了。\n\njs因为他太灵活了，所以也太容易出错了。js的开发者也很无奈，因为每一项新的feature加入了进去，\n不管这feature是好是坏，只要有人用，你就不能把他给删了。\n\n所以js有那么多的问题，也是可以理解的。\n新入门js的可能不太清楚这些坑，大多书上也没提，还大张旗鼓的把那些烂代码copy来copy去。\n\n我举几个简单的例子：\n\n\t'' == '0' // false\n\t0 == ''   // true\n\tfalse == undefined // false\n\tfalse == null\t   // false\n\tnull == undefined  // true\n\n怎么样，晕了吧。js里的==符号就是一个设计失败。建议的是全部使用===和!==代替。\n\n其他的不列举了.....  有本书写的很好**JavaScript语言精髓**，警告了你那些特性你不应该尝试。\n\n好在还有[jslint](http://www.jslint.com/)这种静态代码检查的工具可以用。\n\n有网页版的jslint，不过控制台上办公的码仔们，还是希望有个控制台的东西。所以就有了这款jshunter。\n\n程序用python开发，使用了一个编译后的v8-shell。\n\n## How to use\nuse `./hint.py --help` for more help\n\nThe simple usage is `./hint.py -r report.html test1.js test2.js\n\n## Test if it can work.\n\n\t$ ./hint.py  test/sample.js \n\tfilecount = 1\n\tProcess file: test/sample.js\n\t/home/shxsun/goproj/src/github.com/shxsun/jshunter/test/sample.js***'a' was used before it was defined.***13***7***var a = 1;\n\t/home/shxsun/goproj/src/github.com/shxsun/jshunter/test/sample.js***'b' was used before it was defined.***16***1***print('hello');\n\tError number: 0\n\n不加report.html的输出就是以***分割的。分别代表`文件名，错误描述，行号，列号，代码`\n\n## Extract Regrex\nfor html, php ... Extract Regrex\n\n\t(r'\u003cscript type=[\\'\"]?text/javascript[\\'\"]?\u003e.*?\u003c/script\u003e', re.M|re.S)\n\nInstall:\n    No need to make; make install; Just copy to some folder, that's all\n\nHow to use:\n    see ./hint.py --help\n    \nFINISH:\n    v8 engine add\n    plugin support\n    --plugin --config support\nTODO:\n    compress js ignore\n\n## Friendly link\n* \u003chttp://www.jshint.com/\u003e\n* \u003chttp://www.jslint.com/\u003e\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcodeskyblue%2Fjshunter","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fcodeskyblue%2Fjshunter","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcodeskyblue%2Fjshunter/lists"}