Skip to content
This repository has been archived by the owner on Aug 7, 2023. It is now read-only.

Reduce package activation time #875

Merged
merged 9 commits into from
Apr 10, 2017
22 changes: 5 additions & 17 deletions lib/helpers.js
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ let getDebugInfo = exports.getDebugInfo = (() => {
return returnVal;
});

return function getDebugInfo(_x3) {
return function getDebugInfo(_x2) {
return _ref.apply(this, arguments);
};
})();
Expand All @@ -67,7 +67,7 @@ let generateDebugString = exports.generateDebugString = (() => {
return details.join('\n');
});

return function generateDebugString(_x4) {
return function generateDebugString(_x3) {
return _ref2.apply(this, arguments);
};
})();
Expand Down Expand Up @@ -164,20 +164,19 @@ let processESLintMessages = exports.processESLintMessages = (() => {
return ret;
});

return function (_x19) {
return function (_x18) {
return _ref6.apply(this, arguments);
};
})()));
});

return function processESLintMessages(_x15, _x16, _x17, _x18) {
return function processESLintMessages(_x14, _x15, _x16, _x17) {
return _ref4.apply(this, arguments);
};
})();

exports.spawnWorker = spawnWorker;
exports.showError = showError;
exports.idsToIgnoredRules = idsToIgnoredRules;

var _child_process = require('child_process');

Expand Down Expand Up @@ -206,8 +205,6 @@ function _asyncToGenerator(fn) { return function () { var gen = fn.apply(this, a
// eslint-disable-next-line import/no-extraneous-dependencies, import/extensions


const RULE_OFF_SEVERITY = 0;

function spawnWorker() {
const env = Object.create(process.env);

Expand Down Expand Up @@ -251,15 +248,6 @@ function showError(givenMessage) {
});
}

function idsToIgnoredRules() {
let ruleIds = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : [];

return ruleIds.reduce((ids, id) => {
ids[id] = RULE_OFF_SEVERITY;
return ids;
}, {});
}

function validatePoint(textEditor, line, col) {
const buffer = textEditor.getBuffer();
// Clip the given point to a valid one, and check if it equals the original
Expand Down Expand Up @@ -300,7 +288,7 @@ const generateInvalidTrace = (() => {
};
});

return function generateInvalidTrace(_x5, _x6, _x7, _x8, _x9, _x10, _x11, _x12, _x13, _x14) {
return function generateInvalidTrace(_x4, _x5, _x6, _x7, _x8, _x9, _x10, _x11, _x12, _x13) {
return _ref3.apply(this, arguments);
};
})();
9 changes: 2 additions & 7 deletions lib/is-config-at-home-root.js
Original file line number Diff line number Diff line change
@@ -1,10 +1,5 @@
'use strict';

Object.defineProperty(exports, "__esModule", {
value: true
});
exports.isConfigAtHomeRoot = isConfigAtHomeRoot;

var _userHome = require('user-home');

var _userHome2 = _interopRequireDefault(_userHome);
Expand All @@ -23,6 +18,6 @@ function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { de
*/
/* eslint-disable import/prefer-default-export */

function isConfigAtHomeRoot(configPath) {
module.exports = function isConfigAtHomeRoot(configPath) {
return (0, _path.dirname)(configPath) === _userHome2.default;
}
};
Loading