Update checked-in dependencies
This commit is contained in:
parent
6b0d45a5c6
commit
cc1adb825a
4247 changed files with 144820 additions and 149530 deletions
16
node_modules/eslint/bin/eslint.js
generated
vendored
16
node_modules/eslint/bin/eslint.js
generated
vendored
|
|
@ -14,7 +14,7 @@ require("v8-compile-cache");
|
|||
|
||||
// must do this initialization *before* other requires in order to work
|
||||
if (process.argv.includes("--debug")) {
|
||||
require("debug").enable("eslint:*,-eslint:code-path");
|
||||
require("debug").enable("eslint:*,-eslint:code-path,eslintrc:*");
|
||||
}
|
||||
|
||||
//------------------------------------------------------------------------------
|
||||
|
|
@ -66,11 +66,8 @@ function readStdin() {
|
|||
*/
|
||||
function getErrorMessage(error) {
|
||||
|
||||
// Lazy loading because those are used only if error happened.
|
||||
const fs = require("fs");
|
||||
const path = require("path");
|
||||
// Lazy loading because this is used only if an error happened.
|
||||
const util = require("util");
|
||||
const lodash = require("lodash");
|
||||
|
||||
// Foolproof -- thirdparty module might throw non-object.
|
||||
if (typeof error !== "object" || error === null) {
|
||||
|
|
@ -80,14 +77,7 @@ function getErrorMessage(error) {
|
|||
// Use templates if `error.messageTemplate` is present.
|
||||
if (typeof error.messageTemplate === "string") {
|
||||
try {
|
||||
const templateFilePath = path.resolve(
|
||||
__dirname,
|
||||
`../messages/${error.messageTemplate}.txt`
|
||||
);
|
||||
|
||||
// Use sync API because Node.js should exit at this tick.
|
||||
const templateText = fs.readFileSync(templateFilePath, "utf-8");
|
||||
const template = lodash.template(templateText);
|
||||
const template = require(`../messages/${error.messageTemplate}.js`);
|
||||
|
||||
return template(error.messageData || {});
|
||||
} catch {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue