Permalink
Browse files

[dependencies] bump dependencies, use eslint, mocha and nyc directly

  • Loading branch information...
gabrielcsapo committed Nov 3, 2018
1 parent f26ea16 commit fa895f06cb5ba576235b1001fa5296b37470290e
@@ -0,0 +1,3 @@
build
test
site
@@ -0,0 +1,14 @@
module.exports = {
parserOptions: {
ecmaVersion: 2017,
sourceType: 'module'
},
extends: [
'eslint:recommended',
],
env: {
es6: true,
node: true,
mocha: true
}
};

Large diffs are not rendered by default.

Oops, something went wrong.
@@ -1,4 +1,4 @@
Copyright 2015 LinkedIn Corp. Licensed under the Apache License, Version 2.0
Copyright 2018 LinkedIn Corp. Licensed under the Apache License, Version 2.0
(the "License"); you may not use this file except in compliance with the
License.
 You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
2 NOTICE
@@ -1 +1 @@
Copyright 2015 LinkedIn Corp. All rights reserved.
Copyright 2018 LinkedIn Corp. All rights reserved.

This file was deleted.

Oops, something went wrong.

This file was deleted.

Oops, something went wrong.

This file was deleted.

Oops, something went wrong.
@@ -1,13 +1,8 @@
var gulp = require("gulp");
// Know the node-sass we wrap. It's vital to debugging, tests, and coverage reports
// eslint-disable-next-line no-console
console.log(require("node-sass").info);
require("./build/lint")(gulp);
require("./build/test")(gulp, ["lint"]);
require("./build/coverage")(gulp);
require("./build/site")(gulp, null, __dirname);
gulp.task("default", ["test"]);
require("./build/coverage")(gulp, ["lint"], "test:all");
@@ -185,14 +185,17 @@ Assets.prototype.install = function(file, uri, cb) {
try {
if (options.installWithSymlinks) {
fs.mkdirpSync(path.dirname(dest));
ensureSymlink(file, dest);
} else {
// we explicitly use copySync rather than copy to avoid starving system resources
fs.copySync(file, dest);
}
cb(null, dest);
} catch (error) {
// eslint-disable-next-line no-ex-assign
error = new Error("Failed to install asset from " + file + "\n" + error.toString());
cb(error);
}
} else {
@@ -3,7 +3,7 @@
module.exports = function(eyeglass, sass) {
return {
"eyeglass-asset-uri($registered-assets, $relative-path)": function($assets, $uri, done) {
eyeglass.assets.resolveAsset($assets, $uri, function(error, assetUri, assetPath) {
eyeglass.assets.resolveAsset($assets, $uri, function(error, assetUri) {
if (error) {
if (error.constructor === sass.types.Error) {
done(error);
@@ -7,7 +7,7 @@ var URI = require("../util/URI");
var fileUtils = require("../util/files");
// import pattern matches `assets` and `foo/assets`, but not `foo/bar/assets`
var rAssetsImport = /^(?:([^\/]+)\/)?assets$/;
var rAssetsImport = /^(?:([^/]+)\/)?assets$/;
function AssetImporter(eyeglass, sass, options, fallbackImporter) {
@@ -90,7 +90,7 @@ function ModuleImporter(eyeglass, sass, options, fallbackImporter) {
// pattern to match moduleName/relativePath
// $1 = moduleName (foo or @scope/foo)
// $2 = relativePath
var match = /^((?:@[^\/]+\/[^\/]+)|(?:[^\/]+))\/?(.*)/.exec(uri);
var match = /^((?:@[^/]+\/[^/]+)|(?:[^/]+))\/?(.*)/.exec(uri);
var moduleName = match && match[1];
var relativePath = match && match[2];
var mod = eyeglass.modules.access(moduleName, isRealFile ? prev : root);
@@ -64,6 +64,8 @@ function checkMissingDependencies() {
return " " + dep;
}));
warning.push("You might need to `npm install` the above.");
// eslint-disable-next-line no-console
console.warn(warning.join("\n"));
}
}
@@ -448,7 +448,13 @@ function resolveModulePackage(id, parent, parentDir) {
return this.cache.modules.getOrElse(cacheKey, function() {
try {
return resolve(id, parent, parentDir);
} catch (e) {}
} catch (e) {
/* istanbul ignore next - don't test debug */
debug.modules && debug.modules(
'failed to resolve module package %s',
e
)
}
});
}
@@ -30,6 +30,8 @@ function checkConflicts(obj1, obj2) {
// if the current signature does not match the new signature...
if (currentFunction && currentFunction !== fn) {
// throw a warning
// eslint-disable-next-line no-console
console.warn("WARNING: Function " + fnName +
" was redeclared with conflicting function signatures: " +
currentFunction + " vs. " + fn);
@@ -4,6 +4,7 @@ var path = require("path");
var merge = require("lodash.merge");
var URI = require("./URI");
/* eslint-disable-next-line no-unused-vars */
function Options(options, deprecate, sassArg) {
// get the normalized Sass options
options = getSassOptions.apply(null, arguments);
@@ -57,7 +57,7 @@ SimpleCache.prototype.getOrElse = function(key, callback) {
/**
* Purges the cache
*/
SimpleCache.prototype.purge = function(key) {
SimpleCache.prototype.purge = function() {
this.cache = {};
};
@@ -4,10 +4,10 @@ var path = require("path");
var stringUtils = require("./strings");
var stdSep = "/";
var rAllPathSep = /[\/\\]+/g;
var rAllPathSep = /[/\\]+/g;
var rIsRelative = /^\.{1,2}/;
var rUriFragments = /^([^\?#]+)(\?[^#]*)?(#.*)?/;
var rSearchDelim = /^[\?\&]*/;
var rUriFragments = /^([^?#]+)(\?[^#]*)?(#.*)?/;
var rSearchDelim = /^[?&]*/;
/**
* Provides an interface for working with URIs
@@ -94,7 +94,7 @@ URI.prototype.setHash = function(hash) {
* returns the URI as a string
* @returns {String} the full URI
*/
URI.prototype.toString = function(sep) {
URI.prototype.toString = function() {
return this.path + this.search + this.hash;
};
@@ -23,6 +23,7 @@ Deprecator.prototype.isEnabled = function(sinceVersion) {
Deprecator.prototype.deprecate = function(sinceVersion, removeVersion, message) {
if (this.isEnabled(sinceVersion)) {
// eslint-disable-next-line no-console
console.warn(
"[eyeglass:deprecation]",
"(deprecated in " + sinceVersion + ", will be removed in " + removeVersion + ")",
@@ -32,5 +33,6 @@ Deprecator.prototype.deprecate = function(sinceVersion, removeVersion, message)
module.exports = function(options) {
var deprecator = new Deprecator(options);
return deprecator.deprecate.bind(deprecator);
};
@@ -22,6 +22,7 @@ module.exports = function(eyeglass, sass, options, version) {
return " " + mod.name + " needed eyeglass " + mod.eyeglass.needs;
}));
// eslint-disable-next-line no-console
console.error(incompatible.join("\n"));
}
@@ -34,6 +35,7 @@ module.exports = function(eyeglass, sass, options, version) {
missing.push("Please add the following to the module's package.json:");
missing.push(" \"eyeglass\": { \"needs\": \"^" + version + "\" }");
// eslint-disable-next-line no-console
console.warn(missing.join("\n"));
}
@@ -1,7 +1,7 @@
"use strict";
var rUnquote = /^("|')(.*)\1$/;
var rPlaceholders = /\${([^\}]+)}/g;
var rPlaceholders = /\${([^}]+)}/g;
function isSassValue(item) {
return !!(item && item.getValue && item.constructor);
Oops, something went wrong.

0 comments on commit fa895f0

Please sign in to comment.