Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Changed namespace, updated documentation and README. Other related th…

…ings.
  • Loading branch information...
commit 1e7011f752a4e37cab483073d57c2c2a81a5de48 1 parent 7636134
@arthurakay authored
View
15 CHANGELOG
@@ -1,10 +1,21 @@
-Version 1.3.0 (December 7, 2012)
+===============
+ VERSION 2.x
+===============
+
+Version 2.0.0 (December 11, 2012) - BREAKING CHANGES ALL AROUND!
+ - Changed name from "PhantomLint" to "LintRoller"
- added JSHint support
- optionally disable available linters (JSLint or JSHint)
- - refactored configuration of JSLint file and options (*** BREAKING CHANGE ***)
+ - refactored configuration of linter options
- refactored application of init() configuration
- updated test.js
+ - added documentation via JSDuck
+ - removed dependency on PhantomJS - now running on Node.js as it's more ubiquitous, and installation via NPM is easier
+
+===============
+ VERSION 1.x
+===============
Version 1.2.1 (June 7, 2012)
- updates to example
View
10 PhantomLint.js → LintRoller.js
@@ -25,14 +25,14 @@ var fs = require('fs'),
JSHINT = require('jshint').JSHINT;
/**
- * @class PhantomLint
+ * @class LintRoller
* @author Arthur Kay (http://www.akawebdesign.com)
* @singleton
- * @version 1.3.0
+ * @version 2.0.0
*
* GitHub Project: https://github.com/arthurakay/PhantomLint
*/
-PhantomLint = {
+LintRoller = {
/**
* @cfg {Array} filepaths
* REQUIRED. An array of relative filepaths to the folders containing JS files
@@ -439,7 +439,7 @@ PhantomLint = {
logToFile : function (errorList) {
this.log('\nWriting ' + ((errorList.length - this.linters.length ) / 6) + ' errors to new log file.', true);
- var header = 'PhantomLint : Output for ' + new Date() + '\n\n';
+ var header = 'LintRoller : Output for ' + new Date() + '\n\n';
errorList.splice(0, 0, header);
var output = errorList.join().replace(/,/g, '\n');
@@ -468,4 +468,4 @@ PhantomLint = {
}
};
-module.exports = PhantomLint;
+module.exports = LintRoller;
View
31 README
@@ -1,38 +1,11 @@
OVERVIEW:
- - PhantomLint is an add-on to Phantom.js that recursively dives into a directory and lints your JavaScript files.
+ - LintRoller is a Node.js module that recursively dives into a directory and lints your JavaScript files.
- Available linting platforms include JSLint and JSHint.
- An example shell script (test.sh, test.bat) is provided to run the test.js demo.
-CONFIG OPTIONS:
- - filepaths (Array)
- REQUIRED. An array of relative filepaths to the directories containing JS files
+For full documentation, view /docs/index.html in your browser.
- - exclusions (Array)
- An array of relative filepaths to the directories containing JS files that should be ignored
- - jsLint (Object/Boolean)
- An object containing "file" and "options" properties (False to disable usage.).
- - "file" is a relative filepath to the local JSLint file to use (defaults to ./assets/jslint.js).
- - "options" is an object containing the optional lint flags.
- - jsHint (Object/Boolean)
- An object containing "file" and "options" properties (False to disable usage.).
- - "file" is a relative filepath to the local JSHint file to use (defaults to ./assets/jshint-master/src/stable/jshint.js).
- - "options" is an object containing the optional lint flags.
-
- - verbose (Boolean)
- Defaults to true.
-
- - stopOnFirstError (Boolean)
- Defaults to true.
-
- - logFile (String)
- A relative filepath to where the output error log should go.
- (defaults to ./error_log.txt)
-
-
-
-NOTES:
- - The PhantomJS binary included in this repo is the Mac OS X static build
View
2  docs/data.js
@@ -1 +1 @@
-Docs = {"data":{"search":[{"meta":{"author":["Arthur Kay (http://www.akawebdesign.com)"]},"fullName":"PhantomLint","url":"#!/api/PhantomLint","sort":1,"icon":"icon-singleton","name":"PhantomLint"},{"meta":{"private":true},"fullName":"PhantomLint.files","url":"#!/api/PhantomLint-property-files","sort":3,"icon":"icon-property","name":"files"},{"meta":{"private":true},"fullName":"PhantomLint.linters","url":"#!/api/PhantomLint-property-linters","sort":3,"icon":"icon-property","name":"linters"},{"meta":{"private":true},"fullName":"PhantomLint.announceErrors","url":"#!/api/PhantomLint-method-announceErrors","sort":3,"icon":"icon-method","name":"announceErrors"},{"meta":{"private":true},"fullName":"PhantomLint.announceSuccess","url":"#!/api/PhantomLint-method-announceSuccess","sort":3,"icon":"icon-method","name":"announceSuccess"},{"meta":{"private":true},"fullName":"PhantomLint.applyLintOptions","url":"#!/api/PhantomLint-method-applyLintOptions","sort":3,"icon":"icon-method","name":"applyLintOptions"},{"meta":{"private":true},"fullName":"PhantomLint.getFiles","url":"#!/api/PhantomLint-method-getFiles","sort":3,"icon":"icon-method","name":"getFiles"},{"meta":{},"fullName":"PhantomLint.init","url":"#!/api/PhantomLint-method-init","sort":3,"icon":"icon-method","name":"init"},{"meta":{"private":true},"fullName":"PhantomLint.initConfigs","url":"#!/api/PhantomLint-method-initConfigs","sort":3,"icon":"icon-method","name":"initConfigs"},{"meta":{"private":true},"fullName":"PhantomLint.lintFiles","url":"#!/api/PhantomLint-method-lintFiles","sort":3,"icon":"icon-method","name":"lintFiles"},{"meta":{"private":true},"fullName":"PhantomLint.log","url":"#!/api/PhantomLint-method-log","sort":3,"icon":"icon-method","name":"log"},{"meta":{"private":true},"fullName":"PhantomLint.logToFile","url":"#!/api/PhantomLint-method-logToFile","sort":3,"icon":"icon-method","name":"logToFile"},{"meta":{"private":true},"fullName":"PhantomLint.parseTree","url":"#!/api/PhantomLint-method-parseTree","sort":3,"icon":"icon-method","name":"parseTree"},{"meta":{"private":true},"fullName":"PhantomLint.runJSHint","url":"#!/api/PhantomLint-method-runJSHint","sort":3,"icon":"icon-method","name":"runJSHint"},{"meta":{"private":true},"fullName":"PhantomLint.runJSLint","url":"#!/api/PhantomLint-method-runJSLint","sort":3,"icon":"icon-method","name":"runJSLint"},{"meta":{},"fullName":"PhantomLint.exclusions","url":"#!/api/PhantomLint-cfg-exclusions","sort":3,"icon":"icon-cfg","name":"exclusions"},{"meta":{},"fullName":"PhantomLint.filepaths","url":"#!/api/PhantomLint-cfg-filepaths","sort":3,"icon":"icon-cfg","name":"filepaths"},{"meta":{},"fullName":"PhantomLint.jsHint","url":"#!/api/PhantomLint-cfg-jsHint","sort":3,"icon":"icon-cfg","name":"jsHint"},{"meta":{},"fullName":"PhantomLint.jsLint","url":"#!/api/PhantomLint-cfg-jsLint","sort":3,"icon":"icon-cfg","name":"jsLint"},{"meta":{},"fullName":"PhantomLint.logFile","url":"#!/api/PhantomLint-cfg-logFile","sort":3,"icon":"icon-cfg","name":"logFile"},{"meta":{},"fullName":"PhantomLint.stopOnFirstError","url":"#!/api/PhantomLint-cfg-stopOnFirstError","sort":3,"icon":"icon-cfg","name":"stopOnFirstError"},{"meta":{},"fullName":"PhantomLint.verbose","url":"#!/api/PhantomLint-cfg-verbose","sort":3,"icon":"icon-cfg","name":"verbose"}],"showPrintButton":false,"examples":[],"guides":[],"source":true,"stats":[],"touchExamplesUi":false,"tests":false,"videos":[],"classes":[{"private":null,"extends":null,"icon":"icon-singleton","name":"PhantomLint"}],"signatures":[{"key":"abstract","short":"ABS","long":"abstract"},{"key":"deprecated","short":"DEP","long":"deprecated"},{"key":"preventable","short":"PREV","long":"preventable"},{"key":"private","short":"PRI","long":"private"},{"key":"protected","short":"PRO","long":"protected"},{"key":"readonly","short":"R O","long":"readonly"},{"key":"removed","short":"REM","long":"removed"},{"key":"required","short":"REQ","long":"required"},{"key":"static","short":"STA","long":"static"},{"key":"template","short":"TMP","long":"template"}],"localStorageDb":"docs"}};
+Docs = {"data":{"search":[{"meta":{"author":["Arthur Kay (http://www.akawebdesign.com)"]},"fullName":"LintRoller","url":"#!/api/LintRoller","sort":1,"icon":"icon-singleton","name":"LintRoller"},{"meta":{"private":true},"fullName":"LintRoller.files","url":"#!/api/LintRoller-property-files","sort":3,"icon":"icon-property","name":"files"},{"meta":{"private":true},"fullName":"LintRoller.linters","url":"#!/api/LintRoller-property-linters","sort":3,"icon":"icon-property","name":"linters"},{"meta":{"private":true},"fullName":"LintRoller.announceErrors","url":"#!/api/LintRoller-method-announceErrors","sort":3,"icon":"icon-method","name":"announceErrors"},{"meta":{"private":true},"fullName":"LintRoller.announceSuccess","url":"#!/api/LintRoller-method-announceSuccess","sort":3,"icon":"icon-method","name":"announceSuccess"},{"meta":{"private":true},"fullName":"LintRoller.applyLintOptions","url":"#!/api/LintRoller-method-applyLintOptions","sort":3,"icon":"icon-method","name":"applyLintOptions"},{"meta":{"private":true},"fullName":"LintRoller.getFiles","url":"#!/api/LintRoller-method-getFiles","sort":3,"icon":"icon-method","name":"getFiles"},{"meta":{},"fullName":"LintRoller.init","url":"#!/api/LintRoller-method-init","sort":3,"icon":"icon-method","name":"init"},{"meta":{"private":true},"fullName":"LintRoller.initConfigs","url":"#!/api/LintRoller-method-initConfigs","sort":3,"icon":"icon-method","name":"initConfigs"},{"meta":{"private":true},"fullName":"LintRoller.lintFiles","url":"#!/api/LintRoller-method-lintFiles","sort":3,"icon":"icon-method","name":"lintFiles"},{"meta":{"private":true},"fullName":"LintRoller.log","url":"#!/api/LintRoller-method-log","sort":3,"icon":"icon-method","name":"log"},{"meta":{"private":true},"fullName":"LintRoller.logToFile","url":"#!/api/LintRoller-method-logToFile","sort":3,"icon":"icon-method","name":"logToFile"},{"meta":{"private":true},"fullName":"LintRoller.parseTree","url":"#!/api/LintRoller-method-parseTree","sort":3,"icon":"icon-method","name":"parseTree"},{"meta":{"private":true},"fullName":"LintRoller.runJSHint","url":"#!/api/LintRoller-method-runJSHint","sort":3,"icon":"icon-method","name":"runJSHint"},{"meta":{"private":true},"fullName":"LintRoller.runJSLint","url":"#!/api/LintRoller-method-runJSLint","sort":3,"icon":"icon-method","name":"runJSLint"},{"meta":{},"fullName":"LintRoller.exclusions","url":"#!/api/LintRoller-cfg-exclusions","sort":3,"icon":"icon-cfg","name":"exclusions"},{"meta":{},"fullName":"LintRoller.filepaths","url":"#!/api/LintRoller-cfg-filepaths","sort":3,"icon":"icon-cfg","name":"filepaths"},{"meta":{},"fullName":"LintRoller.jsHint","url":"#!/api/LintRoller-cfg-jsHint","sort":3,"icon":"icon-cfg","name":"jsHint"},{"meta":{},"fullName":"LintRoller.jsLint","url":"#!/api/LintRoller-cfg-jsLint","sort":3,"icon":"icon-cfg","name":"jsLint"},{"meta":{},"fullName":"LintRoller.logFile","url":"#!/api/LintRoller-cfg-logFile","sort":3,"icon":"icon-cfg","name":"logFile"},{"meta":{},"fullName":"LintRoller.stopOnFirstError","url":"#!/api/LintRoller-cfg-stopOnFirstError","sort":3,"icon":"icon-cfg","name":"stopOnFirstError"},{"meta":{},"fullName":"LintRoller.verbose","url":"#!/api/LintRoller-cfg-verbose","sort":3,"icon":"icon-cfg","name":"verbose"}],"showPrintButton":false,"examples":[],"guides":[],"source":true,"stats":[],"touchExamplesUi":false,"tests":false,"videos":[],"classes":[{"private":null,"extends":null,"icon":"icon-singleton","name":"LintRoller"}],"signatures":[{"key":"abstract","short":"ABS","long":"abstract"},{"key":"deprecated","short":"DEP","long":"deprecated"},{"key":"preventable","short":"PREV","long":"preventable"},{"key":"private","short":"PRI","long":"private"},{"key":"protected","short":"PRO","long":"protected"},{"key":"readonly","short":"R O","long":"readonly"},{"key":"removed","short":"REM","long":"removed"},{"key":"required","short":"REQ","long":"required"},{"key":"static","short":"STA","long":"static"},{"key":"template","short":"TMP","long":"template"}],"localStorageDb":"docs"}};
View
6 docs/index.html
@@ -1,7 +1,7 @@
<!DOCTYPE html>
<html>
<head>
- <title>PhantomLint API Docs</title>
+ <title>LintRoller API Docs</title>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<meta http-equiv="X-UA-Compatible" content="chrome=1">
<meta name="fragment" content="!">
@@ -23,7 +23,7 @@
<div id="loading"><span class="title"></span><span class="logo"></span></div>
- <div id="header-content">PhantomLint API Docs</div>
+ <div id="header-content">LintRoller API Docs</div>
<div id='categories-content' style='display:none'>
<div class='section'>
@@ -31,7 +31,7 @@
<div class='left-column'>
<h3>Others...</h3>
<div class='links'>
-<a href="#!/api/PhantomLint" rel="PhantomLint" class="docClass">PhantomLint</a>
+<a href="#!/api/LintRoller" rel="LintRoller" class="docClass">LintRoller</a>
</div>
</div>
<div class='middle-column'>
View
1  docs/output/LintRoller.js
@@ -0,0 +1 @@
+Ext.data.JsonP.LintRoller({"mixedInto":[],"mixins":[],"code_type":"assignment","inheritable":false,"parentMixins":[],"meta":{"author":["Arthur Kay (http://www.akawebdesign.com)"]},"uses":[],"aliases":{},"superclasses":[],"html":"<div><pre class=\"hierarchy\"><h4>Files</h4><div class='dependency'><a href='source/LintRoller.html#LintRoller' target='_blank'>LintRoller.js</a></div></pre><div class='doc-contents'><p>@version 2.0.0</p>\n\n<p>GitHub Project: https://github.com/arthurakay/PhantomLint</p>\n</div><div class='members'><div class='members-section'><div class='definedBy'>Defined By</div><h3 class='members-title icon-cfg'>Config options</h3><div class='subsection'><div id='cfg-exclusions' class='member first-child not-inherited'><a href='#' class='side expandable'><span>&nbsp;</span></a><div class='title'><div class='meta'><span class='defined-in' rel='LintRoller'>LintRoller</span><br/><a href='source/LintRoller.html#LintRoller-cfg-exclusions' target='_blank' class='view-source'>view source</a></div><a href='#!/api/LintRoller-cfg-exclusions' class='name expandable'>exclusions</a><span> : Array</span></div><div class='description'><div class='short'>REQUIRED. ...</div><div class='long'><p>REQUIRED. An array of relative filepaths to the folders containing JS files that should NOT be linted</p>\n</div></div></div><div id='cfg-filepaths' class='member not-inherited'><a href='#' class='side expandable'><span>&nbsp;</span></a><div class='title'><div class='meta'><span class='defined-in' rel='LintRoller'>LintRoller</span><br/><a href='source/LintRoller.html#LintRoller-cfg-filepaths' target='_blank' class='view-source'>view source</a></div><a href='#!/api/LintRoller-cfg-filepaths' class='name expandable'>filepaths</a><span> : Array</span></div><div class='description'><div class='short'>REQUIRED. ...</div><div class='long'><p>REQUIRED. An array of relative filepaths to the folders containing JS files</p>\n</div></div></div><div id='cfg-jsHint' class='member not-inherited'><a href='#' class='side expandable'><span>&nbsp;</span></a><div class='title'><div class='meta'><span class='defined-in' rel='LintRoller'>LintRoller</span><br/><a href='source/LintRoller.html#LintRoller-cfg-jsHint' target='_blank' class='view-source'>view source</a></div><a href='#!/api/LintRoller-cfg-jsHint' class='name expandable'>jsHint</a><span> : Object</span></div><div class='description'><div class='short'>An object containing \"file\" and \"options\" properties (False to disable usage.). ...</div><div class='long'><p>An object containing \"file\" and \"options\" properties (False to disable usage.).</p>\n\n<ul>\n<li>\"file\" is a relative filepath to the local JSHint file to use (defaults to ./assets/jshint-master/src/stable/jshint.js).</li>\n<li>\"options\" is an object containing the optional lint flags.</li>\n</ul>\n\n<p>Defaults to: <code>{options: {}}</code></p></div></div></div><div id='cfg-jsLint' class='member not-inherited'><a href='#' class='side expandable'><span>&nbsp;</span></a><div class='title'><div class='meta'><span class='defined-in' rel='LintRoller'>LintRoller</span><br/><a href='source/LintRoller.html#LintRoller-cfg-jsLint' target='_blank' class='view-source'>view source</a></div><a href='#!/api/LintRoller-cfg-jsLint' class='name expandable'>jsLint</a><span> : Object</span></div><div class='description'><div class='short'>An object containing \"file\" and \"options\" properties (False to disable usage.). ...</div><div class='long'><p>An object containing \"file\" and \"options\" properties (False to disable usage.).</p>\n\n<ul>\n<li>\"file\" is a relative filepath to the local JSLint file to use (defaults to ./assets/jslint.js).</li>\n<li>\"options\" is an object containing the optional lint flags.</li>\n</ul>\n\n<p>Defaults to: <code>{options: {nomen: true, plusplus: true, sloppy: true, vars: true, white: true, undef: true, node: true, browser: true, stupid: true}}</code></p></div></div></div><div id='cfg-logFile' class='member not-inherited'><a href='#' class='side expandable'><span>&nbsp;</span></a><div class='title'><div class='meta'><span class='defined-in' rel='LintRoller'>LintRoller</span><br/><a href='source/LintRoller.html#LintRoller-cfg-logFile' target='_blank' class='view-source'>view source</a></div><a href='#!/api/LintRoller-cfg-logFile' class='name expandable'>logFile</a><span> : String</span></div><div class='description'><div class='short'>A relative filepath to where error messages will be logged. ...</div><div class='long'><p>A relative filepath to where error messages will be logged.</p>\n<p>Defaults to: <code>&quot;error_log.txt&quot;</code></p></div></div></div><div id='cfg-stopOnFirstError' class='member not-inherited'><a href='#' class='side expandable'><span>&nbsp;</span></a><div class='title'><div class='meta'><span class='defined-in' rel='LintRoller'>LintRoller</span><br/><a href='source/LintRoller.html#LintRoller-cfg-stopOnFirstError' target='_blank' class='view-source'>view source</a></div><a href='#!/api/LintRoller-cfg-stopOnFirstError' class='name expandable'>stopOnFirstError</a><span> : Boolean</span></div><div class='description'><div class='short'>True to stop linting your code when the first error is encountered. ...</div><div class='long'><p>True to stop linting your code when the first error is encountered.</p>\n<p>Defaults to: <code>true</code></p></div></div></div><div id='cfg-verbose' class='member not-inherited'><a href='#' class='side expandable'><span>&nbsp;</span></a><div class='title'><div class='meta'><span class='defined-in' rel='LintRoller'>LintRoller</span><br/><a href='source/LintRoller.html#LintRoller-cfg-verbose' target='_blank' class='view-source'>view source</a></div><a href='#!/api/LintRoller-cfg-verbose' class='name expandable'>verbose</a><span> : Boolean</span></div><div class='description'><div class='short'>True to show verbose ouput in the terminal. ...</div><div class='long'><p>True to show verbose ouput in the terminal.</p>\n<p>Defaults to: <code>true</code></p></div></div></div></div></div><div class='members-section'><div class='definedBy'>Defined By</div><h3 class='members-title icon-property'>Properties</h3><div class='subsection'><div id='property-files' class='member first-child not-inherited'><a href='#' class='side expandable'><span>&nbsp;</span></a><div class='title'><div class='meta'><span class='defined-in' rel='LintRoller'>LintRoller</span><br/><a href='source/LintRoller.html#LintRoller-property-files' target='_blank' class='view-source'>view source</a></div><a href='#!/api/LintRoller-property-files' class='name expandable'>files</a><span> : Array</span><strong class='private signature'>private</strong></div><div class='description'><div class='short'> ...</div><div class='long'>\n<p>Defaults to: <code>[]</code></p></div></div></div><div id='property-linters' class='member not-inherited'><a href='#' class='side expandable'><span>&nbsp;</span></a><div class='title'><div class='meta'><span class='defined-in' rel='LintRoller'>LintRoller</span><br/><a href='source/LintRoller.html#LintRoller-property-linters' target='_blank' class='view-source'>view source</a></div><a href='#!/api/LintRoller-property-linters' class='name expandable'>linters</a><span> : Array</span><strong class='private signature'>private</strong></div><div class='description'><div class='short'> ...</div><div class='long'>\n<p>Defaults to: <code>[]</code></p></div></div></div></div></div><div class='members-section'><div class='definedBy'>Defined By</div><h3 class='members-title icon-method'>Methods</h3><div class='subsection'><div id='method-announceErrors' class='member first-child not-inherited'><a href='#' class='side expandable'><span>&nbsp;</span></a><div class='title'><div class='meta'><span class='defined-in' rel='LintRoller'>LintRoller</span><br/><a href='source/LintRoller.html#LintRoller-method-announceErrors' target='_blank' class='view-source'>view source</a></div><a href='#!/api/LintRoller-method-announceErrors' class='name expandable'>announceErrors</a>( <span class='pre'>Object errorList</span> )<strong class='private signature'>private</strong></div><div class='description'><div class='short'> ...</div><div class='long'>\n<h3 class=\"pa\">Parameters</h3><ul><li><span class='pre'>errorList</span> : Object<div class='sub-desc'>\n</div></li></ul></div></div></div><div id='method-announceSuccess' class='member not-inherited'><a href='#' class='side expandable'><span>&nbsp;</span></a><div class='title'><div class='meta'><span class='defined-in' rel='LintRoller'>LintRoller</span><br/><a href='source/LintRoller.html#LintRoller-method-announceSuccess' target='_blank' class='view-source'>view source</a></div><a href='#!/api/LintRoller-method-announceSuccess' class='name expandable'>announceSuccess</a>( <span class='pre'></span> )<strong class='private signature'>private</strong></div><div class='description'><div class='short'> ...</div><div class='long'>\n</div></div></div><div id='method-applyLintOptions' class='member not-inherited'><a href='#' class='side expandable'><span>&nbsp;</span></a><div class='title'><div class='meta'><span class='defined-in' rel='LintRoller'>LintRoller</span><br/><a href='source/LintRoller.html#LintRoller-method-applyLintOptions' target='_blank' class='view-source'>view source</a></div><a href='#!/api/LintRoller-method-applyLintOptions' class='name expandable'>applyLintOptions</a>( <span class='pre'>Object linter, Object options</span> )<strong class='private signature'>private</strong></div><div class='description'><div class='short'> ...</div><div class='long'>\n<h3 class=\"pa\">Parameters</h3><ul><li><span class='pre'>linter</span> : Object<div class='sub-desc'>\n</div></li><li><span class='pre'>options</span> : Object<div class='sub-desc'>\n</div></li></ul></div></div></div><div id='method-getFiles' class='member not-inherited'><a href='#' class='side expandable'><span>&nbsp;</span></a><div class='title'><div class='meta'><span class='defined-in' rel='LintRoller'>LintRoller</span><br/><a href='source/LintRoller.html#LintRoller-method-getFiles' target='_blank' class='view-source'>view source</a></div><a href='#!/api/LintRoller-method-getFiles' class='name expandable'>getFiles</a>( <span class='pre'>Object path</span> )<strong class='private signature'>private</strong></div><div class='description'><div class='short'> ...</div><div class='long'>\n<h3 class=\"pa\">Parameters</h3><ul><li><span class='pre'>path</span> : Object<div class='sub-desc'>\n</div></li></ul></div></div></div><div id='method-init' class='member not-inherited'><a href='#' class='side expandable'><span>&nbsp;</span></a><div class='title'><div class='meta'><span class='defined-in' rel='LintRoller'>LintRoller</span><br/><a href='source/LintRoller.html#LintRoller-method-init' target='_blank' class='view-source'>view source</a></div><a href='#!/api/LintRoller-method-init' class='name expandable'>init</a>( <span class='pre'>Object config</span> )</div><div class='description'><div class='short'>Call this method to de-lint your JavaScript codebase. ...</div><div class='long'><p>Call this method to de-lint your JavaScript codebase.</p>\n<h3 class=\"pa\">Parameters</h3><ul><li><span class='pre'>config</span> : Object<div class='sub-desc'>\n</div></li></ul></div></div></div><div id='method-initConfigs' class='member not-inherited'><a href='#' class='side expandable'><span>&nbsp;</span></a><div class='title'><div class='meta'><span class='defined-in' rel='LintRoller'>LintRoller</span><br/><a href='source/LintRoller.html#LintRoller-method-initConfigs' target='_blank' class='view-source'>view source</a></div><a href='#!/api/LintRoller-method-initConfigs' class='name expandable'>initConfigs</a>( <span class='pre'>Object config</span> )<strong class='private signature'>private</strong></div><div class='description'><div class='short'> ...</div><div class='long'>\n<h3 class=\"pa\">Parameters</h3><ul><li><span class='pre'>config</span> : Object<div class='sub-desc'>\n</div></li></ul></div></div></div><div id='method-lintFiles' class='member not-inherited'><a href='#' class='side expandable'><span>&nbsp;</span></a><div class='title'><div class='meta'><span class='defined-in' rel='LintRoller'>LintRoller</span><br/><a href='source/LintRoller.html#LintRoller-method-lintFiles' target='_blank' class='view-source'>view source</a></div><a href='#!/api/LintRoller-method-lintFiles' class='name expandable'>lintFiles</a>( <span class='pre'></span> )<strong class='private signature'>private</strong></div><div class='description'><div class='short'> ...</div><div class='long'>\n</div></div></div><div id='method-log' class='member not-inherited'><a href='#' class='side expandable'><span>&nbsp;</span></a><div class='title'><div class='meta'><span class='defined-in' rel='LintRoller'>LintRoller</span><br/><a href='source/LintRoller.html#LintRoller-method-log' target='_blank' class='view-source'>view source</a></div><a href='#!/api/LintRoller-method-log' class='name expandable'>log</a>( <span class='pre'>Object msg, Object override</span> )<strong class='private signature'>private</strong></div><div class='description'><div class='short'> ...</div><div class='long'>\n<h3 class=\"pa\">Parameters</h3><ul><li><span class='pre'>msg</span> : Object<div class='sub-desc'>\n</div></li><li><span class='pre'>override</span> : Object<div class='sub-desc'>\n</div></li></ul></div></div></div><div id='method-logToFile' class='member not-inherited'><a href='#' class='side expandable'><span>&nbsp;</span></a><div class='title'><div class='meta'><span class='defined-in' rel='LintRoller'>LintRoller</span><br/><a href='source/LintRoller.html#LintRoller-method-logToFile' target='_blank' class='view-source'>view source</a></div><a href='#!/api/LintRoller-method-logToFile' class='name expandable'>logToFile</a>( <span class='pre'>Object errorList</span> )<strong class='private signature'>private</strong></div><div class='description'><div class='short'> ...</div><div class='long'>\n<h3 class=\"pa\">Parameters</h3><ul><li><span class='pre'>errorList</span> : Object<div class='sub-desc'>\n</div></li></ul></div></div></div><div id='method-parseTree' class='member not-inherited'><a href='#' class='side expandable'><span>&nbsp;</span></a><div class='title'><div class='meta'><span class='defined-in' rel='LintRoller'>LintRoller</span><br/><a href='source/LintRoller.html#LintRoller-method-parseTree' target='_blank' class='view-source'>view source</a></div><a href='#!/api/LintRoller-method-parseTree' class='name expandable'>parseTree</a>( <span class='pre'>Object pathConfig</span> )<strong class='private signature'>private</strong></div><div class='description'><div class='short'> ...</div><div class='long'>\n<h3 class=\"pa\">Parameters</h3><ul><li><span class='pre'>pathConfig</span> : Object<div class='sub-desc'>\n</div></li></ul></div></div></div><div id='method-runJSHint' class='member not-inherited'><a href='#' class='side expandable'><span>&nbsp;</span></a><div class='title'><div class='meta'><span class='defined-in' rel='LintRoller'>LintRoller</span><br/><a href='source/LintRoller.html#LintRoller-method-runJSHint' target='_blank' class='view-source'>view source</a></div><a href='#!/api/LintRoller-method-runJSHint' class='name expandable'>runJSHint</a>( <span class='pre'></span> )<strong class='private signature'>private</strong></div><div class='description'><div class='short'> ...</div><div class='long'>\n</div></div></div><div id='method-runJSLint' class='member not-inherited'><a href='#' class='side expandable'><span>&nbsp;</span></a><div class='title'><div class='meta'><span class='defined-in' rel='LintRoller'>LintRoller</span><br/><a href='source/LintRoller.html#LintRoller-method-runJSLint' target='_blank' class='view-source'>view source</a></div><a href='#!/api/LintRoller-method-runJSLint' class='name expandable'>runJSLint</a>( <span class='pre'></span> )<strong class='private signature'>private</strong></div><div class='description'><div class='short'> ...</div><div class='long'>\n</div></div></div></div></div></div></div>","subclasses":[],"members":{"event":[],"property":[{"meta":{"private":true},"owner":"LintRoller","tagname":"property","name":"files","id":"property-files"},{"meta":{"private":true},"owner":"LintRoller","tagname":"property","name":"linters","id":"property-linters"}],"css_var":[],"method":[{"meta":{"private":true},"owner":"LintRoller","tagname":"method","name":"announceErrors","id":"method-announceErrors"},{"meta":{"private":true},"owner":"LintRoller","tagname":"method","name":"announceSuccess","id":"method-announceSuccess"},{"meta":{"private":true},"owner":"LintRoller","tagname":"method","name":"applyLintOptions","id":"method-applyLintOptions"},{"meta":{"private":true},"owner":"LintRoller","tagname":"method","name":"getFiles","id":"method-getFiles"},{"meta":{},"owner":"LintRoller","tagname":"method","name":"init","id":"method-init"},{"meta":{"private":true},"owner":"LintRoller","tagname":"method","name":"initConfigs","id":"method-initConfigs"},{"meta":{"private":true},"owner":"LintRoller","tagname":"method","name":"lintFiles","id":"method-lintFiles"},{"meta":{"private":true},"owner":"LintRoller","tagname":"method","name":"log","id":"method-log"},{"meta":{"private":true},"owner":"LintRoller","tagname":"method","name":"logToFile","id":"method-logToFile"},{"meta":{"private":true},"owner":"LintRoller","tagname":"method","name":"parseTree","id":"method-parseTree"},{"meta":{"private":true},"owner":"LintRoller","tagname":"method","name":"runJSHint","id":"method-runJSHint"},{"meta":{"private":true},"owner":"LintRoller","tagname":"method","name":"runJSLint","id":"method-runJSLint"}],"css_mixin":[],"cfg":[{"meta":{},"owner":"LintRoller","tagname":"cfg","name":"exclusions","id":"cfg-exclusions"},{"meta":{},"owner":"LintRoller","tagname":"cfg","name":"filepaths","id":"cfg-filepaths"},{"meta":{},"owner":"LintRoller","tagname":"cfg","name":"jsHint","id":"cfg-jsHint"},{"meta":{},"owner":"LintRoller","tagname":"cfg","name":"jsLint","id":"cfg-jsLint"},{"meta":{},"owner":"LintRoller","tagname":"cfg","name":"logFile","id":"cfg-logFile"},{"meta":{},"owner":"LintRoller","tagname":"cfg","name":"stopOnFirstError","id":"cfg-stopOnFirstError"},{"meta":{},"owner":"LintRoller","tagname":"cfg","name":"verbose","id":"cfg-verbose"}]},"html_meta":{"author":null},"tagname":"class","extends":null,"name":"LintRoller","alternateClassNames":[],"inheritdoc":null,"component":false,"singleton":true,"id":"class-LintRoller","statics":{"property":[],"event":[],"css_var":[],"method":[],"css_mixin":[],"cfg":[]},"requires":[],"files":[{"href":"LintRoller.html#LintRoller","filename":"LintRoller.js"}]});
View
1  docs/output/PhantomLint.js
@@ -1 +0,0 @@
-Ext.data.JsonP.PhantomLint({"mixedInto":[],"mixins":[],"code_type":"assignment","inheritable":false,"parentMixins":[],"meta":{"author":["Arthur Kay (http://www.akawebdesign.com)"]},"uses":[],"aliases":{},"superclasses":[],"html":"<div><pre class=\"hierarchy\"><h4>Files</h4><div class='dependency'><a href='source/PhantomLint.html#PhantomLint' target='_blank'>PhantomLint.js</a></div></pre><div class='doc-contents'><p>@version 1.3.0</p>\n\n<p>GitHub Project: https://github.com/arthurakay/PhantomLint</p>\n</div><div class='members'><div class='members-section'><div class='definedBy'>Defined By</div><h3 class='members-title icon-cfg'>Config options</h3><div class='subsection'><div id='cfg-exclusions' class='member first-child not-inherited'><a href='#' class='side expandable'><span>&nbsp;</span></a><div class='title'><div class='meta'><span class='defined-in' rel='PhantomLint'>PhantomLint</span><br/><a href='source/PhantomLint.html#PhantomLint-cfg-exclusions' target='_blank' class='view-source'>view source</a></div><a href='#!/api/PhantomLint-cfg-exclusions' class='name expandable'>exclusions</a><span> : Array</span></div><div class='description'><div class='short'>REQUIRED. ...</div><div class='long'><p>REQUIRED. An array of relative filepaths to the folders containing JS files that should NOT be linted</p>\n</div></div></div><div id='cfg-filepaths' class='member not-inherited'><a href='#' class='side expandable'><span>&nbsp;</span></a><div class='title'><div class='meta'><span class='defined-in' rel='PhantomLint'>PhantomLint</span><br/><a href='source/PhantomLint.html#PhantomLint-cfg-filepaths' target='_blank' class='view-source'>view source</a></div><a href='#!/api/PhantomLint-cfg-filepaths' class='name expandable'>filepaths</a><span> : Array</span></div><div class='description'><div class='short'>REQUIRED. ...</div><div class='long'><p>REQUIRED. An array of relative filepaths to the folders containing JS files</p>\n</div></div></div><div id='cfg-jsHint' class='member not-inherited'><a href='#' class='side expandable'><span>&nbsp;</span></a><div class='title'><div class='meta'><span class='defined-in' rel='PhantomLint'>PhantomLint</span><br/><a href='source/PhantomLint.html#PhantomLint-cfg-jsHint' target='_blank' class='view-source'>view source</a></div><a href='#!/api/PhantomLint-cfg-jsHint' class='name expandable'>jsHint</a><span> : Object</span></div><div class='description'><div class='short'>An object containing \"file\" and \"options\" properties (False to disable usage.). ...</div><div class='long'><p>An object containing \"file\" and \"options\" properties (False to disable usage.).</p>\n\n<ul>\n<li>\"file\" is a relative filepath to the local JSHint file to use (defaults to ./assets/jshint-master/src/stable/jshint.js).</li>\n<li>\"options\" is an object containing the optional lint flags.</li>\n</ul>\n\n<p>Defaults to: <code>{file: &quot;assets/jshint-master/src/stable/jshint.js&quot;, options: {}}</code></p></div></div></div><div id='cfg-jsLint' class='member not-inherited'><a href='#' class='side expandable'><span>&nbsp;</span></a><div class='title'><div class='meta'><span class='defined-in' rel='PhantomLint'>PhantomLint</span><br/><a href='source/PhantomLint.html#PhantomLint-cfg-jsLint' target='_blank' class='view-source'>view source</a></div><a href='#!/api/PhantomLint-cfg-jsLint' class='name expandable'>jsLint</a><span> : Object</span></div><div class='description'><div class='short'>An object containing \"file\" and \"options\" properties (False to disable usage.). ...</div><div class='long'><p>An object containing \"file\" and \"options\" properties (False to disable usage.).</p>\n\n<ul>\n<li>\"file\" is a relative filepath to the local JSLint file to use (defaults to ./assets/jslint.js).</li>\n<li>\"options\" is an object containing the optional lint flags.</li>\n</ul>\n\n<p>Defaults to: <code>{file: &quot;assets/jslint.js&quot;, options: {nomen: true, plusplus: true, sloppy: true, vars: true, white: true, undef: true}}</code></p></div></div></div><div id='cfg-logFile' class='member not-inherited'><a href='#' class='side expandable'><span>&nbsp;</span></a><div class='title'><div class='meta'><span class='defined-in' rel='PhantomLint'>PhantomLint</span><br/><a href='source/PhantomLint.html#PhantomLint-cfg-logFile' target='_blank' class='view-source'>view source</a></div><a href='#!/api/PhantomLint-cfg-logFile' class='name expandable'>logFile</a><span> : String</span></div><div class='description'><div class='short'>A relative filepath to where error messages will be logged. ...</div><div class='long'><p>A relative filepath to where error messages will be logged.</p>\n<p>Defaults to: <code>&quot;error_log.txt&quot;</code></p></div></div></div><div id='cfg-stopOnFirstError' class='member not-inherited'><a href='#' class='side expandable'><span>&nbsp;</span></a><div class='title'><div class='meta'><span class='defined-in' rel='PhantomLint'>PhantomLint</span><br/><a href='source/PhantomLint.html#PhantomLint-cfg-stopOnFirstError' target='_blank' class='view-source'>view source</a></div><a href='#!/api/PhantomLint-cfg-stopOnFirstError' class='name expandable'>stopOnFirstError</a><span> : Boolean</span></div><div class='description'><div class='short'>True to stop linting your code when the first error is encountered. ...</div><div class='long'><p>True to stop linting your code when the first error is encountered.</p>\n<p>Defaults to: <code>true</code></p></div></div></div><div id='cfg-verbose' class='member not-inherited'><a href='#' class='side expandable'><span>&nbsp;</span></a><div class='title'><div class='meta'><span class='defined-in' rel='PhantomLint'>PhantomLint</span><br/><a href='source/PhantomLint.html#PhantomLint-cfg-verbose' target='_blank' class='view-source'>view source</a></div><a href='#!/api/PhantomLint-cfg-verbose' class='name expandable'>verbose</a><span> : Boolean</span></div><div class='description'><div class='short'>True to show verbose ouput in the terminal. ...</div><div class='long'><p>True to show verbose ouput in the terminal.</p>\n<p>Defaults to: <code>true</code></p></div></div></div></div></div><div class='members-section'><div class='definedBy'>Defined By</div><h3 class='members-title icon-property'>Properties</h3><div class='subsection'><div id='property-files' class='member first-child not-inherited'><a href='#' class='side expandable'><span>&nbsp;</span></a><div class='title'><div class='meta'><span class='defined-in' rel='PhantomLint'>PhantomLint</span><br/><a href='source/PhantomLint.html#PhantomLint-property-files' target='_blank' class='view-source'>view source</a></div><a href='#!/api/PhantomLint-property-files' class='name expandable'>files</a><span> : Array</span><strong class='private signature'>private</strong></div><div class='description'><div class='short'> ...</div><div class='long'>\n<p>Defaults to: <code>[]</code></p></div></div></div><div id='property-linters' class='member not-inherited'><a href='#' class='side expandable'><span>&nbsp;</span></a><div class='title'><div class='meta'><span class='defined-in' rel='PhantomLint'>PhantomLint</span><br/><a href='source/PhantomLint.html#PhantomLint-property-linters' target='_blank' class='view-source'>view source</a></div><a href='#!/api/PhantomLint-property-linters' class='name expandable'>linters</a><span> : Array</span><strong class='private signature'>private</strong></div><div class='description'><div class='short'> ...</div><div class='long'>\n<p>Defaults to: <code>[]</code></p></div></div></div></div></div><div class='members-section'><div class='definedBy'>Defined By</div><h3 class='members-title icon-method'>Methods</h3><div class='subsection'><div id='method-announceErrors' class='member first-child not-inherited'><a href='#' class='side expandable'><span>&nbsp;</span></a><div class='title'><div class='meta'><span class='defined-in' rel='PhantomLint'>PhantomLint</span><br/><a href='source/PhantomLint.html#PhantomLint-method-announceErrors' target='_blank' class='view-source'>view source</a></div><a href='#!/api/PhantomLint-method-announceErrors' class='name expandable'>announceErrors</a>( <span class='pre'>Object errorList</span> )<strong class='private signature'>private</strong></div><div class='description'><div class='short'> ...</div><div class='long'>\n<h3 class=\"pa\">Parameters</h3><ul><li><span class='pre'>errorList</span> : Object<div class='sub-desc'>\n</div></li></ul></div></div></div><div id='method-announceSuccess' class='member not-inherited'><a href='#' class='side expandable'><span>&nbsp;</span></a><div class='title'><div class='meta'><span class='defined-in' rel='PhantomLint'>PhantomLint</span><br/><a href='source/PhantomLint.html#PhantomLint-method-announceSuccess' target='_blank' class='view-source'>view source</a></div><a href='#!/api/PhantomLint-method-announceSuccess' class='name expandable'>announceSuccess</a>( <span class='pre'></span> )<strong class='private signature'>private</strong></div><div class='description'><div class='short'> ...</div><div class='long'>\n</div></div></div><div id='method-applyLintOptions' class='member not-inherited'><a href='#' class='side expandable'><span>&nbsp;</span></a><div class='title'><div class='meta'><span class='defined-in' rel='PhantomLint'>PhantomLint</span><br/><a href='source/PhantomLint.html#PhantomLint-method-applyLintOptions' target='_blank' class='view-source'>view source</a></div><a href='#!/api/PhantomLint-method-applyLintOptions' class='name expandable'>applyLintOptions</a>( <span class='pre'>Object linter, Object options</span> )<strong class='private signature'>private</strong></div><div class='description'><div class='short'> ...</div><div class='long'>\n<h3 class=\"pa\">Parameters</h3><ul><li><span class='pre'>linter</span> : Object<div class='sub-desc'>\n</div></li><li><span class='pre'>options</span> : Object<div class='sub-desc'>\n</div></li></ul></div></div></div><div id='method-getFiles' class='member not-inherited'><a href='#' class='side expandable'><span>&nbsp;</span></a><div class='title'><div class='meta'><span class='defined-in' rel='PhantomLint'>PhantomLint</span><br/><a href='source/PhantomLint.html#PhantomLint-method-getFiles' target='_blank' class='view-source'>view source</a></div><a href='#!/api/PhantomLint-method-getFiles' class='name expandable'>getFiles</a>( <span class='pre'>Object path</span> )<strong class='private signature'>private</strong></div><div class='description'><div class='short'> ...</div><div class='long'>\n<h3 class=\"pa\">Parameters</h3><ul><li><span class='pre'>path</span> : Object<div class='sub-desc'>\n</div></li></ul></div></div></div><div id='method-init' class='member not-inherited'><a href='#' class='side expandable'><span>&nbsp;</span></a><div class='title'><div class='meta'><span class='defined-in' rel='PhantomLint'>PhantomLint</span><br/><a href='source/PhantomLint.html#PhantomLint-method-init' target='_blank' class='view-source'>view source</a></div><a href='#!/api/PhantomLint-method-init' class='name expandable'>init</a>( <span class='pre'>Object config</span> )</div><div class='description'><div class='short'>Call this method to de-lint your JavaScript codebase. ...</div><div class='long'><p>Call this method to de-lint your JavaScript codebase.</p>\n<h3 class=\"pa\">Parameters</h3><ul><li><span class='pre'>config</span> : Object<div class='sub-desc'>\n</div></li></ul></div></div></div><div id='method-initConfigs' class='member not-inherited'><a href='#' class='side expandable'><span>&nbsp;</span></a><div class='title'><div class='meta'><span class='defined-in' rel='PhantomLint'>PhantomLint</span><br/><a href='source/PhantomLint.html#PhantomLint-method-initConfigs' target='_blank' class='view-source'>view source</a></div><a href='#!/api/PhantomLint-method-initConfigs' class='name expandable'>initConfigs</a>( <span class='pre'>Object config</span> )<strong class='private signature'>private</strong></div><div class='description'><div class='short'> ...</div><div class='long'>\n<h3 class=\"pa\">Parameters</h3><ul><li><span class='pre'>config</span> : Object<div class='sub-desc'>\n</div></li></ul></div></div></div><div id='method-lintFiles' class='member not-inherited'><a href='#' class='side expandable'><span>&nbsp;</span></a><div class='title'><div class='meta'><span class='defined-in' rel='PhantomLint'>PhantomLint</span><br/><a href='source/PhantomLint.html#PhantomLint-method-lintFiles' target='_blank' class='view-source'>view source</a></div><a href='#!/api/PhantomLint-method-lintFiles' class='name expandable'>lintFiles</a>( <span class='pre'></span> )<strong class='private signature'>private</strong></div><div class='description'><div class='short'> ...</div><div class='long'>\n</div></div></div><div id='method-log' class='member not-inherited'><a href='#' class='side expandable'><span>&nbsp;</span></a><div class='title'><div class='meta'><span class='defined-in' rel='PhantomLint'>PhantomLint</span><br/><a href='source/PhantomLint.html#PhantomLint-method-log' target='_blank' class='view-source'>view source</a></div><a href='#!/api/PhantomLint-method-log' class='name expandable'>log</a>( <span class='pre'>Object msg, Object override</span> )<strong class='private signature'>private</strong></div><div class='description'><div class='short'> ...</div><div class='long'>\n<h3 class=\"pa\">Parameters</h3><ul><li><span class='pre'>msg</span> : Object<div class='sub-desc'>\n</div></li><li><span class='pre'>override</span> : Object<div class='sub-desc'>\n</div></li></ul></div></div></div><div id='method-logToFile' class='member not-inherited'><a href='#' class='side expandable'><span>&nbsp;</span></a><div class='title'><div class='meta'><span class='defined-in' rel='PhantomLint'>PhantomLint</span><br/><a href='source/PhantomLint.html#PhantomLint-method-logToFile' target='_blank' class='view-source'>view source</a></div><a href='#!/api/PhantomLint-method-logToFile' class='name expandable'>logToFile</a>( <span class='pre'>Object errorList</span> )<strong class='private signature'>private</strong></div><div class='description'><div class='short'> ...</div><div class='long'>\n<h3 class=\"pa\">Parameters</h3><ul><li><span class='pre'>errorList</span> : Object<div class='sub-desc'>\n</div></li></ul></div></div></div><div id='method-parseTree' class='member not-inherited'><a href='#' class='side expandable'><span>&nbsp;</span></a><div class='title'><div class='meta'><span class='defined-in' rel='PhantomLint'>PhantomLint</span><br/><a href='source/PhantomLint.html#PhantomLint-method-parseTree' target='_blank' class='view-source'>view source</a></div><a href='#!/api/PhantomLint-method-parseTree' class='name expandable'>parseTree</a>( <span class='pre'>Object pathConfig</span> )<strong class='private signature'>private</strong></div><div class='description'><div class='short'> ...</div><div class='long'>\n<h3 class=\"pa\">Parameters</h3><ul><li><span class='pre'>pathConfig</span> : Object<div class='sub-desc'>\n</div></li></ul></div></div></div><div id='method-runJSHint' class='member not-inherited'><a href='#' class='side expandable'><span>&nbsp;</span></a><div class='title'><div class='meta'><span class='defined-in' rel='PhantomLint'>PhantomLint</span><br/><a href='source/PhantomLint.html#PhantomLint-method-runJSHint' target='_blank' class='view-source'>view source</a></div><a href='#!/api/PhantomLint-method-runJSHint' class='name expandable'>runJSHint</a>( <span class='pre'>Object errorList</span> )<strong class='private signature'>private</strong></div><div class='description'><div class='short'> ...</div><div class='long'>\n<h3 class=\"pa\">Parameters</h3><ul><li><span class='pre'>errorList</span> : Object<div class='sub-desc'>\n</div></li></ul></div></div></div><div id='method-runJSLint' class='member not-inherited'><a href='#' class='side expandable'><span>&nbsp;</span></a><div class='title'><div class='meta'><span class='defined-in' rel='PhantomLint'>PhantomLint</span><br/><a href='source/PhantomLint.html#PhantomLint-method-runJSLint' target='_blank' class='view-source'>view source</a></div><a href='#!/api/PhantomLint-method-runJSLint' class='name expandable'>runJSLint</a>( <span class='pre'>Object errorList</span> )<strong class='private signature'>private</strong></div><div class='description'><div class='short'> ...</div><div class='long'>\n<h3 class=\"pa\">Parameters</h3><ul><li><span class='pre'>errorList</span> : Object<div class='sub-desc'>\n</div></li></ul></div></div></div></div></div></div></div>","subclasses":[],"members":{"event":[],"property":[{"meta":{"private":true},"owner":"PhantomLint","tagname":"property","name":"files","id":"property-files"},{"meta":{"private":true},"owner":"PhantomLint","tagname":"property","name":"linters","id":"property-linters"}],"css_var":[],"method":[{"meta":{"private":true},"owner":"PhantomLint","tagname":"method","name":"announceErrors","id":"method-announceErrors"},{"meta":{"private":true},"owner":"PhantomLint","tagname":"method","name":"announceSuccess","id":"method-announceSuccess"},{"meta":{"private":true},"owner":"PhantomLint","tagname":"method","name":"applyLintOptions","id":"method-applyLintOptions"},{"meta":{"private":true},"owner":"PhantomLint","tagname":"method","name":"getFiles","id":"method-getFiles"},{"meta":{},"owner":"PhantomLint","tagname":"method","name":"init","id":"method-init"},{"meta":{"private":true},"owner":"PhantomLint","tagname":"method","name":"initConfigs","id":"method-initConfigs"},{"meta":{"private":true},"owner":"PhantomLint","tagname":"method","name":"lintFiles","id":"method-lintFiles"},{"meta":{"private":true},"owner":"PhantomLint","tagname":"method","name":"log","id":"method-log"},{"meta":{"private":true},"owner":"PhantomLint","tagname":"method","name":"logToFile","id":"method-logToFile"},{"meta":{"private":true},"owner":"PhantomLint","tagname":"method","name":"parseTree","id":"method-parseTree"},{"meta":{"private":true},"owner":"PhantomLint","tagname":"method","name":"runJSHint","id":"method-runJSHint"},{"meta":{"private":true},"owner":"PhantomLint","tagname":"method","name":"runJSLint","id":"method-runJSLint"}],"css_mixin":[],"cfg":[{"meta":{},"owner":"PhantomLint","tagname":"cfg","name":"exclusions","id":"cfg-exclusions"},{"meta":{},"owner":"PhantomLint","tagname":"cfg","name":"filepaths","id":"cfg-filepaths"},{"meta":{},"owner":"PhantomLint","tagname":"cfg","name":"jsHint","id":"cfg-jsHint"},{"meta":{},"owner":"PhantomLint","tagname":"cfg","name":"jsLint","id":"cfg-jsLint"},{"meta":{},"owner":"PhantomLint","tagname":"cfg","name":"logFile","id":"cfg-logFile"},{"meta":{},"owner":"PhantomLint","tagname":"cfg","name":"stopOnFirstError","id":"cfg-stopOnFirstError"},{"meta":{},"owner":"PhantomLint","tagname":"cfg","name":"verbose","id":"cfg-verbose"}]},"html_meta":{"author":null},"tagname":"class","extends":null,"name":"PhantomLint","alternateClassNames":[],"inheritdoc":null,"component":false,"singleton":true,"id":"class-PhantomLint","statics":{"property":[],"event":[],"css_var":[],"method":[],"css_mixin":[],"cfg":[]},"requires":[],"files":[{"href":"PhantomLint.html#PhantomLint","filename":"PhantomLint.js"}]});
View
147 docs/source/PhantomLint.html → docs/source/LintRoller.html
@@ -35,43 +35,44 @@
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
THE SOFTWARE.
-*/
+ */
-var filesystem = require('fs'),
- JSLINT, JSHINT;
+var fs = require('fs'),
+ JSLINT = require('jslint'),
+ JSHINT = require('jshint').JSHINT;
-<span id='PhantomLint'>/**
-</span> * @class PhantomLint
+<span id='LintRoller'>/**
+</span> * @class LintRoller
* @author Arthur Kay (http://www.akawebdesign.com)
* @singleton
- * @version 1.3.0
+ * @version 2.0.0
*
* GitHub Project: https://github.com/arthurakay/PhantomLint
*/
-PhantomLint = {
-<span id='PhantomLint-cfg-filepaths'> /**
+LintRoller = {
+<span id='LintRoller-cfg-filepaths'> /**
</span> * @cfg {Array} filepaths
* REQUIRED. An array of relative filepaths to the folders containing JS files
*/
-<span id='PhantomLint-cfg-exclusions'> /**
+<span id='LintRoller-cfg-exclusions'> /**
</span> * @cfg {Array} exclusions
* REQUIRED. An array of relative filepaths to the folders containing JS files that should NOT be linted
*/
-<span id='PhantomLint-cfg-verbose'> /**
+<span id='LintRoller-cfg-verbose'> /**
</span> * @cfg
* True to show verbose ouput in the terminal.
*/
verbose : true,
-<span id='PhantomLint-cfg-stopOnFirstError'> /**
+<span id='LintRoller-cfg-stopOnFirstError'> /**
</span> * @cfg
* True to stop linting your code when the first error is encountered.
*/
stopOnFirstError : true,
-<span id='PhantomLint-cfg-jsLint'> /**
+<span id='LintRoller-cfg-jsLint'> /**
</span> * @cfg
* An object containing &quot;file&quot; and &quot;options&quot; properties (False to disable usage.).
*
@@ -79,19 +80,20 @@
* - &quot;options&quot; is an object containing the optional lint flags.
*/
jsLint : {
- file : 'assets/jslint.js',
-
options : {
nomen : true, //if names may have dangling _
plusplus : true, //if increment/decrement should be allowed
sloppy : true, //if the 'use strict'; pragma is optional
vars : true, //if multiple var statements per function should be allowed
white : true, //if sloppy whitespace is tolerated
- undef : true //if variables can be declared out of order
+ undef : true, //if variables can be declared out of order,
+ node : true, //if Node.js globals should be predefined
+ browser : true, //if the standard browser globals should be predefined
+ stupid : true //if really stupid practices are tolerated... namely blocking synchronous operations
}
},
-<span id='PhantomLint-cfg-jsHint'> /**
+<span id='LintRoller-cfg-jsHint'> /**
</span> * @cfg
* An object containing &quot;file&quot; and &quot;options&quot; properties (False to disable usage.).
*
@@ -100,21 +102,18 @@
*
*/
jsHint : {
- file : 'assets/jshint-master/src/stable/jshint.js',
-
options : {
}
},
-<span id='PhantomLint-cfg-logFile'> /**
+<span id='LintRoller-cfg-logFile'> /**
</span> * @cfg
* A relative filepath to where error messages will be logged.
*/
logFile : 'error_log.txt',
-
-<span id='PhantomLint-method-init'> /**
+<span id='LintRoller-method-init'> /**
</span> * Call this method to de-lint your JavaScript codebase.
*/
init : function (config) {
@@ -122,40 +121,39 @@
this.initConfigs(config);
if (this.jsLint) {
- this.log('Loading JSLint... ' + phantom.injectJs(this.jsLint.file), true);
+ this.log('Loading JSLint... ', true);
this.linters.push(JSLINT);
}
if (this.jsHint) {
- this.log('Loading JSHint... ' + phantom.injectJs(this.jsHint.file), true);
+ this.log('Loading JSHint... ', true);
this.linters.push(JSHINT);
}
if (!JSLINT &amp;&amp; !JSHINT) {
- phantom.exit(1);
+ process.exit(1);
}
this.parseTree(config.filepaths);
this.log('\nFilesystem has been parsed. Looping through available files...');
+ this.clearLogFile();
this.lintFiles();
this.announceSuccess();
},
-
-<span id='PhantomLint-property-files'> /**
+<span id='LintRoller-property-files'> /**
</span> * @private
*/
files : [],
-<span id='PhantomLint-property-linters'> /**
+<span id='LintRoller-property-linters'> /**
</span> * @private
*/
linters : [],
-
-<span id='PhantomLint-method-initConfigs'> /**
+<span id='LintRoller-method-initConfigs'> /**
</span> * @private
*/
initConfigs : function (config) {
@@ -187,7 +185,7 @@
}
},
-<span id='PhantomLint-method-applyLintOptions'> /**
+<span id='LintRoller-method-applyLintOptions'> /**
</span> * @private
*/
applyLintOptions : function (linter, options) {
@@ -204,7 +202,7 @@
}
},
-<span id='PhantomLint-method-announceErrors'> /**
+<span id='LintRoller-method-announceErrors'> /**
</span> * @private
*/
announceErrors : function (errorList) {
@@ -213,22 +211,22 @@
}
this.log('\nFix Your Errors! Check the log file for more information.\n\n', true);
- phantom.exit(1);
+ process.exit(1);
},
-<span id='PhantomLint-method-announceSuccess'> /**
+<span id='LintRoller-method-announceSuccess'> /**
</span> * @private
*/
announceSuccess : function () {
this.log('\nSuccessfully linted yo shit.\n\n', true);
- phantom.exit(0);
+ process.exit(0);
},
-<span id='PhantomLint-method-getFiles'> /**
+<span id='LintRoller-method-getFiles'> /**
</span> * @private
*/
getFiles : function (path) {
- var tree = filesystem.list(path);
+ var tree = fs.readdirSync(path);
this.log('\nFILES FOUND AT PATH: ' + path);
this.log(tree);
@@ -236,7 +234,7 @@
return tree;
},
-<span id='PhantomLint-method-parseTree'> /**
+<span id='LintRoller-method-parseTree'> /**
</span> * @private
*/
parseTree : function (pathConfig) {
@@ -253,14 +251,14 @@
for (i; i &lt; path.length; i++) {
var currPath = path[i];
+ var exclude = false;
+
this.log('\n*** currPath: ' + currPath);
if (this.exclusions) {
this.log('Checking exclusion paths...');
var j = 0;
- var exclude = false;
-
for (j; j &lt; this.exclusions.length; j++) {
if (currPath === this.exclusions[j]) {
exclude = true;
@@ -279,7 +277,9 @@
var spacer = ' ',
childPath, childTree;
- if (filesystem.isFile(currPath + list[x])) {
+ var stats = fs.statSync(currPath + list[x]);
+
+ if (stats.isFile()) {
this.log(spacer + list[x] + ' IS A FILE');
/*
* We only want JS files
@@ -313,12 +313,15 @@
}
},
-<span id='PhantomLint-method-lintFiles'> /**
+<span id='LintRoller-method-lintFiles'> /**
</span> * @private
*/
lintFiles : function () {
var x = 0,
+ jsLintErrors = [],
+ jsHintErrors = [],
errorList = [],
+ errors = 0,
j,
linter;
@@ -332,30 +335,39 @@
if (linter === JSLINT) {
this.log('Running JSLint against code...', false);
- errorList = this.runJSLint(errorList);
+ jsLintErrors = this.runJSLint();
+
+ errors += jsLintErrors.length;
+ jsLintErrors.splice(0,0, '=============== Running JSLint... ===============\n\n');
}
else if (linter === JSHINT) {
this.log('Running JSHint against code...', false);
- errorList = this.runJSHint(errorList);
+ jsHintErrors = this.runJSHint();
+
+ errors += jsHintErrors.length;
+ jsHintErrors.splice(0,0, '=============== Running JSHint... ===============\n\n');
}
}
- if (errorList.length &gt; 0) {
+ if (errors &gt; 0) {
+ errorList = errorList.concat(jsLintErrors, jsHintErrors);
this.announceErrors(errorList);
}
+
},
-<span id='PhantomLint-method-runJSLint'> /**
+<span id='LintRoller-method-runJSLint'> /**
</span> * @private
*/
- runJSLint : function (errorList) {
+ runJSLint : function () {
var j = 0,
+ errorList = [],
file, js;
for (j; j &lt; this.files.length; j++) {
file = this.files[j];
- js = filesystem.read(file);
+ js = fs.readFileSync(file, 'utf8');
var i = 0,
result = JSLINT(js, this.jsLint.options),
@@ -391,20 +403,21 @@
return errorList;
},
-<span id='PhantomLint-method-runJSHint'> /**
+<span id='LintRoller-method-runJSHint'> /**
</span> * @private
*/
- runJSHint : function (errorList) {
+ runJSHint : function () {
var j = 0,
+ errorList = [],
file, js;
for (j; j &lt; this.files.length; j++) {
file = this.files[j];
- js = filesystem.read(file);
+ js = fs.readFileSync(file, 'utf8');
var i = 0,
- result = JSHINT(js, this.jsHint.options),
+ result = JSHINT.jshint(js, this.jsHint.options),
totalErrors = JSHINT.errors.length,
error;
@@ -437,24 +450,32 @@
return errorList;
},
-<span id='PhantomLint-method-logToFile'> /**
+<span id='LintRoller-method-logToFile'> /**
</span> * @private
*/
logToFile : function (errorList) {
- this.log('\nWriting ' + (errorList.length / 6) + ' errors to log file.', true);
- filesystem.touch(this.logFile);
+ this.log('\nWriting ' + ((errorList.length - this.linters.length ) / 6) + ' errors to new log file.', true);
- var stream = filesystem.open(this.logFile, 'w');
+ var header = 'LintRoller : Output for ' + new Date() + '\n\n';
+ errorList.splice(0, 0, header);
- var i = 0;
- for (i; i &lt; errorList.length; i++) {
- stream.writeLine(errorList[i]);
- }
+ var output = errorList.join().replace(/,/g, '\n');
- stream.close();
+ fs.writeFileSync(this.logFile, output);
},
-<span id='PhantomLint-method-log'> /**
+ clearLogFile : function() {
+ try {
+ this.log('\nDeleting old log file...', true);
+ fs.unlinkSync(this.logFile);
+ this.log('Done.', true);
+ }
+ catch (err) {
+ this.log('No log file currently exists.', true);
+ }
+ },
+
+<span id='LintRoller-method-log'> /**
</span> * @private
*/
log : function (msg, override) {
@@ -462,6 +483,8 @@
console.log(msg);
}
}
-};</pre>
+};
+
+module.exports = LintRoller;</pre>
</body>
</html>
View
2  generate_docs.sh
@@ -4,4 +4,4 @@ echo 'Removing old duckumentation...'
rm -rf docs
echo 'Hatching new duckumentation...'
-jsduck PhantomLint.js --output docs --title 'PhantomLint API Docs'
+jsduck LintRoller.js --output docs --title 'LintRoller API Docs'
View
4 package.json
@@ -1,5 +1,5 @@
{
- "name" : "lint-roller",
+ "name" : "LintRoller",
"preferGlobal" : "true",
"version" : "2.0.0",
@@ -17,7 +17,7 @@
},
- "main" : "./PhantomLint.js",
+ "main" : "./LintRoller.js",
"repository" : {
"type" : "git",
View
3  test.bat
@@ -1,5 +1,4 @@
@echo off
cls
-rem assume that C:\path\to\phantomjs\bin is added to PATH
-phantomjs test.js
+node test.js
View
4 test.js
@@ -1,4 +1,4 @@
-var PhantomLint = require('./PhantomLint.js');
+var LintRoller = require('./LintRoller.js');
var config = {
verbose : false,
@@ -25,4 +25,4 @@ var config = {
jsHint : false
};
-PhantomLint.init(config);
+LintRoller.init(config);
View
2  test.sh
@@ -1,2 +1,2 @@
clear
-assets/phantomjs-1.5.0/bin/phantomjs test.js
+node test.js
Please sign in to comment.
Something went wrong with that request. Please try again.