Bug 1725952 - Drop .xul file support for eslint-plugin-mozilla. r=Mardak

Differential Revision: https://phabricator.services.mozilla.com/D144001
This commit is contained in:
Mark Banner 2022-04-22 11:23:29 +00:00
parent 9cdc416fdd
commit 56111aa6d7
6 changed files with 109 additions and 487 deletions

View File

@ -4,7 +4,7 @@ eslint:
# ESLint infra handles its own path filtering, so just include cwd
include: ['.']
exclude: []
extensions: ['js', 'jsm', 'jsx', 'xul', 'html', 'xhtml', 'sjs']
extensions: ['js', 'jsm', 'jsx', 'html', 'xhtml', 'sjs']
support-files:
- '**/.eslintrc.js'
- '.eslintignore'

View File

@ -29,9 +29,6 @@ module.exports = {
privileged: require("../lib/environments/privileged.js"),
xpcshell: require("../lib/environments/xpcshell.js"),
},
processors: {
".xul": require("../lib/processors/xul"),
},
rules: {
"avoid-Date-timing": require("../lib/rules/avoid-Date-timing"),
"avoid-removeChild": require("../lib/rules/avoid-removeChild"),

View File

@ -1,120 +0,0 @@
/* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at http://mozilla.org/MPL/2.0/.
*/
"use strict";
let sax = require("sax");
// Converts sax's error message to something that eslint will understand
let errorRegex = /(.*)\nLine: (\d+)\nColumn: (\d+)\nChar: (.*)/;
function parseError(err) {
let matches = err.message.match(errorRegex);
if (!matches) {
return null;
}
return {
fatal: true,
message: matches[1],
line: parseInt(matches[2]) + 1,
column: parseInt(matches[3]),
};
}
let entityRegex = /&[\w][\w-\.]*;/g;
// A simple sax listener that generates a tree of element information
function XMLParser(text) {
// Non-strict allows us to ignore many errors from entities and
// preprocessing at the expense of failing to report some XML errors.
// Unfortunately it also throws away the case of tagnames and attributes
let parser = sax.parser(false, {
lowercase: true,
xmlns: true,
});
parser.onerror = function(err) {
this.lastError = parseError(err);
};
this.parser = parser;
parser.onopentag = this.onOpenTag.bind(this);
parser.onclosetag = this.onCloseTag.bind(this);
parser.ontext = this.onText.bind(this);
parser.onopencdata = this.onOpenCDATA.bind(this);
parser.oncdata = this.onCDATA.bind(this);
parser.oncomment = this.onComment.bind(this);
this.document = {
local: "#document",
uri: null,
children: [],
comments: [],
};
this._currentNode = this.document;
parser.write(text);
}
XMLParser.prototype = {
parser: null,
lastError: null,
onOpenTag(tag) {
let node = {
parentNode: this._currentNode,
local: tag.local,
namespace: tag.uri,
attributes: {},
children: [],
comments: [],
textContent: "",
textLine: this.parser.line,
textColumn: this.parser.column,
textEndLine: this.parser.line,
};
for (let attr of Object.keys(tag.attributes)) {
if (tag.attributes[attr].uri == "") {
node.attributes[attr] = tag.attributes[attr].value;
}
}
this._currentNode.children.push(node);
this._currentNode = node;
},
onCloseTag(tagname) {
this._currentNode.textEndLine = this.parser.line;
this._currentNode = this._currentNode.parentNode;
},
addText(text) {
this._currentNode.textContent += text;
},
onText(text) {
// Replace entities with some valid JS token.
this.addText(text.replace(entityRegex, "null"));
},
onOpenCDATA() {
// Turn the CDATA opening tag into whitespace for indent alignment
this.addText(" ".repeat("<![CDATA[".length));
},
onCDATA(text) {
this.addText(text);
},
onComment(text) {
this._currentNode.comments.push(text);
},
};
module.exports = {
XMLParser,
};

View File

@ -1,258 +0,0 @@
/**
* @fileoverview Converts inline attributes from XUL into JS
* functions
*
* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at http://mozilla.org/MPL/2.0/.
*/
"use strict";
let path = require("path");
let fs = require("fs");
let XMLParser = require("./processor-helpers").XMLParser;
// Stores any XML parse error
let xmlParseError = null;
// Stores the lines of JS code generated from the XUL.
let scriptLines = [];
// Stores a map from the synthetic line number to the real line number
// and column offset.
let lineMap = [];
let includedRanges = [];
// Deal with ifdefs. This is the state we pretend to have:
const kIfdefStateForLinting = {
MOZ_UPDATER: true,
XP_WIN: true,
MOZ_BUILD_APP_IS_BROWSER: true,
MOZ_SERVICES_SYNC: true,
MOZ_DATA_REPORTING: true,
MOZ_TELEMETRY_REPORTING: true,
MOZ_CRASHREPORTER: true,
MOZ_NORMANDY: true,
MOZ_MAINTENANCE_SERVICE: true,
HAVE_SHELL_SERVICE: true,
MENUBAR_CAN_AUTOHIDE: true,
MOZILLA_OFFICIAL: true,
};
// Anything not in the above list is assumed false.
function dealWithIfdefs(text, filename) {
function stripIfdefsFromLines(input, innerFile) {
let outputLines = [];
let inSkippingIfdef = [false];
for (let i = 0; i < input.length; i++) {
let line = input[i];
let shouldSkip = inSkippingIfdef.some(x => x);
if (!line.startsWith("#")) {
outputLines.push(shouldSkip ? "" : line);
} else {
if (
line.startsWith("# ") ||
line.startsWith("#filter") ||
line == "#" ||
line.startsWith("#define")
) {
outputLines.push("");
continue;
}
// if this isn't just a comment (which we skip), figure out what to do:
let term = "";
let negate = false;
if (line.startsWith("#ifdef")) {
term = line.match(/^#ifdef *([A-Z_]+)/);
} else if (line.startsWith("#ifndef")) {
term = line.match(/^#ifndef *([A-Z_]+)/);
negate = true;
} else if (line.startsWith("#if ")) {
term = line.match(/^defined\(([A-Z_]+)\)/);
} else if (line.startsWith("#elifdef")) {
// Replace the old one:
inSkippingIfdef.pop();
term = line.match(/^#elifdef *([A-Z_]+)/);
} else if (line.startsWith("#else")) {
// Switch the last one around:
let old = inSkippingIfdef.pop();
inSkippingIfdef.push(!old);
outputLines.push("");
} else if (line.startsWith("#endif")) {
inSkippingIfdef.pop();
outputLines.push("");
} else if (line.startsWith("#expand")) {
// Just strip expansion instructions
outputLines.push(line.substring("#expand ".length));
} else if (line.startsWith("#include")) {
// Uh oh.
if (!shouldSkip) {
let fileToInclude = line.substr("#include ".length).trim();
let subpath = path.join(path.dirname(innerFile), fileToInclude);
let contents = fs.readFileSync(subpath, { encoding: "utf-8" });
contents = contents.split(/\n/);
// Recurse:
contents = stripIfdefsFromLines(contents, subpath);
if (innerFile == filename) {
includedRanges.push({
start: i,
end: i + contents.length,
filename: subpath,
});
}
// And insert the resulting lines:
input = input.slice(0, i).concat(contents, input.slice(i + 1));
// Re-process this line now that we've spliced things in.
i--;
} else {
outputLines.push("");
}
} else {
throw new Error("Unknown preprocessor directive: " + line);
}
if (term) {
// We always want the first capturing subgroup:
term = term && term[1];
if (!negate) {
inSkippingIfdef.push(!kIfdefStateForLinting[term]);
} else {
inSkippingIfdef.push(kIfdefStateForLinting[term]);
}
outputLines.push("");
// Now just continue; we'll include lines depending on the state of `inSkippingIfdef`.
}
}
}
return outputLines;
}
let lines = text.split(/\n/);
return stripIfdefsFromLines(lines, filename).join("\n");
}
function addSyntheticLine(line, linePos, addDisableLine) {
lineMap[scriptLines.length] = { line: linePos };
scriptLines.push(line + (addDisableLine ? "" : " // eslint-disable-line"));
}
function recursiveExpand(node) {
for (let [attr, value] of Object.entries(node.attributes)) {
if (attr.startsWith("on")) {
// Ignore dashes in the tag name
let nodeDesc = node.local.replace(/-/g, "");
if (node.attributes.id) {
nodeDesc += "_" + node.attributes.id.replace(/[^a-z]/gi, "_");
}
if (node.attributes.class) {
nodeDesc += "_" + node.attributes.class.replace(/[^a-z]/gi, "_");
}
addSyntheticLine("function " + nodeDesc + "(event) {", node.textLine);
let processedLines = value.split(/\r?\n/);
let addlLine = 0;
for (let line of processedLines) {
line = line.replace(/^\s*/, "");
lineMap[scriptLines.length] = {
// Unfortunately, we only get a line number for the <tag> finishing,
// not for individual attributes.
line: node.textLine + addlLine,
};
scriptLines.push(line);
addlLine++;
}
addSyntheticLine("}", node.textLine + processedLines.length - 1);
}
}
for (let kid of node.children) {
recursiveExpand(kid);
}
}
module.exports = {
preprocess(text, filename) {
if (filename.includes(".inc")) {
return [];
}
xmlParseError = null;
// The following rules are annoying in XUL.
// Indent because in multiline attributes it's impossible to understand for the XML parser.
// Semicolons because those shouldn't be required for inline event handlers.
// Quotes because we use doublequotes for attributes so using single quotes
// for strings inside them makes sense.
// No-undef because it's a bunch of work to teach this code how to read
// scripts and get globals from them (though ideally we should do that at some point).
scriptLines = [
"/* eslint-disable indent */",
"/* eslint-disable indent-legacy */",
"/* eslint-disable semi */",
"/* eslint-disable quotes */",
"/* eslint-disable no-undef */",
];
lineMap = scriptLines.map(() => ({ line: 0 }));
includedRanges = [];
// Do C-style preprocessing first:
text = dealWithIfdefs(text, filename);
let xp = new XMLParser(text);
if (xp.lastError) {
xmlParseError = xp.lastError;
}
let doc = xp.document;
if (!doc) {
return [];
}
let node = doc;
for (let kid of node.children) {
recursiveExpand(kid);
}
let scriptText = scriptLines.join("\n") + "\n";
return [scriptText];
},
postprocess(messages, filename) {
// If there was an XML parse error then just return that
if (xmlParseError) {
return [xmlParseError];
}
// For every message from every script block update the line to point to the
// correct place.
let errors = [];
for (let i = 0; i < messages.length; i++) {
for (let message of messages[i]) {
// ESLint indexes lines starting at 1 but our arrays start at 0
let mapped = lineMap[message.line - 1];
// Ensure we don't modify this by making a copy. We might need it for another failure.
let target = mapped.line;
let includedRange = includedRanges.find(
r => target >= r.start && target <= r.end
);
// If this came from an #included file, indicate this in the message
if (includedRange) {
target = includedRange.start;
message.message +=
" (from included file " +
path.basename(includedRange.filename) +
")";
}
// Compensate for line numbers shifting as a result of #include:
let includeBallooning = includedRanges
.filter(r => target >= r.end)
.map(r => r.end - r.start)
.reduce((acc, next) => acc + next, 0);
target -= includeBallooning;
// Add back the 1 to go back to 1-indexing.
message.line = target + 1;
// We never have column information, unfortunately.
message.column = NaN;
errors.push(message);
}
}
return errors;
},
};

View File

@ -5,9 +5,9 @@
"requires": true,
"dependencies": {
"@ampproject/remapping": {
"version": "2.1.0",
"resolved": "https://registry.npmjs.org/@ampproject/remapping/-/remapping-2.1.0.tgz",
"integrity": "sha512-d5RysTlJ7hmw5Tw4UxgxcY3lkMe92n8sXCcuLPAyIAHK6j8DefDwtGnVVDgOnv+RnEosulDJ9NPKQL27bDId0g==",
"version": "2.1.2",
"resolved": "https://registry.npmjs.org/@ampproject/remapping/-/remapping-2.1.2.tgz",
"integrity": "sha512-hoyByceqwKirw7w3Z7gnIIZC3Wx3J484Y3L/cMpXFbr7d9ZQj2mODrirNzcJa+SM3UlpWXYvKV4RlRpFXlWgXg==",
"requires": {
"@jridgewell/trace-mapping": "^0.3.0"
}
@ -21,24 +21,24 @@
}
},
"@babel/compat-data": {
"version": "7.17.0",
"resolved": "https://registry.npmjs.org/@babel/compat-data/-/compat-data-7.17.0.tgz",
"integrity": "sha512-392byTlpGWXMv4FbyWw3sAZ/FrW/DrwqLGXpy0mbyNe9Taqv1mg9yON5/o0cnr8XYCkFTZbC1eV+c+LAROgrng=="
"version": "7.17.7",
"resolved": "https://registry.npmjs.org/@babel/compat-data/-/compat-data-7.17.7.tgz",
"integrity": "sha512-p8pdE6j0a29TNGebNm7NzYZWB3xVZJBZ7XGs42uAKzQo8VQ3F0By/cQCtUEABwIqw5zo6WA4NbmxsfzADzMKnQ=="
},
"@babel/core": {
"version": "7.17.0",
"resolved": "https://registry.npmjs.org/@babel/core/-/core-7.17.0.tgz",
"integrity": "sha512-x/5Ea+RO5MvF9ize5DeVICJoVrNv0Mi2RnIABrZEKYvPEpldXwauPkgvYA17cKa6WpU3LoYvYbuEMFtSNFsarA==",
"version": "7.17.8",
"resolved": "https://registry.npmjs.org/@babel/core/-/core-7.17.8.tgz",
"integrity": "sha512-OdQDV/7cRBtJHLSOBqqbYNkOcydOgnX59TZx4puf41fzcVtN3e/4yqY8lMQsK+5X2lJtAdmA+6OHqsj1hBJ4IQ==",
"requires": {
"@ampproject/remapping": "^2.0.0",
"@ampproject/remapping": "^2.1.0",
"@babel/code-frame": "^7.16.7",
"@babel/generator": "^7.17.0",
"@babel/helper-compilation-targets": "^7.16.7",
"@babel/helper-module-transforms": "^7.16.7",
"@babel/helpers": "^7.17.0",
"@babel/parser": "^7.17.0",
"@babel/generator": "^7.17.7",
"@babel/helper-compilation-targets": "^7.17.7",
"@babel/helper-module-transforms": "^7.17.7",
"@babel/helpers": "^7.17.8",
"@babel/parser": "^7.17.8",
"@babel/template": "^7.16.7",
"@babel/traverse": "^7.17.0",
"@babel/traverse": "^7.17.3",
"@babel/types": "^7.17.0",
"convert-source-map": "^1.7.0",
"debug": "^4.1.0",
@ -58,9 +58,9 @@
}
},
"@babel/generator": {
"version": "7.17.0",
"resolved": "https://registry.npmjs.org/@babel/generator/-/generator-7.17.0.tgz",
"integrity": "sha512-I3Omiv6FGOC29dtlZhkfXO6pgkmukJSlT26QjVvS1DGZe/NzSVCPG41X0tS21oZkJYlovfj9qDWgKP+Cn4bXxw==",
"version": "7.17.7",
"resolved": "https://registry.npmjs.org/@babel/generator/-/generator-7.17.7.tgz",
"integrity": "sha512-oLcVCTeIFadUoArDTwpluncplrYBmTCCZZgXCbgNGvOBBiSDDK3eWO4b/+eOTli5tKv1lg+a5/NAXg+nTcei1w==",
"requires": {
"@babel/types": "^7.17.0",
"jsesc": "^2.5.1",
@ -68,11 +68,11 @@
}
},
"@babel/helper-compilation-targets": {
"version": "7.16.7",
"resolved": "https://registry.npmjs.org/@babel/helper-compilation-targets/-/helper-compilation-targets-7.16.7.tgz",
"integrity": "sha512-mGojBwIWcwGD6rfqgRXVlVYmPAv7eOpIemUG3dGnDdCY4Pae70ROij3XmfrH6Fa1h1aiDylpglbZyktfzyo/hA==",
"version": "7.17.7",
"resolved": "https://registry.npmjs.org/@babel/helper-compilation-targets/-/helper-compilation-targets-7.17.7.tgz",
"integrity": "sha512-UFzlz2jjd8kroj0hmCFV5zr+tQPi1dpC2cRsDV/3IEW8bJfCPrPpmcSN6ZS8RqIq4LXcmpipCQFPddyFA5Yc7w==",
"requires": {
"@babel/compat-data": "^7.16.4",
"@babel/compat-data": "^7.17.7",
"@babel/helper-validator-option": "^7.16.7",
"browserslist": "^4.17.5",
"semver": "^6.3.0"
@ -121,26 +121,26 @@
}
},
"@babel/helper-module-transforms": {
"version": "7.16.7",
"resolved": "https://registry.npmjs.org/@babel/helper-module-transforms/-/helper-module-transforms-7.16.7.tgz",
"integrity": "sha512-gaqtLDxJEFCeQbYp9aLAefjhkKdjKcdh6DB7jniIGU3Pz52WAmP268zK0VgPz9hUNkMSYeH976K2/Y6yPadpng==",
"version": "7.17.7",
"resolved": "https://registry.npmjs.org/@babel/helper-module-transforms/-/helper-module-transforms-7.17.7.tgz",
"integrity": "sha512-VmZD99F3gNTYB7fJRDTi+u6l/zxY0BE6OIxPSU7a50s6ZUQkHwSDmV92FfM+oCG0pZRVojGYhkR8I0OGeCVREw==",
"requires": {
"@babel/helper-environment-visitor": "^7.16.7",
"@babel/helper-module-imports": "^7.16.7",
"@babel/helper-simple-access": "^7.16.7",
"@babel/helper-simple-access": "^7.17.7",
"@babel/helper-split-export-declaration": "^7.16.7",
"@babel/helper-validator-identifier": "^7.16.7",
"@babel/template": "^7.16.7",
"@babel/traverse": "^7.16.7",
"@babel/types": "^7.16.7"
"@babel/traverse": "^7.17.3",
"@babel/types": "^7.17.0"
}
},
"@babel/helper-simple-access": {
"version": "7.16.7",
"resolved": "https://registry.npmjs.org/@babel/helper-simple-access/-/helper-simple-access-7.16.7.tgz",
"integrity": "sha512-ZIzHVyoeLMvXMN/vok/a4LWRy8G2v205mNP0XOuf9XRLyX5/u9CnVulUtDgUTama3lT+bf/UqucuZjqiGuTS1g==",
"version": "7.17.7",
"resolved": "https://registry.npmjs.org/@babel/helper-simple-access/-/helper-simple-access-7.17.7.tgz",
"integrity": "sha512-txyMCGroZ96i+Pxr3Je3lzEJjqwaRC9buMUgtomcrLe5Nd0+fk1h0LLA+ixUF5OW7AhHuQ7Es1WcQJZmZsz2XA==",
"requires": {
"@babel/types": "^7.16.7"
"@babel/types": "^7.17.0"
}
},
"@babel/helper-split-export-declaration": {
@ -162,12 +162,12 @@
"integrity": "sha512-TRtenOuRUVo9oIQGPC5G9DgK4743cdxvtOw0weQNpZXaS16SCBi5MNjZF8vba3ETURjZpTbVn7Vvcf2eAwFozQ=="
},
"@babel/helpers": {
"version": "7.17.0",
"resolved": "https://registry.npmjs.org/@babel/helpers/-/helpers-7.17.0.tgz",
"integrity": "sha512-Xe/9NFxjPwELUvW2dsukcMZIp6XwPSbI4ojFBJuX5ramHuVE22SVcZIwqzdWo5uCgeTXW8qV97lMvSOjq+1+nQ==",
"version": "7.17.8",
"resolved": "https://registry.npmjs.org/@babel/helpers/-/helpers-7.17.8.tgz",
"integrity": "sha512-QcL86FGxpfSJwGtAvv4iG93UL6bmqBdmoVY0CMCU2g+oD2ezQse3PT5Pa+jiD6LJndBQi0EDlpzOWNlLuhz5gw==",
"requires": {
"@babel/template": "^7.16.7",
"@babel/traverse": "^7.17.0",
"@babel/traverse": "^7.17.3",
"@babel/types": "^7.17.0"
}
},
@ -182,9 +182,9 @@
}
},
"@babel/parser": {
"version": "7.17.0",
"resolved": "https://registry.npmjs.org/@babel/parser/-/parser-7.17.0.tgz",
"integrity": "sha512-VKXSCQx5D8S04ej+Dqsr1CzYvvWgf20jIw2D+YhQCrIlr2UZGaDds23Y0xg75/skOxpLCRpUZvk/1EAVkGoDOw=="
"version": "7.17.8",
"resolved": "https://registry.npmjs.org/@babel/parser/-/parser-7.17.8.tgz",
"integrity": "sha512-BoHhDJrJXqcg+ZL16Xv39H9n+AqJ4pcDrQBGZN+wHxIysrLZ3/ECwCBUch/1zUNhnsXULcONU3Ei5Hmkfk6kiQ=="
},
"@babel/template": {
"version": "7.16.7",
@ -197,17 +197,17 @@
}
},
"@babel/traverse": {
"version": "7.17.0",
"resolved": "https://registry.npmjs.org/@babel/traverse/-/traverse-7.17.0.tgz",
"integrity": "sha512-fpFIXvqD6kC7c7PUNnZ0Z8cQXlarCLtCUpt2S1Dx7PjoRtCFffvOkHHSom+m5HIxMZn5bIBVb71lhabcmjEsqg==",
"version": "7.17.3",
"resolved": "https://registry.npmjs.org/@babel/traverse/-/traverse-7.17.3.tgz",
"integrity": "sha512-5irClVky7TxRWIRtxlh2WPUUOLhcPN06AGgaQSB8AEwuyEBgJVuJ5imdHm5zxk8w0QS5T+tDfnDxAlhWjpb7cw==",
"requires": {
"@babel/code-frame": "^7.16.7",
"@babel/generator": "^7.17.0",
"@babel/generator": "^7.17.3",
"@babel/helper-environment-visitor": "^7.16.7",
"@babel/helper-function-name": "^7.16.7",
"@babel/helper-hoist-variables": "^7.16.7",
"@babel/helper-split-export-declaration": "^7.16.7",
"@babel/parser": "^7.17.0",
"@babel/parser": "^7.17.3",
"@babel/types": "^7.17.0",
"debug": "^4.1.0",
"globals": "^11.1.0"
@ -240,9 +240,9 @@
},
"dependencies": {
"globals": {
"version": "13.12.1",
"resolved": "https://registry.npmjs.org/globals/-/globals-13.12.1.tgz",
"integrity": "sha512-317dFlgY2pdJZ9rspXDks7073GpDmXdfbM3vYYp0HAMKGDh1FfWPleI2ljVNLQX5M5lXcAslTcPTrOrMEFOjyw==",
"version": "13.13.0",
"resolved": "https://registry.npmjs.org/globals/-/globals-13.13.0.tgz",
"integrity": "sha512-EQ7Q18AJlPwp3vUDL4mKA0KXrXyNIQyWon6T6XQiBQF0XHvRsiCSrWmmeATpUzdJN2HhWZU6Pdl0a9zdep5p6A==",
"dev": true,
"requires": {
"type-fest": "^0.20.2"
@ -268,19 +268,19 @@
"dev": true
},
"@jridgewell/resolve-uri": {
"version": "3.0.4",
"resolved": "https://registry.npmjs.org/@jridgewell/resolve-uri/-/resolve-uri-3.0.4.tgz",
"integrity": "sha512-cz8HFjOFfUBtvN+NXYSFMHYRdxZMaEl0XypVrhzxBgadKIXhIkRd8aMeHhmF56Sl7SuS8OnUpQ73/k9LE4VnLg=="
"version": "3.0.5",
"resolved": "https://registry.npmjs.org/@jridgewell/resolve-uri/-/resolve-uri-3.0.5.tgz",
"integrity": "sha512-VPeQ7+wH0itvQxnG+lIzWgkysKIr3L9sslimFW55rHMdGu/qCQ5z5h9zq4gI8uBtqkpHhsF4Z/OwExufUCThew=="
},
"@jridgewell/sourcemap-codec": {
"version": "1.4.10",
"resolved": "https://registry.npmjs.org/@jridgewell/sourcemap-codec/-/sourcemap-codec-1.4.10.tgz",
"integrity": "sha512-Ht8wIW5v165atIX1p+JvKR5ONzUyF4Ac8DZIQ5kZs9zrb6M8SJNXpx1zn04rn65VjBMygRoMXcyYwNK0fT7bEg=="
"version": "1.4.11",
"resolved": "https://registry.npmjs.org/@jridgewell/sourcemap-codec/-/sourcemap-codec-1.4.11.tgz",
"integrity": "sha512-Fg32GrJo61m+VqYSdRSjRXMjQ06j8YIYfcTqndLYVAaHmroZHLJZCydsWBOTDqXS2v+mjxohBWEMfg97GXmYQg=="
},
"@jridgewell/trace-mapping": {
"version": "0.3.2",
"resolved": "https://registry.npmjs.org/@jridgewell/trace-mapping/-/trace-mapping-0.3.2.tgz",
"integrity": "sha512-9KzzH4kMjA2XmBRHfqG2/Vtl7s92l6uNDd0wW7frDE+EUvQFGqNXhWp0UGJjSkt3v2AYjzOZn1QO9XaTNJIt1Q==",
"version": "0.3.4",
"resolved": "https://registry.npmjs.org/@jridgewell/trace-mapping/-/trace-mapping-0.3.4.tgz",
"integrity": "sha512-vFv9ttIedivx0ux3QSjhgtCVjPZd5l46ZOMDSCwnH1yUO2e964gO8LZGyv2QkqcgR6TnBU1v+1IFqmeoG+0UJQ==",
"requires": {
"@jridgewell/resolve-uri": "^3.0.3",
"@jridgewell/sourcemap-codec": "^1.4.10"
@ -399,14 +399,14 @@
"dev": true
},
"browserslist": {
"version": "4.19.1",
"resolved": "https://registry.npmjs.org/browserslist/-/browserslist-4.19.1.tgz",
"integrity": "sha512-u2tbbG5PdKRTUoctO3NBD8FQ5HdPh1ZXPHzp1rwaa5jTc+RV9/+RlWiAIKmjRPQF+xbGM9Kklj5bZQFa2s/38A==",
"version": "4.20.2",
"resolved": "https://registry.npmjs.org/browserslist/-/browserslist-4.20.2.tgz",
"integrity": "sha512-CQOBCqp/9pDvDbx3xfMi+86pr4KXIf2FDkTTdeuYw8OxS9t898LA1Khq57gtufFILXpfgsSx5woNgsBgvGjpsA==",
"requires": {
"caniuse-lite": "^1.0.30001286",
"electron-to-chromium": "^1.4.17",
"caniuse-lite": "^1.0.30001317",
"electron-to-chromium": "^1.4.84",
"escalade": "^3.1.1",
"node-releases": "^2.0.1",
"node-releases": "^2.0.2",
"picocolors": "^1.0.0"
}
},
@ -423,9 +423,9 @@
"dev": true
},
"caniuse-lite": {
"version": "1.0.30001309",
"resolved": "https://registry.npmjs.org/caniuse-lite/-/caniuse-lite-1.0.30001309.tgz",
"integrity": "sha512-Pl8vfigmBXXq+/yUz1jUwULeq9xhMJznzdc/xwl4WclDAuebcTHVefpz8lE/bMI+UN7TOkSSe7B7RnZd6+dzjA=="
"version": "1.0.30001323",
"resolved": "https://registry.npmjs.org/caniuse-lite/-/caniuse-lite-1.0.30001323.tgz",
"integrity": "sha512-e4BF2RlCVELKx8+RmklSEIVub1TWrmdhvA5kEUueummz1XyySW0DVk+3x9HyhU9MuWTa2BhqLgEuEmUwASAdCA=="
},
"chalk": {
"version": "2.4.2",
@ -503,9 +503,9 @@
}
},
"debug": {
"version": "4.3.3",
"resolved": "https://registry.npmjs.org/debug/-/debug-4.3.3.tgz",
"integrity": "sha512-/zxw5+vh1Tfv+4Qn7a5nsbcJKPaSvCDhojn6FEl9vupwK2VCSDtEiEtqr8DFtzYFOdz63LBkxec7DYuc2jon6Q==",
"version": "4.3.4",
"resolved": "https://registry.npmjs.org/debug/-/debug-4.3.4.tgz",
"integrity": "sha512-PRWFHuSU3eDtQJPvnNY7Jcket1j0t5OuOsFzPPzsekD52Zl8qUfFIPEiswXqIvHWGVHOgX+7G/vCNNhehwxfkQ==",
"requires": {
"ms": "2.1.2"
}
@ -560,9 +560,9 @@
"integrity": "sha512-DtBMo82pv1dFtUmHyr48beiuq792Sxohr+8Hm9zoxklYPfa6n0Z3Byjj2IV7bmr2IyqClnqEQhfgHJJ5QF0R5A=="
},
"domhandler": {
"version": "4.3.0",
"resolved": "https://registry.npmjs.org/domhandler/-/domhandler-4.3.0.tgz",
"integrity": "sha512-fC0aXNQXqKSFTr2wDNZDhsEYjCiYsDWl3D01kwt25hm1YIPyDGHvvi3rw+PLqHAl/m71MaiF7d5zvBr0p5UB2g==",
"version": "4.3.1",
"resolved": "https://registry.npmjs.org/domhandler/-/domhandler-4.3.1.tgz",
"integrity": "sha512-GrwoxYN+uWlzO8uhUXRl0P+kHE4GtVPfYzVLcUxPL7KNdHKj66vvlhiweIHqYYXWlw+T8iLMp42Lm67ghw4WMQ==",
"requires": {
"domelementtype": "^2.2.0"
}
@ -578,9 +578,9 @@
}
},
"electron-to-chromium": {
"version": "1.4.65",
"resolved": "https://registry.npmjs.org/electron-to-chromium/-/electron-to-chromium-1.4.65.tgz",
"integrity": "sha512-0/d8Skk8sW3FxXP0Dd6MnBlrwx7Qo9cqQec3BlIAlvKnrmS3pHsIbaroEi+nd0kZkGpQ6apMEre7xndzjlEnLw=="
"version": "1.4.103",
"resolved": "https://registry.npmjs.org/electron-to-chromium/-/electron-to-chromium-1.4.103.tgz",
"integrity": "sha512-c/uKWR1Z/W30Wy/sx3dkZoj4BijbXX85QKWu9jJfjho3LBAXNEGAEW3oWiGb+dotA6C6BzCTxL2/aLes7jlUeg=="
},
"emoji-regex": {
"version": "8.0.0",
@ -710,9 +710,9 @@
"dev": true
},
"globals": {
"version": "13.12.1",
"resolved": "https://registry.npmjs.org/globals/-/globals-13.12.1.tgz",
"integrity": "sha512-317dFlgY2pdJZ9rspXDks7073GpDmXdfbM3vYYp0HAMKGDh1FfWPleI2ljVNLQX5M5lXcAslTcPTrOrMEFOjyw==",
"version": "13.13.0",
"resolved": "https://registry.npmjs.org/globals/-/globals-13.13.0.tgz",
"integrity": "sha512-EQ7Q18AJlPwp3vUDL4mKA0KXrXyNIQyWon6T6XQiBQF0XHvRsiCSrWmmeATpUzdJN2HhWZU6Pdl0a9zdep5p6A==",
"dev": true,
"requires": {
"type-fest": "^0.20.2"
@ -1122,12 +1122,9 @@
"dev": true
},
"json5": {
"version": "2.2.0",
"resolved": "https://registry.npmjs.org/json5/-/json5-2.2.0.tgz",
"integrity": "sha512-f+8cldu7X/y7RAJurMEJmdoKXGB/X550w2Nr3tTbezL6RwEE/iMcm+tZnXeoZtKuOq6ft8+CqzEkrIgx1fPoQA==",
"requires": {
"minimist": "^1.2.5"
}
"version": "2.2.1",
"resolved": "https://registry.npmjs.org/json5/-/json5-2.2.1.tgz",
"integrity": "sha512-1hqLFMSrGHRHxav9q9gNjJ5EXznIxGVO09xQRrwplcS8qs28pZ8s8hupZAmqDwZUmVZ2Qb2jnyPOWcDH8m8dlA=="
},
"levn": {
"version": "0.4.1",
@ -1236,19 +1233,14 @@
}
},
"minimatch": {
"version": "3.0.5",
"resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.0.5.tgz",
"integrity": "sha512-tUpxzX0VAzJHjLu0xUfFv1gwVp9ba3IOuRAVH2EGuRW8a5emA2FlACLqiT/lDVtS1W+TGNwqz3sWaNyLgDJWuw==",
"version": "3.1.2",
"resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.1.2.tgz",
"integrity": "sha512-J7p63hRiAjw1NDEww1W7i37+ByIrOWO5XQQAzZ3VOcL0PNybwpfmV/N05zFAzwQ9USyEcX6t3UO+K5aqBQOIHw==",
"dev": true,
"requires": {
"brace-expansion": "^1.1.7"
}
},
"minimist": {
"version": "1.2.5",
"resolved": "https://registry.npmjs.org/minimist/-/minimist-1.2.5.tgz",
"integrity": "sha512-FM9nNUYrRBAELZQT3xeZQ7fmMOBg6nWNmJKTcgsJeaLstP/UODVpGsr5OhXhhXg6f+qtJ8uiZ+PUxkDWcgIXLw=="
},
"mocha": {
"version": "9.2.0",
"resolved": "https://registry.npmjs.org/mocha/-/mocha-9.2.0.tgz",
@ -1287,6 +1279,23 @@
"integrity": "sha512-8+9WqebbFzpX9OR+Wa6O29asIogeRMzcGtAINdpMHHyAg10f05aSFVBbcEqGf/PXw1EjAZ+q2/bEBg3DvurK3Q==",
"dev": true
},
"debug": {
"version": "4.3.3",
"resolved": "https://registry.npmjs.org/debug/-/debug-4.3.3.tgz",
"integrity": "sha512-/zxw5+vh1Tfv+4Qn7a5nsbcJKPaSvCDhojn6FEl9vupwK2VCSDtEiEtqr8DFtzYFOdz63LBkxec7DYuc2jon6Q==",
"dev": true,
"requires": {
"ms": "2.1.2"
},
"dependencies": {
"ms": {
"version": "2.1.2",
"resolved": "https://registry.npmjs.org/ms/-/ms-2.1.2.tgz",
"integrity": "sha512-sGkPx+VjMtmA6MX27oA4FBFELFCZZ4S4XqeGOXCv68tT+jb3vk/RyaKWP0PTKyWtmLSM0b+adUTEvbs1PEaH2w==",
"dev": true
}
}
},
"escape-string-regexp": {
"version": "4.0.0",
"resolved": "https://registry.npmjs.org/escape-string-regexp/-/escape-string-regexp-4.0.0.tgz",
@ -1360,9 +1369,9 @@
"dev": true
},
"node-releases": {
"version": "2.0.1",
"resolved": "https://registry.npmjs.org/node-releases/-/node-releases-2.0.1.tgz",
"integrity": "sha512-CqyzN6z7Q6aMeF/ktcMVTzhAHCEpf8SOarwpzpf8pNBY2k5/oM34UHldUwp8VKI7uxct2HxSRdJjBaZeESzcxA=="
"version": "2.0.2",
"resolved": "https://registry.npmjs.org/node-releases/-/node-releases-2.0.2.tgz",
"integrity": "sha512-XxYDdcQ6eKqp/YjI+tb2C5WM2LgjnZrfYg4vgQt49EK268b6gYCHsBLrK2qvJo4FmCtqmKezb0WZFK4fkrZNsg=="
},
"normalize-path": {
"version": "3.0.0",
@ -1523,11 +1532,6 @@
"resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.1.2.tgz",
"integrity": "sha512-Gd2UZBJDkXlY7GbJxfsE8/nvKkUEU1G38c1siN6QP6a9PT9MmHB8GnpscSmMJSoF8LOIrt8ud/wPtojys4G6+g=="
},
"sax": {
"version": "1.2.4",
"resolved": "https://registry.npmjs.org/sax/-/sax-1.2.4.tgz",
"integrity": "sha512-NqVDv9TpANUjFm0N8uM5GxL36UgKi9/atZw+x7YFnQ8ckwFGKrl4xX4yWtrey3UJm5nP1kUbnYgLopqWNSRhWw=="
},
"semver": {
"version": "6.3.0",
"resolved": "https://registry.npmjs.org/semver/-/semver-6.3.0.tgz",
@ -1653,9 +1657,9 @@
},
"dependencies": {
"ajv": {
"version": "8.10.0",
"resolved": "https://registry.npmjs.org/ajv/-/ajv-8.10.0.tgz",
"integrity": "sha512-bzqAEZOjkrUMl2afH8dknrq5KEk2SrwdBROR+vH1EKVQTqaUbJVPdc/gEdggTMM0Se+s+Ja4ju4TlNcStKl2Hw==",
"version": "8.11.0",
"resolved": "https://registry.npmjs.org/ajv/-/ajv-8.11.0.tgz",
"integrity": "sha512-wGgprdCvMalC0BztXvitD2hC04YffAvtsUn93JbGXYLAtCUO4xd17mCCZQxUOItiBwZvJScWo8NIvQMQ71rdpg==",
"dev": true,
"requires": {
"fast-deep-equal": "^3.1.1",

View File

@ -26,8 +26,7 @@
"eslint-visitor-keys": "^2.1.0",
"estraverse": "^4.3.0",
"htmlparser2": "^7.2.0",
"multi-ini": "^2.1.2",
"sax": "^1.2.4"
"multi-ini": "^2.1.2"
},
"devDependencies": {
"eslint": "7.32.0",