aboutsummaryrefslogtreecommitdiff
path: root/vim/ftplugin/javascript/jslint/runjslint.wsf
diff options
context:
space:
mode:
authorBen Beltran <ben@nsovocal.com>2017-03-02 23:10:51 -0600
committerBen Beltran <ben@nsovocal.com>2017-03-02 23:10:51 -0600
commit35ab4aab6926fb6cd2b44eda8bc14c72a8759b75 (patch)
tree0c08edd4f9b6a0bc9bb2780b8a496ed8c69e20a4 /vim/ftplugin/javascript/jslint/runjslint.wsf
parent0b4318740e55d6977d98872eff6bebfe948bf46f (diff)
parent28cc50d9af1fd1314afde30169dc22bba5934380 (diff)
Merge remote-tracking branch 'origin/master'
Diffstat (limited to 'vim/ftplugin/javascript/jslint/runjslint.wsf')
-rw-r--r--vim/ftplugin/javascript/jslint/runjslint.wsf48
1 files changed, 0 insertions, 48 deletions
diff --git a/vim/ftplugin/javascript/jslint/runjslint.wsf b/vim/ftplugin/javascript/jslint/runjslint.wsf
deleted file mode 100644
index d6c24bd..0000000
--- a/vim/ftplugin/javascript/jslint/runjslint.wsf
+++ /dev/null
@@ -1,48 +0,0 @@
-<job>
-<script src="jslint-core.js" language="javascript"></script>
-<script language="javascript">
-/*global JSLINT load readline WScript */
-
-var readSTDIN = function() {
- var line,
- input = [],
- emptyCount = 0,
- i;
-
- var stdIn = WScript.stdIn,
- stdOut = WScript.stdOut;
-
- while (!stdIn.atEndofStream) {
- line = stdIn.readLine();
- input.push(line);
- }
-
- return input.join("\n");
-};
-
-var body = readSTDIN() || arguments[0],
- ok = JSLINT(body),
- i,
- error,
- errorType,
- nextError,
- errorCount,
- WARN = 'WARNING',
- ERROR = 'ERROR';
-
-if (!ok) {
- errorCount = JSLINT.errors.length;
- for (i = 0; i < errorCount; i += 1) {
- error = JSLINT.errors[i];
- errorType = WARN;
- if (error && error.reason && error.reason.match(/^Stopping/) === null) {
- // If jslint stops next, this was an actual error
- if (nextError && nextError.reason && nextError.reason.match(/^Stopping/) !== null) {
- errorType = ERROR;
- }
- WScript.echo([error.line, error.character, errorType, error.reason].join(":"));
- }
- }
-}
-</script>
-</job>