JSHINT 因以下行而失败,收到错误 "Identifier 'mb_YTPlayer' is not in camel case."
JSHINT failing for below line, receiving error "Identifier 'mb_YTPlayer' is not in camel case."
$('.player').mb_YTPlayer();
此行给出错误,因为“标识符 'mb_YTPlayer' 不是驼峰式。
假设您无法更改那个奇怪的名称,只需使用以下命令忽略该特定行上的 linting:
/* jshint ignore:start */
$('.player').mb_YTPlayer();
/* jshint ignore:end */
甚至:
$('.player').mb_YTPlayer(); // jshint ignore:line
请参阅 JSHint documentation 中有关 ignore
的部分。
$('.player').mb_YTPlayer();
此行给出错误,因为“标识符 'mb_YTPlayer' 不是驼峰式。
假设您无法更改那个奇怪的名称,只需使用以下命令忽略该特定行上的 linting:
/* jshint ignore:start */
$('.player').mb_YTPlayer();
/* jshint ignore:end */
甚至:
$('.player').mb_YTPlayer(); // jshint ignore:line
请参阅 JSHint documentation 中有关 ignore
的部分。