Commit 7bac584c authored by Ola Bini's avatar Ola Bini

Add support for JSHint - a helper script to include .jsm files and

.jshintrc for configuration.

Contribution from Fan Jiang, Iván Pazmiño and Ola Bini.
parent 6abbdacc
{
"moz": true,
"predef": ["Components", "XPCOMUtils"]
}
#!/usr/bin/env bash
#
# This Source Code Form is subject to the terms of the Mozilla Public
# License, v. 2.0. If a copy of the MPL was not distributed with this
# file, You can obtain one at http://mozilla.org/MPL/2.0/.
#
# To run, install node and npm, then install jshint:
# sudo npm install jshint -g
if command -v realpath>/dev/null 2>&1; then
CURRENT_FILE=`realpath "$0"`
else
CURRENT_FILE="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )/$(basename $0)"
fi
STATIC_ANALYSIS_DIR=`dirname "$CURRENT_FILE"`
if [ "$#" -eq 0 ]; then
TESTS=package
else
TESTS="$@"
fi
jshint --config $STATIC_ANALYSIS_DIR/../.jshintrc -e .jsm $TESTS
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment