Invalid option: '; _; ' when creating twitter bootstrap

I just installed and configured the environment for creating custom versions of Twitter Bootstrap locally.

This is what I did:

  • Install node
  • Install npm
  • Install less
  • bootstrap clone locally
  • run make build to compile Bootstrap

Step 5:

 ~/devel/parking/bootstrap$ make build jshint js/*.js --config js/.jshintrc js/bootstrap-affix.js: line 23, col 17, Bad option: ';_;'. js/bootstrap-alert.js: line 23, col 17, Bad option: ';_;'. js/bootstrap-button.js: line 23, col 17, Bad option: ';_;'. js/bootstrap-carousel.js: line 23, col 17, Bad option: ';_;'. js/bootstrap-collapse.js: line 23, col 17, Bad option: ';_;'. js/bootstrap-dropdown.js: line 23, col 17, Bad option: ';_;'. js/bootstrap-modal.js: line 23, col 17, Bad option: ';_;'. js/bootstrap-popover.js: line 23, col 17, Bad option: ';_;'. js/bootstrap-scrollspy.js: line 23, col 17, Bad option: ';_;'. js/bootstrap-tab.js: line 23, col 17, Bad option: ';_;'. js/bootstrap-tooltip.js: line 24, col 17, Bad option: ';_;'. js/bootstrap-transition.js: line 23, col 17, Bad option: ';_;'. js/bootstrap-typeahead.js: line 23, col 17, Bad option: ';_;'. 13 errors make: *** [test] Error 2 

Line 23:

 "use strict"; // jshint ;_; 

I was able to solve the problem with deleting // jshint ;_; from line 23. Although I would prefer to leave Bootstrap sources untouched.

How can I get rid of these errors and what does the Bad Option error mean?


JS / .jshintrc:

 { "validthis": true, "laxcomma" : true, "laxbreak" : true, "browser" : true, "eqnull" : true, "debug" : true, "devel" : true, "boss" : true, "expr" : true, "asi" : true } 
+7
source share
3 answers

I met the same error just now, after looking for a download problem,

I found a solution by looking at them: https://github.com/twitter/bootstrap/pull/5244 https://github.com/twitter/bootstrap/issues/7043

+4
source

The problem today is that the latest version of JSHint is not compatible with the current Bootstrap Makefile, because previous silent warnings now cause errors.

Uninstall JSHint npm uninstall jshint , and then install version 0.9.1 npm install jshint@0.9.1 . Finally run make and it will compile successfully.

+17
source

Just removing JSHint did not do this for me. Here is what I did after this tip .

 cd bootstrap npm uninstall -g uglify-js jshint recess connect npm uninstall uglify-js jshint recess connect npm install mkdir bin cd bin ln -s ../node_modules/*/bin/* . ; ln -s hint jshint cd .. export PATH=$PATH:$PWD/bin 

After this cleanup, simply run:

 make 

or any other make directive.

+3
source

All Articles