Permalink
Browse files

* 1.0.0 version

* changed some colors to be more readable on some color schema
* added missing help for cli options
  • Loading branch information...
1 parent eba887f commit 270dc268f94667254b4032334df32cb0dcd46774 Julien Polo committed Mar 31, 2011
Showing with 32 additions and 36 deletions.
  1. +29 −34 bin/node-lint
  2. +2 −1 lib/lint/formatter/cli.js
  3. +1 −1 package.json
View
@@ -1,54 +1,49 @@
#!/usr/bin/env node
-var util = require(process.binding('natives').util ? 'util' : 'sys');
-var fs = require('fs');
-var path = require('path');
-var ROOT_PATH, LIB_PATH;
+/*jslint nodejs:true, indent:4 */
+var util = require(process.binding('natives').util ? 'util' : 'sys'),
+ fs = require('fs'),
+ path = require('path');
//Build path
-ROOT_PATH = path.dirname(__dirname);
-LIB_PATH = path.join(path.dirname(__dirname), 'lib');
+var VERSION = '1.0.0',
+ ROOT_PATH = path.dirname(__dirname),
+ LIB_PATH = path.join(path.dirname(__dirname), 'lib');
require.paths.unshift(LIB_PATH);
//Include lint library
-var lint = require('lint');
-var Launcher = lint.Launcher;
-
-
-
-
-var usage, args, positionals, launcher, options, configFile;
+var lint = require('lint'),
+ Launcher = lint.Launcher;
//called as main executable
+var usage = "Usage: " + process.ARGV[0] + " file.js [dir1 file2 dir2 ...] [options]\n" +
+ "Options:\n\n" +
+ " --config=FILE the path to a JSON file with JSLINT options\n" +
+ " --formatter=FILE optional path to a /dir/dir/file.hs file to customize the output\n" +
+ " --no-colors disable colors\n" +
+ " --silent disable console output\n" +
+ " --pretty enable pretty print for some format (XML, etc)\n" +
+ " -h, --help display this help and exit\n" +
+ " -v, --version output version information and exit",
+ args = process.ARGV.splice(2), arg,
+ positionals = [],
+ options = {
+ formatter: {
+ },
+ parser: {
+ }
+ },
+ configFile = process.env.NODELINT_CONFIG_FILE || path.join(__dirname, '..', 'etc', 'config.json'),
+ launcher = new Launcher();
-usage = "Usage: " + process.ARGV[0] + " file.js [dir1 file2 dir2 ...] [options]\n" +
-"Options:\n\n" +
-" --config=FILE the path to a JSON file with JSLINT options\n" +
-" --formatter=FILE optional path to a /dir/dir/file.hs file to customize the output\n" +
-" -h, --help display this help and exit\n" +
-" -v, --version output version information and exit";
-args = process.ARGV.splice(2);
-positionals = [];
-options = {
- formatter: {
- },
- parser: {
- }
-};
-configFile = process.env.NODELINT_CONFIG_FILE || path.join(__dirname, '..', 'etc', 'config.json');
-
-launcher = new Launcher();
while (args.length !== 0) {
arg = args.shift();
switch (arg) {
case '-v':
case '--version':
- var content, pkg;
- content = fs.readFileSync(path.join(__filename, '..', '..', '..', 'package.json'), 'utf8');
- pkg = JSON.parse(content);
- util.puts(pkg.version);
+ util.puts(VERSION);
process.exit(0);
break;
case '-h':
@@ -97,6 +97,7 @@ function Formatter(options) {
'text-decoration' : []
},
'file': {
+ 'font': null,
'font-weight' : 'bold',
'text-decoration' : ['underline']
},
@@ -131,7 +132,7 @@ function Formatter(options) {
'error-evidence': {
'font-weight' : 'bold',
- 'color' : 'yellow'
+ 'color' : 'blue'
},
'error-reason': {
'font-style' : 'italic'
View
@@ -1,7 +1,7 @@
{
"name": "lint",
"description": "This package provide lint validation library + node-lint command line tool allows you to check for problems using JSLint. You can specify your own --config file to use alternate JSLint options and your own --formatter file if you want to customize the generated output.",
- "version": "0.2.1-2",
+ "version": "1.0.0",
"homepage": "https://github.com/as-jpolo/node-lint",
"author": "tav <tav@espians.com> (http://tav.espians.com)",
"contributors": [

0 comments on commit 270dc26

Please sign in to comment.