1
0

run_jshint 1000 B

123456789101112131415161718192021222324252627282930
  1. #!/usr/bin/env bash
  2. # You may redistribute this program and/or modify it under the terms of
  3. # the GNU General Public License as published by the Free Software Foundation,
  4. # either version 3 of the License, or (at your option) any later version.
  5. #
  6. # This program is distributed in the hope that it will be useful,
  7. # but WITHOUT ANY WARRANTY; without even the implied warranty of
  8. # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  9. # GNU General Public License for more details.
  10. #
  11. # You should have received a copy of the GNU General Public License
  12. # along with this program. If not, see <https://www.gnu.org/licenses/>.
  13. main()
  14. {
  15. pwd | grep 'node_build' && cd ..
  16. echo "Installing JSHint..."
  17. npm install jshint -s || return 1
  18. JSHINT="`pwd`/node_modules/jshint/bin/jshint"
  19. echo "Running JSHint..."
  20. ${JSHINT} --config .jshintrc \
  21. --exclude-path .jshintignore \
  22. --reporter node_build/JSHintReporter.js . || return 1
  23. return 0
  24. }
  25. main