🔥码云GVP开源项目 12k star Uniapp+ElementUI 功能强大 支持多语言、二开方便! 广告
# C.46 JsHintTask This task runs [JSHint](http://www.jshint.com/), a tool that helps to detect errors and potential problems in JavaScript code. JSHint 2.5.6+ is supported, although latest JSHint is recommended. Table C.55:聽Attributes NameTypeDescriptionDefaultRequired`file``String`Single file to perform check on.n/aNo, unless no `fileset` elements are present`haltOnError``boolean`Should the build fail when there are errors in the JS code?falseNo`haltOnWarning``boolean`Should the build fail when there are warnings in the JS code?falseNo`reporter``String`JSHint reporter.checkstyleNo`checkstyleReportPath``String`Path where the the report in Checkstyle format should be saved.n/aNo`config``String`JSHint config path.n/aNo C.46.1 Example ``` <jshint haltonerror="false" haltOnWarning="false" reporter="jslint" checkstyleReportPath="${project.basedir}/build/checkstyle-jshint.xml"> <fileset dir="${project.basedir}/public_html/www/js"> <include name="**/**.js"/> <exclude name="js-cache/**"/> </fileset> </jshint> ``` C.46.2 Supported Nested Tags - `fileset`