admin管理员组文章数量:1292172
Is it possible to create a custom jshint rule, add it to existing inbuilt rules, configure it (on or off) in our projects?
Is jshint extendable, like how we create our own custom tasks in Grunt?
Sometimes we need to enforce a javascript coding practice just in our environment. For example, we want to enforce our developers to use Date.now() instead of Date.getTime().
Is it possible to create a custom jshint rule, add it to existing inbuilt rules, configure it (on or off) in our projects?
Is jshint extendable, like how we create our own custom tasks in Grunt?
Sometimes we need to enforce a javascript coding practice just in our environment. For example, we want to enforce our developers to use Date.now() instead of Date.getTime().
Share asked Feb 17, 2014 at 5:37 VijeyVijey 6,6268 gold badges44 silver badges50 bronze badges 1- See this related question: stackoverflow./questions/11816713/… – Anderson Green Commented Feb 17, 2014 at 5:39
2 Answers
Reset to default 4You should consider using ESLint in that case.
Every rule is standalone. Even the default rules. So you could take one of the default rules as a blueprint, and write your own.
There's some vague reference to how to do this in the jshint-next project on GitHub, which was apparently merged back into jshint proper at some point.
https://github./jshint/jshint-next/wiki/Design
本文标签: javascriptjshintCreate custom warningsrulesStack Overflow
版权声明:本文标题:javascript - jshint - Create custom warningsrules - Stack Overflow 内容由网友自发贡献,该文观点仅代表作者本人, 转载请联系作者并注明出处:http://www.betaflare.com/web/1741551331a2384897.html, 本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌抄袭侵权/违法违规的内容,一经查实,本站将立刻删除。
发表评论