[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[elpa] master 169b1f4 028/271: Set JSLint options to not care.
From: |
Jackson Ray Hamilton |
Subject: |
[elpa] master 169b1f4 028/271: Set JSLint options to not care. |
Date: |
Thu, 05 Feb 2015 18:29:32 +0000 |
branch: master
commit 169b1f4503392904c96bdcb7845edda0a488288d
Author: Jackson Ray Hamilton <address@hidden>
Commit: Jackson Ray Hamilton <address@hidden>
Set JSLint options to not care.
---
scripts/tokenizer.js | 27 +++++++++++++++++++++++++--
1 files changed, 25 insertions(+), 2 deletions(-)
diff --git a/scripts/tokenizer.js b/scripts/tokenizer.js
index a95c3b2..4d6a913 100644
--- a/scripts/tokenizer.js
+++ b/scripts/tokenizer.js
@@ -3,6 +3,29 @@
var JSLINT = require('./jslint'),
util = require('util'),
+ // Use the most permissive set of options to increase the likelihood of a
+ // successful lint. Anything else should be a syntax error.
+ jslintOptions = {
+ ass: true,
+ bitwise: true,
+ continue: true,
+ eqeq: true,
+ evil: true,
+ forin: true,
+ maxerr: Infinity,
+ newcap: true,
+ nomen: true,
+ plusplus: true,
+ regexp: true,
+ unparam: true,
+ sloppy: true,
+ stupid: true,
+ sub: true,
+ todo: true,
+ vars: true,
+ white: true
+ },
+
// Accumulated input.
whole = '',
@@ -39,7 +62,7 @@ process.stdin.on('end', function () {
var data, globals, totals, out, i, tokens, length, cap, token, origin,
level, total;
// Generate a syntax tree for the input.
- JSLINT(whole);
+ JSLINT(whole, jslintOptions);
data = JSLINT.data();
globals = data.global;
@@ -69,7 +92,7 @@ process.stdin.on('end', function () {
// Globality is not indicated by origin function.
if (token.kind !== 'function' &&
(token.identifier &&
- globals.indexOf(token.string) > -1)) {
+ globals.indexOf(token.string) > -1)) {
level = 0;
} else {
level = origin.function.level;
- [elpa] master 0a4248b 009/271: Update chunk size., (continued)
- [elpa] master 0a4248b 009/271: Update chunk size., Jackson Ray Hamilton, 2015/02/05
- [elpa] master ffd69f5 026/271: Minutia., Jackson Ray Hamilton, 2015/02/05
- [elpa] master f349ecb 027/271: Minutia., Jackson Ray Hamilton, 2015/02/05
- [elpa] master 35453e0 015/271: Only color changed regions., Jackson Ray Hamilton, 2015/02/05
- [elpa] master 222276b 001/271: Init., Jackson Ray Hamilton, 2015/02/05
- [elpa] master 09166f9 021/271: Some progress, probably have to switch back to lexical., Jackson Ray Hamilton, 2015/02/05
- [elpa] master e448e2f 025/271: Cancelling working., Jackson Ray Hamilton, 2015/02/05
- [elpa] master 97194c7 023/271: Apply tokens with lexically-bound buffer as current., Jackson Ray Hamilton, 2015/02/05
- [elpa] master b4b86ac 033/271: Fix after-change-functions with add-hook. Fix nulls., Jackson Ray Hamilton, 2015/02/05
- [elpa] master cce215d 030/271: Add readme., Jackson Ray Hamilton, 2015/02/05
- [elpa] master 169b1f4 028/271: Set JSLint options to not care.,
Jackson Ray Hamilton <=
- [elpa] master df36161 031/271: Fix screenshot link., Jackson Ray Hamilton, 2015/02/05
- [elpa] master 16e984c 039/271: Update installation instructions., Jackson Ray Hamilton, 2015/02/05
- [elpa] master 3e6f2cf 037/271: Cleanup., Jackson Ray Hamilton, 2015/02/05
- [elpa] master bd8fc87 034/271: Restore test files. Start on uglify tokenizer., Jackson Ray Hamilton, 2015/02/05
- [elpa] master 099e8c1 003/271: Write basic tokenizer cli., Jackson Ray Hamilton, 2015/02/05
- [elpa] master fef44f5 038/271: Fix broken link., Jackson Ray Hamilton, 2015/02/05
- [elpa] master e4ee2ec 042/271: Catch parse errors., Jackson Ray Hamilton, 2015/02/05
- [elpa] master d372de1 029/271: Clean up cruft., Jackson Ray Hamilton, 2015/02/05
- [elpa] master b1b7f9d 032/271: Optimize tokens by connecting tail ends., Jackson Ray Hamilton, 2015/02/05
- [elpa] master 2cdd91e 043/271: Write new scopifier with comment detection., Jackson Ray Hamilton, 2015/02/05