Commit 586a6760 by Nick Schonning Committed by GitHub

Merge pull request #1545 from nschonni/eslint

ESLint conversion from JSHint
parents d0c777a3 f657e1a6
{
"env": {
"node": true
},
"globals": {},
"rules": {
"no-bitwise": 2,
"camelcase": 0,
"curly": 2,
"eqeqeq": 2,
"no-unused-expressions": [
2,
{
"allowTernary": true
}
],
"wrap-iife": [
2,
"any"
],
"indent": [
2,
2,
{
"SwitchCase": 1
}
],
"linebreak-style": 2,
"no-multi-str": 2,
"new-cap": 2,
"no-caller": 2,
"quotes": [
2,
"single"
],
"strict": 0,
"no-undef": 2,
"no-unused-vars": 2
}
}
{
"bitwise": true,
"camelcase": false,
"curly": true,
"eqeqeq": true,
"expr": true,
"immed": true,
"indent": 2,
"laxbreak": true,
"mocha": true,
"multistr": true,
"newcap": true,
"noarg": true,
"node": true,
"quotmark": "single",
"strict": false,
"undef": true,
"unused": true
}
\ No newline at end of file
...@@ -166,7 +166,7 @@ function getEmitter() { ...@@ -166,7 +166,7 @@ function getEmitter() {
emitter.on('done', function() { emitter.on('done', function() {
if (!options.watch && !options.directory) { if (!options.watch && !options.directory) {
process.exit; process.exit();
} }
}); });
...@@ -274,11 +274,11 @@ function watch(options, emitter) { ...@@ -274,11 +274,11 @@ function watch(options, emitter) {
}); });
}); });
gaze.on('added', function(file) { gaze.on('added', function() {
graph = buildGraph(options); graph = buildGraph(options);
}); });
gaze.on('deleted', function(file) { gaze.on('deleted', function() {
graph = buildGraph(options); graph = buildGraph(options);
}); });
} }
...@@ -372,7 +372,7 @@ function renderDir(options, emitter) { ...@@ -372,7 +372,7 @@ function renderDir(options, emitter) {
}, function(successful, arr) { }, function(successful, arr) {
var outputDir = path.join(process.cwd(), options.output); var outputDir = path.join(process.cwd(), options.output);
emitter.emit('warn', util.format('Wrote %s CSS files to %s', arr.length, outputDir)); emitter.emit('warn', util.format('Wrote %s CSS files to %s', arr.length, outputDir));
process.exit; process.exit();
}); });
}); });
} }
......
...@@ -30,7 +30,7 @@ ...@@ -30,7 +30,7 @@
"coverage": "node scripts/coverage.js", "coverage": "node scripts/coverage.js",
"install": "node scripts/install.js", "install": "node scripts/install.js",
"postinstall": "node scripts/build.js", "postinstall": "node scripts/build.js",
"pretest": "node_modules/.bin/jshint bin lib scripts test", "pretest": "node_modules/.bin/eslint bin/node-sass lib scripts test",
"test": "node_modules/.bin/mocha test", "test": "node_modules/.bin/mocha test",
"build": "node scripts/build.js --force", "build": "node scripts/build.js --force",
"prepublish": "not-in-install && node scripts/prepublish.js || in-install" "prepublish": "not-in-install && node scripts/prepublish.js || in-install"
...@@ -69,8 +69,8 @@ ...@@ -69,8 +69,8 @@
}, },
"devDependencies": { "devDependencies": {
"coveralls": "^2.11.8", "coveralls": "^2.11.8",
"eslint": "^2.9.0",
"istanbul": "^0.4.2", "istanbul": "^0.4.2",
"jshint": "^2.9.1",
"mocha": "^2.4.5", "mocha": "^2.4.5",
"mocha-lcov-reporter": "^1.2.0", "mocha-lcov-reporter": "^1.2.0",
"rimraf": "^2.5.2" "rimraf": "^2.5.2"
......
...@@ -7,20 +7,18 @@ var Mocha = require('mocha'), ...@@ -7,20 +7,18 @@ var Mocha = require('mocha'),
path = require('path'), path = require('path'),
mkdirp = require('mkdirp'), mkdirp = require('mkdirp'),
coveralls = require('coveralls'), coveralls = require('coveralls'),
Instrumenter = require('istanbul').Instrumenter, istanbul = require('istanbul'),
Report = require('istanbul').Report, sourcefiles = ['index.js', 'extensions.js', 'render.js'],
Collector = new require('istanbul').Collector, summary= istanbul.Report.create('text-summary'),
sourcefiles = ['index.js', 'extensions.js', 'render.js', 'errors.js'], lcov = istanbul.Report.create('lcovonly', { dir: path.join('coverage') }),
summary= Report.create('text-summary'), html = istanbul.Report.create('html', { dir: path.join('coverage', 'html') });
lcov = Report.create('lcovonly', { dir: path.join('coverage') }),
html = Report.create('html', { dir: path.join('coverage', 'html') });
function coverage() { function coverage() {
var mocha = new Mocha(); var mocha = new Mocha();
var rep = function(runner) { var rep = function(runner) {
runner.on('end', function(){ runner.on('end', function(){
var cov = global.__coverage__, var cov = global.__coverage__,
collector = new Collector(); collector = new istanbul.Collector();
if (cov) { if (cov) {
mkdirp(path.join('coverage', 'html'), function(err) { mkdirp(path.join('coverage', 'html'), function(err) {
if (err) { throw err; } if (err) { throw err; }
...@@ -41,7 +39,7 @@ function coverage() { ...@@ -41,7 +39,7 @@ function coverage() {
} }
}); });
}; };
var instrumenter = new Instrumenter(); var instrumenter = new istanbul.Instrumenter();
var instrumentedfiles = []; var instrumentedfiles = [];
var processfile = function(source) { var processfile = function(source) {
fs.readFile(path.join('lib', source), function(err, data) { fs.readFile(path.join('lib', source), function(err, data) {
......
{
"env": {
"mocha": true
}
}
/*eslint new-cap: ["error", {"capIsNewExceptions": ["Color"]}]*/
var assert = require('assert'), var assert = require('assert'),
fs = require('fs'), fs = require('fs'),
path = require('path'), path = require('path'),
......
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