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() {
emitter.on('done', function() {
if (!options.watch && !options.directory) {
process.exit;
process.exit();
}
});
......@@ -274,11 +274,11 @@ function watch(options, emitter) {
});
});
gaze.on('added', function(file) {
gaze.on('added', function() {
graph = buildGraph(options);
});
gaze.on('deleted', function(file) {
gaze.on('deleted', function() {
graph = buildGraph(options);
});
}
......@@ -372,7 +372,7 @@ function renderDir(options, emitter) {
}, function(successful, arr) {
var outputDir = path.join(process.cwd(), options.output);
emitter.emit('warn', util.format('Wrote %s CSS files to %s', arr.length, outputDir));
process.exit;
process.exit();
});
});
}
......
......@@ -30,7 +30,7 @@
"coverage": "node scripts/coverage.js",
"install": "node scripts/install.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",
"build": "node scripts/build.js --force",
"prepublish": "not-in-install && node scripts/prepublish.js || in-install"
......@@ -69,8 +69,8 @@
},
"devDependencies": {
"coveralls": "^2.11.8",
"eslint": "^2.9.0",
"istanbul": "^0.4.2",
"jshint": "^2.9.1",
"mocha": "^2.4.5",
"mocha-lcov-reporter": "^1.2.0",
"rimraf": "^2.5.2"
......
......@@ -7,20 +7,18 @@ var Mocha = require('mocha'),
path = require('path'),
mkdirp = require('mkdirp'),
coveralls = require('coveralls'),
Instrumenter = require('istanbul').Instrumenter,
Report = require('istanbul').Report,
Collector = new require('istanbul').Collector,
sourcefiles = ['index.js', 'extensions.js', 'render.js', 'errors.js'],
summary= Report.create('text-summary'),
lcov = Report.create('lcovonly', { dir: path.join('coverage') }),
html = Report.create('html', { dir: path.join('coverage', 'html') });
istanbul = require('istanbul'),
sourcefiles = ['index.js', 'extensions.js', 'render.js'],
summary= istanbul.Report.create('text-summary'),
lcov = istanbul.Report.create('lcovonly', { dir: path.join('coverage') }),
html = istanbul.Report.create('html', { dir: path.join('coverage', 'html') });
function coverage() {
var mocha = new Mocha();
var rep = function(runner) {
runner.on('end', function(){
var cov = global.__coverage__,
collector = new Collector();
collector = new istanbul.Collector();
if (cov) {
mkdirp(path.join('coverage', 'html'), function(err) {
if (err) { throw err; }
......@@ -41,7 +39,7 @@ function coverage() {
}
});
};
var instrumenter = new Instrumenter();
var instrumenter = new istanbul.Instrumenter();
var instrumentedfiles = [];
var processfile = function(source) {
fs.readFile(path.join('lib', source), function(err, data) {
......
{
"env": {
"mocha": true
}
}
/*eslint new-cap: ["error", {"capIsNewExceptions": ["Color"]}]*/
var assert = require('assert'),
fs = require('fs'),
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