ags
This commit is contained in:
parent
eddf7cecb8
commit
aea798d119
16631 changed files with 1480363 additions and 257 deletions
193
home/ags/node_modules/eslint-compat-utils/dist/shared/eslint-compat-utils.1a5060cf.mjs
generated
vendored
Normal file
193
home/ags/node_modules/eslint-compat-utils/dist/shared/eslint-compat-utils.1a5060cf.mjs
generated
vendored
Normal file
|
|
@ -0,0 +1,193 @@
|
|||
import * as eslint from 'eslint';
|
||||
import * as semver from 'semver';
|
||||
import { createRequire } from 'module';
|
||||
|
||||
function safeRequire(name) {
|
||||
try {
|
||||
return createRequire(`${process.cwd()}/__placeholder__.js`)(name);
|
||||
} catch {
|
||||
return void 0;
|
||||
}
|
||||
}
|
||||
function safeRequireResolve(name) {
|
||||
try {
|
||||
return createRequire(`${process.cwd()}/__placeholder__.js`).resolve(name);
|
||||
} catch {
|
||||
return name;
|
||||
}
|
||||
}
|
||||
|
||||
const builtInGlobals = /* @__PURE__ */ new Map([
|
||||
[
|
||||
3,
|
||||
Object.entries({
|
||||
Array: false,
|
||||
Boolean: false,
|
||||
constructor: false,
|
||||
Date: false,
|
||||
decodeURI: false,
|
||||
decodeURIComponent: false,
|
||||
encodeURI: false,
|
||||
encodeURIComponent: false,
|
||||
Error: false,
|
||||
escape: false,
|
||||
eval: false,
|
||||
EvalError: false,
|
||||
Function: false,
|
||||
hasOwnProperty: false,
|
||||
Infinity: false,
|
||||
isFinite: false,
|
||||
isNaN: false,
|
||||
isPrototypeOf: false,
|
||||
Math: false,
|
||||
NaN: false,
|
||||
Number: false,
|
||||
Object: false,
|
||||
parseFloat: false,
|
||||
parseInt: false,
|
||||
propertyIsEnumerable: false,
|
||||
RangeError: false,
|
||||
ReferenceError: false,
|
||||
RegExp: false,
|
||||
String: false,
|
||||
SyntaxError: false,
|
||||
toLocaleString: false,
|
||||
toString: false,
|
||||
TypeError: false,
|
||||
undefined: false,
|
||||
unescape: false,
|
||||
URIError: false,
|
||||
valueOf: false
|
||||
})
|
||||
],
|
||||
[
|
||||
5,
|
||||
Object.entries({
|
||||
JSON: false
|
||||
})
|
||||
],
|
||||
[
|
||||
2015,
|
||||
Object.entries({
|
||||
ArrayBuffer: false,
|
||||
DataView: false,
|
||||
Float32Array: false,
|
||||
Float64Array: false,
|
||||
Int16Array: false,
|
||||
Int32Array: false,
|
||||
Int8Array: false,
|
||||
Intl: false,
|
||||
Map: false,
|
||||
Promise: false,
|
||||
Proxy: false,
|
||||
Reflect: false,
|
||||
Set: false,
|
||||
Symbol: false,
|
||||
Uint16Array: false,
|
||||
Uint32Array: false,
|
||||
Uint8Array: false,
|
||||
Uint8ClampedArray: false,
|
||||
WeakMap: false,
|
||||
WeakSet: false
|
||||
})
|
||||
],
|
||||
[
|
||||
2017,
|
||||
Object.entries({
|
||||
Atomics: false,
|
||||
SharedArrayBuffer: false
|
||||
})
|
||||
],
|
||||
[
|
||||
2020,
|
||||
Object.entries({
|
||||
BigInt: false,
|
||||
BigInt64Array: false,
|
||||
BigUint64Array: false,
|
||||
globalThis: false
|
||||
})
|
||||
],
|
||||
[
|
||||
2021,
|
||||
Object.entries({
|
||||
AggregateError: false,
|
||||
FinalizationRegistry: false,
|
||||
WeakRef: false
|
||||
})
|
||||
]
|
||||
]);
|
||||
function convertConfigToRc(config, linter) {
|
||||
var _a, _b;
|
||||
if (Array.isArray(config)) {
|
||||
throw new Error("Array config is not supported.");
|
||||
}
|
||||
const {
|
||||
languageOptions: originalLanguageOptions,
|
||||
plugins,
|
||||
...newConfig
|
||||
} = config;
|
||||
if (originalLanguageOptions) {
|
||||
const {
|
||||
parser,
|
||||
globals,
|
||||
parserOptions,
|
||||
ecmaVersion,
|
||||
sourceType,
|
||||
...languageOptions
|
||||
} = originalLanguageOptions;
|
||||
newConfig.parserOptions = {
|
||||
...!ecmaVersion || ecmaVersion === "latest" ? { ecmaVersion: getLatestEcmaVersion() } : { ecmaVersion },
|
||||
...sourceType ? { sourceType } : { sourceType: "module" },
|
||||
...languageOptions,
|
||||
...parserOptions,
|
||||
...newConfig.parserOptions
|
||||
};
|
||||
const resolvedEcmaVersion = newConfig.parserOptions.ecmaVersion;
|
||||
newConfig.globals = {
|
||||
...Object.fromEntries(
|
||||
[...builtInGlobals.entries()].flatMap(
|
||||
([version, editionGlobals]) => resolvedEcmaVersion < version ? [] : editionGlobals
|
||||
)
|
||||
),
|
||||
...newConfig.globals
|
||||
};
|
||||
if (globals) {
|
||||
newConfig.globals = {
|
||||
...globals,
|
||||
...newConfig.globals
|
||||
};
|
||||
}
|
||||
if (parser && !newConfig.parser) {
|
||||
const parserName = getParserName(parser);
|
||||
newConfig.parser = parserName;
|
||||
(_a = linter == null ? void 0 : linter.defineParser) == null ? void 0 : _a.call(linter, parserName, parser);
|
||||
}
|
||||
}
|
||||
if (plugins) {
|
||||
for (const [pluginName, plugin] of Object.entries(plugins)) {
|
||||
for (const [ruleName, rule] of Object.entries(plugin.rules || {})) {
|
||||
(_b = linter == null ? void 0 : linter.defineRule) == null ? void 0 : _b.call(linter, `${pluginName}/${ruleName}`, rule);
|
||||
}
|
||||
}
|
||||
}
|
||||
newConfig.env = {
|
||||
es6: true,
|
||||
...newConfig.env
|
||||
};
|
||||
return newConfig;
|
||||
}
|
||||
function getParserName(parser) {
|
||||
var _a;
|
||||
const name = ((_a = parser.meta) == null ? void 0 : _a.name) || parser.name;
|
||||
if (name === "typescript-eslint/parser") {
|
||||
return safeRequireResolve("@typescript-eslint/parser");
|
||||
} else if (name == null && parser === safeRequire("@typescript-eslint/parser"))
|
||||
return safeRequireResolve("@typescript-eslint/parser");
|
||||
return safeRequireResolve(name);
|
||||
}
|
||||
function getLatestEcmaVersion() {
|
||||
const eslintVersion = eslint.Linter.version;
|
||||
return semver.gte(eslintVersion, "8.0.0") ? "latest" : semver.gte(eslintVersion, "7.8.0") ? 2021 : semver.gte(eslintVersion, "6.2.0") ? 2020 : semver.gte(eslintVersion, "5.0.0") ? 2019 : 2018;
|
||||
}
|
||||
|
||||
export { convertConfigToRc as c };
|
||||
9
home/ags/node_modules/eslint-compat-utils/dist/shared/eslint-compat-utils.3ecba7ac.mjs
generated
vendored
Normal file
9
home/ags/node_modules/eslint-compat-utils/dist/shared/eslint-compat-utils.3ecba7ac.mjs
generated
vendored
Normal file
|
|
@ -0,0 +1,9 @@
|
|||
function getUnsupported() {
|
||||
try {
|
||||
return require("eslint/use-at-your-own-risk");
|
||||
} catch {
|
||||
return {};
|
||||
}
|
||||
}
|
||||
|
||||
export { getUnsupported as g };
|
||||
210
home/ags/node_modules/eslint-compat-utils/dist/shared/eslint-compat-utils.503aeaae.cjs
generated
vendored
Normal file
210
home/ags/node_modules/eslint-compat-utils/dist/shared/eslint-compat-utils.503aeaae.cjs
generated
vendored
Normal file
|
|
@ -0,0 +1,210 @@
|
|||
'use strict';
|
||||
|
||||
const eslint = require('eslint');
|
||||
const semver = require('semver');
|
||||
const module$1 = require('module');
|
||||
|
||||
function _interopNamespaceCompat(e) {
|
||||
if (e && typeof e === 'object' && 'default' in e) return e;
|
||||
const n = Object.create(null);
|
||||
if (e) {
|
||||
for (const k in e) {
|
||||
n[k] = e[k];
|
||||
}
|
||||
}
|
||||
n.default = e;
|
||||
return n;
|
||||
}
|
||||
|
||||
const eslint__namespace = /*#__PURE__*/_interopNamespaceCompat(eslint);
|
||||
const semver__namespace = /*#__PURE__*/_interopNamespaceCompat(semver);
|
||||
|
||||
function safeRequire(name) {
|
||||
try {
|
||||
return module$1.createRequire(`${process.cwd()}/__placeholder__.js`)(name);
|
||||
} catch {
|
||||
return void 0;
|
||||
}
|
||||
}
|
||||
function safeRequireResolve(name) {
|
||||
try {
|
||||
return module$1.createRequire(`${process.cwd()}/__placeholder__.js`).resolve(name);
|
||||
} catch {
|
||||
return name;
|
||||
}
|
||||
}
|
||||
|
||||
const builtInGlobals = /* @__PURE__ */ new Map([
|
||||
[
|
||||
3,
|
||||
Object.entries({
|
||||
Array: false,
|
||||
Boolean: false,
|
||||
constructor: false,
|
||||
Date: false,
|
||||
decodeURI: false,
|
||||
decodeURIComponent: false,
|
||||
encodeURI: false,
|
||||
encodeURIComponent: false,
|
||||
Error: false,
|
||||
escape: false,
|
||||
eval: false,
|
||||
EvalError: false,
|
||||
Function: false,
|
||||
hasOwnProperty: false,
|
||||
Infinity: false,
|
||||
isFinite: false,
|
||||
isNaN: false,
|
||||
isPrototypeOf: false,
|
||||
Math: false,
|
||||
NaN: false,
|
||||
Number: false,
|
||||
Object: false,
|
||||
parseFloat: false,
|
||||
parseInt: false,
|
||||
propertyIsEnumerable: false,
|
||||
RangeError: false,
|
||||
ReferenceError: false,
|
||||
RegExp: false,
|
||||
String: false,
|
||||
SyntaxError: false,
|
||||
toLocaleString: false,
|
||||
toString: false,
|
||||
TypeError: false,
|
||||
undefined: false,
|
||||
unescape: false,
|
||||
URIError: false,
|
||||
valueOf: false
|
||||
})
|
||||
],
|
||||
[
|
||||
5,
|
||||
Object.entries({
|
||||
JSON: false
|
||||
})
|
||||
],
|
||||
[
|
||||
2015,
|
||||
Object.entries({
|
||||
ArrayBuffer: false,
|
||||
DataView: false,
|
||||
Float32Array: false,
|
||||
Float64Array: false,
|
||||
Int16Array: false,
|
||||
Int32Array: false,
|
||||
Int8Array: false,
|
||||
Intl: false,
|
||||
Map: false,
|
||||
Promise: false,
|
||||
Proxy: false,
|
||||
Reflect: false,
|
||||
Set: false,
|
||||
Symbol: false,
|
||||
Uint16Array: false,
|
||||
Uint32Array: false,
|
||||
Uint8Array: false,
|
||||
Uint8ClampedArray: false,
|
||||
WeakMap: false,
|
||||
WeakSet: false
|
||||
})
|
||||
],
|
||||
[
|
||||
2017,
|
||||
Object.entries({
|
||||
Atomics: false,
|
||||
SharedArrayBuffer: false
|
||||
})
|
||||
],
|
||||
[
|
||||
2020,
|
||||
Object.entries({
|
||||
BigInt: false,
|
||||
BigInt64Array: false,
|
||||
BigUint64Array: false,
|
||||
globalThis: false
|
||||
})
|
||||
],
|
||||
[
|
||||
2021,
|
||||
Object.entries({
|
||||
AggregateError: false,
|
||||
FinalizationRegistry: false,
|
||||
WeakRef: false
|
||||
})
|
||||
]
|
||||
]);
|
||||
function convertConfigToRc(config, linter) {
|
||||
var _a, _b;
|
||||
if (Array.isArray(config)) {
|
||||
throw new Error("Array config is not supported.");
|
||||
}
|
||||
const {
|
||||
languageOptions: originalLanguageOptions,
|
||||
plugins,
|
||||
...newConfig
|
||||
} = config;
|
||||
if (originalLanguageOptions) {
|
||||
const {
|
||||
parser,
|
||||
globals,
|
||||
parserOptions,
|
||||
ecmaVersion,
|
||||
sourceType,
|
||||
...languageOptions
|
||||
} = originalLanguageOptions;
|
||||
newConfig.parserOptions = {
|
||||
...!ecmaVersion || ecmaVersion === "latest" ? { ecmaVersion: getLatestEcmaVersion() } : { ecmaVersion },
|
||||
...sourceType ? { sourceType } : { sourceType: "module" },
|
||||
...languageOptions,
|
||||
...parserOptions,
|
||||
...newConfig.parserOptions
|
||||
};
|
||||
const resolvedEcmaVersion = newConfig.parserOptions.ecmaVersion;
|
||||
newConfig.globals = {
|
||||
...Object.fromEntries(
|
||||
[...builtInGlobals.entries()].flatMap(
|
||||
([version, editionGlobals]) => resolvedEcmaVersion < version ? [] : editionGlobals
|
||||
)
|
||||
),
|
||||
...newConfig.globals
|
||||
};
|
||||
if (globals) {
|
||||
newConfig.globals = {
|
||||
...globals,
|
||||
...newConfig.globals
|
||||
};
|
||||
}
|
||||
if (parser && !newConfig.parser) {
|
||||
const parserName = getParserName(parser);
|
||||
newConfig.parser = parserName;
|
||||
(_a = linter == null ? void 0 : linter.defineParser) == null ? void 0 : _a.call(linter, parserName, parser);
|
||||
}
|
||||
}
|
||||
if (plugins) {
|
||||
for (const [pluginName, plugin] of Object.entries(plugins)) {
|
||||
for (const [ruleName, rule] of Object.entries(plugin.rules || {})) {
|
||||
(_b = linter == null ? void 0 : linter.defineRule) == null ? void 0 : _b.call(linter, `${pluginName}/${ruleName}`, rule);
|
||||
}
|
||||
}
|
||||
}
|
||||
newConfig.env = {
|
||||
es6: true,
|
||||
...newConfig.env
|
||||
};
|
||||
return newConfig;
|
||||
}
|
||||
function getParserName(parser) {
|
||||
var _a;
|
||||
const name = ((_a = parser.meta) == null ? void 0 : _a.name) || parser.name;
|
||||
if (name === "typescript-eslint/parser") {
|
||||
return safeRequireResolve("@typescript-eslint/parser");
|
||||
} else if (name == null && parser === safeRequire("@typescript-eslint/parser"))
|
||||
return safeRequireResolve("@typescript-eslint/parser");
|
||||
return safeRequireResolve(name);
|
||||
}
|
||||
function getLatestEcmaVersion() {
|
||||
const eslintVersion = eslint__namespace.Linter.version;
|
||||
return semver__namespace.gte(eslintVersion, "8.0.0") ? "latest" : semver__namespace.gte(eslintVersion, "7.8.0") ? 2021 : semver__namespace.gte(eslintVersion, "6.2.0") ? 2020 : semver__namespace.gte(eslintVersion, "5.0.0") ? 2019 : 2018;
|
||||
}
|
||||
|
||||
exports.convertConfigToRc = convertConfigToRc;
|
||||
54
home/ags/node_modules/eslint-compat-utils/dist/shared/eslint-compat-utils.808b5669.cjs
generated
vendored
Normal file
54
home/ags/node_modules/eslint-compat-utils/dist/shared/eslint-compat-utils.808b5669.cjs
generated
vendored
Normal file
|
|
@ -0,0 +1,54 @@
|
|||
'use strict';
|
||||
|
||||
function convertOptionToLegacy(processor, verifyOption, config) {
|
||||
var _a;
|
||||
if (processor == null)
|
||||
return verifyOption;
|
||||
if (typeof processor === "string") {
|
||||
return convertOptionToLegacy(
|
||||
findProcessor(processor, config),
|
||||
verifyOption,
|
||||
config
|
||||
);
|
||||
}
|
||||
const filename = (_a = typeof verifyOption === "string" ? verifyOption : verifyOption == null ? void 0 : verifyOption.filename) != null ? _a : "<input>";
|
||||
const preprocess = function(code) {
|
||||
var _a2;
|
||||
const result = (_a2 = processor.preprocess) == null ? void 0 : _a2.call(processor, code, filename);
|
||||
return result ? result : [code];
|
||||
};
|
||||
const postprocess = function(messages) {
|
||||
var _a2;
|
||||
const result = (_a2 = processor.postprocess) == null ? void 0 : _a2.call(processor, messages, filename);
|
||||
return result ? result : messages[0];
|
||||
};
|
||||
if (verifyOption == null) {
|
||||
return { preprocess, postprocess };
|
||||
}
|
||||
if (typeof verifyOption === "string") {
|
||||
return { filename: verifyOption, preprocess, postprocess };
|
||||
}
|
||||
return { ...verifyOption, preprocess, postprocess };
|
||||
}
|
||||
function findProcessor(processor, config) {
|
||||
var _a, _b;
|
||||
let pluginName, processorName;
|
||||
const splitted = processor.split("/")[0];
|
||||
if (splitted.length === 2) {
|
||||
pluginName = splitted[0];
|
||||
processorName = splitted[1];
|
||||
} else if (splitted.length === 3 && splitted[0].startsWith("@")) {
|
||||
pluginName = `${splitted[0]}/${splitted[1]}`;
|
||||
processorName = splitted[2];
|
||||
} else {
|
||||
throw new Error(`Could not resolve processor: ${processor}`);
|
||||
}
|
||||
const plugin = (_a = config.plugins) == null ? void 0 : _a[pluginName];
|
||||
const resolved = (_b = plugin == null ? void 0 : plugin.processors) == null ? void 0 : _b[processorName];
|
||||
if (!resolved) {
|
||||
throw new Error(`Could not resolve processor: ${processor}`);
|
||||
}
|
||||
return resolved;
|
||||
}
|
||||
|
||||
exports.convertOptionToLegacy = convertOptionToLegacy;
|
||||
11
home/ags/node_modules/eslint-compat-utils/dist/shared/eslint-compat-utils.cb53cf36.cjs
generated
vendored
Normal file
11
home/ags/node_modules/eslint-compat-utils/dist/shared/eslint-compat-utils.cb53cf36.cjs
generated
vendored
Normal file
|
|
@ -0,0 +1,11 @@
|
|||
'use strict';
|
||||
|
||||
function getUnsupported() {
|
||||
try {
|
||||
return require("eslint/use-at-your-own-risk");
|
||||
} catch {
|
||||
return {};
|
||||
}
|
||||
}
|
||||
|
||||
exports.getUnsupported = getUnsupported;
|
||||
52
home/ags/node_modules/eslint-compat-utils/dist/shared/eslint-compat-utils.cb6790c2.mjs
generated
vendored
Normal file
52
home/ags/node_modules/eslint-compat-utils/dist/shared/eslint-compat-utils.cb6790c2.mjs
generated
vendored
Normal file
|
|
@ -0,0 +1,52 @@
|
|||
function convertOptionToLegacy(processor, verifyOption, config) {
|
||||
var _a;
|
||||
if (processor == null)
|
||||
return verifyOption;
|
||||
if (typeof processor === "string") {
|
||||
return convertOptionToLegacy(
|
||||
findProcessor(processor, config),
|
||||
verifyOption,
|
||||
config
|
||||
);
|
||||
}
|
||||
const filename = (_a = typeof verifyOption === "string" ? verifyOption : verifyOption == null ? void 0 : verifyOption.filename) != null ? _a : "<input>";
|
||||
const preprocess = function(code) {
|
||||
var _a2;
|
||||
const result = (_a2 = processor.preprocess) == null ? void 0 : _a2.call(processor, code, filename);
|
||||
return result ? result : [code];
|
||||
};
|
||||
const postprocess = function(messages) {
|
||||
var _a2;
|
||||
const result = (_a2 = processor.postprocess) == null ? void 0 : _a2.call(processor, messages, filename);
|
||||
return result ? result : messages[0];
|
||||
};
|
||||
if (verifyOption == null) {
|
||||
return { preprocess, postprocess };
|
||||
}
|
||||
if (typeof verifyOption === "string") {
|
||||
return { filename: verifyOption, preprocess, postprocess };
|
||||
}
|
||||
return { ...verifyOption, preprocess, postprocess };
|
||||
}
|
||||
function findProcessor(processor, config) {
|
||||
var _a, _b;
|
||||
let pluginName, processorName;
|
||||
const splitted = processor.split("/")[0];
|
||||
if (splitted.length === 2) {
|
||||
pluginName = splitted[0];
|
||||
processorName = splitted[1];
|
||||
} else if (splitted.length === 3 && splitted[0].startsWith("@")) {
|
||||
pluginName = `${splitted[0]}/${splitted[1]}`;
|
||||
processorName = splitted[2];
|
||||
} else {
|
||||
throw new Error(`Could not resolve processor: ${processor}`);
|
||||
}
|
||||
const plugin = (_a = config.plugins) == null ? void 0 : _a[pluginName];
|
||||
const resolved = (_b = plugin == null ? void 0 : plugin.processors) == null ? void 0 : _b[processorName];
|
||||
if (!resolved) {
|
||||
throw new Error(`Could not resolve processor: ${processor}`);
|
||||
}
|
||||
return resolved;
|
||||
}
|
||||
|
||||
export { convertOptionToLegacy as c };
|
||||
Loading…
Add table
Add a link
Reference in a new issue