Commit 05105ad3 by Nick Schonning

Bump ESLint to 3.x and fix errors

parent fb199177
......@@ -3,6 +3,7 @@
"node": true
},
"globals": {},
"extends": "eslint:recommended",
"rules": {
"no-bitwise": 2,
"camelcase": 0,
......@@ -35,6 +36,11 @@
],
"strict": 0,
"no-undef": 2,
"no-unused-vars": 2
"no-unused-vars": 2,
"semi": 2,
"no-extra-semi": 2,
"no-redeclare": 2,
"block-scoped-var": 2,
"no-console": 0
}
}
node_modules/**
test/coverage/html
......@@ -182,6 +182,7 @@ function getEmitter() {
*/
function getOptions(args, options) {
var cssDir, sassDir, file, mapDir;
options.src = args[0];
if (args[1]) {
......@@ -193,9 +194,9 @@ function getOptions(args, options) {
}
if (options.directory) {
var sassDir = path.resolve(options.directory);
var file = path.relative(sassDir, args[0]);
var cssDir = path.resolve(options.output);
sassDir = path.resolve(options.directory);
file = path.relative(sassDir, args[0]);
cssDir = path.resolve(options.output);
options.dest = path.join(cssDir, file).replace(path.extname(file), '.css');
}
......@@ -215,9 +216,9 @@ function getOptions(args, options) {
if (!options.directory) {
options.sourceMap = path.resolve(options.sourceMapOriginal, path.basename(options.dest) + '.map');
} else {
var sassDir = path.resolve(options.directory);
var file = path.relative(sassDir, args[0]);
var mapDir = path.resolve(options.sourceMapOriginal);
sassDir = path.resolve(options.directory);
file = path.relative(sassDir, args[0]);
mapDir = path.resolve(options.sourceMapOriginal);
options.sourceMap = path.join(mapDir, file).replace(path.extname(file), '.css.map');
}
}
......@@ -236,19 +237,20 @@ function getOptions(args, options) {
function watch(options, emitter) {
var buildGraph = function(options) {
var graph;
var graphOptions = {
loadPaths: options.includePath,
extensions: ['scss', 'sass', 'css']
};
if (options.directory) {
var graph = grapher.parseDir(options.directory, graphOptions);
graph = grapher.parseDir(options.directory, graphOptions);
} else {
var graph = grapher.parseFile(options.src, graphOptions);
graph = grapher.parseFile(options.src, graphOptions);
}
return graph;
}
};
var watch = [];
var graph = buildGraph(options);
......
......@@ -71,7 +71,7 @@
},
"devDependencies": {
"coveralls": "^2.11.8",
"eslint": "^2.9.0",
"eslint": "^3.4.0",
"istanbul": "^0.4.2",
"mocha": "^2.4.5",
"mocha-lcov-reporter": "^1.2.0",
......
......@@ -147,7 +147,7 @@ describe('api', function() {
var expectedRed = read(fixture('sass-path/expected-red.css'), 'utf8').trim();
var expectedOrange = read(fixture('sass-path/expected-orange.css'), 'utf8').trim();
envIncludes = [
var envIncludes = [
fixture('sass-path/red'),
fixture('sass-path/orange')
];
......@@ -175,7 +175,7 @@ describe('api', function() {
var expectedRed = read(fixture('sass-path/expected-red.css'), 'utf8').trim();
var expectedOrange = read(fixture('sass-path/expected-orange.css'), 'utf8').trim();
envIncludes = [
var envIncludes = [
fixture('sass-path/red')
];
process.env.SASS_PATH = envIncludes.join(path.delimiter);
......
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