tools: update ESLint to 5.11.0
Update ESLint to 5.11.0. PR-URL: https://github.com/nodejs/node/pull/25191 Reviewed-By: Rich Trott <rtrott@gmail.com> Reviewed-By: Trivikram Kamat <trivikr.dev@gmail.com> Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de>
This commit is contained in:
parent
361cdb7861
commit
db2b612614
1
tools/node_modules/eslint/conf/eslint-recommended.js
generated
vendored
1
tools/node_modules/eslint/conf/eslint-recommended.js
generated
vendored
@ -207,6 +207,7 @@ module.exports = {
|
|||||||
"no-unused-vars": "error",
|
"no-unused-vars": "error",
|
||||||
"no-use-before-define": "off",
|
"no-use-before-define": "off",
|
||||||
"no-useless-call": "off",
|
"no-useless-call": "off",
|
||||||
|
"no-useless-catch": "off",
|
||||||
"no-useless-computed-key": "off",
|
"no-useless-computed-key": "off",
|
||||||
"no-useless-concat": "off",
|
"no-useless-concat": "off",
|
||||||
"no-useless-constructor": "off",
|
"no-useless-constructor": "off",
|
||||||
|
19
tools/node_modules/eslint/lib/rules/camelcase.js
generated
vendored
19
tools/node_modules/eslint/lib/rules/camelcase.js
generated
vendored
@ -100,14 +100,20 @@ module.exports = {
|
|||||||
* @private
|
* @private
|
||||||
*/
|
*/
|
||||||
function isInsideObjectPattern(node) {
|
function isInsideObjectPattern(node) {
|
||||||
let { parent } = node;
|
let current = node;
|
||||||
|
|
||||||
while (parent) {
|
while (current) {
|
||||||
if (parent.type === "ObjectPattern") {
|
const parent = current.parent;
|
||||||
|
|
||||||
|
if (parent && parent.type === "Property" && parent.computed && parent.key === current) {
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (current.type === "ObjectPattern") {
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
parent = parent.parent;
|
current = parent;
|
||||||
}
|
}
|
||||||
|
|
||||||
return false;
|
return false;
|
||||||
@ -169,12 +175,15 @@ module.exports = {
|
|||||||
|
|
||||||
if (node.parent.parent && node.parent.parent.type === "ObjectPattern") {
|
if (node.parent.parent && node.parent.parent.type === "ObjectPattern") {
|
||||||
if (node.parent.shorthand && node.parent.value.left && nameIsUnderscored) {
|
if (node.parent.shorthand && node.parent.value.left && nameIsUnderscored) {
|
||||||
|
|
||||||
report(node);
|
report(node);
|
||||||
}
|
}
|
||||||
|
|
||||||
const assignmentKeyEqualsValue = node.parent.key.name === node.parent.value.name;
|
const assignmentKeyEqualsValue = node.parent.key.name === node.parent.value.name;
|
||||||
|
|
||||||
|
if (isUnderscored(name) && node.parent.computed) {
|
||||||
|
report(node);
|
||||||
|
}
|
||||||
|
|
||||||
// prevent checking righthand side of destructured object
|
// prevent checking righthand side of destructured object
|
||||||
if (node.parent.key === node && node.parent.value !== node) {
|
if (node.parent.key === node && node.parent.value !== node) {
|
||||||
return;
|
return;
|
||||||
|
144
tools/node_modules/eslint/lib/rules/implicit-arrow-linebreak.js
generated
vendored
144
tools/node_modules/eslint/lib/rules/implicit-arrow-linebreak.js
generated
vendored
@ -4,6 +4,12 @@
|
|||||||
*/
|
*/
|
||||||
"use strict";
|
"use strict";
|
||||||
|
|
||||||
|
const {
|
||||||
|
isArrowToken,
|
||||||
|
isParenthesised,
|
||||||
|
isOpeningParenToken
|
||||||
|
} = require("../util/ast-utils");
|
||||||
|
|
||||||
//------------------------------------------------------------------------------
|
//------------------------------------------------------------------------------
|
||||||
// Rule Definition
|
// Rule Definition
|
||||||
//------------------------------------------------------------------------------
|
//------------------------------------------------------------------------------
|
||||||
@ -41,6 +47,142 @@ module.exports = {
|
|||||||
return context.options[0] || "beside";
|
return context.options[0] || "beside";
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Formats the comments depending on whether it's a line or block comment.
|
||||||
|
* @param {Comment[]} comments The array of comments between the arrow and body
|
||||||
|
* @param {Integer} column The column number of the first token
|
||||||
|
* @returns {string} A string of comment text joined by line breaks
|
||||||
|
*/
|
||||||
|
function formatComments(comments, column) {
|
||||||
|
const whiteSpaces = " ".repeat(column);
|
||||||
|
|
||||||
|
return `${comments.map(comment => {
|
||||||
|
|
||||||
|
if (comment.type === "Line") {
|
||||||
|
return `//${comment.value}`;
|
||||||
|
}
|
||||||
|
|
||||||
|
return `/*${comment.value}*/`;
|
||||||
|
}).join(`\n${whiteSpaces}`)}\n${whiteSpaces}`;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Finds the first token to prepend comments to depending on the parent type
|
||||||
|
* @param {Node} node The validated node
|
||||||
|
* @returns {Token|Node} The node to prepend comments to
|
||||||
|
*/
|
||||||
|
function findFirstToken(node) {
|
||||||
|
switch (node.parent.type) {
|
||||||
|
case "VariableDeclarator":
|
||||||
|
|
||||||
|
// If the parent is first or only declarator, return the declaration, else, declarator
|
||||||
|
return sourceCode.getFirstToken(
|
||||||
|
node.parent.parent.declarations.length === 1 ||
|
||||||
|
node.parent.parent.declarations[0].id.name === node.parent.id.name
|
||||||
|
? node.parent.parent : node.parent
|
||||||
|
);
|
||||||
|
case "CallExpression":
|
||||||
|
case "Property":
|
||||||
|
|
||||||
|
// find the object key
|
||||||
|
return sourceCode.getFirstToken(node.parent);
|
||||||
|
default:
|
||||||
|
return node;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Helper function for adding parentheses fixes for nodes containing nested arrow functions
|
||||||
|
* @param {Fixer} fixer Fixer
|
||||||
|
* @param {Token} arrow - The arrow token
|
||||||
|
* @param {ASTNode} arrowBody - The arrow function body
|
||||||
|
* @returns {Function[]} autofixer -- wraps function bodies with parentheses
|
||||||
|
*/
|
||||||
|
function addParentheses(fixer, arrow, arrowBody) {
|
||||||
|
const parenthesesFixes = [];
|
||||||
|
let closingParentheses = "";
|
||||||
|
|
||||||
|
let followingBody = arrowBody;
|
||||||
|
let currentArrow = arrow;
|
||||||
|
|
||||||
|
while (currentArrow) {
|
||||||
|
if (!isParenthesised(sourceCode, followingBody)) {
|
||||||
|
parenthesesFixes.push(
|
||||||
|
fixer.insertTextAfter(currentArrow, " (")
|
||||||
|
);
|
||||||
|
|
||||||
|
const paramsToken = sourceCode.getTokenBefore(currentArrow, token =>
|
||||||
|
isOpeningParenToken(token) || token.type === "Identifier");
|
||||||
|
|
||||||
|
const whiteSpaces = " ".repeat(paramsToken.loc.start.column);
|
||||||
|
|
||||||
|
closingParentheses = `\n${whiteSpaces})${closingParentheses}`;
|
||||||
|
}
|
||||||
|
|
||||||
|
currentArrow = sourceCode.getTokenAfter(currentArrow, isArrowToken);
|
||||||
|
|
||||||
|
if (currentArrow) {
|
||||||
|
followingBody = sourceCode.getTokenAfter(currentArrow, token => !isOpeningParenToken(token));
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
return [...parenthesesFixes,
|
||||||
|
fixer.insertTextAfter(arrowBody, closingParentheses)
|
||||||
|
];
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Autofixes the function body to collapse onto the same line as the arrow.
|
||||||
|
* If comments exist, prepends the comments before the arrow function.
|
||||||
|
* If the function body contains arrow functions, appends the function bodies with parentheses.
|
||||||
|
* @param {Token} arrowToken The arrow token.
|
||||||
|
* @param {ASTNode} arrowBody the function body
|
||||||
|
* @param {ASTNode} node The evaluated node
|
||||||
|
* @returns {Function} autofixer -- validates the node to adhere to besides
|
||||||
|
*/
|
||||||
|
function autoFixBesides(arrowToken, arrowBody, node) {
|
||||||
|
return fixer => {
|
||||||
|
const placeBesides = fixer.replaceTextRange([arrowToken.range[1], arrowBody.range[0]], " ");
|
||||||
|
|
||||||
|
const comments = sourceCode.getCommentsInside(node).filter(comment =>
|
||||||
|
comment.loc.start.line < arrowBody.loc.start.line);
|
||||||
|
|
||||||
|
if (comments.length) {
|
||||||
|
|
||||||
|
// If the grandparent is not a variable declarator
|
||||||
|
if (
|
||||||
|
arrowBody.parent &&
|
||||||
|
arrowBody.parent.parent &&
|
||||||
|
arrowBody.parent.parent.type !== "VariableDeclarator"
|
||||||
|
) {
|
||||||
|
|
||||||
|
// If any arrow functions follow, return the necessary parens fixes.
|
||||||
|
if (sourceCode.getTokenAfter(arrowToken, isArrowToken) && arrowBody.parent.parent.type !== "VariableDeclarator") {
|
||||||
|
return addParentheses(fixer, arrowToken, arrowBody);
|
||||||
|
}
|
||||||
|
|
||||||
|
// If any arrow functions precede, the necessary fixes have already been returned, so return null.
|
||||||
|
if (sourceCode.getTokenBefore(arrowToken, isArrowToken) && arrowBody.parent.parent.type !== "VariableDeclarator") {
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
const firstToken = findFirstToken(node);
|
||||||
|
|
||||||
|
const commentText = formatComments(comments, firstToken.loc.start.column);
|
||||||
|
|
||||||
|
const commentBeforeExpression = fixer.insertTextBeforeRange(
|
||||||
|
firstToken.range,
|
||||||
|
commentText
|
||||||
|
);
|
||||||
|
|
||||||
|
return [placeBesides, commentBeforeExpression];
|
||||||
|
}
|
||||||
|
|
||||||
|
return placeBesides;
|
||||||
|
};
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Validates the location of an arrow function body
|
* Validates the location of an arrow function body
|
||||||
* @param {ASTNode} node The arrow function body
|
* @param {ASTNode} node The arrow function body
|
||||||
@ -75,7 +217,7 @@ module.exports = {
|
|||||||
context.report({
|
context.report({
|
||||||
node: fixerTarget,
|
node: fixerTarget,
|
||||||
message: "Expected no linebreak before this expression.",
|
message: "Expected no linebreak before this expression.",
|
||||||
fix: fixer => fixer.replaceTextRange([tokenBefore.range[1], fixerTarget.range[0]], " ")
|
fix: autoFixBesides(tokenBefore, fixerTarget, node)
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
46
tools/node_modules/eslint/lib/rules/indent.js
generated
vendored
46
tools/node_modules/eslint/lib/rules/indent.js
generated
vendored
@ -522,25 +522,13 @@ module.exports = {
|
|||||||
},
|
},
|
||||||
VariableDeclarator: {
|
VariableDeclarator: {
|
||||||
oneOf: [
|
oneOf: [
|
||||||
{
|
ELEMENT_LIST_SCHEMA,
|
||||||
type: "integer",
|
|
||||||
minimum: 0
|
|
||||||
},
|
|
||||||
{
|
{
|
||||||
type: "object",
|
type: "object",
|
||||||
properties: {
|
properties: {
|
||||||
var: {
|
var: ELEMENT_LIST_SCHEMA,
|
||||||
type: "integer",
|
let: ELEMENT_LIST_SCHEMA,
|
||||||
minimum: 0
|
const: ELEMENT_LIST_SCHEMA
|
||||||
},
|
|
||||||
let: {
|
|
||||||
type: "integer",
|
|
||||||
minimum: 0
|
|
||||||
},
|
|
||||||
const: {
|
|
||||||
type: "integer",
|
|
||||||
minimum: 0
|
|
||||||
}
|
|
||||||
},
|
},
|
||||||
additionalProperties: false
|
additionalProperties: false
|
||||||
}
|
}
|
||||||
@ -661,7 +649,7 @@ module.exports = {
|
|||||||
if (context.options[1]) {
|
if (context.options[1]) {
|
||||||
lodash.merge(options, context.options[1]);
|
lodash.merge(options, context.options[1]);
|
||||||
|
|
||||||
if (typeof options.VariableDeclarator === "number") {
|
if (typeof options.VariableDeclarator === "number" || options.VariableDeclarator === "first") {
|
||||||
options.VariableDeclarator = {
|
options.VariableDeclarator = {
|
||||||
var: options.VariableDeclarator,
|
var: options.VariableDeclarator,
|
||||||
let: options.VariableDeclarator,
|
let: options.VariableDeclarator,
|
||||||
@ -1349,10 +1337,27 @@ module.exports = {
|
|||||||
},
|
},
|
||||||
|
|
||||||
VariableDeclaration(node) {
|
VariableDeclaration(node) {
|
||||||
const variableIndent = Object.prototype.hasOwnProperty.call(options.VariableDeclarator, node.kind)
|
let variableIndent = Object.prototype.hasOwnProperty.call(options.VariableDeclarator, node.kind)
|
||||||
? options.VariableDeclarator[node.kind]
|
? options.VariableDeclarator[node.kind]
|
||||||
: DEFAULT_VARIABLE_INDENT;
|
: DEFAULT_VARIABLE_INDENT;
|
||||||
|
|
||||||
|
const firstToken = sourceCode.getFirstToken(node),
|
||||||
|
lastToken = sourceCode.getLastToken(node);
|
||||||
|
|
||||||
|
if (options.VariableDeclarator[node.kind] === "first") {
|
||||||
|
if (node.declarations.length > 1) {
|
||||||
|
addElementListIndent(
|
||||||
|
node.declarations,
|
||||||
|
firstToken,
|
||||||
|
lastToken,
|
||||||
|
"first"
|
||||||
|
);
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
variableIndent = DEFAULT_VARIABLE_INDENT;
|
||||||
|
}
|
||||||
|
|
||||||
if (node.declarations[node.declarations.length - 1].loc.start.line > node.loc.start.line) {
|
if (node.declarations[node.declarations.length - 1].loc.start.line > node.loc.start.line) {
|
||||||
|
|
||||||
/*
|
/*
|
||||||
@ -1374,13 +1379,10 @@ module.exports = {
|
|||||||
* on the same line as the start of the declaration, provided that there are declarators that
|
* on the same line as the start of the declaration, provided that there are declarators that
|
||||||
* follow this one.
|
* follow this one.
|
||||||
*/
|
*/
|
||||||
const firstToken = sourceCode.getFirstToken(node);
|
|
||||||
|
|
||||||
offsets.setDesiredOffsets(node.range, firstToken, variableIndent, true);
|
offsets.setDesiredOffsets(node.range, firstToken, variableIndent, true);
|
||||||
} else {
|
} else {
|
||||||
offsets.setDesiredOffsets(node.range, sourceCode.getFirstToken(node), variableIndent);
|
offsets.setDesiredOffsets(node.range, firstToken, variableIndent);
|
||||||
}
|
}
|
||||||
const lastToken = sourceCode.getLastToken(node);
|
|
||||||
|
|
||||||
if (astUtils.isSemicolonToken(lastToken)) {
|
if (astUtils.isSemicolonToken(lastToken)) {
|
||||||
offsets.ignoreToken(lastToken);
|
offsets.ignoreToken(lastToken);
|
||||||
|
2
tools/node_modules/eslint/lib/rules/no-irregular-whitespace.js
generated
vendored
2
tools/node_modules/eslint/lib/rules/no-irregular-whitespace.js
generated
vendored
@ -30,7 +30,7 @@ module.exports = {
|
|||||||
type: "problem",
|
type: "problem",
|
||||||
|
|
||||||
docs: {
|
docs: {
|
||||||
description: "disallow irregular whitespace outside of strings and comments",
|
description: "disallow irregular whitespace",
|
||||||
category: "Possible Errors",
|
category: "Possible Errors",
|
||||||
recommended: true,
|
recommended: true,
|
||||||
url: "https://eslint.org/docs/rules/no-irregular-whitespace"
|
url: "https://eslint.org/docs/rules/no-irregular-whitespace"
|
||||||
|
51
tools/node_modules/eslint/lib/rules/no-useless-catch.js
generated
vendored
Normal file
51
tools/node_modules/eslint/lib/rules/no-useless-catch.js
generated
vendored
Normal file
@ -0,0 +1,51 @@
|
|||||||
|
/**
|
||||||
|
* @fileoverview Reports useless `catch` clauses that just rethrow their error.
|
||||||
|
* @author Teddy Katz
|
||||||
|
*/
|
||||||
|
|
||||||
|
"use strict";
|
||||||
|
|
||||||
|
//------------------------------------------------------------------------------
|
||||||
|
// Rule Definition
|
||||||
|
//------------------------------------------------------------------------------
|
||||||
|
|
||||||
|
module.exports = {
|
||||||
|
meta: {
|
||||||
|
type: "suggestion",
|
||||||
|
|
||||||
|
docs: {
|
||||||
|
description: "disallow unnecessary `catch` clauses",
|
||||||
|
category: "Best Practices",
|
||||||
|
recommended: false,
|
||||||
|
url: "https://eslint.org/docs/rules/no-useless-catch"
|
||||||
|
},
|
||||||
|
|
||||||
|
schema: []
|
||||||
|
},
|
||||||
|
|
||||||
|
create(context) {
|
||||||
|
return {
|
||||||
|
CatchClause(node) {
|
||||||
|
if (
|
||||||
|
node.param.type === "Identifier" &&
|
||||||
|
node.body.body.length &&
|
||||||
|
node.body.body[0].type === "ThrowStatement" &&
|
||||||
|
node.body.body[0].argument.type === "Identifier" &&
|
||||||
|
node.body.body[0].argument.name === node.param.name
|
||||||
|
) {
|
||||||
|
if (node.parent.finalizer) {
|
||||||
|
context.report({
|
||||||
|
node,
|
||||||
|
message: "Unnecessary catch clause."
|
||||||
|
});
|
||||||
|
} else {
|
||||||
|
context.report({
|
||||||
|
node: node.parent,
|
||||||
|
message: "Unnecessary try/catch wrapper."
|
||||||
|
});
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
};
|
||||||
|
}
|
||||||
|
};
|
2
tools/node_modules/eslint/node_modules/ajv/README.md
generated
vendored
2
tools/node_modules/eslint/node_modules/ajv/README.md
generated
vendored
@ -244,7 +244,7 @@ The following formats are supported for string validation with "format" keyword:
|
|||||||
- _uri_: full URI.
|
- _uri_: full URI.
|
||||||
- _uri-reference_: URI reference, including full and relative URIs.
|
- _uri-reference_: URI reference, including full and relative URIs.
|
||||||
- _uri-template_: URI template according to [RFC6570](https://tools.ietf.org/html/rfc6570)
|
- _uri-template_: URI template according to [RFC6570](https://tools.ietf.org/html/rfc6570)
|
||||||
- _url_: [URL record](https://url.spec.whatwg.org/#concept-url).
|
- _url_ (deprecated): [URL record](https://url.spec.whatwg.org/#concept-url).
|
||||||
- _email_: email address.
|
- _email_: email address.
|
||||||
- _hostname_: host name according to [RFC1034](http://tools.ietf.org/html/rfc1034#section-3.5).
|
- _hostname_: host name according to [RFC1034](http://tools.ietf.org/html/rfc1034#section-3.5).
|
||||||
- _ipv4_: IP address v4.
|
- _ipv4_: IP address v4.
|
||||||
|
10
tools/node_modules/eslint/node_modules/ajv/dist/ajv.bundle.js
generated
vendored
10
tools/node_modules/eslint/node_modules/ajv/dist/ajv.bundle.js
generated
vendored
@ -6595,8 +6595,6 @@ function Ajv(opts) {
|
|||||||
this._refs = {};
|
this._refs = {};
|
||||||
this._fragments = {};
|
this._fragments = {};
|
||||||
this._formats = formats(opts.format);
|
this._formats = formats(opts.format);
|
||||||
var schemaUriFormat = this._schemaUriFormat = this._formats['uri-reference'];
|
|
||||||
this._schemaUriFormatFunc = function (str) { return schemaUriFormat.test(str); };
|
|
||||||
|
|
||||||
this._cache = opts.cache || new Cache;
|
this._cache = opts.cache || new Cache;
|
||||||
this._loadingSchemas = {};
|
this._loadingSchemas = {};
|
||||||
@ -6711,13 +6709,7 @@ function validateSchema(schema, throwOrLogError) {
|
|||||||
this.errors = null;
|
this.errors = null;
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
var currentUriFormat = this._formats.uri;
|
var valid = this.validate($schema, schema);
|
||||||
this._formats.uri = typeof currentUriFormat == 'function'
|
|
||||||
? this._schemaUriFormatFunc
|
|
||||||
: this._schemaUriFormat;
|
|
||||||
var valid;
|
|
||||||
try { valid = this.validate($schema, schema); }
|
|
||||||
finally { this._formats.uri = currentUriFormat; }
|
|
||||||
if (!valid && throwOrLogError) {
|
if (!valid && throwOrLogError) {
|
||||||
var message = 'schema is invalid: ' + this.errorsText();
|
var message = 'schema is invalid: ' + this.errorsText();
|
||||||
if (this._opts.validateSchema == 'log') this.logger.error(message);
|
if (this._opts.validateSchema == 'log') this.logger.error(message);
|
||||||
|
4
tools/node_modules/eslint/node_modules/ajv/dist/ajv.min.js
generated
vendored
4
tools/node_modules/eslint/node_modules/ajv/dist/ajv.min.js
generated
vendored
File diff suppressed because one or more lines are too long
2
tools/node_modules/eslint/node_modules/ajv/dist/ajv.min.js.map
generated
vendored
2
tools/node_modules/eslint/node_modules/ajv/dist/ajv.min.js.map
generated
vendored
File diff suppressed because one or more lines are too long
10
tools/node_modules/eslint/node_modules/ajv/lib/ajv.js
generated
vendored
10
tools/node_modules/eslint/node_modules/ajv/lib/ajv.js
generated
vendored
@ -55,8 +55,6 @@ function Ajv(opts) {
|
|||||||
this._refs = {};
|
this._refs = {};
|
||||||
this._fragments = {};
|
this._fragments = {};
|
||||||
this._formats = formats(opts.format);
|
this._formats = formats(opts.format);
|
||||||
var schemaUriFormat = this._schemaUriFormat = this._formats['uri-reference'];
|
|
||||||
this._schemaUriFormatFunc = function (str) { return schemaUriFormat.test(str); };
|
|
||||||
|
|
||||||
this._cache = opts.cache || new Cache;
|
this._cache = opts.cache || new Cache;
|
||||||
this._loadingSchemas = {};
|
this._loadingSchemas = {};
|
||||||
@ -171,13 +169,7 @@ function validateSchema(schema, throwOrLogError) {
|
|||||||
this.errors = null;
|
this.errors = null;
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
var currentUriFormat = this._formats.uri;
|
var valid = this.validate($schema, schema);
|
||||||
this._formats.uri = typeof currentUriFormat == 'function'
|
|
||||||
? this._schemaUriFormatFunc
|
|
||||||
: this._schemaUriFormat;
|
|
||||||
var valid;
|
|
||||||
try { valid = this.validate($schema, schema); }
|
|
||||||
finally { this._formats.uri = currentUriFormat; }
|
|
||||||
if (!valid && throwOrLogError) {
|
if (!valid && throwOrLogError) {
|
||||||
var message = 'schema is invalid: ' + this.errorsText();
|
var message = 'schema is invalid: ' + this.errorsText();
|
||||||
if (this._opts.validateSchema == 'log') this.logger.error(message);
|
if (this._opts.validateSchema == 'log') this.logger.error(message);
|
||||||
|
7
tools/node_modules/eslint/node_modules/ajv/lib/refs/json-schema-draft-04.json
generated
vendored
7
tools/node_modules/eslint/node_modules/ajv/lib/refs/json-schema-draft-04.json
generated
vendored
@ -28,12 +28,10 @@
|
|||||||
"type": "object",
|
"type": "object",
|
||||||
"properties": {
|
"properties": {
|
||||||
"id": {
|
"id": {
|
||||||
"type": "string",
|
"type": "string"
|
||||||
"format": "uri"
|
|
||||||
},
|
},
|
||||||
"$schema": {
|
"$schema": {
|
||||||
"type": "string",
|
"type": "string"
|
||||||
"format": "uri"
|
|
||||||
},
|
},
|
||||||
"title": {
|
"title": {
|
||||||
"type": "string"
|
"type": "string"
|
||||||
@ -137,6 +135,7 @@
|
|||||||
}
|
}
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
|
"format": { "type": "string" },
|
||||||
"allOf": { "$ref": "#/definitions/schemaArray" },
|
"allOf": { "$ref": "#/definitions/schemaArray" },
|
||||||
"anyOf": { "$ref": "#/definitions/schemaArray" },
|
"anyOf": { "$ref": "#/definitions/schemaArray" },
|
||||||
"oneOf": { "$ref": "#/definitions/schemaArray" },
|
"oneOf": { "$ref": "#/definitions/schemaArray" },
|
||||||
|
4
tools/node_modules/eslint/node_modules/ajv/package.json
generated
vendored
4
tools/node_modules/eslint/node_modules/ajv/package.json
generated
vendored
@ -33,7 +33,7 @@
|
|||||||
"karma": "^3.0.0",
|
"karma": "^3.0.0",
|
||||||
"karma-chrome-launcher": "^2.2.0",
|
"karma-chrome-launcher": "^2.2.0",
|
||||||
"karma-mocha": "^1.1.1",
|
"karma-mocha": "^1.1.1",
|
||||||
"karma-sauce-launcher": "^1.1.0",
|
"karma-sauce-launcher": "^2.0.0",
|
||||||
"mocha": "^5.1.1",
|
"mocha": "^5.1.1",
|
||||||
"nyc": "^12.0.1",
|
"nyc": "^12.0.1",
|
||||||
"pre-commit": "^1.1.1",
|
"pre-commit": "^1.1.1",
|
||||||
@ -96,5 +96,5 @@
|
|||||||
},
|
},
|
||||||
"tonicExampleFilename": ".tonic_example.js",
|
"tonicExampleFilename": ".tonic_example.js",
|
||||||
"typings": "lib/ajv.d.ts",
|
"typings": "lib/ajv.d.ts",
|
||||||
"version": "6.6.1"
|
"version": "6.6.2"
|
||||||
}
|
}
|
30
tools/node_modules/eslint/node_modules/debug/dist/debug.js
generated
vendored
30
tools/node_modules/eslint/node_modules/debug/dist/debug.js
generated
vendored
@ -1,5 +1,13 @@
|
|||||||
"use strict";
|
"use strict";
|
||||||
|
|
||||||
|
function _toConsumableArray(arr) { return _arrayWithoutHoles(arr) || _iterableToArray(arr) || _nonIterableSpread(); }
|
||||||
|
|
||||||
|
function _nonIterableSpread() { throw new TypeError("Invalid attempt to spread non-iterable instance"); }
|
||||||
|
|
||||||
|
function _iterableToArray(iter) { if (Symbol.iterator in Object(iter) || Object.prototype.toString.call(iter) === "[object Arguments]") return Array.from(iter); }
|
||||||
|
|
||||||
|
function _arrayWithoutHoles(arr) { if (Array.isArray(arr)) { for (var i = 0, arr2 = new Array(arr.length); i < arr.length; i++) { arr2[i] = arr[i]; } return arr2; } }
|
||||||
|
|
||||||
function _typeof(obj) { if (typeof Symbol === "function" && typeof Symbol.iterator === "symbol") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }; } return _typeof(obj); }
|
function _typeof(obj) { if (typeof Symbol === "function" && typeof Symbol.iterator === "symbol") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }; } return _typeof(obj); }
|
||||||
|
|
||||||
(function (f) {
|
(function (f) {
|
||||||
@ -594,7 +602,9 @@ function _typeof(obj) { if (typeof Symbol === "function" && typeof Symbol.iterat
|
|||||||
}
|
}
|
||||||
|
|
||||||
function extend(namespace, delimiter) {
|
function extend(namespace, delimiter) {
|
||||||
return createDebug(this.namespace + (typeof delimiter === 'undefined' ? ':' : delimiter) + namespace);
|
var newDebug = createDebug(this.namespace + (typeof delimiter === 'undefined' ? ':' : delimiter) + namespace);
|
||||||
|
newDebug.log = this.log;
|
||||||
|
return newDebug;
|
||||||
}
|
}
|
||||||
/**
|
/**
|
||||||
* Enables a debug mode by namespaces. This can include modes
|
* Enables a debug mode by namespaces. This can include modes
|
||||||
@ -636,12 +646,17 @@ function _typeof(obj) { if (typeof Symbol === "function" && typeof Symbol.iterat
|
|||||||
/**
|
/**
|
||||||
* Disable debug output.
|
* Disable debug output.
|
||||||
*
|
*
|
||||||
|
* @return {String} namespaces
|
||||||
* @api public
|
* @api public
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
|
||||||
function disable() {
|
function disable() {
|
||||||
|
var namespaces = [].concat(_toConsumableArray(createDebug.names.map(toNamespace)), _toConsumableArray(createDebug.skips.map(toNamespace).map(function (namespace) {
|
||||||
|
return '-' + namespace;
|
||||||
|
}))).join(',');
|
||||||
createDebug.enable('');
|
createDebug.enable('');
|
||||||
|
return namespaces;
|
||||||
}
|
}
|
||||||
/**
|
/**
|
||||||
* Returns true if the given mode name is enabled, false otherwise.
|
* Returns true if the given mode name is enabled, false otherwise.
|
||||||
@ -675,6 +690,18 @@ function _typeof(obj) { if (typeof Symbol === "function" && typeof Symbol.iterat
|
|||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
/**
|
/**
|
||||||
|
* Convert regexp to namespace
|
||||||
|
*
|
||||||
|
* @param {RegExp} regxep
|
||||||
|
* @return {String} namespace
|
||||||
|
* @api private
|
||||||
|
*/
|
||||||
|
|
||||||
|
|
||||||
|
function toNamespace(regexp) {
|
||||||
|
return regexp.toString().substring(2, regexp.toString().length - 2).replace(/\.\*\?$/, '*');
|
||||||
|
}
|
||||||
|
/**
|
||||||
* Coerce `val`.
|
* Coerce `val`.
|
||||||
*
|
*
|
||||||
* @param {Mixed} val
|
* @param {Mixed} val
|
||||||
@ -883,4 +910,3 @@ function _typeof(obj) { if (typeof Symbol === "function" && typeof Symbol.iterat
|
|||||||
}]
|
}]
|
||||||
}, {}, [4])(4);
|
}, {}, [4])(4);
|
||||||
});
|
});
|
||||||
|
|
||||||
|
4
tools/node_modules/eslint/node_modules/debug/package.json
generated
vendored
4
tools/node_modules/eslint/node_modules/debug/package.json
generated
vendored
@ -67,13 +67,13 @@
|
|||||||
"build:test": "babel -d dist test.js",
|
"build:test": "babel -d dist test.js",
|
||||||
"clean": "rimraf dist coverage",
|
"clean": "rimraf dist coverage",
|
||||||
"lint": "xo",
|
"lint": "xo",
|
||||||
"posttest:node": "cat ./coverage/lcov.info | coveralls",
|
|
||||||
"prebuild:debug": "mkdir -p dist && browserify --standalone debug -o dist/debug.es6.js .",
|
"prebuild:debug": "mkdir -p dist && browserify --standalone debug -o dist/debug.es6.js .",
|
||||||
"pretest:browser": "npm run build",
|
"pretest:browser": "npm run build",
|
||||||
"test": "npm run test:node && npm run test:browser",
|
"test": "npm run test:node && npm run test:browser",
|
||||||
"test:browser": "karma start --single-run",
|
"test:browser": "karma start --single-run",
|
||||||
|
"test:coverage": "cat ./coverage/lcov.info | coveralls",
|
||||||
"test:node": "istanbul cover _mocha -- test.js"
|
"test:node": "istanbul cover _mocha -- test.js"
|
||||||
},
|
},
|
||||||
"unpkg": "./dist/debug.js",
|
"unpkg": "./dist/debug.js",
|
||||||
"version": "4.1.0"
|
"version": "4.1.1"
|
||||||
}
|
}
|
4
tools/node_modules/eslint/node_modules/debug/src/common.js
generated
vendored
4
tools/node_modules/eslint/node_modules/debug/src/common.js
generated
vendored
@ -143,7 +143,9 @@ function setup(env) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
function extend(namespace, delimiter) {
|
function extend(namespace, delimiter) {
|
||||||
return createDebug(this.namespace + (typeof delimiter === 'undefined' ? ':' : delimiter) + namespace);
|
const newDebug = createDebug(this.namespace + (typeof delimiter === 'undefined' ? ':' : delimiter) + namespace);
|
||||||
|
newDebug.log = this.log;
|
||||||
|
return newDebug;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
2
tools/node_modules/eslint/node_modules/vfile-message/package.json
generated
vendored
2
tools/node_modules/eslint/node_modules/vfile-message/package.json
generated
vendored
@ -73,7 +73,7 @@
|
|||||||
"test-api": "node test",
|
"test-api": "node test",
|
||||||
"test-coverage": "nyc --reporter lcov tape test.js"
|
"test-coverage": "nyc --reporter lcov tape test.js"
|
||||||
},
|
},
|
||||||
"version": "1.0.2",
|
"version": "1.1.1",
|
||||||
"xo": {
|
"xo": {
|
||||||
"prettier": true,
|
"prettier": true,
|
||||||
"esnext": false,
|
"esnext": false,
|
||||||
|
2
tools/node_modules/eslint/package.json
generated
vendored
2
tools/node_modules/eslint/package.json
generated
vendored
@ -134,5 +134,5 @@
|
|||||||
"publish-release": "node Makefile.js publishRelease",
|
"publish-release": "node Makefile.js publishRelease",
|
||||||
"test": "node Makefile.js test"
|
"test": "node Makefile.js test"
|
||||||
},
|
},
|
||||||
"version": "5.10.0"
|
"version": "5.11.0"
|
||||||
}
|
}
|
Loading…
x
Reference in New Issue
Block a user