diff --git a/.eslintrc.json b/.eslintrc.json
deleted file mode 100644
index 61353bc..0000000
--- a/.eslintrc.json
+++ /dev/null
@@ -1,28 +0,0 @@
-{
- "env": {
- "node": true,
- "es2022": true,
- "browser": true
- },
- "extends": "eslint:recommended",
- "parserOptions": {
- "ecmaVersion": "latest",
- "sourceType": "commonjs"
- },
- "rules": {
- "no-unused-vars": ["warn", { "argsIgnorePattern": "^_" }],
- "no-console": "off",
- "prefer-const": "warn",
- "no-var": "warn"
- },
- "globals": {
- "exifr": "readonly",
- "sha256": "readonly",
- "SparkMD5": "readonly",
- "OCR_PIPELINE": "readonly",
- "OSINT_LIB": "readonly",
- "BLUELENS_HELPERS": "readonly",
- "BLUELENS_CONFIG": "readonly",
- "Tesseract": "readonly"
- }
-}
diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md
new file mode 100644
index 0000000..26ecf55
--- /dev/null
+++ b/CONTRIBUTING.md
@@ -0,0 +1,209 @@
+# Contributing to BlueLens
+
+Thank you for your interest in contributing to BlueLens! This document provides guidelines and instructions for contributing to the project.
+
+## Code of Conduct
+
+Please be respectful and constructive in all interactions with the community. We aim to maintain a welcoming environment for all contributors.
+
+## Getting Started
+
+### Prerequisites
+
+- Node.js 18 or later (Node.js 20 recommended)
+- Git
+- A code editor (VS Code, Sublime, etc.)
+
+### Development Setup
+
+1. **Fork and Clone**
+
+ ```bash
+ git clone https://github.com/your-username/bluelens.git
+ cd bluelens
+ ```
+
+2. **Install Dependencies**
+
+ ```bash
+ npm install
+ ```
+
+3. **Run the Development Server**
+
+ ```bash
+ npm start
+ ```
+
+ Then open http://localhost:8787 in your browser.
+
+4. **Run Tests**
+ ```bash
+ npm test
+ ```
+
+## Development Workflow
+
+### Before Making Changes
+
+1. Create a new branch for your work:
+
+ ```bash
+ git checkout -b feature/your-feature-name
+ ```
+
+2. Make sure all tests pass:
+ ```bash
+ npm test
+ ```
+
+### Making Changes
+
+1. **Write Quality Code**
+ - Follow the existing code style and conventions
+ - Keep functions focused and reasonably sized
+ - Add comments for complex logic
+ - Use meaningful variable and function names
+
+2. **Code Style**
+ - We use ESLint and Prettier for code formatting
+ - Run linting before committing:
+ ```bash
+ npm run lint
+ npm run format:check
+ ```
+ - Auto-fix issues when possible:
+ ```bash
+ npm run lint:fix
+ npm run format
+ ```
+
+3. **Testing**
+ - Add tests for new features
+ - Update existing tests if behavior changes
+ - Ensure all tests pass: `npm test`
+ - Check test coverage: `npm run test:coverage`
+
+4. **Documentation**
+ - Update relevant documentation in the `docs/` folder
+ - Update README.md if adding user-facing features
+ - Add JSDoc comments for new functions
+
+### Commit Messages
+
+Write clear, descriptive commit messages:
+
+- Use present tense ("Add feature" not "Added feature")
+- Use imperative mood ("Move cursor to..." not "Moves cursor to...")
+- Keep the first line under 72 characters
+- Add detailed description if needed after a blank line
+
+Examples:
+
+```
+Add OCR confidence threshold configuration
+
+Allow users to configure minimum confidence level for OCR text extraction
+via the bluelens-config.js file. Defaults to 60% confidence.
+```
+
+### Pull Requests
+
+1. **Before Submitting**
+ - Ensure all tests pass
+ - Run linting and fix any issues
+ - Update documentation
+ - Rebase on the latest main branch if needed
+
+2. **PR Description**
+ - Clearly describe what the PR does
+ - Reference any related issues (e.g., "Fixes #123")
+ - Include screenshots for UI changes
+ - List any breaking changes
+
+3. **Review Process**
+ - Respond to feedback constructively
+ - Make requested changes in new commits (don't force-push during review)
+ - Once approved, we may squash commits when merging
+
+## Areas for Contribution
+
+### Good First Issues
+
+Look for issues labeled `good first issue` - these are suitable for newcomers.
+
+### High-Priority Areas
+
+- **Testing**: Improve test coverage for edge cases
+- **Documentation**: Enhance user guides and API documentation
+- **Accessibility**: Improve keyboard navigation and screen reader support
+- **Performance**: Optimize large file handling and OCR processing
+- **Modularization**: Help break down large files (especially `app.js`)
+
+### Feature Requests
+
+Before implementing a new feature:
+
+1. Check if an issue exists for it
+2. If not, create a feature request issue
+3. Discuss the approach with maintainers
+4. Wait for approval before starting significant work
+
+## Project Structure
+
+```
+bluelens/
+├── app.js # Main frontend application logic
+├── server.js # Local HTTP server
+├── index.html # Main UI
+├── styles.css # UI styling
+├── bluelens-config.js # Configuration
+├── bluelens-helpers.js # Utility functions
+├── ocr-pipeline.js # OCR processing
+├── ocr-entities-ui.js # Entity extraction UI
+├── osint-lib.js # OSINT search engine integration
+├── launchpad-core.js # Search engine launcher
+├── logger.js # Logging utilities
+├── test/ # Test files
+├── docs/ # Documentation
+└── assets/ # Static assets
+```
+
+## Coding Conventions
+
+### JavaScript
+
+- Use `const` and `let`, not `var`
+- Prefer arrow functions for callbacks
+- Use template literals for string interpolation
+- Destructure objects when accessing multiple properties
+- Use optional chaining (`?.`) for safe property access
+
+### Naming
+
+- `camelCase` for variables and functions
+- `PascalCase` for classes
+- `UPPER_SNAKE_CASE` for constants
+- Prefix unused variables with underscore (`_variable`)
+
+### Comments
+
+- Use `//` for single-line comments
+- Use `/* */` for multi-line comments
+- Add JSDoc comments for public functions
+- Explain "why" not "what" in comments
+
+## Getting Help
+
+- **Questions**: Open a discussion on GitHub
+- **Bugs**: Create an issue with reproduction steps
+- **Features**: Create a feature request issue
+- **Security**: See SECURITY.md for reporting vulnerabilities
+
+## License
+
+By contributing to BlueLens, you agree that your contributions will be licensed under the MIT License.
+
+---
+
+Thank you for contributing to BlueLens! 🌊
diff --git a/README.md b/README.md
index b0ede17..4315d69 100644
--- a/README.md
+++ b/README.md
@@ -176,6 +176,7 @@ npm test
- choosing an image stays local until you launch a provider action
- upload proxy uses ranked temporary-host failover
- OCR model files load from a CDN on first use
+- **Browser-loaded libraries**: BlueLens loads external libraries (exifr, Tesseract.js, SparkMD5, sha256) directly in the browser via CDN for flexibility and to keep the server-side footprint minimal. These are not listed as npm dependencies because they're browser-loaded, not bundled.
- capture-time exports preserve raw value, normalized value, source field, and timezone ambiguity notes
- the evidence pack includes report data and reproducibility metadata
- `BLUELENS_ALLOW_PRIVATE_FETCH=1` is for controlled local testing only
@@ -208,27 +209,32 @@ For detailed documentation, see the [docs/](./docs) folder:
## 🧑💻 Development
**Install development tools**:
+
```bash
npm install
```
**Run tests**:
+
```bash
npm test
```
**Run tests with coverage**:
+
```bash
npm run test:coverage
```
**Linting**:
+
```bash
npm run lint
npm run lint:fix
```
**Formatting**:
+
```bash
npm run format:check
npm run format
diff --git a/SECURITY.md b/SECURITY.md
new file mode 100644
index 0000000..8cebea6
--- /dev/null
+++ b/SECURITY.md
@@ -0,0 +1,59 @@
+# Security Policy
+
+## Supported Versions
+
+BlueLens is currently in active development. Security updates will be provided for the latest version.
+
+| Version | Supported |
+| ------- | ------------------ |
+| Latest | :white_check_mark: |
+
+## Reporting a Vulnerability
+
+If you discover a security vulnerability in BlueLens, please report it responsibly:
+
+### How to Report
+
+1. **Do NOT** create a public GitHub issue for security vulnerabilities
+2. Send a detailed report to the repository maintainers via:
+ - GitHub Security Advisories (preferred): Use the "Security" tab → "Report a vulnerability"
+ - Or create a private security advisory
+
+### What to Include
+
+Please include the following information in your report:
+
+- A clear description of the vulnerability
+- Steps to reproduce the issue
+- Potential impact and severity assessment
+- Any suggested fixes or mitigations (if available)
+- Your contact information for follow-up questions
+
+### Response Timeline
+
+- **Acknowledgment**: We aim to acknowledge receipt of your vulnerability report within 48 hours
+- **Initial Assessment**: We will provide an initial assessment within 5 business days
+- **Updates**: We will keep you informed of progress toward a fix
+- **Disclosure**: We will work with you to coordinate responsible disclosure after a fix is available
+
+### Security Best Practices
+
+When using BlueLens:
+
+- Keep your Node.js environment up to date (Node.js 18 or later required)
+- Review uploaded images to ensure they don't contain sensitive information before sharing externally
+- Be cautious when using the acquisition layer features with untrusted URLs
+- Regularly update dependencies by running `npm update`
+- Use the local-first approach to keep sensitive image analysis offline when possible
+
+## Security Features
+
+BlueLens is designed with security in mind:
+
+- **Local-first processing**: Image analysis happens locally by default
+- **No automatic uploads**: Images are only uploaded when you explicitly choose to
+- **Configurable upload hosts**: Control which services are used for image uploads
+- **Rate limiting**: Built-in rate limiting for acquisition layer requests
+- **Content Security Policy**: Frontend implements CSP headers (when served via the local server)
+
+Thank you for helping keep BlueLens and its users secure!
diff --git a/app.js b/app.js
index 6505558..91451a9 100644
--- a/app.js
+++ b/app.js
@@ -1,5 +1,3 @@
-/* global exifr, sha256, SparkMD5, OCR_PIPELINE, OSINT_LIB, BLUELENS_HELPERS, BLUELENS_CONFIG, Tesseract */
-
const elements = {
dropzone: document.getElementById("dropzone"),
fileInput: document.getElementById("fileInput"),
@@ -155,7 +153,6 @@ const elements = {
cmdk: document.getElementById("cmdk"),
cmdkInput: document.getElementById("cmdkInput"),
cmdkList: document.getElementById("cmdkList"),
-
};
const appHelpers = BLUELENS_HELPERS || {};
@@ -186,24 +183,32 @@ const sortBatchItems =
sortKey === "name"
? String(item?.report?.file?.name || "")
: sortKey === "gps"
- ? (triage.gps ? 1 : 0)
+ ? triage.gps
+ ? 1
+ : 0
: sortKey === "ent"
- ? (triage.entCount || 0)
+ ? triage.entCount || 0
: sortKey === "repost"
- ? (Number.isFinite(triage.repost) ? triage.repost : -1)
+ ? Number.isFinite(triage.repost)
+ ? triage.repost
+ : -1
: sortKey === "cluster"
- ? (item?.clusterId || 0)
+ ? item?.clusterId || 0
: sortKey === "dim"
- ? (dims ? Number(dims[1]) * Number(dims[2]) : -1)
- : (triage.lead || 0);
+ ? dims
+ ? Number(dims[1]) * Number(dims[2])
+ : -1
+ : triage.lead || 0;
const va = pick(a, ta, dimsA);
const vb = pick(b, tb, dimsB);
if (typeof va === "string" || typeof vb === "string") return dir * String(va).localeCompare(String(vb));
return dir * ((va || 0) - (vb || 0));
});
});
-const buildEntityGraph = appHelpers.buildEntityGraph || (() => ({ nodes: [], edges: [], summary: { reports: 0, file_nodes: 0, entity_nodes: 0, edges: 0 } }));
-const buildInvestigationTimeline = appHelpers.buildInvestigationTimeline || (() => ({ events: [], summary: { total: 0, ambiguous: 0, categories: {} } }));
+const buildEntityGraph =
+ appHelpers.buildEntityGraph || (() => ({ nodes: [], edges: [], summary: { reports: 0, file_nodes: 0, entity_nodes: 0, edges: 0 } }));
+const buildInvestigationTimeline =
+ appHelpers.buildInvestigationTimeline || (() => ({ events: [], summary: { total: 0, ambiguous: 0, categories: {} } }));
const runtimeConfig = BLUELENS_CONFIG || {};
const CONFIG_META = runtimeConfig.meta || {};
@@ -212,7 +217,18 @@ const SERVER_CONFIG = runtimeConfig.server || {};
const FX_CONFIG = runtimeConfig.fx || {};
const STORAGE_KEYS = runtimeConfig.storageKeys || {};
-const ENGINE_ORDER = APP_CONFIG.engines?.order || ["lens", "bing", "yandex", "tineye", "pinterest", "saucenao", "iqdb", "baidu", "ascii2d", "google_images"];
+const ENGINE_ORDER = APP_CONFIG.engines?.order || [
+ "lens",
+ "bing",
+ "yandex",
+ "tineye",
+ "pinterest",
+ "saucenao",
+ "iqdb",
+ "baidu",
+ "ascii2d",
+ "google_images",
+];
const ENGINE_LABEL = APP_CONFIG.engines?.labels || {
lens: "Lens",
bing: "Bing",
@@ -255,14 +271,15 @@ const BATCH_TOP_LENS_MAX = APP_CONFIG.batch?.topLensMax || 10;
const BATCH_OCR_DEFAULT = APP_CONFIG.batch?.ocrDefault || 8;
const BATCH_OCR_MAX = APP_CONFIG.batch?.ocrMax || 20;
const OCR_DEFAULT_LANGUAGE = APP_CONFIG.ocr?.defaultLanguage || "eng";
-const OCR_LANGUAGE_OPTIONS = Array.isArray(APP_CONFIG.ocr?.languages) && APP_CONFIG.ocr.languages.length
- ? APP_CONFIG.ocr.languages
- : [
- { value: "eng", label: "English" },
- { value: "spa", label: "Spanish" },
- { value: "fra", label: "French" },
- { value: "deu", label: "German" },
- ];
+const OCR_LANGUAGE_OPTIONS =
+ Array.isArray(APP_CONFIG.ocr?.languages) && APP_CONFIG.ocr.languages.length
+ ? APP_CONFIG.ocr.languages
+ : [
+ { value: "eng", label: "English" },
+ { value: "spa", label: "Spanish" },
+ { value: "fra", label: "French" },
+ { value: "deu", label: "German" },
+ ];
const OCR_FAST_PREPROCESS_MAX_DIM = APP_CONFIG.ocr?.fastPreprocessMaxDim || 1200;
const OCR_BATCH_PREPROCESS_MAX_DIM = APP_CONFIG.ocr?.batchPreprocessMaxDim || 1400;
const DHASH_BATCH_CLUSTER_THRESHOLD = APP_CONFIG.dhash?.batchClusterThreshold || 8;
@@ -270,9 +287,11 @@ const DHASH_MUTATION_CLUSTER_THRESHOLD = APP_CONFIG.dhash?.mutationClusterThresh
const HOST_STATS_REFRESH_TIMEOUT_MS = APP_CONFIG.hostStats?.refreshTimeoutMs || 2000;
const UPLOAD_PROXY_TIMEOUT_MS = APP_CONFIG.upload?.endpointTimeoutMs || 45000;
const UPLOAD_PREFLIGHT_TIMEOUT_MS = APP_CONFIG.upload?.preflightTimeoutMs || 2500;
-const WAIT_JOB_DEFAULT_TIMEOUT_MS = SERVER_CONFIG.waitJobs?.defaultTimeoutMs || 25000;
+const _WAIT_JOB_DEFAULT_TIMEOUT_MS = SERVER_CONFIG.waitJobs?.defaultTimeoutMs || 25000;
const LOCAL_SERVER_HINT_TIMEOUT_MS = APP_CONFIG.localServerHint?.timeoutMs || 900;
-const LOCAL_SERVER_HINT_MESSAGE = APP_CONFIG.localServerHint?.offlineMessage || "Local server offline — start `bluelens-start.cmd` (or `node server.js`) for Upload + Launchpad.";
+const LOCAL_SERVER_HINT_MESSAGE =
+ APP_CONFIG.localServerHint?.offlineMessage ||
+ "Local server offline — start `bluelens-start.cmd` (or `node server.js`) for Upload + Launchpad.";
const WAIT_JOB_ENDPOINT_PREFIX = "/api/wait-jobs/";
const SESSION_KEY = STORAGE_KEYS.session || "osint:session:v1";
const LAST_RUN_KEY = STORAGE_KEYS.lastRun || "osint:lastRun:v1";
@@ -340,7 +359,8 @@ const RUN_QUEUE_STATUS = {
error: "error",
};
const UNKNOWN_EXPIRY_WINDOW = "unknown";
-const TEMP_EXTERNAL_ARTIFACT_WARNING = "Temporary external artifact — third-party upload URLs may expire or disappear before a reader opens the report.";
+const TEMP_EXTERNAL_ARTIFACT_WARNING =
+ "Temporary external artifact — third-party upload URLs may expire or disappear before a reader opens the report.";
const TEMP_EXTERNAL_ARTIFACT_NOTE = "Host retention is controlled by the third-party service and is not guaranteed by BlueLens.";
const compareDiffScratchA = document.createElement("canvas");
const compareDiffScratchB = document.createElement("canvas");
@@ -362,7 +382,8 @@ const EXPORT_RUNTIME_CONFIG_SOURCE = JSON.stringify({
metadataSuspicionBands: METADATA_SUSPICION_BANDS,
},
});
-const EXPORT_RUNTIME_CONFIG_FINGERPRINT = typeof sha256 === "function" ? sha256(EXPORT_RUNTIME_CONFIG_SOURCE) : EXPORT_RUNTIME_CONFIG_SOURCE;
+const EXPORT_RUNTIME_CONFIG_FINGERPRINT =
+ typeof sha256 === "function" ? sha256(EXPORT_RUNTIME_CONFIG_SOURCE) : EXPORT_RUNTIME_CONFIG_SOURCE;
const DOCTOR_SONAR_POLL_MS = 120_000;
let doctorSonarTimer = 0;
@@ -410,7 +431,7 @@ function writeStorage(key, value, scope, storage = localStorage) {
}
}
-function removeStorage(key, scope, storage = localStorage) {
+function _removeStorage(key, scope, storage = localStorage) {
try {
storage.removeItem(key);
return true;
@@ -636,11 +657,9 @@ function getInvestigationReports({ currentReport = null } = {}) {
const addReport = (report) => {
const enriched = enrichReportForInvestigation(report);
if (!enriched) return;
- const key = [
- enriched.file?.name || "image",
- enriched.hashes?.sha256 || enriched.hashes?.md5 || "",
- enriched.generated_at || "",
- ].join("|");
+ const key = [enriched.file?.name || "image", enriched.hashes?.sha256 || enriched.hashes?.md5 || "", enriched.generated_at || ""].join(
+ "|",
+ );
if (seen.has(key)) return;
seen.add(key);
reports.push(enriched);
@@ -782,7 +801,9 @@ function renderInvestigationGraph(model) {
svg.innerHTML = `${edgeMarkup}${nodeMarkup} `;
const legendTypes = Array.from(new Set(nodes.map((node) => node.type)));
legend.hidden = legendTypes.length === 0;
- legend.innerHTML = legendTypes.map((type) => `${escapeHtml(type)} `).join("");
+ legend.innerHTML = legendTypes
+ .map((type) => `${escapeHtml(type)} `)
+ .join("");
}
function renderInvestigationDetail(model) {
@@ -809,10 +830,17 @@ function renderInvestigationDetail(model) {
...(linkedNodes.length ? linkedNodes.map((entry) => `- ${entry.label} (${entry.type}) · files ${entry.file_count}`) : ["- —"]),
"",
"Provenance:",
- ...((node.provenance || []).slice(0, 10).map((entry) => `- ${entry.file_name || "report"} · ${entry.field || "field"} · ${entry.source || "source"}${entry.raw ? ` · ${entry.raw}` : ""}${entry.excerpt ? ` · ${entry.excerpt}` : ""}`) || ["- —"]),
+ ...((node.provenance || [])
+ .slice(0, 10)
+ .map(
+ (entry) =>
+ `- ${entry.file_name || "report"} · ${entry.field || "field"} · ${entry.source || "source"}${entry.raw ? ` · ${entry.raw}` : ""}${entry.excerpt ? ` · ${entry.excerpt}` : ""}`,
+ ) || ["- —"]),
"",
"Edges:",
- ...(linkedEdges.length ? linkedEdges.map((edge) => `- ${edge.type} · evidence ${edge.evidence_count} · files ${edge.file_count}`) : ["- —"]),
+ ...(linkedEdges.length
+ ? linkedEdges.map((edge) => `- ${edge.type} · evidence ${edge.evidence_count} · files ${edge.file_count}`)
+ : ["- —"]),
];
el.textContent = lines.join("\n");
}
@@ -844,32 +872,45 @@ function renderDoctorSurface(report) {
lines.push("Running sonar…");
} else {
lines.push(`App: ${report.app_version || APP_VERSION} · schema ${report.schema_version || EXPORT_SCHEMA_VERSION}`);
- lines.push(`Ping: ${report.server?.ping_ok ? "OK" : "FAIL"}${report.server?.node_version ? ` · Node ${report.server.node_version}` : ""}`);
+ lines.push(
+ `Ping: ${report.server?.ping_ok ? "OK" : "FAIL"}${report.server?.node_version ? ` · Node ${report.server.node_version}` : ""}`,
+ );
lines.push(`Popup: ${report.popup?.ok ? "OK" : "BLOCKED"} · Storage: ${report.storage?.ok ? "OK" : "FAIL"}`);
lines.push(`Libraries: ${report.libs?.summary || "unknown"}`);
if (report.server?.recommended_upload_host) lines.push(`Best upload path: ${report.server.recommended_upload_host}`);
if (Array.isArray(report.server?.upload_reachability) && report.server.upload_reachability.length) {
lines.push("Upload reachability:");
for (const row of report.server.upload_reachability) {
- lines.push(`- ${row.host}: ${row.reachable ? "OK" : "FAIL"}${row.status_code ? ` (${row.status_code})` : ""}${row.error ? ` · ${row.error}` : ""}`);
+ lines.push(
+ `- ${row.host}: ${row.reachable ? "OK" : "FAIL"}${row.status_code ? ` (${row.status_code})` : ""}${row.error ? ` · ${row.error}` : ""}`,
+ );
}
}
if (Array.isArray(report.server?.cdn_reachability) && report.server.cdn_reachability.length) {
lines.push("CDN reachability:");
- for (const row of report.server.cdn_reachability) lines.push(`- ${row.name}: ${row.reachable ? "OK" : "FAIL"}${row.status_code ? ` (${row.status_code})` : ""}${row.error ? ` · ${row.error}` : ""}`);
+ for (const row of report.server.cdn_reachability)
+ lines.push(
+ `- ${row.name}: ${row.reachable ? "OK" : "FAIL"}${row.status_code ? ` (${row.status_code})` : ""}${row.error ? ` · ${row.error}` : ""}`,
+ );
}
if (Array.isArray(report.server?.engine_availability) && report.server.engine_availability.length) {
lines.push("Engine availability:");
- for (const row of report.server.engine_availability) lines.push(`- ${row.engine}: ${row.reachable ? "OK" : "FAIL"}${row.status_code ? ` (${row.status_code})` : ""}${row.error ? ` · ${row.error}` : ""}`);
+ for (const row of report.server.engine_availability)
+ lines.push(
+ `- ${row.engine}: ${row.reachable ? "OK" : "FAIL"}${row.status_code ? ` (${row.status_code})` : ""}${row.error ? ` · ${row.error}` : ""}`,
+ );
}
if (Array.isArray(report.server?.recent_upload_attempts) && report.server.recent_upload_attempts.length) {
lines.push("Recent upload attempts:");
- for (const row of report.server.recent_upload_attempts.slice(0, 6)) lines.push(`- ${row.host}: ${row.ok ? "OK" : "FAIL"} · ${fmtMs(row.ms)}${row.err ? ` · ${row.err}` : ""}`);
+ for (const row of report.server.recent_upload_attempts.slice(0, 6))
+ lines.push(`- ${row.host}: ${row.ok ? "OK" : "FAIL"} · ${fmtMs(row.ms)}${row.err ? ` · ${row.err}` : ""}`);
}
if (report.server?.history?.upload_hosts && Object.keys(report.server.history.upload_hosts).length) {
lines.push("Host trends:");
for (const [host, stats] of Object.entries(report.server.history.upload_hosts)) {
- lines.push(`- ${host}: ok ${stats.ok || 0} · fail ${stats.fail || 0} · fail-rate ${Math.round(Number(stats.fail_rate || 0) * 100)}% · avg ${fmtMs(stats.avg_ms)}`);
+ lines.push(
+ `- ${host}: ok ${stats.ok || 0} · fail ${stats.fail || 0} · fail-rate ${Math.round(Number(stats.fail_rate || 0) * 100)}% · avg ${fmtMs(stats.avg_ms)}`,
+ );
}
}
}
@@ -891,14 +932,17 @@ function renderInvestigationSwarm(model) {
el.innerHTML = `
Mode: ${escapeHtml(run.mode || "launchpad")} · artifact ${escapeHtml(run.artifact || "original")} · engines ${engines.length}
-
Outcomes: ${Object.entries(outcomeSummary).map(([key, value]) => `${escapeHtml(key)} ${escapeHtml(String(value))}`).join(" · ")}
+
Outcomes: ${Object.entries(outcomeSummary)
+ .map(([key, value]) => `${escapeHtml(key)} ${escapeHtml(String(value))}`)
+ .join(" · ")}
- ${engines.map((engine) => {
- const queue = run.queue?.[engine] || {};
- const outcome = run.outcomes?.[engine] || {};
- const disposition = outcome.disposition || "pending";
- return `
+ ${engines
+ .map((engine) => {
+ const queue = run.queue?.[engine] || {};
+ const outcome = run.outcomes?.[engine] || {};
+ const disposition = outcome.disposition || "pending";
+ return `
${escapeHtml(displayEngineLabel(engine))}
@@ -917,7 +961,8 @@ function renderInvestigationSwarm(model) {
`;
- }).join("")}
+ })
+ .join("")}
`;
}
@@ -967,7 +1012,12 @@ function createReviewEntry({
function updateSourceInfoField(field, value, { source = "manual", note = "" } = {}) {
state.sourceInfo = state.sourceInfo || {};
const normalized = typeof value === "string" ? value : value == null ? "" : String(value);
- const previous = typeof state.sourceInfo[field] === "string" ? state.sourceInfo[field] : state.sourceInfo[field] == null ? "" : String(state.sourceInfo[field]);
+ const previous =
+ typeof state.sourceInfo[field] === "string"
+ ? state.sourceInfo[field]
+ : state.sourceInfo[field] == null
+ ? ""
+ : String(state.sourceInfo[field]);
if (normalized === previous) return false;
state.sourceInfo[field] = normalized;
appendReviewEntry(
@@ -1093,7 +1143,7 @@ function getVisibleResultIntakeEntries(entries = state.resultIntake?.entries) {
return (entries || []).filter((entry) => !entry?.suppressed);
}
-function getSuppressedResultIntakeEntries(entries = state.resultIntake?.entries) {
+function _getSuppressedResultIntakeEntries(entries = state.resultIntake?.entries) {
return (entries || []).filter((entry) => entry?.suppressed);
}
@@ -1134,7 +1184,9 @@ function formatSourceLabelKey(key) {
function extractYearCandidatesFromText(text) {
const raw = String(text || "");
- const years = Array.from(new Set((raw.match(/\b(19\d{2}|20\d{2})\b/g) || []).map((value) => Number(value)).filter((value) => value >= 1900 && value <= 2099)));
+ const years = Array.from(
+ new Set((raw.match(/\b(19\d{2}|20\d{2})\b/g) || []).map((value) => Number(value)).filter((value) => value >= 1900 && value <= 2099)),
+ );
return years.sort((a, b) => a - b);
}
@@ -1156,7 +1208,8 @@ function buildResultIntakeDerivedContext(entries = []) {
}
function classifyResultIntakeEntry(entry, context = {}) {
- const combined = `${entry?.title || ""}\n${entry?.snippet || ""}\n${entry?.canonical_url || entry?.url || ""}\n${entry?.source_line || ""}`.toLowerCase();
+ const combined =
+ `${entry?.title || ""}\n${entry?.snippet || ""}\n${entry?.canonical_url || entry?.url || ""}\n${entry?.source_line || ""}`.toLowerCase();
const years = extractYearCandidatesFromText(combined);
const earliestYear = years[0] || null;
const notes = [];
@@ -1166,10 +1219,16 @@ function classifyResultIntakeEntry(entry, context = {}) {
const domain = String(entry?.domain || "");
const repeated = Number(context.repeatedDomains?.get(domain) || 0);
const has = (re) => re.test(combined);
- const stockDomain = /(shutterstock|adobestock|stock|istockphoto|gettyimages|pixabay|pexels|unsplash)/.test(domain) || has(/\b(stock|royalty[- ]free|licensing|shutterstock|getty|adobe stock|iStock)\b/);
+ const stockDomain =
+ /(shutterstock|adobestock|stock|istockphoto|gettyimages|pixabay|pexels|unsplash)/.test(domain) ||
+ has(/\b(stock|royalty[- ]free|licensing|shutterstock|getty|adobe stock|iStock)\b/);
const memeSignal = has(/\b(meme|reaction image|caption|template|knowyourmeme|imgflip|shitpost)\b/);
- const mirrorSignal = /(pinimg|pinterest|weheartit|tumblr|reddit|9gag|danbooru|gelbooru|yande\.re|zerochan|e-shuushuu|fancaps)/.test(domain) || has(/\b(mirror|mirrored|rehost|aggregator|board|cached|scraped|proxy)\b/);
- const originalSignal = /(artstation|behance|deviantart|pixiv|flickr|instagram|twitter|x\.com|newgrounds)/.test(domain) || has(/\b(original|official|artist|author|portfolio|source post|posted by)\b/);
+ const mirrorSignal =
+ /(pinimg|pinterest|weheartit|tumblr|reddit|9gag|danbooru|gelbooru|yande\.re|zerochan|e-shuushuu|fancaps)/.test(domain) ||
+ has(/\b(mirror|mirrored|rehost|aggregator|board|cached|scraped|proxy)\b/);
+ const originalSignal =
+ /(artstation|behance|deviantart|pixiv|flickr|instagram|twitter|x\.com|newgrounds)/.test(domain) ||
+ has(/\b(original|official|artist|author|portfolio|source post|posted by)\b/);
const repostSignal = has(/\b(repost|reblog|shared by|posted on|pinned|collection|roundup|compilation)\b/);
if (stockDomain) {
@@ -1260,7 +1319,8 @@ function renderSourceContradictions() {
const conflict = buildSourceContradictionModel();
if (!conflict) {
el.classList.remove("mission-grid");
- el.textContent = "Ingest result snippets with dates and BlueLens will surface conflicts instead of flattening them into fake certainty.";
+ el.textContent =
+ "Ingest result snippets with dates and BlueLens will surface conflicts instead of flattening them into fake certainty.";
return;
}
el.classList.add("mission-grid");
@@ -1286,15 +1346,15 @@ function renderSourceContradictions() {
function pickBestResultIntakeEntry(entries = []) {
const priority = { likely_original: 5, stock_duplicate: 4, scraped_mirror: 3, likely_repost: 2, meme_derivative: 1, needs_review: 0 };
- return entries
- .slice()
- .sort((a, b) => {
+ return (
+ entries.slice().sort((a, b) => {
const pa = priority[a.source_label] || 0;
const pb = priority[b.source_label] || 0;
if (pb !== pa) return pb - pa;
if ((b.source_confidence || 0) !== (a.source_confidence || 0)) return (b.source_confidence || 0) - (a.source_confidence || 0);
return String(a.canonical_url || a.url || "").localeCompare(String(b.canonical_url || b.url || ""));
- })[0] || null;
+ })[0] || null
+ );
}
function parseCurrentDimensions() {
@@ -1319,7 +1379,8 @@ function computeNoResultAutopsy() {
const readyEngines = Object.keys(run.targets || {}).length;
const manualOnlyProviders = ["pinterest"].filter((engine) => run.targets?.[engine]);
const hasExif = Boolean(state.exif && Object.keys(state.exif).length > 0);
- const hasTextPivots = Boolean((state.ocrText || "").trim()) || Boolean(state.insights?.attribution_hints && state.insights.attribution_hints !== "—");
+ const hasTextPivots =
+ Boolean((state.ocrText || "").trim()) || Boolean(state.insights?.attribution_hints && state.insights.attribution_hints !== "—");
if (blocked > 0) {
reasons.push({
@@ -1527,11 +1588,12 @@ function renderResultIntake() {
Intake queue: ${summary.total} visible entries · merged ${summary.duplicatesMerged} duplicates · engines ${summary.engines.join(", ") || "—"} · top domains ${summary.topDomains.join(", ") || "—"}${suppressedEntries.length ? ` · suppressed ${suppressedEntries.length}` : ""}
- ${visibleEntries.length
- ? visibleEntries
- .slice(0, 12)
- .map(
- (entry) => `
+ ${
+ visibleEntries.length
+ ? visibleEntries
+ .slice(0, 12)
+ .map(
+ (entry) => `
${escapeHtml(entry.title || entry.canonical_url || entry.url)}
@@ -1549,9 +1611,10 @@ function renderResultIntake() {
`,
- )
- .join("")
- : `
All current findings are suppressed for this session.
`}
+ )
+ .join("")
+ : `
All current findings are suppressed for this session.
`
+ }
${
suppressedEntries.length
? `
@@ -1642,13 +1705,7 @@ function buildMetadataPassOutput() {
const software = elements.kfSoftware?.textContent || "—";
const gps = elements.kfGps?.textContent || "—";
const suspicion = state.insights?.metadata_suspicion_band || "—";
- const lines = [
- `Captured: ${captured}`,
- `Camera: ${camera}`,
- `Software: ${software}`,
- `GPS: ${gps}`,
- `Metadata suspicion: ${suspicion}`,
- ];
+ const lines = [`Captured: ${captured}`, `Camera: ${camera}`, `Software: ${software}`, `GPS: ${gps}`, `Metadata suspicion: ${suspicion}`];
if (Array.isArray(state.insights?.metadata_suspicion_inputs)) {
lines.push(...state.insights.metadata_suspicion_inputs.slice(0, 4).map((line) => `Cue: ${line}`));
}
@@ -1661,7 +1718,14 @@ function buildMetadataPassOutput() {
label: state.file?.name || "Loaded image",
meta: elements.metaDim?.textContent || "metadata review",
lines,
- links: state.gps ? [{ label: "Open map", url: `https://www.openstreetmap.org/?mlat=${encodeURIComponent(state.gps.lat)}&mlon=${encodeURIComponent(state.gps.lon)}#map=16/${encodeURIComponent(state.gps.lat)}/${encodeURIComponent(state.gps.lon)}` }] : [],
+ links: state.gps
+ ? [
+ {
+ label: "Open map",
+ url: `https://www.openstreetmap.org/?mlat=${encodeURIComponent(state.gps.lat)}&mlon=${encodeURIComponent(state.gps.lon)}#map=16/${encodeURIComponent(state.gps.lat)}/${encodeURIComponent(state.gps.lon)}`,
+ },
+ ]
+ : [],
},
],
};
@@ -1682,7 +1746,8 @@ function getBatchEntityClusters(items = state.batchItems) {
for (const item of items || []) {
const report = item?.report;
const fileName = report?.file?.name || item?.file?.name || "image";
- const ent = report?.key_fields?.ocr_entities || (report?.ocr_text ? OCR_PIPELINE?.extractEntities?.(report.ocr_text) : null) || { urls: [], emails: [], handles: [], phones: [] };
+ const ent = report?.key_fields?.ocr_entities ||
+ (report?.ocr_text ? OCR_PIPELINE?.extractEntities?.(report.ocr_text) : null) || { urls: [], emails: [], handles: [], phones: [] };
for (const handle of ent.handles || []) {
const normalized = OCR_PIPELINE?.normalizeHandle?.(handle);
if (normalized) addCluster("handle", `@${normalized}`, fileName);
@@ -1738,7 +1803,9 @@ async function fetchLocalJson(endpoint, scope = "api.fetch") {
}
function extractEmailDomain(email) {
- const value = String(email || "").trim().toLowerCase();
+ const value = String(email || "")
+ .trim()
+ .toLowerCase();
const at = value.lastIndexOf("@");
return at >= 0 ? value.slice(at + 1) : "";
}
@@ -1801,7 +1868,9 @@ async function runPivotStructuredTask({ entityType, entityKey, entityValue }) {
};
if (entityType === "handle") {
- const handle = String(entityValue || "").replace(/^@/, "").trim();
+ const handle = String(entityValue || "")
+ .replace(/^@/, "")
+ .trim();
const candidates = [
{ label: "Instagram", url: `https://www.instagram.com/${encodeURIComponent(handle)}/` },
{ label: "TikTok", url: `https://www.tiktok.com/@${encodeURIComponent(handle)}` },
@@ -1816,7 +1885,9 @@ async function runPivotStructuredTask({ entityType, entityKey, entityValue }) {
const live = probes.filter((probe) => probe.result.ok);
return {
status: live.length ? "ready" : "error",
- summary: live.length ? `Resolved ${live.length}/${probes.length} profile probes for @${handle}.` : `No profile metadata fetched for @${handle}.`,
+ summary: live.length
+ ? `Resolved ${live.length}/${probes.length} profile probes for @${handle}.`
+ : `No profile metadata fetched for @${handle}.`,
lines: probes.map((probe) =>
probe.result.ok
? `${probe.label}: ${(probe.result.data?.metadata?.title || probe.result.data?.final_url || probe.url).slice(0, 120)}`
@@ -1840,11 +1911,13 @@ async function runPivotStructuredTask({ entityType, entityKey, entityValue }) {
call(`/api/archive?url=${encodeURIComponent(target)}`, `pivot.${entityType}.archive`),
]);
const lines = [];
- if (page.ok) lines.push(`Fetch: ${page.data?.status || "—"} · ${(page.data?.metadata?.title || page.data?.snippet || target).slice(0, 140)}`);
+ if (page.ok)
+ lines.push(`Fetch: ${page.data?.status || "—"} · ${(page.data?.metadata?.title || page.data?.snippet || target).slice(0, 140)}`);
else lines.push(`Fetch: ${page.error}`);
if (metadata.ok) lines.push(`Canonical: ${metadata.data?.metadata?.canonical_url || metadata.data?.final_url || target}`);
else lines.push(`Metadata: ${metadata.error}`);
- if (discover.ok) lines.push(`Discovery: ${Number(discover.data?.sitemaps?.length || 0)} sitemaps · robots ${discover.data?.robots_status || "—"}`);
+ if (discover.ok)
+ lines.push(`Discovery: ${Number(discover.data?.sitemaps?.length || 0)} sitemaps · robots ${discover.data?.robots_status || "—"}`);
else lines.push(`Discovery: ${discover.error}`);
if (archive.ok) {
const snap = archive.data?.snapshot;
@@ -1970,8 +2043,8 @@ function renderOnboardingStrip() {
state.localServerOnline === null
? "Checking local upload helper…"
: state.localServerOnline === false
- ? "Uploads unavailable — start `node server.js`."
- : "Uploads available when you ask for them.",
+ ? "Uploads unavailable — start `node server.js`."
+ : "Uploads available when you ask for them.",
},
state.popupLikely ? { tone: "warn", text: "If a search tab does not open, click that engine again." } : null,
].filter(Boolean);
@@ -2252,7 +2325,12 @@ function reset() {
analyst_confidence: "unverified",
};
state.sourceReviewLog = [];
- state.insights = { metadata_suspicion_score: null, metadata_suspicion_band: null, metadata_suspicion_inputs: [], ai_image_suspicion: null };
+ state.insights = {
+ metadata_suspicion_score: null,
+ metadata_suspicion_band: null,
+ metadata_suspicion_inputs: [],
+ ai_image_suspicion: null,
+ };
state.missionOutput = null;
state.resultIntake = { raw: "", entries: [], last_ingested_at: null };
state.pivotTaskResults = {};
@@ -2278,7 +2356,8 @@ function reset() {
}
elements.previewEmpty.style.display = "grid";
if (elements.cropStatusOut) {
- elements.cropStatusOut.textContent = "Drag a box around a face, logo, object, tattoo, sign, vehicle, building, product, artwork, or text area to search just that region.";
+ elements.cropStatusOut.textContent =
+ "Drag a box around a face, logo, object, tattoo, sign, vehicle, building, product, artwork, or text area to search just that region.";
}
elements.metaName.textContent = "—";
elements.metaType.textContent = "—";
@@ -2380,7 +2459,8 @@ function reset() {
}
if (elements.noResultAutopsyOut) {
elements.noResultAutopsyOut.classList.remove("mission-grid");
- elements.noResultAutopsyOut.textContent = "Run a multi-engine launch, then ingest hits. If nothing lands, BlueLens will explain the likely failure modes here.";
+ elements.noResultAutopsyOut.textContent =
+ "Run a multi-engine launch, then ingest hits. If nothing lands, BlueLens will explain the likely failure modes here.";
}
if (elements.sourceContradictionOut) {
elements.sourceContradictionOut.classList.remove("mission-grid");
@@ -2535,9 +2615,11 @@ function setSearchQueryOutput(output) {
renderSearchQueryOutput();
}
-function parseFilenameStem(name) {
+function _parseFilenameStem(name) {
if (appHelpers.parseFilenameStem) return appHelpers.parseFilenameStem(name);
- const raw = String(name || "").trim().replace(/\.[^.]+$/, "");
+ const raw = String(name || "")
+ .trim()
+ .replace(/\.[^.]+$/, "");
return raw.replace(/[_-]+/g, " ").replace(/\s+/g, " ").trim();
}
@@ -2551,10 +2633,20 @@ function summarizeDocumentLayout(text) {
.split(/\r?\n/)
.map((line) => line.trim())
.filter(Boolean);
- const paragraphBreaks = String(text || "").split(/\n\s*\n/).filter((block) => block.trim()).length;
- const headingCandidates = lines.filter((line) => line.length >= 4 && line.length <= 72 && (line === line.toUpperCase() || /^[A-Z][A-Za-z0-9 '&/-]{3,}$/.test(line))).slice(0, 4);
- const kvRows = lines.filter((line) => /[:|]/.test(line) || /\b(total|date|name|address|price|receipt|invoice|menu|certificate|issued|expires)\b/i.test(line)).slice(0, 6);
- const tableRows = lines.filter((line) => /\d/.test(line) && /[$€£¥]|(?:\s{2,}|\t)|\bqty\b|\btotal\b|\bsubtotal\b/i.test(line)).slice(0, 6);
+ const paragraphBreaks = String(text || "")
+ .split(/\n\s*\n/)
+ .filter((block) => block.trim()).length;
+ const headingCandidates = lines
+ .filter((line) => line.length >= 4 && line.length <= 72 && (line === line.toUpperCase() || /^[A-Z][A-Za-z0-9 '&/-]{3,}$/.test(line)))
+ .slice(0, 4);
+ const kvRows = lines
+ .filter(
+ (line) => /[:|]/.test(line) || /\b(total|date|name|address|price|receipt|invoice|menu|certificate|issued|expires)\b/i.test(line),
+ )
+ .slice(0, 6);
+ const tableRows = lines
+ .filter((line) => /\d/.test(line) && /[$€£¥]|(?:\s{2,}|\t)|\bqty\b|\btotal\b|\bsubtotal\b/i.test(line))
+ .slice(0, 6);
return {
line_count: lines.length,
paragraph_count: paragraphBreaks,
@@ -2657,12 +2749,10 @@ function buildDocumentImageOutput(context = getCurrentReconContext()) {
`Candidates: ${logoCandidates.join(" · ") || "No strong brand/logo cue extracted"}`,
"Use logo lookups as pivots, not proof of origin.",
],
- links: logoCandidates
- .slice(0, 4)
- .flatMap((candidate) => [
- { label: `${candidate} logo`, url: buildSearchLink(`"${candidate}" logo`) },
- { label: `${candidate} images`, url: buildSearchLink(`"${candidate}"`) },
- ]),
+ links: logoCandidates.slice(0, 4).flatMap((candidate) => [
+ { label: `${candidate} logo`, url: buildSearchLink(`"${candidate}" logo`) },
+ { label: `${candidate} images`, url: buildSearchLink(`"${candidate}"`) },
+ ]),
},
{
label: "Entity extraction",
@@ -2724,26 +2814,38 @@ function renderEngineLaunchpad(run) {
const queue = r.queue && typeof r.queue === "object" ? r.queue : {};
const engines = getRunEngines(r);
- const chips = engines.map((eng) => {
- const url = r.targets?.[eng] || "";
- const on = chosen?.[eng] !== false;
- const queueState = queue?.[eng] || {};
- const st = blocked?.[eng] ? "blocked" : opened?.[eng] ? "opened" : queueState.status || "";
- const title = blocked?.[eng] ? "Popup blocked" : opened?.[eng] ? "Opened" : queueState.status ? `State: ${queueState.status}` : "Prepared";
- const disabled = url ? "" : "disabled";
- return `
+ const chips = engines
+ .map((eng) => {
+ const url = r.targets?.[eng] || "";
+ const on = chosen?.[eng] !== false;
+ const queueState = queue?.[eng] || {};
+ const st = blocked?.[eng] ? "blocked" : opened?.[eng] ? "opened" : queueState.status || "";
+ const title = blocked?.[eng]
+ ? "Popup blocked"
+ : opened?.[eng]
+ ? "Opened"
+ : queueState.status
+ ? `State: ${queueState.status}`
+ : "Prepared";
+ const disabled = url ? "" : "disabled";
+ return `
${escapeHtml(ENGINE_ICON[eng] || "•")}
${escapeHtml(ENGINE_LABEL[eng] || eng)}
`;
- }).join("");
+ })
+ .join("");
const queueCards = engines
.map((eng) => {
const q = queue?.[eng] || {};
- const status = blocked?.[eng] ? RUN_QUEUE_STATUS.blocked : opened?.[eng] ? RUN_QUEUE_STATUS.opened : q.status || (r.targets?.[eng] ? RUN_QUEUE_STATUS.prepared : "idle");
+ const status = blocked?.[eng]
+ ? RUN_QUEUE_STATUS.blocked
+ : opened?.[eng]
+ ? RUN_QUEUE_STATUS.opened
+ : q.status || (r.targets?.[eng] ? RUN_QUEUE_STATUS.prepared : "idle");
const detail = [
q.job_id ? `job ${q.job_id.slice(0, 12)}…` : "",
Number.isFinite(q.attempts) && q.attempts > 0 ? `attempts ${q.attempts}` : "",
@@ -2952,7 +3054,9 @@ function fmtMs(ms) {
function triageSignalsForReport(report) {
const gps = report?.gps && Number.isFinite(report.gps.lat) && Number.isFinite(report.gps.lon);
// Keep reading the old field from saved cases/reports until they have all been re-exported with metadata_suspicion_score.
- const repost = Number(report?.insights?.metadata_suspicion_score ?? report?.insights?.repost_heuristic ?? report?.insights?.repost_likelihood);
+ const repost = Number(
+ report?.insights?.metadata_suspicion_score ?? report?.insights?.repost_heuristic ?? report?.insights?.repost_likelihood,
+ );
const hasExif = Boolean(report?.exif && Object.keys(report.exif).length > 0);
const software = String(report?.key_fields?.software || report?.exif?.Software || "").trim();
@@ -2964,10 +3068,7 @@ function triageSignalsForReport(report) {
const lowRes = mp != null ? mp < 1.0 : false;
// "Entities" from OCR if available; otherwise from whatever text we have without forcing batch OCR.
- let ent =
- report?.key_fields?.ocr_entities && typeof report.key_fields.ocr_entities === "object"
- ? report.key_fields.ocr_entities
- : null;
+ let ent = report?.key_fields?.ocr_entities && typeof report.key_fields.ocr_entities === "object" ? report.key_fields.ocr_entities : null;
if (!ent && report?.ocr_text) {
ent = OCR_PIPELINE?.extractEntities?.(String(report.ocr_text)) || null;
@@ -3068,7 +3169,9 @@ function renderBatchDashboard() {
const entityClusters = getBatchEntityClusters(items).slice(0, 10);
const applyFilters = () => {
- const q = String(state.batchUi.query || "").toLowerCase().trim();
+ const q = String(state.batchUi.query || "")
+ .toLowerCase()
+ .trim();
const gpsOnly = Boolean(state.batchUi.gpsOnly);
const entOnly = Boolean(state.batchUi.entOnly);
const cl = state.batchUi.cluster;
@@ -3079,7 +3182,8 @@ function renderBatchDashboard() {
if (entOnly && !t.entCount) return false;
if (cl !== "all" && String(it.clusterId || "") !== String(cl)) return false;
if (q) {
- const hay = `${it.report?.file?.name || ""} ${it.triage?.software || ""} ${(t.ent?.urls || []).join(" ")} ${(t.ent?.handles || []).join(" ")} ${(t.ent?.emails || []).join(" ")}`.toLowerCase();
+ const hay =
+ `${it.report?.file?.name || ""} ${it.triage?.software || ""} ${(t.ent?.urls || []).join(" ")} ${(t.ent?.handles || []).join(" ")} ${(t.ent?.emails || []).join(" ")}`.toLowerCase();
if (!hay.includes(q)) return false;
}
return true;
@@ -3466,7 +3570,12 @@ async function ensureReconContext({ mode = "deep" } = {}) {
return normalizeReconEntities(state.ocrText || "");
}
-function createEngineRunRecord({ engines = ENGINE_ORDER, mode = "launchpad", url = "", artifact = state.publicUrlArtifact || "original" } = {}) {
+function createEngineRunRecord({
+ engines = ENGINE_ORDER,
+ mode = "launchpad",
+ url = "",
+ artifact = state.publicUrlArtifact || "original",
+} = {}) {
return LAUNCHPAD_CORE.createEngineRunRecord({
engines,
mode,
@@ -3621,7 +3730,9 @@ async function runMissionPreset(preset) {
const output = buildSearchQueryGeneratorOutput(context);
setSearchQueryOutput(output);
setMissionOutput(output);
- setStatusLine(output.items?.length ? `Query generator: ${output.items.length} searches prepared` : "Query generator: no stable clues yet");
+ setStatusLine(
+ output.items?.length ? `Query generator: ${output.items.length} searches prepared` : "Query generator: no stable clues yet",
+ );
setStatus("Ready");
return;
}
@@ -3647,7 +3758,9 @@ async function runMissionPreset(preset) {
if (p === "handle_recon") {
const context = await ensureReconContext({ mode: "deep" });
setMissionOutput(buildHandleReconOutput(context));
- setStatusLine(context.handles.length ? `Handle recon: ${context.handles.length} handles normalized` : "Handle recon: no stable handles found");
+ setStatusLine(
+ context.handles.length ? `Handle recon: ${context.handles.length} handles normalized` : "Handle recon: no stable handles found",
+ );
setStatus("Ready");
return;
}
@@ -3655,7 +3768,9 @@ async function runMissionPreset(preset) {
if (p === "domain_recon") {
const context = await ensureReconContext({ mode: "deep" });
setMissionOutput(buildDomainReconOutput(context));
- setStatusLine(context.domains.length ? `Domain recon: ${context.domains.length} domains normalized` : "Domain recon: no domains found");
+ setStatusLine(
+ context.domains.length ? `Domain recon: ${context.domains.length} domains normalized` : "Domain recon: no domains found",
+ );
setStatus("Ready");
return;
}
@@ -3668,17 +3783,24 @@ async function runMissionPreset(preset) {
}
if (p === "cross_engine_swarm") {
- if (!ensureMissionShareEnabled("Cross-engine swarm opens queued wait tabs for every configured engine and uses one temporary upload for the shared handoff. Allow it?")) return;
+ if (
+ !ensureMissionShareEnabled(
+ "Cross-engine swarm opens queued wait tabs for every configured engine and uses one temporary upload for the shared handoff. Allow it?",
+ )
+ )
+ return;
setStatusLine("Swarm: staging wait tabs…");
- const run = await prepareEngineSwarm({ engines: ENGINE_ORDER, labelPrefix: "Swarm" });
+ const _run = await prepareEngineSwarm({ engines: ENGINE_ORDER, labelPrefix: "Swarm" });
state.session = loadSession();
state.session.engines_opened += ENGINE_ORDER.length;
saveSession();
void refreshHostStats();
- setMissionOutput(buildMissionSummaryOutput("Cross-Engine Swarm", [
- `Queued ${ENGINE_ORDER.length} engine waits with throttled handoff`,
- `Swarm cockpit now tracks per-engine state, retries, and reopen status`,
- ]));
+ setMissionOutput(
+ buildMissionSummaryOutput("Cross-Engine Swarm", [
+ `Queued ${ENGINE_ORDER.length} engine waits with throttled handoff`,
+ `Swarm cockpit now tracks per-engine state, retries, and reopen status`,
+ ]),
+ );
setStatusLine("Swarm: queued and ready");
setStatus("Ready");
}
@@ -3715,7 +3837,9 @@ async function refreshHostStats() {
}
const lines = [
`Upload stats (session-only diagnostic): engines ${session.engines_opened} · uploads ok ${session.uploads_ok} · fail ${session.uploads_fail} · last ${session.last_host || "—"} ${fmtMs(session.last_ms)}`,
- rows.length ? `Hosts: ${rows.map((r) => `${r.host} ok ${r.ok} · fail ${r.fail} · avg ${fmtMs(r.avgMs)}`).join(" · ")}` : "Hosts: no completed upload samples yet",
+ rows.length
+ ? `Hosts: ${rows.map((r) => `${r.host} ok ${r.ok} · fail ${r.fail} · avg ${fmtMs(r.avgMs)}`).join(" · ")}`
+ : "Hosts: no completed upload samples yet",
];
elements.hostStatsOut.textContent = lines.join("\n");
@@ -3882,15 +4006,8 @@ async function ensurePublicUrl({ purpose = "" } = {}) {
};
const uploadFile =
- artifactWanted === "clean"
- ? await ensureCleanCopyFile()
- : artifactWanted === "crop"
- ? await ensureCropSearchFile()
- : state.file;
- const url =
- provider === "0x0"
- ? await publicUrlForFile(uploadFile, normalizedPurpose)
- : "";
+ artifactWanted === "clean" ? await ensureCleanCopyFile() : artifactWanted === "crop" ? await ensureCropSearchFile() : state.file;
+ const url = provider === "0x0" ? await publicUrlForFile(uploadFile, normalizedPurpose) : "";
if (!url) throw new Error("Unsupported provider");
state.publicUrl = url;
state.publicUrlPurpose = normalizedPurpose;
@@ -3923,7 +4040,11 @@ async function handleQuickJump(engine) {
if (!state.file) return;
if (state.uiBusy) return;
- if (!ensureMissionShareEnabled("To open a provider in one step, BlueLens needs one temporary public upload for the handoff URL. Allow the upload?")) {
+ if (
+ !ensureMissionShareEnabled(
+ "To open a provider in one step, BlueLens needs one temporary public upload for the handoff URL. Allow the upload?",
+ )
+ ) {
openUrl(reverseSearchUploadPage(engine));
return;
}
@@ -4156,10 +4277,7 @@ function setupCropTool() {
const bounds = stage.getBoundingClientRect();
const px = event.clientX - bounds.left;
const py = event.clientY - bounds.top;
- if (
- px < metrics.left || px > metrics.left + metrics.width ||
- py < metrics.top || py > metrics.top + metrics.height
- ) return;
+ if (px < metrics.left || px > metrics.left + metrics.width || py < metrics.top || py > metrics.top + metrics.height) return;
event.preventDefault();
state.crop.dragging = true;
state.crop.pointerId = event.pointerId;
@@ -4232,7 +4350,9 @@ function setupCropTool() {
invalidateSharedSearch("Crop ready — next search uploads only the selected region");
renderCropSelection();
updateCropButtons();
- setCropStatus(`Crop locked: ${state.crop.rect.natural.width} × ${state.crop.rect.natural.height}px. SEARCH now uses only the selected region.`);
+ setCropStatus(
+ `Crop locked: ${state.crop.rect.natural.width} × ${state.crop.rect.natural.height}px. SEARCH now uses only the selected region.`,
+ );
};
stage.addEventListener("pointerdown", beginCrop);
@@ -4288,11 +4408,7 @@ async function generateMutationFiles() {
low.ctx.drawImage(img, 0, 0, iw, ih);
low.ctx.filter = "none";
- const blobs = await Promise.all([
- canvasToBlob(crop.c, outType, q),
- canvasToBlob(rot.c, outType, q),
- canvasToBlob(low.c, outType, q),
- ]);
+ const blobs = await Promise.all([canvasToBlob(crop.c, outType, q), canvasToBlob(rot.c, outType, q), canvasToBlob(low.c, outType, q)]);
const files = [
new File([blobs[0]], `${baseName}_mut_crop.jpg`, { type: outType }),
@@ -4383,10 +4499,13 @@ function renderMutationSummary(entries) {
const lens = url ? reverseSearchUrl("lens", url) : "";
const analystAnnotation = r.analyst_annotation || r.confidence || "unreviewed";
const disabled = r.status !== "ok" ? "disabled" : "";
- const score = r.engine_review && typeof r.engine_review === "object" ? r.engine_review : r.score && typeof r.score === "object" ? r.score : {};
+ const score =
+ r.engine_review && typeof r.engine_review === "object" ? r.engine_review : r.score && typeof r.score === "object" ? r.score : {};
parts.push(`
`);
- parts.push(`
${status} ${escapeHtml(r.label || "Variant")}
`);
+ parts.push(
+ `
${status} ${escapeHtml(r.label || "Variant")}
`,
+ );
parts.push(`
Δ ${escapeHtml(dist)}
`);
parts.push(
`
` +
@@ -4474,7 +4593,7 @@ function escapeHtml(s) {
.replace(/&/g, "&")
.replace(//g, ">")
- .replace(/\"/g, """)
+ .replace(/"/g, """)
.replace(/'/g, "'");
}
@@ -4502,7 +4621,9 @@ function buildPivotSearchUrlsFromEntities(ent) {
for (const date of (ent?.dates || []).slice(0, 4)) add(google(`"${date}"`));
for (const alias of (ent?.aliases || []).slice(0, 4)) add(google(`"${alias}"`));
for (const hRaw of (ent?.handles || []).slice(0, 8)) {
- const h = String(hRaw || "").replace(/^@/, "").trim();
+ const h = String(hRaw || "")
+ .replace(/^@/, "")
+ .trim();
if (!h) continue;
add(google(`@${h}`));
add(`https://www.instagram.com/${encodeURIComponent(h)}/`);
@@ -4551,7 +4672,9 @@ function buildMarkdownReport(report) {
lines.push(`- Size: \`${file.size_bytes != null ? formatBytes(file.size_bytes) : "—"}\``);
lines.push(`- Dimensions: \`${r.dimensions || "—"}\``);
if (crop?.bounds_pixels) {
- lines.push(`- Search crop: \`${crop.bounds_pixels.width} × ${crop.bounds_pixels.height}px @ ${crop.bounds_pixels.x},${crop.bounds_pixels.y}\``);
+ lines.push(
+ `- Search crop: \`${crop.bounds_pixels.width} × ${crop.bounds_pixels.height}px @ ${crop.bounds_pixels.x},${crop.bounds_pixels.y}\``,
+ );
}
lines.push("");
lines.push(`## Signals`);
@@ -4601,7 +4724,8 @@ function buildMarkdownReport(report) {
lines.push(`- Expected expiry window: ${upload.expected_expiry_window ? `\`${upload.expected_expiry_window}\`` : "—"}`);
lines.push(`- Retention note: ${upload.retention_note || "—"}`);
lines.push(`- Warning: ${upload.temporary_external_artifact_warning || "—"}`);
- if (r.export_metadata?.runtime_config_fingerprint) lines.push(`- Runtime fingerprint: \`${r.export_metadata.runtime_config_fingerprint}\``);
+ if (r.export_metadata?.runtime_config_fingerprint)
+ lines.push(`- Runtime fingerprint: \`${r.export_metadata.runtime_config_fingerprint}\``);
lines.push("");
lines.push(`## OCR Pivots`);
const u = Array.isArray(entities.urls) ? entities.urls.slice(0, 8) : [];
@@ -4664,14 +4788,20 @@ function buildMarkdownReport(report) {
lines.push(`- Deduped entries: \`${Array.isArray(r.result_intake?.entries) ? r.result_intake.entries.length : 0}\``);
lines.push(`- Last ingested: ${r.result_intake?.last_ingested_at ? `\`${r.result_intake.last_ingested_at}\`` : "—"}`);
if (r.result_intake?.best_match) {
- lines.push(`- Best match: ${r.result_intake.best_match.title ? `\`${r.result_intake.best_match.title}\`` : "—"} · ${r.result_intake.best_match.label || "—"} · confidence ${r.result_intake.best_match.confidence ?? "—"}`);
+ lines.push(
+ `- Best match: ${r.result_intake.best_match.title ? `\`${r.result_intake.best_match.title}\`` : "—"} · ${r.result_intake.best_match.label || "—"} · confidence ${r.result_intake.best_match.confidence ?? "—"}`,
+ );
lines.push(`- Best match URL: ${r.result_intake.best_match.url || "—"}`);
}
if (r.result_intake?.contradictions?.summary) lines.push(`- Contradictions: ${r.result_intake.contradictions.summary}`);
lines.push("");
lines.push(`## Action Log`);
const actionLog = Array.isArray(r.session_action_log) ? r.session_action_log : [];
- lines.push(actionLog.length ? actionLog.map((row) => `- ${row.ts || "—"} · ${row.event || "event"}${row.detail ? ` · ${row.detail}` : ""}`).join("\n") : "- —");
+ lines.push(
+ actionLog.length
+ ? actionLog.map((row) => `- ${row.ts || "—"} · ${row.event || "event"}${row.detail ? ` · ${row.detail}` : ""}`).join("\n")
+ : "- —",
+ );
lines.push("");
lines.push(`---`);
lines.push("");
@@ -4738,7 +4868,7 @@ async function parseExif(file) {
}
}
-function hasGps(exifObj) {
+function _hasGps(exifObj) {
if (!exifObj) return false;
const lat = exifObj.latitude ?? exifObj.GPSLatitude ?? exifObj.GPSLatitudeRef;
const lon = exifObj.longitude ?? exifObj.GPSLongitude ?? exifObj.GPSLongitudeRef;
@@ -4770,7 +4900,8 @@ function parseExifDateValue(rawValue) {
normalized: raw.replace(/\.000Z$/, "Z"),
normalized_utc: raw,
has_timezone: false,
- timezone_note: "EXIF parser returned a Date object; the original EXIF timezone is still ambiguous unless a source offset is documented elsewhere.",
+ timezone_note:
+ "EXIF parser returned a Date object; the original EXIF timezone is still ambiguous unless a source offset is documented elsewhere.",
source_type: sourceType,
};
}
@@ -4840,7 +4971,11 @@ function normalizeCapturedAt(exifObj) {
};
}
-function buildExportMetadata({ ocrMode = state.lastOcrMode || "not_run", ocrLanguage = elements.ocrLang?.value || OCR_DEFAULT_LANGUAGE, uploadMeta = state.uploadMeta ? { ...state.uploadMeta } : null } = {}) {
+function buildExportMetadata({
+ ocrMode = state.lastOcrMode || "not_run",
+ ocrLanguage = elements.ocrLang?.value || OCR_DEFAULT_LANGUAGE,
+ uploadMeta = state.uploadMeta ? { ...state.uploadMeta } : null,
+} = {}) {
const upload = buildUploadLifecycleMeta(uploadMeta, uploadMeta?.purpose || state.publicUrlPurpose || "");
return {
schema_version: EXPORT_SCHEMA_VERSION,
@@ -5164,9 +5299,8 @@ function computeAiImageSuspicionChecklist({ exifObj, file, width, height, ocrTex
return letters > 0 && digits > 0;
}).length;
- const squareish = Number.isFinite(width) && Number.isFinite(height) && height > 0
- ? Math.abs(width / height - 1) < AI_SQUAREISH_ASPECT_DELTA
- : false;
+ const squareish =
+ Number.isFinite(width) && Number.isFinite(height) && height > 0 ? Math.abs(width / height - 1) < AI_SQUAREISH_ASPECT_DELTA : false;
const hiRes = Number.isFinite(width) && Number.isFinite(height) ? (width * height) / 1_000_000 >= AI_SYNTHETIC_TEXTURE_HIRES_MP : false;
const syntheticFriendlyFormat = /image\/(png|webp)/i.test(file?.type || "");
@@ -5176,21 +5310,76 @@ function computeAiImageSuspicionChecklist({ exifObj, file, width, height, ocrTex
aiToolName
? { key: "metadata", label: "Metadata hints", status: "flag", detail: `Creator/software tag mentions ${aiToolName}.` }
: !hasExif
- ? { key: "metadata", label: "Metadata hints", status: "review", detail: "No capture metadata present. Re-exports and synthetic images often strip EXIF." }
+ ? {
+ key: "metadata",
+ label: "Metadata hints",
+ status: "review",
+ detail: "No capture metadata present. Re-exports and synthetic images often strip EXIF.",
+ }
: hasCameraMeta
- ? { key: "metadata", label: "Metadata hints", status: "clear", detail: "Camera/capture metadata is present, so there is no direct generator tag here." }
- : { key: "metadata", label: "Metadata hints", status: "review", detail: software ? `Creator/software tag: ${software}` : "Metadata is thin; review provenance manually." },
+ ? {
+ key: "metadata",
+ label: "Metadata hints",
+ status: "clear",
+ detail: "Camera/capture metadata is present, so there is no direct generator tag here.",
+ }
+ : {
+ key: "metadata",
+ label: "Metadata hints",
+ status: "review",
+ detail: software ? `Creator/software tag: ${software}` : "Metadata is thin; review provenance manually.",
+ },
!text
- ? { key: "text", label: "Malformed text", status: "review", detail: "Run OCR or visually inspect lettering for warped glyphs, merged characters, and fake UI text." }
+ ? {
+ key: "text",
+ label: "Malformed text",
+ status: "review",
+ detail: "Run OCR or visually inspect lettering for warped glyphs, merged characters, and fake UI text.",
+ }
: weirdGlyphRatio > AI_OCR_WEIRD_GLYPH_RATIO || repeatedRuns || noisyTokens >= AI_OCR_NOISY_TOKEN_MIN
- ? { key: "text", label: "Malformed text", status: "flag", detail: "OCR output looks noisy enough to justify a closer lettering review." }
- : { key: "text", label: "Malformed text", status: "clear", detail: "OCR text does not show an obvious gibberish pattern from local extraction alone." },
+ ? {
+ key: "text",
+ label: "Malformed text",
+ status: "flag",
+ detail: "OCR output looks noisy enough to justify a closer lettering review.",
+ }
+ : {
+ key: "text",
+ label: "Malformed text",
+ status: "clear",
+ detail: "OCR text does not show an obvious gibberish pattern from local extraction alone.",
+ },
aiToolName || (!hasExif && hiRes && syntheticFriendlyFormat) || squareish
- ? { key: "texture", label: "Synthetic texture", status: "review", detail: "Zoom into skin, sky, fabric, foliage, or walls for repeated micro-patterns and plastic smoothing." }
- : { key: "texture", label: "Synthetic texture", status: "review", detail: "Still inspect repeated texture, oversmoothing, and edge halos manually." },
- { key: "reflections", label: "Weird reflections", status: "review", detail: "Check glass, water, chrome, and eyes for impossible mirrored geometry." },
- { key: "shadows", label: "Inconsistent shadows", status: "review", detail: "Check whether shadow direction, hardness, and light color stay consistent across the scene." },
- { key: "anatomy", label: "Impossible anatomy", status: "review", detail: "Check hands, teeth, ears, jewelry, straps, and limb joins for broken structure." },
+ ? {
+ key: "texture",
+ label: "Synthetic texture",
+ status: "review",
+ detail: "Zoom into skin, sky, fabric, foliage, or walls for repeated micro-patterns and plastic smoothing.",
+ }
+ : {
+ key: "texture",
+ label: "Synthetic texture",
+ status: "review",
+ detail: "Still inspect repeated texture, oversmoothing, and edge halos manually.",
+ },
+ {
+ key: "reflections",
+ label: "Weird reflections",
+ status: "review",
+ detail: "Check glass, water, chrome, and eyes for impossible mirrored geometry.",
+ },
+ {
+ key: "shadows",
+ label: "Inconsistent shadows",
+ status: "review",
+ detail: "Check whether shadow direction, hardness, and light color stay consistent across the scene.",
+ },
+ {
+ key: "anatomy",
+ label: "Impossible anatomy",
+ status: "review",
+ detail: "Check hands, teeth, ears, jewelry, straps, and limb joins for broken structure.",
+ },
];
const flagged = items.filter((item) => item.status === "flag").length;
@@ -5240,9 +5429,7 @@ function updateConsoleInsights({ exifObj, file, width, height, ocrText }) {
elements.repostReasons.innerHTML = "";
} else {
elements.repostReasons.hidden = false;
- elements.repostReasons.innerHTML = top
- .map((r) => `${escapeHtml(String(r))} `)
- .join("");
+ elements.repostReasons.innerHTML = top.map((r) => `${escapeHtml(String(r))} `).join("");
}
}
return { score, band, inputs, aiImageSuspicion };
@@ -5355,10 +5542,7 @@ async function encodeCleanCopy(img, preferredType) {
ctx.imageSmoothingQuality = "high";
ctx.drawImage(img, 0, 0, w, h);
- const type =
- preferredType && (preferredType === "image/png" || preferredType === "image/webp")
- ? preferredType
- : "image/jpeg";
+ const type = preferredType && (preferredType === "image/png" || preferredType === "image/webp") ? preferredType : "image/jpeg";
const quality = type === "image/jpeg" ? 0.92 : undefined;
const blob = await new Promise((resolve) => canvas.toBlob(resolve, type, quality));
@@ -5413,7 +5597,7 @@ async function makeThumbnailDataUrl(file, maxEdge = 240) {
}
}
-function extractPivotsFromReport(report) {
+function _extractPivotsFromReport(report) {
if (appHelpers.extractPivotsFromReport) return appHelpers.extractPivotsFromReport(report);
const pivots = [];
const ents = report?.key_fields?.ocr_entities;
@@ -5516,9 +5700,7 @@ function buildOsintReport({ includeInvestigation = true } = {}) {
ocr_entity_confidence: state.entityConfidence && Object.keys(state.entityConfidence).length ? { ...state.entityConfidence } : null,
ocr_entity_review_entries: buildCurrentOcrReviewEntries(),
ocr_entity_tasks:
- state.pivotTaskResults && Object.keys(state.pivotTaskResults).length
- ? JSON.parse(JSON.stringify(state.pivotTaskResults))
- : null,
+ state.pivotTaskResults && Object.keys(state.pivotTaskResults).length ? JSON.parse(JSON.stringify(state.pivotTaskResults)) : null,
},
exif: state.exif || null,
ocr_text: state.ocrText || null,
@@ -5547,12 +5729,12 @@ function buildOsintReport({ includeInvestigation = true } = {}) {
items: Array.isArray(state.missionOutput.items) ? state.missionOutput.items.slice() : null,
}
: null,
- document_image_mode: (state.documentModeOutput || state.ocrText)
- ? deepClone(state.documentModeOutput || buildDocumentImageOutput(reconContext))
- : null,
- search_query_generator: (state.searchQueryOutput || state.ocrText || state.file)
- ? deepClone(state.searchQueryOutput || buildSearchQueryGeneratorOutput(reconContext))
- : null,
+ document_image_mode:
+ state.documentModeOutput || state.ocrText ? deepClone(state.documentModeOutput || buildDocumentImageOutput(reconContext)) : null,
+ search_query_generator:
+ state.searchQueryOutput || state.ocrText || state.file
+ ? deepClone(state.searchQueryOutput || buildSearchQueryGeneratorOutput(reconContext))
+ : null,
result_intake: state.resultIntake
? {
last_ingested_at: state.resultIntake.last_ingested_at || null,
@@ -5560,7 +5742,9 @@ function buildOsintReport({ includeInvestigation = true } = {}) {
autopsy: computeNoResultAutopsy(),
contradictions: buildSourceContradictionModel(),
best_match: (() => {
- const best = pickBestResultIntakeEntry(getAnalyzedResultIntakeEntries(state.resultIntake.entries || []).filter((entry) => !entry?.suppressed));
+ const best = pickBestResultIntakeEntry(
+ getAnalyzedResultIntakeEntries(state.resultIntake.entries || []).filter((entry) => !entry?.suppressed),
+ );
return best
? {
title: best.title || null,
@@ -5603,11 +5787,7 @@ function extractKeyFieldsObj(exifObj) {
}
async function buildReportForFileHeadless(file) {
- const [hashes, exifObj, decoded] = await Promise.all([
- computeHashes(file),
- parseExif(file),
- loadImageStandalone(file),
- ]);
+ const [hashes, exifObj, decoded] = await Promise.all([computeHashes(file), parseExif(file), loadImageStandalone(file)]);
const width = decoded.img.naturalWidth || decoded.img.width;
const height = decoded.img.naturalHeight || decoded.img.height;
@@ -5678,7 +5858,9 @@ async function runBatchFiles(files) {
thumb = null;
}
state.batchItems.push({ id, file: f, report: r, triage: null, clusterId: 0, thumb });
- const suspicion = r.insights?.metadata_suspicion_band || formatMetadataSuspicionBand(Number(r.insights?.metadata_suspicion_score ?? r.insights?.repost_heuristic));
+ const suspicion =
+ r.insights?.metadata_suspicion_band ||
+ formatMetadataSuspicionBand(Number(r.insights?.metadata_suspicion_score ?? r.insights?.repost_heuristic));
lines.push(` OK · suspicion ${suspicion}`);
} catch (e) {
lines.push(` FAIL · ${e?.message || "unknown error"}`);
@@ -5733,8 +5915,10 @@ function estimateLocalSourcePosture(report) {
const dims = String(report?.dimensions || "");
const match = dims.match(/(\d+)\s*[×x]\s*(\d+)/);
const mp = match ? (Number(match[1]) * Number(match[2])) / 1_000_000 : 0;
- if (hasExif && !software && mp >= 1.5 && score <= 45) return { label: "Likely original", confidence: 0.62, notes: ["Local metadata and resolution look comparatively source-like"] };
- if (software || score >= 60) return { label: "Likely repost", confidence: 0.58, notes: ["Editing/software or repost-oriented metadata cues present"] };
+ if (hasExif && !software && mp >= 1.5 && score <= 45)
+ return { label: "Likely original", confidence: 0.62, notes: ["Local metadata and resolution look comparatively source-like"] };
+ if (software || score >= 60)
+ return { label: "Likely repost", confidence: 0.58, notes: ["Editing/software or repost-oriented metadata cues present"] };
return { label: "Needs review", confidence: 0.4, notes: ["No external result intake was attached to this batch row"] };
}
@@ -5784,7 +5968,18 @@ function buildBatchSummaryRows(items = state.batchItems) {
}
function downloadCsvRows(rows, filename) {
- const cols = ["file_name", "dimensions", "sha256", "best_match", "best_match_label", "earliest_date", "source_urls", "confidence", "duplicate_count", "notes"];
+ const cols = [
+ "file_name",
+ "dimensions",
+ "sha256",
+ "best_match",
+ "best_match_label",
+ "earliest_date",
+ "source_urls",
+ "confidence",
+ "duplicate_count",
+ "notes",
+ ];
const lines = [cols.join(",")];
for (const row of rows || []) {
lines.push(cols.map((col) => toCsvValue(row?.[col] ?? "")).join(","));
@@ -5876,7 +6071,9 @@ function getOcrLanguageLabel(code) {
function populateOcrLanguageOptions() {
if (!elements.ocrLang) return;
const current = elements.ocrLang.value || OCR_DEFAULT_LANGUAGE;
- elements.ocrLang.innerHTML = OCR_LANGUAGE_OPTIONS.map((opt) => `${escapeHtml(opt.label)} `).join("");
+ elements.ocrLang.innerHTML = OCR_LANGUAGE_OPTIONS.map(
+ (opt) => `${escapeHtml(opt.label)} `,
+ ).join("");
const fallback = OCR_LANGUAGE_OPTIONS.some((opt) => opt.value === current) ? current : OCR_DEFAULT_LANGUAGE;
elements.ocrLang.value = fallback;
}
@@ -5957,7 +6154,7 @@ function renderOcrEntities(text) {
});
}
-function detectScriptHint(text) {
+function _detectScriptHint(text) {
return OCR_ENTITIES_UI.detectScriptHint({ text, scriptHints: OCR_SCRIPT_HINTS });
}
@@ -6014,7 +6211,12 @@ async function runOcrForCurrent({ mode = "deep" } = {}) {
const m = (elements.metaDim.textContent || "").match(/(\d+)\s*×\s*(\d+)/);
return m ? Number(m[2]) : null;
})();
- const { score: s, band, inputs, aiImageSuspicion } = updateConsoleInsights({
+ const {
+ score: s,
+ band,
+ inputs,
+ aiImageSuspicion,
+ } = updateConsoleInsights({
exifObj: state.exif,
file: state.file,
width: imgW,
@@ -6173,7 +6375,12 @@ async function runOcrForCurrent({ mode = "deep" } = {}) {
const m = (elements.metaDim.textContent || "").match(/(\d+)\s*×\s*(\d+)/);
return m ? Number(m[2]) : null;
})();
- const { score: s, band, inputs, aiImageSuspicion } = updateConsoleInsights({
+ const {
+ score: s,
+ band,
+ inputs,
+ aiImageSuspicion,
+ } = updateConsoleInsights({
exifObj: state.exif,
file: state.file,
width: imgW,
@@ -6265,7 +6472,9 @@ async function analyzeFile(file) {
setShareControlsEnabled(true);
setShareStatus(state.publicUrl ? "Shared" : "Not shared");
clearCompare();
- setCropStatus("Drag a box over the preview to search only a face, logo, object, tattoo, sign, vehicle, building, product, artwork, or text area.");
+ setCropStatus(
+ "Drag a box over the preview to search only a face, logo, object, tattoo, sign, vehicle, building, product, artwork, or text area.",
+ );
renderCropSelection();
updateCropButtons();
@@ -6286,7 +6495,7 @@ async function analyzeFile(file) {
window.__osintActivateTab?.("search");
if (elements.btnEvidencePack) elements.btnEvidencePack.disabled = false;
- if (elements.btnIngestResults) elements.btnIngestResults.disabled = !Boolean((elements.resultIntakeInput?.value || "").trim());
+ if (elements.btnIngestResults) elements.btnIngestResults.disabled = !(elements.resultIntakeInput?.value || "").trim();
logAction("image_loaded", `${file.name || "image"} · local review ready`);
setStatusLine("Local review ready. Uploads start only when you choose a launch action.");
renderOnboardingStrip();
@@ -6411,8 +6620,7 @@ async function analyzeCompareFile(file) {
elements.cmpVerdict.textContent = verdict;
if (elements.cmpExplain) {
const diffText = Number.isFinite(state.compare.diffScore) ? ` Thumbnail diff intensity: ${state.compare.diffScore}/255.` : "";
- elements.cmpExplain.textContent =
- `dHash compares tiny perceptual thumbnails; 0 means identical hashes and larger numbers mean less visual agreement.${diffText} Treat this as a screening signal, not proof that two files are the same image.`;
+ elements.cmpExplain.textContent = `dHash compares tiny perceptual thumbnails; 0 means identical hashes and larger numbers mean less visual agreement.${diffText} Treat this as a screening signal, not proof that two files are the same image.`;
}
elements.btnClearCompare.disabled = false;
setStatus("Ready");
@@ -6476,7 +6684,7 @@ function setupDnD() {
let url = (uri || "").trim().split(/\s+/)[0];
if (!url && html) {
- const m = html.match(/ ]+src=[\"']([^\"']+)[\"']/i);
+ const m = html.match(/ ]+src=["']([^"']+)["']/i);
url = m ? String(m[1] || "").trim() : "";
}
if (!url) return;
@@ -6670,7 +6878,9 @@ function setupActions() {
autopsy: computeNoResultAutopsy(),
contradictions: buildSourceContradictionModel(),
best_match: (() => {
- const best = pickBestResultIntakeEntry(getAnalyzedResultIntakeEntries(state.resultIntake?.entries || []).filter((entry) => !entry?.suppressed));
+ const best = pickBestResultIntakeEntry(
+ getAnalyzedResultIntakeEntries(state.resultIntake?.entries || []).filter((entry) => !entry?.suppressed),
+ );
return best
? {
title: best.title || null,
@@ -6763,9 +6973,7 @@ function setupActions() {
await withUiLock("Mutating…", async () => {
if (!state.shareEnabled) {
- const ok = window.confirm(
- "Mutation Lab needs automatic uploads (uploads variants to generate public URLs). Allow it?",
- );
+ const ok = window.confirm("Mutation Lab needs automatic uploads (uploads variants to generate public URLs). Allow it?");
if (!ok) return;
state.shareEnabled = true;
elements.chkEnableShare.checked = true;
@@ -6800,7 +7008,10 @@ function setupActions() {
}
}
- const clusters = clusterByDhash(muts.filter((m) => m.dhash), DHASH_MUTATION_CLUSTER_THRESHOLD);
+ const clusters = clusterByDhash(
+ muts.filter((m) => m.dhash),
+ DHASH_MUTATION_CLUSTER_THRESHOLD,
+ );
for (let ci = 0; ci < clusters.length; ci += 1) {
for (const m of clusters[ci].items) m.cluster = ci + 1;
}
@@ -6887,7 +7098,9 @@ function setupActions() {
const output = buildSearchQueryGeneratorOutput(context);
setSearchQueryOutput(output);
setMissionOutput(output);
- setStatusLine(output.items?.length ? `Query generator: ${output.items.length} searches prepared` : "Query generator: no stable clues yet");
+ setStatusLine(
+ output.items?.length ? `Query generator: ${output.items.length} searches prepared` : "Query generator: no stable clues yet",
+ );
setStatus("Ready");
});
});
@@ -6923,7 +7136,9 @@ function setupActions() {
elements.btnOpenMap.addEventListener("click", () => {
if (!state.gps) return;
const { lat, lon } = state.gps;
- openUrl(`https://www.openstreetmap.org/?mlat=${encodeURIComponent(lat)}&mlon=${encodeURIComponent(lon)}#map=16/${encodeURIComponent(lat)}/${encodeURIComponent(lon)}`);
+ openUrl(
+ `https://www.openstreetmap.org/?mlat=${encodeURIComponent(lat)}&mlon=${encodeURIComponent(lon)}#map=16/${encodeURIComponent(lat)}/${encodeURIComponent(lon)}`,
+ );
});
elements.btnCopyCoords.addEventListener("click", async () => {
@@ -7142,9 +7357,13 @@ function setupFx() {
if (elements.chkFunMode) elements.chkFunMode.checked = funMode;
if (elements.chkOperatorMode) elements.chkOperatorMode.checked = operatorMode;
if (elements.scanlineSlider)
- elements.scanlineSlider.value = String(Math.max(0, Math.min(FX_SCANLINE_MAX, Number.isFinite(scanline) ? scanline : FX_SCANLINE_FUN_DEFAULT)));
+ elements.scanlineSlider.value = String(
+ Math.max(0, Math.min(FX_SCANLINE_MAX, Number.isFinite(scanline) ? scanline : FX_SCANLINE_FUN_DEFAULT)),
+ );
if (elements.chromaticSlider)
- elements.chromaticSlider.value = String(Math.max(0, Math.min(FX_CHROMATIC_MAX, Number.isFinite(chromatic) ? chromatic : FX_CHROMATIC_FUN_DEFAULT)));
+ elements.chromaticSlider.value = String(
+ Math.max(0, Math.min(FX_CHROMATIC_MAX, Number.isFinite(chromatic) ? chromatic : FX_CHROMATIC_FUN_DEFAULT)),
+ );
if (elements.chkHud) elements.chkHud.checked = state.hudWanted;
if (elements.chkChrome) elements.chkChrome.checked = state.chromeSkinWanted;
@@ -7372,7 +7591,7 @@ function setupCursorBubbles() {
});
}
-function setupHoloTilt() {
+function _setupHoloTilt() {
const card = document.querySelector(".console-card");
if (!card) return;
if (window.matchMedia && window.matchMedia("(prefers-reduced-motion: reduce)").matches) return;
@@ -7447,16 +7666,41 @@ function setupCommandPalette() {
let activeIndex = 0;
const actions = [
- { name: "Upload + Prepare Links", meta: "Reverse-search launchpad", keys: ["upload", "prepare", "search", "all", "reverse", "engines", "launchpad"], run: () => void handleSearchAll() },
- { name: "Refresh Local Analysis", meta: "OCR + signals", keys: ["refresh", "pass", "ocr", "signals", "attribution"], run: () => elements.btnRunPass?.click() },
+ {
+ name: "Upload + Prepare Links",
+ meta: "Reverse-search launchpad",
+ keys: ["upload", "prepare", "search", "all", "reverse", "engines", "launchpad"],
+ run: () => void handleSearchAll(),
+ },
+ {
+ name: "Refresh Local Analysis",
+ meta: "OCR + signals",
+ keys: ["refresh", "pass", "ocr", "signals", "attribution"],
+ run: () => elements.btnRunPass?.click(),
+ },
{ name: "Copy Report", meta: "JSON to clipboard", keys: ["copy", "report", "json"], run: () => elements.btnCopyReport?.click() },
{ name: "Copy Public URL", meta: "If shared", keys: ["copy", "url", "public"], run: () => elements.btnCopyPublicUrl?.click() },
{ name: "Tab: Search", meta: "Console", keys: ["tab", "search"], run: () => window.__osintActivateTab?.("search") },
- { name: "Tab: Signals", meta: "Hashes + EXIF", keys: ["tab", "signals", "exif", "hash"], run: () => window.__osintActivateTab?.("signals") },
+ {
+ name: "Tab: Signals",
+ meta: "Hashes + EXIF",
+ keys: ["tab", "signals", "exif", "hash"],
+ run: () => window.__osintActivateTab?.("signals"),
+ },
{ name: "Tab: Text", meta: "OCR", keys: ["tab", "text", "ocr"], run: () => window.__osintActivateTab?.("text") },
{ name: "Tab: Compare", meta: "Similarity", keys: ["tab", "compare", "dhash"], run: () => window.__osintActivateTab?.("compare") },
- { name: "Toggle Blue Chrome", meta: "Y2K skin", keys: ["toggle", "chrome", "skin"], run: () => (elements.chkChrome.checked = !elements.chkChrome.checked, elements.chkChrome.dispatchEvent(new Event("change"))) },
- { name: "Toggle HUD Mode", meta: "Drag panels", keys: ["toggle", "hud", "cockpit"], run: () => (elements.chkHud.checked = !elements.chkHud.checked, elements.chkHud.dispatchEvent(new Event("change"))) },
+ {
+ name: "Toggle Blue Chrome",
+ meta: "Y2K skin",
+ keys: ["toggle", "chrome", "skin"],
+ run: () => ((elements.chkChrome.checked = !elements.chkChrome.checked), elements.chkChrome.dispatchEvent(new Event("change"))),
+ },
+ {
+ name: "Toggle HUD Mode",
+ meta: "Drag panels",
+ keys: ["toggle", "hud", "cockpit"],
+ run: () => ((elements.chkHud.checked = !elements.chkHud.checked), elements.chkHud.dispatchEvent(new Event("change"))),
+ },
{ name: "Reset", meta: "Clear current image", keys: ["reset", "clear"], run: () => elements.btnReset?.click() },
].filter((a) => typeof a.run === "function");
diff --git a/bluelens-config.js b/bluelens-config.js
index 78ce998..a4de5f4 100644
--- a/bluelens-config.js
+++ b/bluelens-config.js
@@ -148,13 +148,25 @@
{ label: "Local server port", value: "8787", detail: "Used by the built-in upload proxy and wait-job handoff." },
{ label: "Wait-job long poll", value: "25s", detail: "Wait tabs reconnect after a timed hold instead of busy polling." },
{ label: "Wait-job retention", value: "10 min", detail: "Completed handoff jobs stay available briefly for reconnects." },
- { label: "Upload host order", value: "Uguu → Catbox → 0x0 → Litterbox", detail: "Default failover order before purpose-specific weighting." },
+ {
+ label: "Upload host order",
+ value: "Uguu → Catbox → 0x0 → Litterbox",
+ detail: "Default failover order before purpose-specific weighting.",
+ },
{ label: "Lens/Google host bias", value: "Catbox → 0x0 → Litterbox → Uguu", detail: "Preferred for upload-by-URL launches." },
- { label: "Upload timeout", value: "35s upstream / 45s browser", detail: "Server host attempts and browser proxy requests time out independently." },
+ {
+ label: "Upload timeout",
+ value: "35s upstream / 45s browser",
+ detail: "Server host attempts and browser proxy requests time out independently.",
+ },
{ label: "Batch OCR default", value: "Top 8 images", detail: "Top-candidate OCR pass size before manual expansion." },
{ label: "OCR model list", value: "17 manual models", detail: "Weak script hints do not auto-switch the selected OCR model." },
{ label: "dHash cluster thresholds", value: "8 batch / 10 mutation", detail: "Near-duplicate grouping defaults used in dashboards." },
- { label: "Wait-tab recovery", value: "350ms→5s backoff", detail: "Wait tabs slow down retries and show a reopen-from-main-tab state if handoff disappears." },
+ {
+ label: "Wait-tab recovery",
+ value: "350ms→5s backoff",
+ detail: "Wait tabs slow down retries and show a reopen-from-main-tab state if handoff disappears.",
+ },
{ label: "Fun mode default", value: "Off", detail: "Operator theme ships calm; ambient FX are opt-in." },
],
},
diff --git a/bluelens-helpers.js b/bluelens-helpers.js
index 19e8ca4..ab84996 100644
--- a/bluelens-helpers.js
+++ b/bluelens-helpers.js
@@ -85,10 +85,10 @@
...ents.handles
.slice(0, 3)
.map((x) => {
- // Old reports or manual entry mistakes can leave multiple leading @ symbols; normalize them to a single @ prefix format.
- const handle = String(x || "").replace(/^@+/, "");
- return handle ? `@${handle}` : null;
- })
+ // Old reports or manual entry mistakes can leave multiple leading @ symbols; normalize them to a single @ prefix format.
+ const handle = String(x || "").replace(/^@+/, "");
+ return handle ? `@${handle}` : null;
+ })
.filter(Boolean),
);
}
@@ -107,12 +107,16 @@
.split(/\r?\n/)
.map((line) => line.trim())
.filter(Boolean);
- const paragraphBreaks = String(text || "").split(/\n\s*\n/).filter((block) => block.trim()).length;
+ const paragraphBreaks = String(text || "")
+ .split(/\n\s*\n/)
+ .filter((block) => block.trim()).length;
const headingCandidates = lines
.filter((line) => line.length >= 4 && line.length <= 72 && (line === line.toUpperCase() || /^[A-Z][A-Za-z0-9 '&/-]{3,}$/.test(line)))
.slice(0, 4);
const keyValueRows = lines
- .filter((line) => /[:|]/.test(line) || /\b(total|date|name|address|price|receipt|invoice|menu|certificate|issued|expires)\b/i.test(line))
+ .filter(
+ (line) => /[:|]/.test(line) || /\b(total|date|name|address|price|receipt|invoice|menu|certificate|issued|expires)\b/i.test(line),
+ )
.slice(0, 6);
const tabularRows = lines
.filter((line) => /\d/.test(line) && /[$€£¥]|(?:\s{2,}|\t)|\bqty\b|\btotal\b|\bsubtotal\b/i.test(line))
@@ -170,19 +174,30 @@
}
function parseFilenameStem(name) {
- const raw = String(name || "").trim().replace(/\.[^.]+$/, "");
+ const raw = String(name || "")
+ .trim()
+ .replace(/\.[^.]+$/, "");
return raw.replace(/[_-]+/g, " ").replace(/\s+/g, " ").trim();
}
- function buildSearchQuerySpecs({ text = "", fileName = "", dimensions = "", language = "English", ent = {}, handles = [], domains = [] } = {}) {
+ function buildSearchQuerySpecs({
+ text = "",
+ fileName = "",
+ dimensions = "",
+ language = "English",
+ ent = {},
+ handles = [],
+ domains = [],
+ } = {}) {
const kinds = inferDocumentKinds({ text, fileName, ent });
const logoCandidates = collectLogoLookupCandidates({ text, ent, domains, handles });
const fileStem = parseFilenameStem(fileName);
- const topLine = String(text || "")
- .split(/\r?\n/)
- .map((line) => line.trim())
- .filter(Boolean)
- .find((line) => line.length >= 4) || "";
+ const topLine =
+ String(text || "")
+ .split(/\r?\n/)
+ .map((line) => line.trim())
+ .filter(Boolean)
+ .find((line) => line.length >= 4) || "";
const queries = [];
const seen = new Set();
const add = (label, query, why) => {
@@ -191,26 +206,54 @@
seen.add(clean);
queries.push({ label, query: clean, why });
};
- if (logoCandidates[0] && ent.locations?.[0]) add("Brand + city", `"${logoCandidates[0]}" "${ent.locations[0]}"`, "Combine the strongest brand/logo clue with the strongest location clue.");
- if (topLine && logoCandidates[0]) add("OCR text + logo", `"${topLine.slice(0, 80)}" "${logoCandidates[0]}"`, "Bind the main OCR line to the strongest logo/brand candidate.");
- if (kinds[0]) add("Object + language", `"${kinds[0]}" "${language}"`, "Search the detected document/object type together with the OCR language.");
- if (fileStem || dimensions) add("File name + dimensions", `"${fileStem || "image"}" "${dimensions || "unknown dimensions"}"`, "Use file naming residue with the visible pixel dimensions.");
+ if (logoCandidates[0] && ent.locations?.[0])
+ add(
+ "Brand + city",
+ `"${logoCandidates[0]}" "${ent.locations[0]}"`,
+ "Combine the strongest brand/logo clue with the strongest location clue.",
+ );
+ if (topLine && logoCandidates[0])
+ add(
+ "OCR text + logo",
+ `"${topLine.slice(0, 80)}" "${logoCandidates[0]}"`,
+ "Bind the main OCR line to the strongest logo/brand candidate.",
+ );
+ if (kinds[0])
+ add("Object + language", `"${kinds[0]}" "${language}"`, "Search the detected document/object type together with the OCR language.");
+ if (fileStem || dimensions)
+ add(
+ "File name + dimensions",
+ `"${fileStem || "image"}" "${dimensions || "unknown dimensions"}"`,
+ "Use file naming residue with the visible pixel dimensions.",
+ );
if (handles[0]) {
- const platformHint = domains.find((domain) => /(instagram|tiktok|x\.com|twitter|facebook|linkedin|telegram)/i.test(domain)) || "instagram OR tiktok OR x";
- add("Visible username + platform", `"${handles[0]}" ${platformHint}`, "Pivot the visible handle against the likeliest platform hint.");
+ const platformHint =
+ domains.find((domain) => /(instagram|tiktok|x\.com|twitter|facebook|linkedin|telegram)/i.test(domain)) ||
+ "instagram OR tiktok OR x";
+ add(
+ "Visible username + platform",
+ `"${handles[0]}" ${platformHint}`,
+ "Pivot the visible handle against the likeliest platform hint.",
+ );
}
- if (domains[0] && logoCandidates[0]) add("Logo + domain", `"${logoCandidates[0]}" "${domains[0]}"`, "Pair a brand/logo clue with the strongest normalized domain.");
+ if (domains[0] && logoCandidates[0])
+ add("Logo + domain", `"${logoCandidates[0]}" "${domains[0]}"`, "Pair a brand/logo clue with the strongest normalized domain.");
if (topLine) add("Quoted OCR line", `"${topLine.slice(0, 96)}"`, "Quoted text search for the most stable visible line.");
return queries;
}
function normalizeHandleValue(value) {
- const clean = String(value || "").trim().replace(/^@+/, "").toLowerCase();
+ const clean = String(value || "")
+ .trim()
+ .replace(/^@+/, "")
+ .toLowerCase();
return clean ? `@${clean}` : "";
}
function normalizeDomainValue(value) {
- const raw = String(value || "").trim().toLowerCase();
+ const raw = String(value || "")
+ .trim()
+ .toLowerCase();
if (!raw) return "";
const withoutProtocol = raw.replace(/^[a-z]+:\/\//i, "");
const host = withoutProtocol.split(/[/?#]/, 1)[0].replace(/^www\./, "");
@@ -334,24 +377,32 @@
for (const value of entities?.handles || []) {
const normalized = normalizeHandleValue(value);
- const detail = Array.isArray(details.handles) ? details.handles.find((entry) => normalizeHandleValue(entry?.value) === normalized) : null;
+ const detail = Array.isArray(details.handles)
+ ? details.handles.find((entry) => normalizeHandleValue(entry?.value) === normalized)
+ : null;
addEntity("handle", normalized, detail);
}
for (const value of entities?.emails || []) {
const email = String(value || "").toLowerCase();
- const detail = Array.isArray(details.emails) ? details.emails.find((entry) => String(entry?.value || "").toLowerCase() === email) : null;
+ const detail = Array.isArray(details.emails)
+ ? details.emails.find((entry) => String(entry?.value || "").toLowerCase() === email)
+ : null;
addEntity("email", email, detail);
const domain = normalizeDomainValue(email.split("@")[1] || "");
if (domain) addEntity("domain", domain, detail, { field: "ocr_entities.email_domain", source: "email_domain" });
}
for (const value of entities?.phones || []) {
const phone = String(value || "").trim();
- const detail = Array.isArray(details.phones) ? details.phones.find((entry) => String(entry?.value || "").trim() === phone || String(entry?.raw || "").trim() === phone) : null;
+ const detail = Array.isArray(details.phones)
+ ? details.phones.find((entry) => String(entry?.value || "").trim() === phone || String(entry?.raw || "").trim() === phone)
+ : null;
addEntity("phone", phone, detail);
}
for (const value of entities?.urls || []) {
const url = String(value || "").trim();
- const detail = Array.isArray(details.urls) ? details.urls.find((entry) => String(entry?.value || "").trim() === url || String(entry?.raw || "").trim() === url) : null;
+ const detail = Array.isArray(details.urls)
+ ? details.urls.find((entry) => String(entry?.value || "").trim() === url || String(entry?.raw || "").trim() === url)
+ : null;
addEntity("url", url, detail);
const domain = normalizeDomainValue(url);
if (domain) addEntity("domain", domain, detail, { field: "ocr_entities.url_domain", source: "url_domain" });
@@ -412,25 +463,29 @@
}
});
- const nodes = Array.from(nodeMap.values()).map((node) => ({
- ...node,
- file_count: node.files.size,
- files: Array.from(node.files).sort(),
- provenance: node.provenance.slice(0, 24),
- linked_keys: Array.from(node.linked_keys),
- degree: node.linked_keys.size,
- })).sort((a, b) => {
- if (a.type === "file" && b.type !== "file") return -1;
- if (a.type !== "file" && b.type === "file") return 1;
- return b.file_count - a.file_count || b.evidence_count - a.evidence_count || a.label.localeCompare(b.label);
- });
+ const nodes = Array.from(nodeMap.values())
+ .map((node) => ({
+ ...node,
+ file_count: node.files.size,
+ files: Array.from(node.files).sort(),
+ provenance: node.provenance.slice(0, 24),
+ linked_keys: Array.from(node.linked_keys),
+ degree: node.linked_keys.size,
+ }))
+ .sort((a, b) => {
+ if (a.type === "file" && b.type !== "file") return -1;
+ if (a.type !== "file" && b.type === "file") return 1;
+ return b.file_count - a.file_count || b.evidence_count - a.evidence_count || a.label.localeCompare(b.label);
+ });
- const edges = Array.from(edgeMap.values()).map((edge) => ({
- ...edge,
- file_count: edge.files.size,
- files: Array.from(edge.files).sort(),
- provenance: edge.provenance.slice(0, 24),
- })).sort((a, b) => b.file_count - a.file_count || b.evidence_count - a.evidence_count || a.key.localeCompare(b.key));
+ const edges = Array.from(edgeMap.values())
+ .map((edge) => ({
+ ...edge,
+ file_count: edge.files.size,
+ files: Array.from(edge.files).sort(),
+ provenance: edge.provenance.slice(0, 24),
+ }))
+ .sort((a, b) => b.file_count - a.file_count || b.evidence_count - a.evidence_count || a.key.localeCompare(b.key));
return {
nodes,
@@ -499,7 +554,9 @@
});
}
- const captured = parseTimelineInstant(report?.key_fields?.captured_at, { ambiguous: report?.key_fields?.captured_at?.has_timezone === false });
+ const captured = parseTimelineInstant(report?.key_fields?.captured_at, {
+ ambiguous: report?.key_fields?.captured_at?.has_timezone === false,
+ });
if (captured) {
addEvent({
key: `${reportKey}:captured`,
@@ -660,10 +717,11 @@
const sorted = events
.slice()
- .sort((a, b) =>
- (Number(a.ts_ms || Number.MAX_SAFE_INTEGER) - Number(b.ts_ms || Number.MAX_SAFE_INTEGER)) ||
- ((categoryRank[a.category] || 99) - (categoryRank[b.category] || 99)) ||
- String(a.label || "").localeCompare(String(b.label || "")),
+ .sort(
+ (a, b) =>
+ Number(a.ts_ms || Number.MAX_SAFE_INTEGER) - Number(b.ts_ms || Number.MAX_SAFE_INTEGER) ||
+ (categoryRank[a.category] || 99) - (categoryRank[b.category] || 99) ||
+ String(a.label || "").localeCompare(String(b.label || "")),
);
return {
diff --git a/docs/API.md b/docs/API.md
index 5dc7bfe..22dd1eb 100644
--- a/docs/API.md
+++ b/docs/API.md
@@ -17,6 +17,7 @@ Base URL: `http://localhost:8787` (default port, configurable via `PORT` env var
Health check endpoint that returns server status.
**Response**: 200 OK
+
```json
{
"ok": true,
@@ -34,17 +35,21 @@ Health check endpoint that returns server status.
Proxies an image upload to a temporary public hosting service. Implements automatic failover across multiple hosts.
**Headers**:
+
- `Content-Type`: `multipart/form-data` or `application/octet-stream`
**Request Body**:
+
- For multipart: Include `file` field with image data
- For octet-stream: Raw image bytes
**Query Parameters**:
+
- `purpose` (optional): Hint for host selection (`lens`, `google`, or `default`)
- `provider` (optional): Force specific provider (`uguu`, `catbox`, `litterbox`, `0x0`)
**Response**: 200 OK
+
```json
{
"ok": true,
@@ -56,6 +61,7 @@ Proxies an image upload to a temporary public hosting service. Implements automa
```
**Error Response**: 500/503
+
```json
{
"ok": false,
@@ -66,12 +72,14 @@ Proxies an image upload to a temporary public hosting service. Implements automa
```
**Supported Hosts**:
+
1. **Uguu** (`uguu.se`) - 48-hour expiry
2. **Catbox** (`catbox.moe`) - Permanent
3. **Litterbox** (`litterbox.catbox.moe`) - 72-hour expiry (configurable)
4. **0x0** (`0x0.st`) - 1-year expiry
**Host Selection Logic**:
+
- Automatic failover if primary host fails
- Purpose-specific host preferences for better compatibility
- Performance-based selection using historical upload stats
@@ -83,6 +91,7 @@ Proxies an image upload to a temporary public hosting service. Implements automa
Returns upload host performance statistics.
**Response**: 200 OK
+
```json
{
"stats": {
@@ -111,6 +120,7 @@ Wait jobs enable a long-polling mechanism for search engine tabs to receive URLs
Creates a new wait job.
**Request Body**:
+
```json
{
"engine": "lens",
@@ -119,6 +129,7 @@ Creates a new wait job.
```
**Response**: 200 OK
+
```json
{
"ok": true,
@@ -138,9 +149,11 @@ Creates a new wait job.
Long-polls for a wait job's result. Holds the connection until the job is updated or times out.
**Query Parameters**:
+
- `timeout` (optional): Max wait time in milliseconds (default: 25000, max: 30000)
**Response (pending)**: 200 OK (after timeout)
+
```json
{
"ok": true,
@@ -151,6 +164,7 @@ Long-polls for a wait job's result. Holds the connection until the job is update
```
**Response (completed)**: 200 OK
+
```json
{
"ok": true,
@@ -162,6 +176,7 @@ Long-polls for a wait job's result. Holds the connection until the job is update
```
**Response (failed)**: 200 OK
+
```json
{
"ok": false,
@@ -179,6 +194,7 @@ Long-polls for a wait job's result. Holds the connection until the job is update
Updates a wait job with a result (URL or error).
**Request Body**:
+
```json
{
"status": "completed",
@@ -196,6 +212,7 @@ or
```
**Response**: 200 OK
+
```json
{
"ok": true,
@@ -215,9 +232,11 @@ The acquisition layer provides safe fetching of remote resources with rate limit
Fetches a remote URL's content.
**Query Parameters**:
+
- `url` (required): Target URL to fetch
**Response**: 200 OK
+
```json
{
"ok": true,
@@ -240,6 +259,7 @@ Fetches a remote URL's content.
```
**Security**:
+
- Blocks private IP addresses (10.0.0.0/8, 172.16.0.0/12, 192.168.0.0/16, 127.0.0.0/8)
- Rate limited: 18 requests per IP per minute
- 10-second timeout
@@ -252,9 +272,11 @@ Fetches a remote URL's content.
Fetches and parses a site's robots.txt file.
**Query Parameters**:
+
- `url` (required): Target URL (robots.txt will be fetched from the origin)
**Response**: 200 OK
+
```json
{
"ok": true,
@@ -283,9 +305,11 @@ Fetches and parses a site's robots.txt file.
Checks for Wayback Machine snapshots of a URL.
**Query Parameters**:
+
- `url` (required): Target URL to check
**Response**: 200 OK
+
```json
{
"ok": true,
@@ -301,6 +325,7 @@ Checks for Wayback Machine snapshots of a URL.
```
**Response (no snapshot)**: 200 OK
+
```json
{
"ok": true,
@@ -319,6 +344,7 @@ Checks for Wayback Machine snapshots of a URL.
Checks if upload hosts are reachable.
**Response**: 200 OK
+
```json
{
"ok": true,
@@ -336,6 +362,7 @@ Checks if upload hosts are reachable.
Checks if CDN resources are reachable.
**Response**: 200 OK
+
```json
{
"ok": true,
@@ -353,6 +380,7 @@ Checks if CDN resources are reachable.
Checks if search engine pages are reachable.
**Response**: 200 OK
+
```json
{
"ok": true,
@@ -376,14 +404,16 @@ The client-side JavaScript provides several global APIs for image analysis and s
Generates a reverse search URL for a given engine.
**Parameters**:
+
- `engine` (string): Engine name (`lens`, `bing`, `yandex`, `tineye`, `saucenao`, `iqdb`, `baidu`, `ascii2d`, `google_images`)
- `imageUrl` (string): Public URL of the image to search
**Returns**: String URL or empty string if engine not supported
**Example**:
+
```javascript
-const url = OSINT_LIB.reverseSearchUrl('lens', 'https://example.com/image.jpg');
+const url = OSINT_LIB.reverseSearchUrl("lens", "https://example.com/image.jpg");
// Returns: "https://lens.google.com/uploadbyurl?url=https%3A%2F%2Fexample.com%2Fimage.jpg"
```
@@ -394,6 +424,7 @@ const url = OSINT_LIB.reverseSearchUrl('lens', 'https://example.com/image.jpg');
Returns the manual upload page URL for an engine.
**Parameters**:
+
- `engine` (string): Engine name
**Returns**: String URL or `about:blank` if not supported
@@ -407,6 +438,7 @@ Returns the manual upload page URL for an engine.
Global configuration object containing all app settings.
**Structure**:
+
```javascript
{
meta: {
@@ -430,35 +462,35 @@ Global configuration object containing all app settings.
## Rate Limits
-| Endpoint | Limit | Window |
-|----------|-------|--------|
-| `/api/upload` | None (but individual hosts may limit) | N/A |
-| `/api/acquire` | 18 requests | 60 seconds per IP |
-| `/api/discover` | 18 requests | 60 seconds per IP |
-| `/api/archive` | 18 requests | 60 seconds per IP |
+| Endpoint | Limit | Window |
+| --------------- | ------------------------------------- | ----------------- |
+| `/api/upload` | None (but individual hosts may limit) | N/A |
+| `/api/acquire` | 18 requests | 60 seconds per IP |
+| `/api/discover` | 18 requests | 60 seconds per IP |
+| `/api/archive` | 18 requests | 60 seconds per IP |
---
## Error Codes
-| Code | HTTP Status | Description |
-|------|-------------|-------------|
-| `upload_failed` | 500 | All upload hosts failed |
-| `invalid_image` | 400 | Invalid or corrupt image data |
-| `timeout` | 504 | Request timed out |
-| `rate_limited` | 429 | Too many requests from this IP |
-| `private_ip_blocked` | 403 | Target URL resolves to private IP |
-| `invalid_url` | 400 | Malformed or invalid URL |
-| `acquire_failed` | 500 | Failed to fetch remote content |
+| Code | HTTP Status | Description |
+| -------------------- | ----------- | --------------------------------- |
+| `upload_failed` | 500 | All upload hosts failed |
+| `invalid_image` | 400 | Invalid or corrupt image data |
+| `timeout` | 504 | Request timed out |
+| `rate_limited` | 429 | Too many requests from this IP |
+| `private_ip_blocked` | 403 | Target URL resolves to private IP |
+| `invalid_url` | 400 | Malformed or invalid URL |
+| `acquire_failed` | 500 | Failed to fetch remote content |
---
## Environment Variables
-| Variable | Default | Description |
-|----------|---------|-------------|
-| `PORT` | `8787` | Server port |
-| `BLUELENS_LOG_LEVEL` | `INFO` | Log level (DEBUG, INFO, WARN, ERROR) |
-| `BLUELENS_LOG_FILE` | None | Optional log file path |
-| `BLUELENS_ARCHIVE_API_BASE` | `https://archive.org/wayback/available` | Archive.org API base URL |
-| `BLUELENS_ALLOW_PRIVATE_FETCH` | `0` | Allow fetching private IPs (testing only) |
+| Variable | Default | Description |
+| ------------------------------ | --------------------------------------- | ----------------------------------------- |
+| `PORT` | `8787` | Server port |
+| `BLUELENS_LOG_LEVEL` | `INFO` | Log level (DEBUG, INFO, WARN, ERROR) |
+| `BLUELENS_LOG_FILE` | None | Optional log file path |
+| `BLUELENS_ARCHIVE_API_BASE` | `https://archive.org/wayback/available` | Archive.org API base URL |
+| `BLUELENS_ALLOW_PRIVATE_FETCH` | `0` | Allow fetching private IPs (testing only) |
diff --git a/docs/ARCHITECTURE.md b/docs/ARCHITECTURE.md
index bea9a34..0843e8e 100644
--- a/docs/ARCHITECTURE.md
+++ b/docs/ARCHITECTURE.md
@@ -18,6 +18,7 @@ BlueLens is a local-first OSINT (Open Source Intelligence) tool for image reconn
**Files**: `app.js`, `index.html`, `wait.html`, `styles.css`
The client layer runs entirely in the browser and handles:
+
- Image upload and preview
- Local hash computation (SHA-256, MD5, dHash)
- EXIF metadata extraction using exifr library
@@ -27,6 +28,7 @@ The client layer runs entirely in the browser and handles:
- Session state management (localStorage)
**Key Components**:
+
- **Dropzone**: Drag-and-drop image upload interface
- **Preview Stage**: Image display with crop selection
- **Hash Computation**: SHA-256, MD5, and perceptual dHash generation
@@ -42,21 +44,25 @@ The client layer runs entirely in the browser and handles:
The server provides three main services:
#### a. Static File Server
+
Serves the HTML, CSS, JavaScript, and asset files for the web interface.
#### b. Upload Proxy (`/api/upload`)
+
- Proxies image uploads to public temporary hosting services (Uguu, Catbox, Litterbox, 0x0)
- Implements failover logic across multiple hosts
- Tracks upload success/failure statistics for intelligent host selection
- Returns public URLs for use in reverse search engines
#### c. Wait Job Handoff (`/api/wait-jobs/:id`)
+
- Long-polling mechanism for wait tabs
- Allows search engine tabs to receive URLs without popup blockers
- Implements job expiration and cleanup
- Stores jobs in-memory with optional disk persistence
#### d. Acquisition Layer
+
- Fetches remote content for analysis
- Robots.txt discovery
- Archive.org snapshot lookup
@@ -67,6 +73,7 @@ Serves the HTML, CSS, JavaScript, and asset files for the web interface.
**Files**: `bluelens-helpers.js`, `bluelens-config.js`, `osint-lib.js`, `launchpad-core.js`, `ocr-pipeline.js`, `ocr-entities-ui.js`
Shared utilities used by both client and server:
+
- **bluelens-config.js**: Central configuration (ports, timeouts, engine URLs)
- **bluelens-helpers.js**: Shared helper functions (Hamming distance, dimension parsing, sorting)
- **osint-lib.js**: OSINT-specific utilities (reverse search URL builders)
@@ -127,6 +134,7 @@ For engines that need post-upload processing:
## Storage
### Browser (localStorage)
+
- **osint:session:v1**: Current investigation session (images, results, suppressions)
- **osint:lastRun:v1**: Last analysis run metadata
- **ui:missionPreset**: User's mission preset selection
@@ -134,6 +142,7 @@ For engines that need post-upload processing:
- **fx:\***: Visual effects settings
### Server (In-Memory + Disk)
+
- **WAIT_JOBS Map**: Active wait jobs (in-memory)
- **UPLOAD_STATS Map**: Host performance telemetry (in-memory)
- **DOCTOR_HISTORY**: Health check history (in-memory)
@@ -174,12 +183,14 @@ For engines that need post-upload processing:
## Dependencies
### Client-Side (CDN)
+
- **exifr**: EXIF metadata parsing
- **Tesseract.js**: OCR engine
- **SparkMD5**: MD5 hashing
- **sha256**: SHA-256 hashing
### Server-Side (Built-in)
+
- **http**: HTTP server
- **fs**: File system operations
- **path**: Path manipulation
@@ -187,6 +198,7 @@ For engines that need post-upload processing:
- **net**: Network utilities
### Development
+
- **eslint**: Code linting
- **prettier**: Code formatting
- **node:test**: Built-in test runner (Node 18+)
diff --git a/docs/DEPLOYMENT.md b/docs/DEPLOYMENT.md
index 60d09cb..d42bef0 100644
--- a/docs/DEPLOYMENT.md
+++ b/docs/DEPLOYMENT.md
@@ -21,17 +21,20 @@
### Setup Steps
1. **Clone the repository**:
+
```bash
git clone https://github.com/potemkin666/bluelens.git
cd bluelens
```
2. **Install dependencies** (dev tools only):
+
```bash
npm install
```
3. **Start the server**:
+
```bash
npm start
# or
@@ -46,28 +49,33 @@
### Development Workflow
**Running tests**:
+
```bash
npm test
```
**Running tests with coverage**:
+
```bash
npm run test:coverage
```
**Linting**:
+
```bash
npm run lint # Check for issues
npm run lint:fix # Auto-fix issues
```
**Formatting**:
+
```bash
npm run format:check # Check formatting
npm run format # Auto-format files
```
**Windows Desktop Shortcut**:
+
```bash
npm run desktop-icon
```
@@ -89,18 +97,21 @@ npm run desktop-icon
#### Deployment Steps
1. **Create a deployment user**:
+
```bash
sudo useradd -m -s /bin/bash bluelens
sudo su - bluelens
```
2. **Clone and setup**:
+
```bash
git clone https://github.com/potemkin666/bluelens.git
cd bluelens
```
3. **Configure environment** (optional):
+
```bash
export PORT=8787
export BLUELENS_LOG_LEVEL=INFO
@@ -108,6 +119,7 @@ npm run desktop-icon
```
4. **Start with process manager** (PM2 recommended):
+
```bash
npm install -g pm2
pm2 start server.js --name bluelens
@@ -148,6 +160,7 @@ WantedBy=multi-user.target
```
Enable and start:
+
```bash
sudo mkdir -p /var/log/bluelens
sudo chown bluelens:bluelens /var/log/bluelens
@@ -192,7 +205,7 @@ server {
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header X-Forwarded-Proto $scheme;
proxy_cache_bypass $http_upgrade;
-
+
# Long-polling support for wait jobs
proxy_read_timeout 35s;
proxy_connect_timeout 10s;
@@ -202,6 +215,7 @@ server {
```
Enable and restart:
+
```bash
sudo ln -s /etc/nginx/sites-available/bluelens /etc/nginx/sites-enabled/
sudo nginx -t
@@ -272,7 +286,7 @@ docker logs -f bluelens
Create `docker-compose.yml`:
```yaml
-version: '3.8'
+version: "3.8"
services:
bluelens:
@@ -288,13 +302,15 @@ services:
- ./logs:/var/log/bluelens
restart: unless-stopped
healthcheck:
- test: ["CMD", "node", "-e", "require('http').get('http://localhost:8787/api/ping', (r) => process.exit(r.statusCode === 200 ? 0 : 1))"]
+ test:
+ ["CMD", "node", "-e", "require('http').get('http://localhost:8787/api/ping', (r) => process.exit(r.statusCode === 200 ? 0 : 1))"]
interval: 30s
timeout: 3s
retries: 3
```
Run with:
+
```bash
docker-compose up -d
docker-compose logs -f
@@ -307,6 +323,7 @@ docker-compose logs -f
### Application Logs
**Console logs** (if running directly):
+
```bash
# Follow logs with PM2
pm2 logs bluelens
@@ -316,6 +333,7 @@ sudo journalctl -u bluelens -f
```
**File logs** (if configured):
+
```bash
tail -f /var/log/bluelens/app.log
```
@@ -323,6 +341,7 @@ tail -f /var/log/bluelens/app.log
### Log Format
Structured JSON logs (when using logger module):
+
```json
{
"timestamp": "2026-05-10T10:00:00.000Z",
@@ -336,11 +355,13 @@ Structured JSON logs (when using logger module):
### Health Checks
**Manual check**:
+
```bash
curl http://localhost:8787/api/ping
```
**Expected response**:
+
```json
{
"ok": true,
@@ -352,11 +373,13 @@ curl http://localhost:8787/api/ping
### Performance Monitoring
**Check upload statistics**:
+
```bash
curl http://localhost:8787/api/upload-stats
```
**Monitor system resources**:
+
```bash
# With PM2
pm2 monit
@@ -369,6 +392,7 @@ df -h
### Alerts
Set up monitoring with tools like:
+
- **Uptime Robot**: External uptime monitoring
- **Prometheus + Grafana**: Metrics and dashboards
- **Sentry**: Error tracking
@@ -381,6 +405,7 @@ Set up monitoring with tools like:
### Server Won't Start
**Check port availability**:
+
```bash
# Check if port is in use
sudo lsof -i :8787
@@ -388,6 +413,7 @@ sudo netstat -tuln | grep 8787
```
**Check logs**:
+
```bash
# PM2
pm2 logs bluelens --err
@@ -399,17 +425,20 @@ sudo journalctl -u bluelens -n 50
### Upload Failures
**Check upload host reachability**:
+
```bash
curl http://localhost:8787/api/doctor/upload-reachability
```
**Common causes**:
+
1. Network connectivity issues
2. Upload hosts down or blocking server IP
3. Image size too large (some hosts have limits)
4. Rate limiting from upload hosts
**Solutions**:
+
- Configure alternative upload hosts in `bluelens-config.js`
- Check network/firewall rules
- Reduce image size before upload
@@ -419,11 +448,13 @@ curl http://localhost:8787/api/doctor/upload-reachability
**Symptoms**: Wait tabs stuck at "Waiting for upload..."
**Check**:
+
1. Server is running and accessible
2. No CORS issues (check browser console)
3. Wait job timeout settings in config
**Debug**:
+
```bash
# Check active jobs
curl http://localhost:8787/api/wait-jobs/[job-id]
@@ -432,6 +463,7 @@ curl http://localhost:8787/api/wait-jobs/[job-id]
### High Memory Usage
**Check memory**:
+
```bash
# PM2
pm2 show bluelens
@@ -442,11 +474,13 @@ ps aux | grep node
```
**Common causes**:
+
1. Large images being processed
2. Memory leaks in long-running processes
3. Too many concurrent uploads
**Solutions**:
+
- Restart the service regularly (cron job)
- Add memory limit to PM2: `pm2 start server.js --max-memory-restart 500M`
- Enable swap if needed
@@ -454,16 +488,19 @@ ps aux | grep node
### CDN Resources Not Loading
**Check CDN reachability**:
+
```bash
curl http://localhost:8787/api/doctor/cdn-reachability
```
**Common causes**:
+
1. Network/firewall blocking CDN domains
2. Corporate proxy interfering
3. DNS issues
**Solutions**:
+
- Check DNS resolution: `nslookup cdn.jsdelivr.net`
- Configure proxy if needed
- Whitelist CDN domains in firewall
@@ -473,11 +510,13 @@ curl http://localhost:8787/api/doctor/cdn-reachability
**Symptoms**: Slow responses, timeouts
**Check**:
+
1. Server resource usage (CPU, RAM, disk)
2. Network latency
3. Upload host performance
**Optimize**:
+
```bash
# Enable compression in nginx
gzip on;
@@ -503,11 +542,13 @@ worker_processes auto;
## Backup and Recovery
**What to backup**:
+
- Application logs (if important)
- Configuration files (if customized)
- Wait job store: `/tmp/bluelens-wait-jobs-v1.json` (ephemeral, low priority)
**Backup script example**:
+
```bash
#!/bin/bash
BACKUP_DIR=/backup/bluelens/$(date +%Y%m%d)
diff --git a/docs/MODULARIZATION.md b/docs/MODULARIZATION.md
index d375e86..28517f4 100644
--- a/docs/MODULARIZATION.md
+++ b/docs/MODULARIZATION.md
@@ -10,6 +10,7 @@ The BlueLens codebase has two large files that could benefit from modularization
## Why Not Split Now?
### app.js (Browser Context)
+
- **Single Script Tag**: Currently loaded as a single `
```
@@ -124,6 +128,7 @@ These improvements make the large files more maintainable without breaking chang
## When to Revisit
Consider splitting when:
+
- app.js grows beyond 10,000 lines
- server.js grows beyond 2,000 lines
- Adding a build system becomes necessary for other reasons
diff --git a/docs/PROJECT_CONFIG.md b/docs/PROJECT_CONFIG.md
index 0dd0aeb..2b91a1f 100644
--- a/docs/PROJECT_CONFIG.md
+++ b/docs/PROJECT_CONFIG.md
@@ -15,7 +15,7 @@ All requirements from the problem statement have been successfully addressed:
2. **.gitignore**
- Status: Already existed
- - Content: Excludes node_modules/, .DS_Store, *.log, .env, IDE files, and more
+ - Content: Excludes node_modules/, .DS_Store, \*.log, .env, IDE files, and more
- Change: Removed package-lock.json from exclusions
3. **.editorconfig**
@@ -76,17 +76,20 @@ All requirements from the problem statement have been successfully addressed:
## Developer Experience Improvements
### For New Contributors
+
- Running `nvm use` or similar will automatically use Node.js 20
- Editor configurations (indent size, line endings) are automatically applied
- Code quality checks are available via npm scripts
- License terms are clearly defined
### For CI/CD
+
- Consistent dependency versions via package-lock.json
- Automated linting and formatting checks can be added to workflows
- Test coverage reporting is available
### For Maintainers
+
- All major IDEs and editors will respect .editorconfig settings
- Consistent code style is enforced via ESLint and Prettier
- Clear licensing reduces legal ambiguity
@@ -94,6 +97,7 @@ All requirements from the problem statement have been successfully addressed:
## Verification
All tests pass successfully:
+
```
✔ 56 tests passed
✔ 0 tests failed
@@ -114,6 +118,7 @@ All tests pass successfully:
For developers using this repository:
1. **Install Node.js**: Use version 20 as specified in .nvmrc
+
```bash
nvm use
# or
@@ -121,11 +126,13 @@ For developers using this repository:
```
2. **Install dependencies**:
+
```bash
npm install
```
3. **Run development tools**:
+
```bash
npm run lint # Check code quality
npm run format # Format code
diff --git a/docs/README.md b/docs/README.md
index 2236390..9c11093 100644
--- a/docs/README.md
+++ b/docs/README.md
@@ -5,6 +5,7 @@ This folder contains development and deployment documentation for BlueLens.
## Documentation Files
### [ARCHITECTURE.md](./ARCHITECTURE.md)
+
- System architecture overview
- Component descriptions (client, server, helpers)
- Data flow diagrams
@@ -15,6 +16,7 @@ This folder contains development and deployment documentation for BlueLens.
- Dependencies
### [API.md](./API.md)
+
- Server API endpoints documentation
- Health & status endpoints
- Upload proxy API
@@ -26,6 +28,7 @@ This folder contains development and deployment documentation for BlueLens.
- Environment variables
### [DEPLOYMENT.md](./DEPLOYMENT.md)
+
- Local development setup
- Production deployment options
- Direct Node.js deployment
@@ -41,6 +44,7 @@ This folder contains development and deployment documentation for BlueLens.
- Backup and recovery
### [MODULARIZATION.md](./MODULARIZATION.md)
+
- Code organization notes
- Rationale for not splitting large files yet
- Future modularization strategy
@@ -51,15 +55,18 @@ This folder contains development and deployment documentation for BlueLens.
## Quick Links
### For Developers
+
- Start with [ARCHITECTURE.md](./ARCHITECTURE.md) to understand the system
- See [API.md](./API.md) for endpoint and function documentation
- Review [MODULARIZATION.md](./MODULARIZATION.md) before making structural changes
### For Operators
+
- See [DEPLOYMENT.md](./DEPLOYMENT.md) for installation and configuration
- Reference [API.md](./API.md) for API endpoints and environment variables
### For Contributors
+
- Read [ARCHITECTURE.md](./ARCHITECTURE.md) to understand the codebase
- Check [MODULARIZATION.md](./MODULARIZATION.md) for code organization philosophy
- Follow the development workflow in [DEPLOYMENT.md](./DEPLOYMENT.md#local-development)
diff --git a/eslint.config.mjs b/eslint.config.mjs
new file mode 100644
index 0000000..f45b4f8
--- /dev/null
+++ b/eslint.config.mjs
@@ -0,0 +1,89 @@
+// ESLint flat config for BlueLens
+// Migrated from .eslintrc.json for ESLint v9+
+
+import js from "@eslint/js";
+
+export default [
+ js.configs.recommended,
+ {
+ languageOptions: {
+ ecmaVersion: "latest",
+ sourceType: "commonjs",
+ globals: {
+ // Node.js globals
+ console: "readonly",
+ process: "readonly",
+ Buffer: "readonly",
+ __dirname: "readonly",
+ __filename: "readonly",
+ require: "readonly",
+ module: "readonly",
+ exports: "readonly",
+ setTimeout: "readonly",
+ clearTimeout: "readonly",
+ setInterval: "readonly",
+ clearInterval: "readonly",
+ setImmediate: "readonly",
+ clearImmediate: "readonly",
+ // Browser globals
+ window: "readonly",
+ document: "readonly",
+ navigator: "readonly",
+ location: "readonly",
+ history: "readonly",
+ localStorage: "readonly",
+ sessionStorage: "readonly",
+ fetch: "readonly",
+ FormData: "readonly",
+ File: "readonly",
+ Blob: "readonly",
+ FileReader: "readonly",
+ Image: "readonly",
+ URL: "readonly",
+ URLSearchParams: "readonly",
+ HTMLElement: "readonly",
+ HTMLInputElement: "readonly",
+ NodeList: "readonly",
+ Element: "readonly",
+ Event: "readonly",
+ MouseEvent: "readonly",
+ KeyboardEvent: "readonly",
+ DragEvent: "readonly",
+ ClipboardEvent: "readonly",
+ CustomEvent: "readonly",
+ requestAnimationFrame: "readonly",
+ cancelAnimationFrame: "readonly",
+ alert: "readonly",
+ confirm: "readonly",
+ prompt: "readonly",
+ TextEncoder: "readonly",
+ TextDecoder: "readonly",
+ structuredClone: "readonly",
+ AbortController: "readonly",
+ AbortSignal: "readonly",
+ createImageBitmap: "readonly",
+ performance: "readonly",
+ // BlueLens-specific globals
+ exifr: "readonly",
+ sha256: "readonly",
+ SparkMD5: "readonly",
+ OCR_PIPELINE: "readonly",
+ OSINT_LIB: "readonly",
+ BLUELENS_HELPERS: "readonly",
+ BLUELENS_CONFIG: "readonly",
+ Tesseract: "readonly",
+ crypto: "readonly",
+ OCR_ENTITIES_UI: "readonly",
+ },
+ },
+ rules: {
+ "no-unused-vars": ["warn", { argsIgnorePattern: "^_", varsIgnorePattern: "^_" }],
+ "no-console": "off",
+ "prefer-const": "warn",
+ "no-var": "warn",
+ // ESLint 10 new rules - set to warn for now
+ "no-useless-assignment": "warn",
+ "preserve-caught-error": "warn",
+ },
+ },
+];
diff --git a/help.html b/help.html
index 0be74b3..36fad39 100644
--- a/help.html
+++ b/help.html
@@ -15,7 +15,9 @@
BlueLens Help
Back to app
-
Start here for startup steps, privacy expectations, troubleshooting, and the operator-visible defaults that shape launch behavior.
+
+ Start here for startup steps, privacy expectations, troubleshooting, and the operator-visible defaults that shape launch behavior.
+
@@ -25,7 +27,9 @@ BlueLens Help
Run node server.js from the repository root.
Open http://localhost:8787.
Choose an image to inspect locally, then explicitly run a launch action when you want provider links.
- Open the Doctor panel for a one-screen check of server, popup, storage, CDN, and upload-host reachability.
+
+ Open the Doctor panel for a one-screen check of server, popup, storage, CDN, and upload-host reachability.
+
diff --git a/index.html b/index.html
index edb7b4c..fe9d960 100644
--- a/index.html
+++ b/index.html
@@ -91,24 +91,10 @@ Image Search
Other actions
-
+
Lens only
-
+
Run OCR
@@ -221,237 +207,254 @@
Image Search
-
-
-
Share
-
- Not shared
- GPS present
- Editing software
-
-
+
+
+
Share
+
+ Not shared
+ GPS present
+ Editing software
+
+
-
+
-
-
- Confidence
-
- Unverified
- Likely
- Confirmed
-
-
-
+
+
+ Confidence
+
+ Unverified
+ Likely
+ Confirmed
+
+
+
-
-
- Uploads start only when you choose search.
-
+
+
+ Uploads start only when you choose search.
+
-
+
-
-
-
- Clean upload copy
-
+
+
+
+ Clean upload copy
+
-
-
- Auto host
-
-
- Copy URL
-
-
- Retry
-
-
+
+
+ Auto host
+
+ Copy URL
+
+ Retry
+
+
-
—
-
-
-
-
+
—
+
+
+
+
-
-
-
AI-image suspicion
-
checklist
-
-
Checklist only — not an oracle.
-
-
+
+
+
AI-image suspicion
+
checklist
+
+
Checklist only — not an oracle.
+
+
-
-
-
Mission Output
-
structured
-
-
- Run a workflow.
-
-
+
+
+
Mission Output
+
structured
+
+
Run a workflow.
+
-
-
-
Result Intake
-
dedupe queue
-
-
-
-
- Ingest Results
-
-
- Clear Queue
-
-
- Copy JSON
-
-
-
- No external findings ingested yet.
-
-
+
+
+
Result Intake
+
dedupe queue
+
+
+
+
+ Ingest Results
+
+
+ Clear Queue
+
+
+ Copy JSON
+
+
+
No external findings ingested yet.
+
-
-
-
No-result autopsy
-
why nothing hit
-
-
- Run a multi-engine launch, then ingest hits. If nothing lands, BlueLens will explain the likely failure modes here.
-
-
+
+
+
No-result autopsy
+
why nothing hit
+
+
+ Run a multi-engine launch, then ingest hits. If nothing lands, BlueLens will explain the likely failure modes here.
+
+
-
-
-
Source contradictions
-
date conflicts
-
-
- Ingest result snippets with dates and BlueLens will surface conflicts instead of flattening them into fake certainty.
-
-
+
+
+
Source contradictions
+
date conflicts
+
+
+ Ingest result snippets with dates and BlueLens will surface conflicts instead of flattening them into fake certainty.
+
+
-
- More tools
-
-
-
-
Mutation Lab
-
variants
-
-
-
- Generate Variants + Lens
-
- Copy JSON
-
-
—
-
+
+ More tools
+
+
+
+
Mutation Lab
+
variants
+
+
+
+ Generate Variants + Lens
+
+
+ Copy JSON
+
+
+
—
+
-
-
-
-
- Run Batch
- Download JSON
- Download CSV
-
-
—
-
+
+
+
+
+
+ Run Batch
+
+
+ Download JSON
+
+
+ Download CSV
+
+
+
—
+
-
-
-
-
- Run Doctor
-
-
-
Checking runtime…
-
+
+
+
+
+ Run Doctor
+
+
+
Checking runtime…
+
-
-
-
+
@@ -475,11 +478,12 @@ Image Search
Search Crop
-
- Clear Crop
-
+ Clear Crop
+
+
+ Drag a box around a face, logo, object, tattoo, sign, vehicle, building, product, artwork, or text area to search just that
+ region.
-
Drag a box around a face, logo, object, tattoo, sign, vehicle, building, product, artwork, or text area to search just that region.
@@ -546,18 +550,10 @@
Image Search
-
- Map
-
-
- Copy Coords
-
-
- Copy EXIF
-
-
- Pretty
-
+ Map
+ Copy Coords
+ Copy EXIF
+ Pretty
@@ -635,11 +631,37 @@
Image Search
Chinese (Traditional)
- Weak script hint
+ Weak script hint
Run OCR
- Document mode
- Generate queries
- Manual pivots
+
+ Document mode
+
+
+ Generate queries
+
+
+ Manual pivots
+
Copy
@@ -662,12 +684,8 @@ Image Search
-
- Choose
-
-
- Clear
-
+ Choose
+ Clear
@@ -698,7 +716,8 @@ Image Search
—
- dHash is a 64-bit perceptual heuristic. Lower Hamming distance means the thumbnails look closer, not that the files are proven to be the same image.
+ dHash is a 64-bit perceptual heuristic. Lower Hamming distance means the thumbnails look closer, not that the files are
+ proven to be the same image.
@@ -711,7 +730,9 @@ Image Search
Investigation
graph + chronology
- Correlate entities, inspect chronology, monitor source health, and track swarm outcomes from one shared investigation model.
+
+ Correlate entities, inspect chronology, monitor source health, and track swarm outcomes from one shared investigation model.
+
Graph
Timeline
@@ -720,7 +741,13 @@
Image Search
Refresh Sonar
-
+
Copy Swarm JSON
@@ -731,7 +758,13 @@ Image Search
@@ -747,23 +780,17 @@
Image Search
-
- Running sonar…
-
+
Running sonar…
-
- No launchpad or swarm run staged yet.
-
+
No launchpad or swarm run staged yet.
-
- *HEIC support depends on your browser/OS. One-click search makes the image public via a temporary URL.
-
+ *HEIC support depends on your browser/OS. One-click search makes the image public via a temporary URL.
diff --git a/launchpad-core.js b/launchpad-core.js
index 42308a9..5646398 100644
--- a/launchpad-core.js
+++ b/launchpad-core.js
@@ -1,10 +1,14 @@
-/* global BLUELENS_CONFIG, crypto */
-
(() => {
const getRunEngines = ({ run, engineOrder = [] } = {}) => {
const fromTargets = Object.keys(run?.targets || {});
const fromQueue = Object.keys(run?.queue || {});
- return Array.from(new Set([...(engineOrder || []).filter((engine) => fromTargets.includes(engine) || fromQueue.includes(engine)), ...fromTargets, ...fromQueue])).filter(Boolean);
+ return Array.from(
+ new Set([
+ ...(engineOrder || []).filter((engine) => fromTargets.includes(engine) || fromQueue.includes(engine)),
+ ...fromTargets,
+ ...fromQueue,
+ ]),
+ ).filter(Boolean);
};
const updateRunQueueStatus = ({ run, engine, patch = {}, runQueueStatus = { queued: "queued" } } = {}) => {
@@ -96,7 +100,14 @@
};
};
- const openTargetsForRun = ({ run, engines, engineOrder = [], openUrl = () => null, updateRunQueueStatus: updateStatus, runQueueStatus = {} } = {}) => {
+ const openTargetsForRun = ({
+ run,
+ engines,
+ engineOrder = [],
+ openUrl = () => null,
+ updateRunQueueStatus: updateStatus,
+ runQueueStatus = {},
+ } = {}) => {
if (!run || !run.targets) return { openedCount: 0, blockedCount: 0 };
ensureRunOutcomeState({ run, engines: getRunEngines({ run, engineOrder }) });
const openList = Array.from(new Set((engines || []).filter((engine) => run.targets?.[engine])));
@@ -124,7 +135,15 @@
return { openedCount, blockedCount };
};
- const hydrateRunTargets = ({ run, engines = [], url = "", reverseSearchUrl = () => "", updateRunQueueStatus: updateStatus, openLens = true, runQueueStatus = {} } = {}) => {
+ const hydrateRunTargets = ({
+ run,
+ engines = [],
+ url = "",
+ reverseSearchUrl = () => "",
+ updateRunQueueStatus: updateStatus,
+ openLens = true,
+ runQueueStatus = {},
+ } = {}) => {
run.url = url;
run.targets = Object.fromEntries(engines.map((engine) => [engine, reverseSearchUrl(engine, url)]));
for (const engine of engines) {
@@ -192,7 +211,9 @@
const run = createRun({ engines, mode: "swarm", reverseSearchUrl, runQueueStatus, artifact: getArtifact() });
ensureRunOutcomeState({ run, engines });
for (const engine of engines) {
- const wait = openWaitJob(engine, `${labelPrefix} · ${engineLabel[engine] || engine}`, { initialStatus: runQueueStatus.queued || "queued" });
+ const wait = openWaitJob(engine, `${labelPrefix} · ${engineLabel[engine] || engine}`, {
+ initialStatus: runQueueStatus.queued || "queued",
+ });
updateStatus?.(run, engine, {
job_id: wait.jobId,
attempts: 1,
@@ -209,7 +230,10 @@
for (let index = 0; index < engines.length; index += 1) {
const engine = engines[index];
const jobId = run.queue?.[engine]?.job_id || "";
- updateStatus?.(run, engine, { status: runQueueStatus.ready || "ready", detail: `Provider target staged (${index + 1}/${engines.length})` });
+ updateStatus?.(run, engine, {
+ status: runQueueStatus.ready || "ready",
+ detail: `Provider target staged (${index + 1}/${engines.length})`,
+ });
if (jobId && !run.blocked?.[engine]) publishWaitState(jobId, { url });
persistRun(run);
if (index < engines.length - 1 && delayMs > 0) await sleep(delayMs);
diff --git a/node_modules/.bin/js-yaml b/node_modules/.bin/js-yaml
deleted file mode 120000
index 9dbd010..0000000
--- a/node_modules/.bin/js-yaml
+++ /dev/null
@@ -1 +0,0 @@
-../js-yaml/bin/js-yaml.js
\ No newline at end of file
diff --git a/node_modules/.bin/rimraf b/node_modules/.bin/rimraf
deleted file mode 120000
index 4cd49a4..0000000
--- a/node_modules/.bin/rimraf
+++ /dev/null
@@ -1 +0,0 @@
-../rimraf/bin.js
\ No newline at end of file
diff --git a/node_modules/.package-lock.json b/node_modules/.package-lock.json
index 07e48cd..6a8b068 100644
--- a/node_modules/.package-lock.json
+++ b/node_modules/.package-lock.json
@@ -32,54 +32,128 @@
"node": "^12.0.0 || ^14.0.0 || >=16.0.0"
}
},
- "node_modules/@eslint/eslintrc": {
- "version": "2.1.4",
- "resolved": "https://registry.npmjs.org/@eslint/eslintrc/-/eslintrc-2.1.4.tgz",
- "integrity": "sha512-269Z39MS6wVJtsoUl10L60WdkhJVdPG24Q4eZTH3nnF6lpvSShEK3wQjDX9JRWAUPvPh7COouPpU9IrqaZFvtQ==",
+ "node_modules/@eslint/config-array": {
+ "version": "0.23.5",
+ "resolved": "https://registry.npmjs.org/@eslint/config-array/-/config-array-0.23.5.tgz",
+ "integrity": "sha512-Y3kKLvC1dvTOT+oGlqNQ1XLqK6D1HU2YXPc52NmAlJZbMMWDzGYXMiPRJ8TYD39muD/OTjlZmNJ4ib7dvSrMBA==",
"dev": true,
- "license": "MIT",
+ "license": "Apache-2.0",
"dependencies": {
- "ajv": "^6.12.4",
- "debug": "^4.3.2",
- "espree": "^9.6.0",
- "globals": "^13.19.0",
- "ignore": "^5.2.0",
- "import-fresh": "^3.2.1",
- "js-yaml": "^4.1.0",
- "minimatch": "^3.1.2",
- "strip-json-comments": "^3.1.1"
+ "@eslint/object-schema": "^3.0.5",
+ "debug": "^4.3.1",
+ "minimatch": "^10.2.4"
},
"engines": {
- "node": "^12.22.0 || ^14.17.0 || >=16.0.0"
+ "node": "^20.19.0 || ^22.13.0 || >=24"
+ }
+ },
+ "node_modules/@eslint/config-helpers": {
+ "version": "0.5.5",
+ "resolved": "https://registry.npmjs.org/@eslint/config-helpers/-/config-helpers-0.5.5.tgz",
+ "integrity": "sha512-eIJYKTCECbP/nsKaaruF6LW967mtbQbsw4JTtSVkUQc9MneSkbrgPJAbKl9nWr0ZeowV8BfsarBmPpBzGelA2w==",
+ "dev": true,
+ "license": "Apache-2.0",
+ "dependencies": {
+ "@eslint/core": "^1.2.1"
},
- "funding": {
- "url": "https://opencollective.com/eslint"
+ "engines": {
+ "node": "^20.19.0 || ^22.13.0 || >=24"
+ }
+ },
+ "node_modules/@eslint/core": {
+ "version": "1.2.1",
+ "resolved": "https://registry.npmjs.org/@eslint/core/-/core-1.2.1.tgz",
+ "integrity": "sha512-MwcE1P+AZ4C6DWlpin/OmOA54mmIZ/+xZuJiQd4SyB29oAJjN30UW9wkKNptW2ctp4cEsvhlLY/CsQ1uoHDloQ==",
+ "dev": true,
+ "license": "Apache-2.0",
+ "dependencies": {
+ "@types/json-schema": "^7.0.15"
+ },
+ "engines": {
+ "node": "^20.19.0 || ^22.13.0 || >=24"
}
},
"node_modules/@eslint/js": {
- "version": "8.57.1",
- "resolved": "https://registry.npmjs.org/@eslint/js/-/js-8.57.1.tgz",
- "integrity": "sha512-d9zaMRSTIKDLhctzH12MtXvJKSSUhaHcjV+2Z+GK+EEY7XKpP5yR4x+N3TAcHTcu963nIr+TMcCb4DBCYX1z6Q==",
+ "version": "10.0.1",
+ "resolved": "https://registry.npmjs.org/@eslint/js/-/js-10.0.1.tgz",
+ "integrity": "sha512-zeR9k5pd4gxjZ0abRoIaxdc7I3nDktoXZk2qOv9gCNWx3mVwEn32VRhyLaRsDiJjTs0xq/T8mfPtyuXu7GWBcA==",
"dev": true,
"license": "MIT",
"engines": {
- "node": "^12.22.0 || ^14.17.0 || >=16.0.0"
+ "node": "^20.19.0 || ^22.13.0 || >=24"
+ },
+ "funding": {
+ "url": "https://eslint.org/donate"
+ },
+ "peerDependencies": {
+ "eslint": "^10.0.0"
+ },
+ "peerDependenciesMeta": {
+ "eslint": {
+ "optional": true
+ }
}
},
- "node_modules/@humanwhocodes/config-array": {
- "version": "0.13.0",
- "resolved": "https://registry.npmjs.org/@humanwhocodes/config-array/-/config-array-0.13.0.tgz",
- "integrity": "sha512-DZLEEqFWQFiyK6h5YIeynKx7JlvCYWL0cImfSRXZ9l4Sg2efkFGTuFf6vzXjK1cq6IYkU+Eg/JizXw+TD2vRNw==",
- "deprecated": "Use @eslint/config-array instead",
+ "node_modules/@eslint/object-schema": {
+ "version": "3.0.5",
+ "resolved": "https://registry.npmjs.org/@eslint/object-schema/-/object-schema-3.0.5.tgz",
+ "integrity": "sha512-vqTaUEgxzm+YDSdElad6PiRoX4t8VGDjCtt05zn4nU810UIx/uNEV7/lZJ6KwFThKZOzOxzXy48da+No7HZaMw==",
+ "dev": true,
+ "license": "Apache-2.0",
+ "engines": {
+ "node": "^20.19.0 || ^22.13.0 || >=24"
+ }
+ },
+ "node_modules/@eslint/plugin-kit": {
+ "version": "0.7.1",
+ "resolved": "https://registry.npmjs.org/@eslint/plugin-kit/-/plugin-kit-0.7.1.tgz",
+ "integrity": "sha512-rZAP3aVgB9ds9KOeUSL+zZ21hPmo8dh6fnIFwRQj5EAZl9gzR7wxYbYXYysAM8CTqGmUGyp2S4kUdV17MnGuWQ==",
"dev": true,
"license": "Apache-2.0",
"dependencies": {
- "@humanwhocodes/object-schema": "^2.0.3",
- "debug": "^4.3.1",
- "minimatch": "^3.0.5"
+ "@eslint/core": "^1.2.1",
+ "levn": "^0.4.1"
},
"engines": {
- "node": ">=10.10.0"
+ "node": "^20.19.0 || ^22.13.0 || >=24"
+ }
+ },
+ "node_modules/@humanfs/core": {
+ "version": "0.19.2",
+ "resolved": "https://registry.npmjs.org/@humanfs/core/-/core-0.19.2.tgz",
+ "integrity": "sha512-UhXNm+CFMWcbChXywFwkmhqjs3PRCmcSa/hfBgLIb7oQ5HNb1wS0icWsGtSAUNgefHeI+eBrA8I1fxmbHsGdvA==",
+ "dev": true,
+ "license": "Apache-2.0",
+ "dependencies": {
+ "@humanfs/types": "^0.15.0"
+ },
+ "engines": {
+ "node": ">=18.18.0"
+ }
+ },
+ "node_modules/@humanfs/node": {
+ "version": "0.16.8",
+ "resolved": "https://registry.npmjs.org/@humanfs/node/-/node-0.16.8.tgz",
+ "integrity": "sha512-gE1eQNZ3R++kTzFUpdGlpmy8kDZD/MLyHqDwqjkVQI0JMdI1D51sy1H958PNXYkM2rAac7e5/CnIKZrHtPh3BQ==",
+ "dev": true,
+ "license": "Apache-2.0",
+ "dependencies": {
+ "@humanfs/core": "^0.19.2",
+ "@humanfs/types": "^0.15.0",
+ "@humanwhocodes/retry": "^0.4.0"
+ },
+ "engines": {
+ "node": ">=18.18.0"
+ }
+ },
+ "node_modules/@humanfs/types": {
+ "version": "0.15.0",
+ "resolved": "https://registry.npmjs.org/@humanfs/types/-/types-0.15.0.tgz",
+ "integrity": "sha512-ZZ1w0aoQkwuUuC7Yf+7sdeaNfqQiiLcSRbfI08oAxqLtpXQr9AIVX7Ay7HLDuiLYAaFPu8oBYNq/QIi9URHJ3Q==",
+ "dev": true,
+ "license": "Apache-2.0",
+ "engines": {
+ "node": ">=18.18.0"
}
},
"node_modules/@humanwhocodes/module-importer": {
@@ -96,58 +170,40 @@
"url": "https://github.com/sponsors/nzakas"
}
},
- "node_modules/@humanwhocodes/object-schema": {
- "version": "2.0.3",
- "resolved": "https://registry.npmjs.org/@humanwhocodes/object-schema/-/object-schema-2.0.3.tgz",
- "integrity": "sha512-93zYdMES/c1D69yZiKDBj0V24vqNzB/koF26KPaagAfd3P/4gUlh3Dys5ogAK+Exi9QyzlD8x/08Zt7wIKcDcA==",
- "deprecated": "Use @eslint/object-schema instead",
- "dev": true,
- "license": "BSD-3-Clause"
- },
- "node_modules/@nodelib/fs.scandir": {
- "version": "2.1.5",
- "resolved": "https://registry.npmjs.org/@nodelib/fs.scandir/-/fs.scandir-2.1.5.tgz",
- "integrity": "sha512-vq24Bq3ym5HEQm2NKCr3yXDwjc7vTsEThRDnkp2DK9p1uqLR+DHurm/NOTo0KG7HYHU7eppKZj3MyqYuMBf62g==",
+ "node_modules/@humanwhocodes/retry": {
+ "version": "0.4.3",
+ "resolved": "https://registry.npmjs.org/@humanwhocodes/retry/-/retry-0.4.3.tgz",
+ "integrity": "sha512-bV0Tgo9K4hfPCek+aMAn81RppFKv2ySDQeMoSZuvTASywNTnVJCArCZE2FWqpvIatKu7VMRLWlR1EazvVhDyhQ==",
"dev": true,
- "license": "MIT",
- "dependencies": {
- "@nodelib/fs.stat": "2.0.5",
- "run-parallel": "^1.1.9"
- },
+ "license": "Apache-2.0",
"engines": {
- "node": ">= 8"
+ "node": ">=18.18"
+ },
+ "funding": {
+ "type": "github",
+ "url": "https://github.com/sponsors/nzakas"
}
},
- "node_modules/@nodelib/fs.stat": {
- "version": "2.0.5",
- "resolved": "https://registry.npmjs.org/@nodelib/fs.stat/-/fs.stat-2.0.5.tgz",
- "integrity": "sha512-RkhPPp2zrqDAQA/2jNhnztcPAlv64XdhIp7a7454A5ovI7Bukxgt7MX7udwAu3zg1DcpPU0rz3VV1SeaqvY4+A==",
+ "node_modules/@types/esrecurse": {
+ "version": "4.3.1",
+ "resolved": "https://registry.npmjs.org/@types/esrecurse/-/esrecurse-4.3.1.tgz",
+ "integrity": "sha512-xJBAbDifo5hpffDBuHl0Y8ywswbiAp/Wi7Y/GtAgSlZyIABppyurxVueOPE8LUQOxdlgi6Zqce7uoEpqNTeiUw==",
"dev": true,
- "license": "MIT",
- "engines": {
- "node": ">= 8"
- }
+ "license": "MIT"
},
- "node_modules/@nodelib/fs.walk": {
- "version": "1.2.8",
- "resolved": "https://registry.npmjs.org/@nodelib/fs.walk/-/fs.walk-1.2.8.tgz",
- "integrity": "sha512-oGB+UxlgWcgQkgwo8GcEGwemoTFt3FIO9ababBmaGwXIoBKZ+GTy0pP185beGg7Llih/NSHSV2XAs1lnznocSg==",
+ "node_modules/@types/estree": {
+ "version": "1.0.9",
+ "resolved": "https://registry.npmjs.org/@types/estree/-/estree-1.0.9.tgz",
+ "integrity": "sha512-GhdPgy1el4/ImP05X05Uw4cw2/M93BCUmnEvWZNStlCzEKME4Fkk+YpoA5OiHNQmoS7Cafb8Xa3Pya8m1Qrzeg==",
"dev": true,
- "license": "MIT",
- "dependencies": {
- "@nodelib/fs.scandir": "2.1.5",
- "fastq": "^1.6.0"
- },
- "engines": {
- "node": ">= 8"
- }
+ "license": "MIT"
},
- "node_modules/@ungap/structured-clone": {
- "version": "1.3.1",
- "resolved": "https://registry.npmjs.org/@ungap/structured-clone/-/structured-clone-1.3.1.tgz",
- "integrity": "sha512-mUFwbeTqrVgDQxFveS+df2yfap6iuP20NAKAsBt5jDEoOTDew+zwLAOilHCeQJOVSvmgCX4ogqIrA0mnyr08yQ==",
+ "node_modules/@types/json-schema": {
+ "version": "7.0.15",
+ "resolved": "https://registry.npmjs.org/@types/json-schema/-/json-schema-7.0.15.tgz",
+ "integrity": "sha512-5+fP8P8MFNC+AyZCDxrB2pkZFPGzqQWUzpSeuuVLvm8VMcorNYavBqoFcxK8bQz4Qsbn4oUEEem4wDLfcysGHA==",
"dev": true,
- "license": "ISC"
+ "license": "MIT"
},
"node_modules/acorn": {
"version": "8.16.0",
@@ -189,111 +245,29 @@
"url": "https://github.com/sponsors/epoberezkin"
}
},
- "node_modules/ansi-regex": {
- "version": "5.0.1",
- "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-5.0.1.tgz",
- "integrity": "sha512-quJQXlTSUGL2LH9SUXo8VwsY4soanhgo6LNSm84E1LBcE8s3O0wpdiRzyR9z/ZZJMlMWv37qOOb9pdJlMUEKFQ==",
- "dev": true,
- "license": "MIT",
- "engines": {
- "node": ">=8"
- }
- },
- "node_modules/ansi-styles": {
- "version": "4.3.0",
- "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-4.3.0.tgz",
- "integrity": "sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg==",
- "dev": true,
- "license": "MIT",
- "dependencies": {
- "color-convert": "^2.0.1"
- },
- "engines": {
- "node": ">=8"
- },
- "funding": {
- "url": "https://github.com/chalk/ansi-styles?sponsor=1"
- }
- },
- "node_modules/argparse": {
- "version": "2.0.1",
- "resolved": "https://registry.npmjs.org/argparse/-/argparse-2.0.1.tgz",
- "integrity": "sha512-8+9WqebbFzpX9OR+Wa6O29asIogeRMzcGtAINdpMHHyAg10f05aSFVBbcEqGf/PXw1EjAZ+q2/bEBg3DvurK3Q==",
- "dev": true,
- "license": "Python-2.0"
- },
"node_modules/balanced-match": {
- "version": "1.0.2",
- "resolved": "https://registry.npmjs.org/balanced-match/-/balanced-match-1.0.2.tgz",
- "integrity": "sha512-3oSeUO0TMV67hN1AmbXsK4yaqU7tjiHlbxRDZOpH0KW9+CeX4bRAaX0Anxt0tx2MrpRpWwQaPwIlISEJhYU5Pw==",
- "dev": true,
- "license": "MIT"
- },
- "node_modules/brace-expansion": {
- "version": "1.1.14",
- "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.14.tgz",
- "integrity": "sha512-MWPGfDxnyzKU7rNOW9SP/c50vi3xrmrua/+6hfPbCS2ABNWfx24vPidzvC7krjU/RTo235sV776ymlsMtGKj8g==",
- "dev": true,
- "license": "MIT",
- "dependencies": {
- "balanced-match": "^1.0.0",
- "concat-map": "0.0.1"
- }
- },
- "node_modules/callsites": {
- "version": "3.1.0",
- "resolved": "https://registry.npmjs.org/callsites/-/callsites-3.1.0.tgz",
- "integrity": "sha512-P8BjAsXvZS+VIDUI11hHCQEv74YT67YUi5JJFNWIqL235sBmjX4+qx9Muvls5ivyNENctx46xQLQ3aTuE7ssaQ==",
+ "version": "4.0.4",
+ "resolved": "https://registry.npmjs.org/balanced-match/-/balanced-match-4.0.4.tgz",
+ "integrity": "sha512-BLrgEcRTwX2o6gGxGOCNyMvGSp35YofuYzw9h1IMTRmKqttAZZVU67bdb9Pr2vUHA8+j3i2tJfjO6C6+4myGTA==",
"dev": true,
"license": "MIT",
"engines": {
- "node": ">=6"
+ "node": "18 || 20 || >=22"
}
},
- "node_modules/chalk": {
- "version": "4.1.2",
- "resolved": "https://registry.npmjs.org/chalk/-/chalk-4.1.2.tgz",
- "integrity": "sha512-oKnbhFyRIXpUuez8iBMmyEa4nbj4IOQyuhc/wy9kY7/WVPcwIO9VA668Pu8RkO7+0G76SLROeyw9CpQ061i4mA==",
- "dev": true,
- "license": "MIT",
- "dependencies": {
- "ansi-styles": "^4.1.0",
- "supports-color": "^7.1.0"
- },
- "engines": {
- "node": ">=10"
- },
- "funding": {
- "url": "https://github.com/chalk/chalk?sponsor=1"
- }
- },
- "node_modules/color-convert": {
- "version": "2.0.1",
- "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-2.0.1.tgz",
- "integrity": "sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ==",
+ "node_modules/brace-expansion": {
+ "version": "5.0.6",
+ "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-5.0.6.tgz",
+ "integrity": "sha512-kLpxurY4Z4r9sgMsyG0Z9uzsBlgiU/EFKhj/h91/8yHu0edo7XuixOIH3VcJ8kkxs6/jPzoI6U9Vj3WqbMQ94g==",
"dev": true,
"license": "MIT",
"dependencies": {
- "color-name": "~1.1.4"
+ "balanced-match": "^4.0.2"
},
"engines": {
- "node": ">=7.0.0"
+ "node": "18 || 20 || >=22"
}
},
- "node_modules/color-name": {
- "version": "1.1.4",
- "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.4.tgz",
- "integrity": "sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==",
- "dev": true,
- "license": "MIT"
- },
- "node_modules/concat-map": {
- "version": "0.0.1",
- "resolved": "https://registry.npmjs.org/concat-map/-/concat-map-0.0.1.tgz",
- "integrity": "sha512-/Srv4dswyQNBfohGpz9o6Yb3Gz3SrUDqBH5rTuhGR7ahtlbYKnVxw2bCFMRljaA7EXHaXZ8wsHdodFvbkhKmqg==",
- "dev": true,
- "license": "MIT"
- },
"node_modules/cross-spawn": {
"version": "7.0.6",
"resolved": "https://registry.npmjs.org/cross-spawn/-/cross-spawn-7.0.6.tgz",
@@ -334,19 +308,6 @@
"dev": true,
"license": "MIT"
},
- "node_modules/doctrine": {
- "version": "3.0.0",
- "resolved": "https://registry.npmjs.org/doctrine/-/doctrine-3.0.0.tgz",
- "integrity": "sha512-yS+Q5i3hBf7GBkd4KG8a7eBNNWNGLTaEwwYWUijIYM7zrlYDM0BFXHjjPWlWZ1Rg7UaddZeIDmi9jF3HmqiQ2w==",
- "dev": true,
- "license": "Apache-2.0",
- "dependencies": {
- "esutils": "^2.0.2"
- },
- "engines": {
- "node": ">=6.0.0"
- }
- },
"node_modules/escape-string-regexp": {
"version": "4.0.0",
"resolved": "https://registry.npmjs.org/escape-string-regexp/-/escape-string-regexp-4.0.0.tgz",
@@ -361,74 +322,75 @@
}
},
"node_modules/eslint": {
- "version": "8.57.1",
- "resolved": "https://registry.npmjs.org/eslint/-/eslint-8.57.1.tgz",
- "integrity": "sha512-ypowyDxpVSYpkXr9WPv2PAZCtNip1Mv5KTW0SCurXv/9iOpcrH9PaqUElksqEB6pChqHGDRCFTyrZlGhnLNGiA==",
- "deprecated": "This version is no longer supported. Please see https://eslint.org/version-support for other options.",
+ "version": "10.3.0",
+ "resolved": "https://registry.npmjs.org/eslint/-/eslint-10.3.0.tgz",
+ "integrity": "sha512-XbEXaRva5cF0ZQB8w6MluHA0kZZfV2DuCMJ3ozyEOHLwDpZX2Lmm/7Pp0xdJmI0GL1W05VH5VwIFHEm1Vcw2gw==",
"dev": true,
"license": "MIT",
"dependencies": {
- "@eslint-community/eslint-utils": "^4.2.0",
- "@eslint-community/regexpp": "^4.6.1",
- "@eslint/eslintrc": "^2.1.4",
- "@eslint/js": "8.57.1",
- "@humanwhocodes/config-array": "^0.13.0",
+ "@eslint-community/eslint-utils": "^4.8.0",
+ "@eslint-community/regexpp": "^4.12.2",
+ "@eslint/config-array": "^0.23.5",
+ "@eslint/config-helpers": "^0.5.5",
+ "@eslint/core": "^1.2.1",
+ "@eslint/plugin-kit": "^0.7.1",
+ "@humanfs/node": "^0.16.6",
"@humanwhocodes/module-importer": "^1.0.1",
- "@nodelib/fs.walk": "^1.2.8",
- "@ungap/structured-clone": "^1.2.0",
- "ajv": "^6.12.4",
- "chalk": "^4.0.0",
- "cross-spawn": "^7.0.2",
+ "@humanwhocodes/retry": "^0.4.2",
+ "@types/estree": "^1.0.6",
+ "ajv": "^6.14.0",
+ "cross-spawn": "^7.0.6",
"debug": "^4.3.2",
- "doctrine": "^3.0.0",
"escape-string-regexp": "^4.0.0",
- "eslint-scope": "^7.2.2",
- "eslint-visitor-keys": "^3.4.3",
- "espree": "^9.6.1",
- "esquery": "^1.4.2",
+ "eslint-scope": "^9.1.2",
+ "eslint-visitor-keys": "^5.0.1",
+ "espree": "^11.2.0",
+ "esquery": "^1.7.0",
"esutils": "^2.0.2",
"fast-deep-equal": "^3.1.3",
- "file-entry-cache": "^6.0.1",
+ "file-entry-cache": "^8.0.0",
"find-up": "^5.0.0",
"glob-parent": "^6.0.2",
- "globals": "^13.19.0",
- "graphemer": "^1.4.0",
"ignore": "^5.2.0",
"imurmurhash": "^0.1.4",
"is-glob": "^4.0.0",
- "is-path-inside": "^3.0.3",
- "js-yaml": "^4.1.0",
"json-stable-stringify-without-jsonify": "^1.0.1",
- "levn": "^0.4.1",
- "lodash.merge": "^4.6.2",
- "minimatch": "^3.1.2",
+ "minimatch": "^10.2.4",
"natural-compare": "^1.4.0",
- "optionator": "^0.9.3",
- "strip-ansi": "^6.0.1",
- "text-table": "^0.2.0"
+ "optionator": "^0.9.3"
},
"bin": {
"eslint": "bin/eslint.js"
},
"engines": {
- "node": "^12.22.0 || ^14.17.0 || >=16.0.0"
+ "node": "^20.19.0 || ^22.13.0 || >=24"
},
"funding": {
- "url": "https://opencollective.com/eslint"
+ "url": "https://eslint.org/donate"
+ },
+ "peerDependencies": {
+ "jiti": "*"
+ },
+ "peerDependenciesMeta": {
+ "jiti": {
+ "optional": true
+ }
}
},
"node_modules/eslint-scope": {
- "version": "7.2.2",
- "resolved": "https://registry.npmjs.org/eslint-scope/-/eslint-scope-7.2.2.tgz",
- "integrity": "sha512-dOt21O7lTMhDM+X9mB4GX+DZrZtCUJPL/wlcTqxyrx5IvO0IYtILdtrQGQp+8n5S0gwSVmOf9NQrjMOgfQZlIg==",
+ "version": "9.1.2",
+ "resolved": "https://registry.npmjs.org/eslint-scope/-/eslint-scope-9.1.2.tgz",
+ "integrity": "sha512-xS90H51cKw0jltxmvmHy2Iai1LIqrfbw57b79w/J7MfvDfkIkFZ+kj6zC3BjtUwh150HsSSdxXZcsuv72miDFQ==",
"dev": true,
"license": "BSD-2-Clause",
"dependencies": {
+ "@types/esrecurse": "^4.3.1",
+ "@types/estree": "^1.0.8",
"esrecurse": "^4.3.0",
"estraverse": "^5.2.0"
},
"engines": {
- "node": "^12.22.0 || ^14.17.0 || >=16.0.0"
+ "node": "^20.19.0 || ^22.13.0 || >=24"
},
"funding": {
"url": "https://opencollective.com/eslint"
@@ -447,19 +409,45 @@
"url": "https://opencollective.com/eslint"
}
},
+ "node_modules/eslint/node_modules/eslint-visitor-keys": {
+ "version": "5.0.1",
+ "resolved": "https://registry.npmjs.org/eslint-visitor-keys/-/eslint-visitor-keys-5.0.1.tgz",
+ "integrity": "sha512-tD40eHxA35h0PEIZNeIjkHoDR4YjjJp34biM0mDvplBe//mB+IHCqHDGV7pxF+7MklTvighcCPPZC7ynWyjdTA==",
+ "dev": true,
+ "license": "Apache-2.0",
+ "engines": {
+ "node": "^20.19.0 || ^22.13.0 || >=24"
+ },
+ "funding": {
+ "url": "https://opencollective.com/eslint"
+ }
+ },
"node_modules/espree": {
- "version": "9.6.1",
- "resolved": "https://registry.npmjs.org/espree/-/espree-9.6.1.tgz",
- "integrity": "sha512-oruZaFkjorTpF32kDSI5/75ViwGeZginGGy2NoOSg3Q9bnwlnmDm4HLnkl0RE3n+njDXR037aY1+x58Z/zFdwQ==",
+ "version": "11.2.0",
+ "resolved": "https://registry.npmjs.org/espree/-/espree-11.2.0.tgz",
+ "integrity": "sha512-7p3DrVEIopW1B1avAGLuCSh1jubc01H2JHc8B4qqGblmg5gI9yumBgACjWo4JlIc04ufug4xJ3SQI8HkS/Rgzw==",
"dev": true,
"license": "BSD-2-Clause",
"dependencies": {
- "acorn": "^8.9.0",
+ "acorn": "^8.16.0",
"acorn-jsx": "^5.3.2",
- "eslint-visitor-keys": "^3.4.1"
+ "eslint-visitor-keys": "^5.0.1"
},
"engines": {
- "node": "^12.22.0 || ^14.17.0 || >=16.0.0"
+ "node": "^20.19.0 || ^22.13.0 || >=24"
+ },
+ "funding": {
+ "url": "https://opencollective.com/eslint"
+ }
+ },
+ "node_modules/espree/node_modules/eslint-visitor-keys": {
+ "version": "5.0.1",
+ "resolved": "https://registry.npmjs.org/eslint-visitor-keys/-/eslint-visitor-keys-5.0.1.tgz",
+ "integrity": "sha512-tD40eHxA35h0PEIZNeIjkHoDR4YjjJp34biM0mDvplBe//mB+IHCqHDGV7pxF+7MklTvighcCPPZC7ynWyjdTA==",
+ "dev": true,
+ "license": "Apache-2.0",
+ "engines": {
+ "node": "^20.19.0 || ^22.13.0 || >=24"
},
"funding": {
"url": "https://opencollective.com/eslint"
@@ -532,27 +520,17 @@
"dev": true,
"license": "MIT"
},
- "node_modules/fastq": {
- "version": "1.20.1",
- "resolved": "https://registry.npmjs.org/fastq/-/fastq-1.20.1.tgz",
- "integrity": "sha512-GGToxJ/w1x32s/D2EKND7kTil4n8OVk/9mycTc4VDza13lOvpUZTGX3mFSCtV9ksdGBVzvsyAVLM6mHFThxXxw==",
- "dev": true,
- "license": "ISC",
- "dependencies": {
- "reusify": "^1.0.4"
- }
- },
"node_modules/file-entry-cache": {
- "version": "6.0.1",
- "resolved": "https://registry.npmjs.org/file-entry-cache/-/file-entry-cache-6.0.1.tgz",
- "integrity": "sha512-7Gps/XWymbLk2QLYK4NzpMOrYjMhdIxXuIvy2QBsLE6ljuodKvdkWs/cpyJJ3CVIVpH0Oi1Hvg1ovbMzLdFBBg==",
+ "version": "8.0.0",
+ "resolved": "https://registry.npmjs.org/file-entry-cache/-/file-entry-cache-8.0.0.tgz",
+ "integrity": "sha512-XXTUwCvisa5oacNGRP9SfNtYBNAMi+RPwBFmblZEF7N7swHYQS6/Zfk7SRwx4D5j3CH211YNRco1DEMNVfZCnQ==",
"dev": true,
"license": "MIT",
"dependencies": {
- "flat-cache": "^3.0.4"
+ "flat-cache": "^4.0.0"
},
"engines": {
- "node": "^10.12.0 || >=12.0.0"
+ "node": ">=16.0.0"
}
},
"node_modules/find-up": {
@@ -573,18 +551,17 @@
}
},
"node_modules/flat-cache": {
- "version": "3.2.0",
- "resolved": "https://registry.npmjs.org/flat-cache/-/flat-cache-3.2.0.tgz",
- "integrity": "sha512-CYcENa+FtcUKLmhhqyctpclsq7QF38pKjZHsGNiSQF5r4FtoKDWabFDl3hzaEQMvT1LHEysw5twgLvpYYb4vbw==",
+ "version": "4.0.1",
+ "resolved": "https://registry.npmjs.org/flat-cache/-/flat-cache-4.0.1.tgz",
+ "integrity": "sha512-f7ccFPK3SXFHpx15UIGyRJ/FJQctuKZ0zVuN3frBo4HnK3cay9VEW0R6yPYFHC0AgqhukPzKjq22t5DmAyqGyw==",
"dev": true,
"license": "MIT",
"dependencies": {
"flatted": "^3.2.9",
- "keyv": "^4.5.3",
- "rimraf": "^3.0.2"
+ "keyv": "^4.5.4"
},
"engines": {
- "node": "^10.12.0 || >=12.0.0"
+ "node": ">=16"
}
},
"node_modules/flatted": {
@@ -594,35 +571,6 @@
"dev": true,
"license": "ISC"
},
- "node_modules/fs.realpath": {
- "version": "1.0.0",
- "resolved": "https://registry.npmjs.org/fs.realpath/-/fs.realpath-1.0.0.tgz",
- "integrity": "sha512-OO0pH2lK6a0hZnAdau5ItzHPI6pUlvI7jMVnxUQRtw4owF2wk8lOSabtGDCTP4Ggrg2MbGnWO9X8K1t4+fGMDw==",
- "dev": true,
- "license": "ISC"
- },
- "node_modules/glob": {
- "version": "7.2.3",
- "resolved": "https://registry.npmjs.org/glob/-/glob-7.2.3.tgz",
- "integrity": "sha512-nFR0zLpU2YCaRxwoCJvL6UvCH2JFyFVIvwTLsIf21AuHlMskA1hhTdk+LlYJtOlYt9v6dvszD2BGRqBL+iQK9Q==",
- "deprecated": "Old versions of glob are not supported, and contain widely publicized security vulnerabilities, which have been fixed in the current version. Please update. Support for old versions may be purchased (at exorbitant rates) by contacting i@izs.me",
- "dev": true,
- "license": "ISC",
- "dependencies": {
- "fs.realpath": "^1.0.0",
- "inflight": "^1.0.4",
- "inherits": "2",
- "minimatch": "^3.1.1",
- "once": "^1.3.0",
- "path-is-absolute": "^1.0.0"
- },
- "engines": {
- "node": "*"
- },
- "funding": {
- "url": "https://github.com/sponsors/isaacs"
- }
- },
"node_modules/glob-parent": {
"version": "6.0.2",
"resolved": "https://registry.npmjs.org/glob-parent/-/glob-parent-6.0.2.tgz",
@@ -636,39 +584,6 @@
"node": ">=10.13.0"
}
},
- "node_modules/globals": {
- "version": "13.24.0",
- "resolved": "https://registry.npmjs.org/globals/-/globals-13.24.0.tgz",
- "integrity": "sha512-AhO5QUcj8llrbG09iWhPU2B204J1xnPeL8kQmVorSsy+Sjj1sk8gIyh6cUocGmH4L0UuhAJy+hJMRA4mgA4mFQ==",
- "dev": true,
- "license": "MIT",
- "dependencies": {
- "type-fest": "^0.20.2"
- },
- "engines": {
- "node": ">=8"
- },
- "funding": {
- "url": "https://github.com/sponsors/sindresorhus"
- }
- },
- "node_modules/graphemer": {
- "version": "1.4.0",
- "resolved": "https://registry.npmjs.org/graphemer/-/graphemer-1.4.0.tgz",
- "integrity": "sha512-EtKwoO6kxCL9WO5xipiHTZlSzBm7WLT627TqC/uVRd0HKmq8NXyebnNYxDoBi7wt8eTWrUrKXCOVaFq9x1kgag==",
- "dev": true,
- "license": "MIT"
- },
- "node_modules/has-flag": {
- "version": "4.0.0",
- "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-4.0.0.tgz",
- "integrity": "sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ==",
- "dev": true,
- "license": "MIT",
- "engines": {
- "node": ">=8"
- }
- },
"node_modules/ignore": {
"version": "5.3.2",
"resolved": "https://registry.npmjs.org/ignore/-/ignore-5.3.2.tgz",
@@ -679,23 +594,6 @@
"node": ">= 4"
}
},
- "node_modules/import-fresh": {
- "version": "3.3.1",
- "resolved": "https://registry.npmjs.org/import-fresh/-/import-fresh-3.3.1.tgz",
- "integrity": "sha512-TR3KfrTZTYLPB6jUjfx6MF9WcWrHL9su5TObK4ZkYgBdWKPOFoSoQIdEuTuR82pmtxH2spWG9h6etwfr1pLBqQ==",
- "dev": true,
- "license": "MIT",
- "dependencies": {
- "parent-module": "^1.0.0",
- "resolve-from": "^4.0.0"
- },
- "engines": {
- "node": ">=6"
- },
- "funding": {
- "url": "https://github.com/sponsors/sindresorhus"
- }
- },
"node_modules/imurmurhash": {
"version": "0.1.4",
"resolved": "https://registry.npmjs.org/imurmurhash/-/imurmurhash-0.1.4.tgz",
@@ -706,25 +604,6 @@
"node": ">=0.8.19"
}
},
- "node_modules/inflight": {
- "version": "1.0.6",
- "resolved": "https://registry.npmjs.org/inflight/-/inflight-1.0.6.tgz",
- "integrity": "sha512-k92I/b08q4wvFscXCLvqfsHCrjrF7yiXsQuIVvVE7N82W3+aqpzuUdBbfhWcy/FZR3/4IgflMgKLOsvPDrGCJA==",
- "deprecated": "This module is not supported, and leaks memory. Do not use it. Check out lru-cache if you want a good and tested way to coalesce async requests by a key value, which is much more comprehensive and powerful.",
- "dev": true,
- "license": "ISC",
- "dependencies": {
- "once": "^1.3.0",
- "wrappy": "1"
- }
- },
- "node_modules/inherits": {
- "version": "2.0.4",
- "resolved": "https://registry.npmjs.org/inherits/-/inherits-2.0.4.tgz",
- "integrity": "sha512-k/vGaX4/Yla3WzyMCvTQOXYeIHvqOKtnqBduzTHpzpQZzAskKMhZ2K+EnBiSM9zGSoIFeMpXKxa4dYeZIQqewQ==",
- "dev": true,
- "license": "ISC"
- },
"node_modules/is-extglob": {
"version": "2.1.1",
"resolved": "https://registry.npmjs.org/is-extglob/-/is-extglob-2.1.1.tgz",
@@ -748,16 +627,6 @@
"node": ">=0.10.0"
}
},
- "node_modules/is-path-inside": {
- "version": "3.0.3",
- "resolved": "https://registry.npmjs.org/is-path-inside/-/is-path-inside-3.0.3.tgz",
- "integrity": "sha512-Fd4gABb+ycGAmKou8eMftCupSir5lRxqf4aD/vd0cD2qc4HL07OjCeuHMr8Ro4CoMaeCKDB0/ECBOVWjTwUvPQ==",
- "dev": true,
- "license": "MIT",
- "engines": {
- "node": ">=8"
- }
- },
"node_modules/isexe": {
"version": "2.0.0",
"resolved": "https://registry.npmjs.org/isexe/-/isexe-2.0.0.tgz",
@@ -765,19 +634,6 @@
"dev": true,
"license": "ISC"
},
- "node_modules/js-yaml": {
- "version": "4.1.1",
- "resolved": "https://registry.npmjs.org/js-yaml/-/js-yaml-4.1.1.tgz",
- "integrity": "sha512-qQKT4zQxXl8lLwBtHMWwaTcGfFOZviOJet3Oy/xmGk2gZH677CJM9EvtfdSkgWcATZhj/55JZ0rmy3myCT5lsA==",
- "dev": true,
- "license": "MIT",
- "dependencies": {
- "argparse": "^2.0.1"
- },
- "bin": {
- "js-yaml": "bin/js-yaml.js"
- }
- },
"node_modules/json-buffer": {
"version": "3.0.1",
"resolved": "https://registry.npmjs.org/json-buffer/-/json-buffer-3.0.1.tgz",
@@ -839,24 +695,20 @@
"url": "https://github.com/sponsors/sindresorhus"
}
},
- "node_modules/lodash.merge": {
- "version": "4.6.2",
- "resolved": "https://registry.npmjs.org/lodash.merge/-/lodash.merge-4.6.2.tgz",
- "integrity": "sha512-0KpjqXRVvrYyCsX1swR/XTK0va6VQkQM6MNo7PqW77ByjAhoARA8EfrP1N4+KlKj8YS0ZUCtRT/YUuhyYDujIQ==",
- "dev": true,
- "license": "MIT"
- },
"node_modules/minimatch": {
- "version": "3.1.5",
- "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.1.5.tgz",
- "integrity": "sha512-VgjWUsnnT6n+NUk6eZq77zeFdpW2LWDzP6zFGrCbHXiYNul5Dzqk2HHQ5uFH2DNW5Xbp8+jVzaeNt94ssEEl4w==",
+ "version": "10.2.5",
+ "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-10.2.5.tgz",
+ "integrity": "sha512-MULkVLfKGYDFYejP07QOurDLLQpcjk7Fw+7jXS2R2czRQzR56yHRveU5NDJEOviH+hETZKSkIk5c+T23GjFUMg==",
"dev": true,
- "license": "ISC",
+ "license": "BlueOak-1.0.0",
"dependencies": {
- "brace-expansion": "^1.1.7"
+ "brace-expansion": "^5.0.5"
},
"engines": {
- "node": "*"
+ "node": "18 || 20 || >=22"
+ },
+ "funding": {
+ "url": "https://github.com/sponsors/isaacs"
}
},
"node_modules/ms": {
@@ -873,16 +725,6 @@
"dev": true,
"license": "MIT"
},
- "node_modules/once": {
- "version": "1.4.0",
- "resolved": "https://registry.npmjs.org/once/-/once-1.4.0.tgz",
- "integrity": "sha512-lNaJgI+2Q5URQBkccEKHTQOPaXdUxnZZElQTZY0MFUAuaEqe1E+Nyvgdz/aIyNi6Z9MzO5dv1H8n58/GELp3+w==",
- "dev": true,
- "license": "ISC",
- "dependencies": {
- "wrappy": "1"
- }
- },
"node_modules/optionator": {
"version": "0.9.4",
"resolved": "https://registry.npmjs.org/optionator/-/optionator-0.9.4.tgz",
@@ -933,19 +775,6 @@
"url": "https://github.com/sponsors/sindresorhus"
}
},
- "node_modules/parent-module": {
- "version": "1.0.1",
- "resolved": "https://registry.npmjs.org/parent-module/-/parent-module-1.0.1.tgz",
- "integrity": "sha512-GQ2EWRpQV8/o+Aw8YqtfZZPfNRWZYkbidE9k5rpl/hC3vtHHBfGm2Ifi6qWV+coDGkrUKZAxE3Lot5kcsRlh+g==",
- "dev": true,
- "license": "MIT",
- "dependencies": {
- "callsites": "^3.0.0"
- },
- "engines": {
- "node": ">=6"
- }
- },
"node_modules/path-exists": {
"version": "4.0.0",
"resolved": "https://registry.npmjs.org/path-exists/-/path-exists-4.0.0.tgz",
@@ -956,16 +785,6 @@
"node": ">=8"
}
},
- "node_modules/path-is-absolute": {
- "version": "1.0.1",
- "resolved": "https://registry.npmjs.org/path-is-absolute/-/path-is-absolute-1.0.1.tgz",
- "integrity": "sha512-AVbw3UJ2e9bq64vSaS9Am0fje1Pa8pbGqTTsmXfaIiMpnr5DlDhfJOuLj9Sf95ZPVDAUerDfEk88MPmPe7UCQg==",
- "dev": true,
- "license": "MIT",
- "engines": {
- "node": ">=0.10.0"
- }
- },
"node_modules/path-key": {
"version": "3.1.1",
"resolved": "https://registry.npmjs.org/path-key/-/path-key-3.1.1.tgz",
@@ -1012,89 +831,6 @@
"node": ">=6"
}
},
- "node_modules/queue-microtask": {
- "version": "1.2.3",
- "resolved": "https://registry.npmjs.org/queue-microtask/-/queue-microtask-1.2.3.tgz",
- "integrity": "sha512-NuaNSa6flKT5JaSYQzJok04JzTL1CA6aGhv5rfLW3PgqA+M2ChpZQnAC8h8i4ZFkBS8X5RqkDBHA7r4hej3K9A==",
- "dev": true,
- "funding": [
- {
- "type": "github",
- "url": "https://github.com/sponsors/feross"
- },
- {
- "type": "patreon",
- "url": "https://www.patreon.com/feross"
- },
- {
- "type": "consulting",
- "url": "https://feross.org/support"
- }
- ],
- "license": "MIT"
- },
- "node_modules/resolve-from": {
- "version": "4.0.0",
- "resolved": "https://registry.npmjs.org/resolve-from/-/resolve-from-4.0.0.tgz",
- "integrity": "sha512-pb/MYmXstAkysRFx8piNI1tGFNQIFA3vkE3Gq4EuA1dF6gHp/+vgZqsCGJapvy8N3Q+4o7FwvquPJcnZ7RYy4g==",
- "dev": true,
- "license": "MIT",
- "engines": {
- "node": ">=4"
- }
- },
- "node_modules/reusify": {
- "version": "1.1.0",
- "resolved": "https://registry.npmjs.org/reusify/-/reusify-1.1.0.tgz",
- "integrity": "sha512-g6QUff04oZpHs0eG5p83rFLhHeV00ug/Yf9nZM6fLeUrPguBTkTQOdpAWWspMh55TZfVQDPaN3NQJfbVRAxdIw==",
- "dev": true,
- "license": "MIT",
- "engines": {
- "iojs": ">=1.0.0",
- "node": ">=0.10.0"
- }
- },
- "node_modules/rimraf": {
- "version": "3.0.2",
- "resolved": "https://registry.npmjs.org/rimraf/-/rimraf-3.0.2.tgz",
- "integrity": "sha512-JZkJMZkAGFFPP2YqXZXPbMlMBgsxzE8ILs4lMIX/2o0L9UBw9O/Y3o6wFw/i9YLapcUJWwqbi3kdxIPdC62TIA==",
- "deprecated": "Rimraf versions prior to v4 are no longer supported",
- "dev": true,
- "license": "ISC",
- "dependencies": {
- "glob": "^7.1.3"
- },
- "bin": {
- "rimraf": "bin.js"
- },
- "funding": {
- "url": "https://github.com/sponsors/isaacs"
- }
- },
- "node_modules/run-parallel": {
- "version": "1.2.0",
- "resolved": "https://registry.npmjs.org/run-parallel/-/run-parallel-1.2.0.tgz",
- "integrity": "sha512-5l4VyZR86LZ/lDxZTR6jqL8AFE2S0IFLMP26AbjsLVADxHdhB/c0GUsH+y39UfCi3dzz8OlQuPmnaJOMoDHQBA==",
- "dev": true,
- "funding": [
- {
- "type": "github",
- "url": "https://github.com/sponsors/feross"
- },
- {
- "type": "patreon",
- "url": "https://www.patreon.com/feross"
- },
- {
- "type": "consulting",
- "url": "https://feross.org/support"
- }
- ],
- "license": "MIT",
- "dependencies": {
- "queue-microtask": "^1.2.2"
- }
- },
"node_modules/shebang-command": {
"version": "2.0.0",
"resolved": "https://registry.npmjs.org/shebang-command/-/shebang-command-2.0.0.tgz",
@@ -1118,52 +854,6 @@
"node": ">=8"
}
},
- "node_modules/strip-ansi": {
- "version": "6.0.1",
- "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-6.0.1.tgz",
- "integrity": "sha512-Y38VPSHcqkFrCpFnQ9vuSXmquuv5oXOKpGeT6aGrr3o3Gc9AlVa6JBfUSOCnbxGGZF+/0ooI7KrPuUSztUdU5A==",
- "dev": true,
- "license": "MIT",
- "dependencies": {
- "ansi-regex": "^5.0.1"
- },
- "engines": {
- "node": ">=8"
- }
- },
- "node_modules/strip-json-comments": {
- "version": "3.1.1",
- "resolved": "https://registry.npmjs.org/strip-json-comments/-/strip-json-comments-3.1.1.tgz",
- "integrity": "sha512-6fPc+R4ihwqP6N/aIv2f1gMH8lOVtWQHoqC4yK6oSDVVocumAsfCqjkXnqiYMhmMwS/mEHLp7Vehlt3ql6lEig==",
- "dev": true,
- "license": "MIT",
- "engines": {
- "node": ">=8"
- },
- "funding": {
- "url": "https://github.com/sponsors/sindresorhus"
- }
- },
- "node_modules/supports-color": {
- "version": "7.2.0",
- "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-7.2.0.tgz",
- "integrity": "sha512-qpCAvRl9stuOHveKsn7HncJRvv501qIacKzQlO/+Lwxc9+0q2wLyv4Dfvt80/DPn2pqOBsJdDiogXGR9+OvwRw==",
- "dev": true,
- "license": "MIT",
- "dependencies": {
- "has-flag": "^4.0.0"
- },
- "engines": {
- "node": ">=8"
- }
- },
- "node_modules/text-table": {
- "version": "0.2.0",
- "resolved": "https://registry.npmjs.org/text-table/-/text-table-0.2.0.tgz",
- "integrity": "sha512-N+8UisAXDGk8PFXP4HAzVR9nbfmVJ3zYLAWiTIoqC5v5isinhr+r5uaO8+7r3BMfuNIufIsA7RdpVgacC2cSpw==",
- "dev": true,
- "license": "MIT"
- },
"node_modules/type-check": {
"version": "0.4.0",
"resolved": "https://registry.npmjs.org/type-check/-/type-check-0.4.0.tgz",
@@ -1177,19 +867,6 @@
"node": ">= 0.8.0"
}
},
- "node_modules/type-fest": {
- "version": "0.20.2",
- "resolved": "https://registry.npmjs.org/type-fest/-/type-fest-0.20.2.tgz",
- "integrity": "sha512-Ne+eE4r0/iWnpAxD852z3A+N0Bt5RN//NjJwRd2VFHEmrywxf5vsZlh4R6lixl6B+wz/8d+maTSAkN1FIkI3LQ==",
- "dev": true,
- "license": "(MIT OR CC0-1.0)",
- "engines": {
- "node": ">=10"
- },
- "funding": {
- "url": "https://github.com/sponsors/sindresorhus"
- }
- },
"node_modules/uri-js": {
"version": "4.4.1",
"resolved": "https://registry.npmjs.org/uri-js/-/uri-js-4.4.1.tgz",
@@ -1226,13 +903,6 @@
"node": ">=0.10.0"
}
},
- "node_modules/wrappy": {
- "version": "1.0.2",
- "resolved": "https://registry.npmjs.org/wrappy/-/wrappy-1.0.2.tgz",
- "integrity": "sha512-l4Sp/DRseor9wL6EvV2+TuQn63dMkPjZ/sp9XkghTEbV9KlPS1xUsZ3u7/IQO4wxtcFB4bgpQPRcR3QCvezPcQ==",
- "dev": true,
- "license": "ISC"
- },
"node_modules/yocto-queue": {
"version": "0.1.0",
"resolved": "https://registry.npmjs.org/yocto-queue/-/yocto-queue-0.1.0.tgz",
diff --git a/node_modules/@eslint/eslintrc/LICENSE b/node_modules/@eslint/eslintrc/LICENSE
deleted file mode 100644
index b607bb3..0000000
--- a/node_modules/@eslint/eslintrc/LICENSE
+++ /dev/null
@@ -1,19 +0,0 @@
-Copyright OpenJS Foundation and other contributors,
-
-Permission is hereby granted, free of charge, to any person obtaining a copy
-of this software and associated documentation files (the "Software"), to deal
-in the Software without restriction, including without limitation the rights
-to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
-copies of the Software, and to permit persons to whom the Software is
-furnished to do so, subject to the following conditions:
-
-The above copyright notice and this permission notice shall be included in
-all copies or substantial portions of the Software.
-
-THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
-IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
-FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
-AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
-LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
-OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
-THE SOFTWARE.
diff --git a/node_modules/@eslint/eslintrc/README.md b/node_modules/@eslint/eslintrc/README.md
deleted file mode 100644
index 7641c74..0000000
--- a/node_modules/@eslint/eslintrc/README.md
+++ /dev/null
@@ -1,115 +0,0 @@
-# ESLintRC Library
-
-This repository contains the legacy ESLintRC configuration file format for ESLint. This package is not intended for use outside of the ESLint ecosystem. It is ESLint-specific and not intended for use in other programs.
-
-**Note:** This package is frozen except for critical bug fixes as ESLint moves to a new config system.
-
-## Installation
-
-You can install the package as follows:
-
-```
-npm install @eslint/eslintrc --save-dev
-
-# or
-
-yarn add @eslint/eslintrc -D
-```
-
-## Usage (ESM)
-
-The primary class in this package is `FlatCompat`, which is a utility to translate ESLintRC-style configs into flat configs. Here's how you use it inside of your `eslint.config.js` file:
-
-```js
-import { FlatCompat } from "@eslint/eslintrc";
-import js from "@eslint/js";
-import path from "path";
-import { fileURLToPath } from "url";
-
-// mimic CommonJS variables -- not needed if using CommonJS
-const __filename = fileURLToPath(import.meta.url);
-const __dirname = path.dirname(__filename);
-
-const compat = new FlatCompat({
- baseDirectory: __dirname, // optional; default: process.cwd()
- resolvePluginsRelativeTo: __dirname, // optional
- recommendedConfig: js.configs.recommended, // optional
- allConfig: js.configs.all, // optional
-});
-
-export default [
-
- // mimic ESLintRC-style extends
- ...compat.extends("standard", "example"),
-
- // mimic environments
- ...compat.env({
- es2020: true,
- node: true
- }),
-
- // mimic plugins
- ...compat.plugins("airbnb", "react"),
-
- // translate an entire config
- ...compat.config({
- plugins: ["airbnb", "react"],
- extends: "standard",
- env: {
- es2020: true,
- node: true
- },
- rules: {
- semi: "error"
- }
- })
-];
-```
-
-## Usage (CommonJS)
-
-Using `FlatCompat` in CommonJS files is similar to ESM, but you'll use `require()` and `module.exports` instead of `import` and `export`. Here's how you use it inside of your `eslint.config.js` CommonJS file:
-
-```js
-const { FlatCompat } = require("@eslint/eslintrc");
-const js = require("@eslint/js");
-
-const compat = new FlatCompat({
- baseDirectory: __dirname, // optional; default: process.cwd()
- resolvePluginsRelativeTo: __dirname, // optional
- recommendedConfig: js.configs.recommended, // optional
- allConfig: js.configs.all, // optional
-});
-
-module.exports = [
-
- // mimic ESLintRC-style extends
- ...compat.extends("standard", "example"),
-
- // mimic environments
- ...compat.env({
- es2020: true,
- node: true
- }),
-
- // mimic plugins
- ...compat.plugins("airbnb", "react"),
-
- // translate an entire config
- ...compat.config({
- plugins: ["airbnb", "react"],
- extends: "standard",
- env: {
- es2020: true,
- node: true
- },
- rules: {
- semi: "error"
- }
- })
-];
-```
-
-## License
-
-MIT License
diff --git a/node_modules/@eslint/eslintrc/conf/config-schema.js b/node_modules/@eslint/eslintrc/conf/config-schema.js
deleted file mode 100644
index ada90e1..0000000
--- a/node_modules/@eslint/eslintrc/conf/config-schema.js
+++ /dev/null
@@ -1,79 +0,0 @@
-/**
- * @fileoverview Defines a schema for configs.
- * @author Sylvan Mably
- */
-
-const baseConfigProperties = {
- $schema: { type: "string" },
- env: { type: "object" },
- extends: { $ref: "#/definitions/stringOrStrings" },
- globals: { type: "object" },
- overrides: {
- type: "array",
- items: { $ref: "#/definitions/overrideConfig" },
- additionalItems: false
- },
- parser: { type: ["string", "null"] },
- parserOptions: { type: "object" },
- plugins: { type: "array" },
- processor: { type: "string" },
- rules: { type: "object" },
- settings: { type: "object" },
- noInlineConfig: { type: "boolean" },
- reportUnusedDisableDirectives: { type: "boolean" },
-
- ecmaFeatures: { type: "object" } // deprecated; logs a warning when used
-};
-
-const configSchema = {
- definitions: {
- stringOrStrings: {
- oneOf: [
- { type: "string" },
- {
- type: "array",
- items: { type: "string" },
- additionalItems: false
- }
- ]
- },
- stringOrStringsRequired: {
- oneOf: [
- { type: "string" },
- {
- type: "array",
- items: { type: "string" },
- additionalItems: false,
- minItems: 1
- }
- ]
- },
-
- // Config at top-level.
- objectConfig: {
- type: "object",
- properties: {
- root: { type: "boolean" },
- ignorePatterns: { $ref: "#/definitions/stringOrStrings" },
- ...baseConfigProperties
- },
- additionalProperties: false
- },
-
- // Config in `overrides`.
- overrideConfig: {
- type: "object",
- properties: {
- excludedFiles: { $ref: "#/definitions/stringOrStrings" },
- files: { $ref: "#/definitions/stringOrStringsRequired" },
- ...baseConfigProperties
- },
- required: ["files"],
- additionalProperties: false
- }
- },
-
- $ref: "#/definitions/objectConfig"
-};
-
-export default configSchema;
diff --git a/node_modules/@eslint/eslintrc/conf/environments.js b/node_modules/@eslint/eslintrc/conf/environments.js
deleted file mode 100644
index 50d1b1d..0000000
--- a/node_modules/@eslint/eslintrc/conf/environments.js
+++ /dev/null
@@ -1,215 +0,0 @@
-/**
- * @fileoverview Defines environment settings and globals.
- * @author Elan Shanker
- */
-
-//------------------------------------------------------------------------------
-// Requirements
-//------------------------------------------------------------------------------
-
-import globals from "globals";
-
-//------------------------------------------------------------------------------
-// Helpers
-//------------------------------------------------------------------------------
-
-/**
- * Get the object that has difference.
- * @param {Record} current The newer object.
- * @param {Record} prev The older object.
- * @returns {Record} The difference object.
- */
-function getDiff(current, prev) {
- const retv = {};
-
- for (const [key, value] of Object.entries(current)) {
- if (!Object.hasOwnProperty.call(prev, key)) {
- retv[key] = value;
- }
- }
-
- return retv;
-}
-
-const newGlobals2015 = getDiff(globals.es2015, globals.es5); // 19 variables such as Promise, Map, ...
-const newGlobals2017 = {
- Atomics: false,
- SharedArrayBuffer: false
-};
-const newGlobals2020 = {
- BigInt: false,
- BigInt64Array: false,
- BigUint64Array: false,
- globalThis: false
-};
-
-const newGlobals2021 = {
- AggregateError: false,
- FinalizationRegistry: false,
- WeakRef: false
-};
-
-//------------------------------------------------------------------------------
-// Public Interface
-//------------------------------------------------------------------------------
-
-/** @type {Map} */
-export default new Map(Object.entries({
-
- // Language
- builtin: {
- globals: globals.es5
- },
- es6: {
- globals: newGlobals2015,
- parserOptions: {
- ecmaVersion: 6
- }
- },
- es2015: {
- globals: newGlobals2015,
- parserOptions: {
- ecmaVersion: 6
- }
- },
- es2016: {
- globals: newGlobals2015,
- parserOptions: {
- ecmaVersion: 7
- }
- },
- es2017: {
- globals: { ...newGlobals2015, ...newGlobals2017 },
- parserOptions: {
- ecmaVersion: 8
- }
- },
- es2018: {
- globals: { ...newGlobals2015, ...newGlobals2017 },
- parserOptions: {
- ecmaVersion: 9
- }
- },
- es2019: {
- globals: { ...newGlobals2015, ...newGlobals2017 },
- parserOptions: {
- ecmaVersion: 10
- }
- },
- es2020: {
- globals: { ...newGlobals2015, ...newGlobals2017, ...newGlobals2020 },
- parserOptions: {
- ecmaVersion: 11
- }
- },
- es2021: {
- globals: { ...newGlobals2015, ...newGlobals2017, ...newGlobals2020, ...newGlobals2021 },
- parserOptions: {
- ecmaVersion: 12
- }
- },
- es2022: {
- globals: { ...newGlobals2015, ...newGlobals2017, ...newGlobals2020, ...newGlobals2021 },
- parserOptions: {
- ecmaVersion: 13
- }
- },
- es2023: {
- globals: { ...newGlobals2015, ...newGlobals2017, ...newGlobals2020, ...newGlobals2021 },
- parserOptions: {
- ecmaVersion: 14
- }
- },
- es2024: {
- globals: { ...newGlobals2015, ...newGlobals2017, ...newGlobals2020, ...newGlobals2021 },
- parserOptions: {
- ecmaVersion: 15
- }
- },
-
- // Platforms
- browser: {
- globals: globals.browser
- },
- node: {
- globals: globals.node,
- parserOptions: {
- ecmaFeatures: {
- globalReturn: true
- }
- }
- },
- "shared-node-browser": {
- globals: globals["shared-node-browser"]
- },
- worker: {
- globals: globals.worker
- },
- serviceworker: {
- globals: globals.serviceworker
- },
-
- // Frameworks
- commonjs: {
- globals: globals.commonjs,
- parserOptions: {
- ecmaFeatures: {
- globalReturn: true
- }
- }
- },
- amd: {
- globals: globals.amd
- },
- mocha: {
- globals: globals.mocha
- },
- jasmine: {
- globals: globals.jasmine
- },
- jest: {
- globals: globals.jest
- },
- phantomjs: {
- globals: globals.phantomjs
- },
- jquery: {
- globals: globals.jquery
- },
- qunit: {
- globals: globals.qunit
- },
- prototypejs: {
- globals: globals.prototypejs
- },
- shelljs: {
- globals: globals.shelljs
- },
- meteor: {
- globals: globals.meteor
- },
- mongo: {
- globals: globals.mongo
- },
- protractor: {
- globals: globals.protractor
- },
- applescript: {
- globals: globals.applescript
- },
- nashorn: {
- globals: globals.nashorn
- },
- atomtest: {
- globals: globals.atomtest
- },
- embertest: {
- globals: globals.embertest
- },
- webextensions: {
- globals: globals.webextensions
- },
- greasemonkey: {
- globals: globals.greasemonkey
- }
-}));
diff --git a/node_modules/@eslint/eslintrc/dist/eslintrc-universal.cjs b/node_modules/@eslint/eslintrc/dist/eslintrc-universal.cjs
deleted file mode 100644
index 64e6666..0000000
--- a/node_modules/@eslint/eslintrc/dist/eslintrc-universal.cjs
+++ /dev/null
@@ -1,1104 +0,0 @@
-'use strict';
-
-Object.defineProperty(exports, '__esModule', { value: true });
-
-var util = require('util');
-var path = require('path');
-var Ajv = require('ajv');
-var globals = require('globals');
-
-function _interopDefaultLegacy (e) { return e && typeof e === 'object' && 'default' in e ? e : { 'default': e }; }
-
-var util__default = /*#__PURE__*/_interopDefaultLegacy(util);
-var path__default = /*#__PURE__*/_interopDefaultLegacy(path);
-var Ajv__default = /*#__PURE__*/_interopDefaultLegacy(Ajv);
-var globals__default = /*#__PURE__*/_interopDefaultLegacy(globals);
-
-/**
- * @fileoverview Config file operations. This file must be usable in the browser,
- * so no Node-specific code can be here.
- * @author Nicholas C. Zakas
- */
-
-//------------------------------------------------------------------------------
-// Private
-//------------------------------------------------------------------------------
-
-const RULE_SEVERITY_STRINGS = ["off", "warn", "error"],
- RULE_SEVERITY = RULE_SEVERITY_STRINGS.reduce((map, value, index) => {
- map[value] = index;
- return map;
- }, {}),
- VALID_SEVERITIES = [0, 1, 2, "off", "warn", "error"];
-
-//------------------------------------------------------------------------------
-// Public Interface
-//------------------------------------------------------------------------------
-
-/**
- * Normalizes the severity value of a rule's configuration to a number
- * @param {(number|string|[number, ...*]|[string, ...*])} ruleConfig A rule's configuration value, generally
- * received from the user. A valid config value is either 0, 1, 2, the string "off" (treated the same as 0),
- * the string "warn" (treated the same as 1), the string "error" (treated the same as 2), or an array
- * whose first element is one of the above values. Strings are matched case-insensitively.
- * @returns {(0|1|2)} The numeric severity value if the config value was valid, otherwise 0.
- */
-function getRuleSeverity(ruleConfig) {
- const severityValue = Array.isArray(ruleConfig) ? ruleConfig[0] : ruleConfig;
-
- if (severityValue === 0 || severityValue === 1 || severityValue === 2) {
- return severityValue;
- }
-
- if (typeof severityValue === "string") {
- return RULE_SEVERITY[severityValue.toLowerCase()] || 0;
- }
-
- return 0;
-}
-
-/**
- * Converts old-style severity settings (0, 1, 2) into new-style
- * severity settings (off, warn, error) for all rules. Assumption is that severity
- * values have already been validated as correct.
- * @param {Object} config The config object to normalize.
- * @returns {void}
- */
-function normalizeToStrings(config) {
-
- if (config.rules) {
- Object.keys(config.rules).forEach(ruleId => {
- const ruleConfig = config.rules[ruleId];
-
- if (typeof ruleConfig === "number") {
- config.rules[ruleId] = RULE_SEVERITY_STRINGS[ruleConfig] || RULE_SEVERITY_STRINGS[0];
- } else if (Array.isArray(ruleConfig) && typeof ruleConfig[0] === "number") {
- ruleConfig[0] = RULE_SEVERITY_STRINGS[ruleConfig[0]] || RULE_SEVERITY_STRINGS[0];
- }
- });
- }
-}
-
-/**
- * Determines if the severity for the given rule configuration represents an error.
- * @param {int|string|Array} ruleConfig The configuration for an individual rule.
- * @returns {boolean} True if the rule represents an error, false if not.
- */
-function isErrorSeverity(ruleConfig) {
- return getRuleSeverity(ruleConfig) === 2;
-}
-
-/**
- * Checks whether a given config has valid severity or not.
- * @param {number|string|Array} ruleConfig The configuration for an individual rule.
- * @returns {boolean} `true` if the configuration has valid severity.
- */
-function isValidSeverity(ruleConfig) {
- let severity = Array.isArray(ruleConfig) ? ruleConfig[0] : ruleConfig;
-
- if (typeof severity === "string") {
- severity = severity.toLowerCase();
- }
- return VALID_SEVERITIES.indexOf(severity) !== -1;
-}
-
-/**
- * Checks whether every rule of a given config has valid severity or not.
- * @param {Object} config The configuration for rules.
- * @returns {boolean} `true` if the configuration has valid severity.
- */
-function isEverySeverityValid(config) {
- return Object.keys(config).every(ruleId => isValidSeverity(config[ruleId]));
-}
-
-/**
- * Normalizes a value for a global in a config
- * @param {(boolean|string|null)} configuredValue The value given for a global in configuration or in
- * a global directive comment
- * @returns {("readable"|"writeable"|"off")} The value normalized as a string
- * @throws Error if global value is invalid
- */
-function normalizeConfigGlobal(configuredValue) {
- switch (configuredValue) {
- case "off":
- return "off";
-
- case true:
- case "true":
- case "writeable":
- case "writable":
- return "writable";
-
- case null:
- case false:
- case "false":
- case "readable":
- case "readonly":
- return "readonly";
-
- default:
- throw new Error(`'${configuredValue}' is not a valid configuration for a global (use 'readonly', 'writable', or 'off')`);
- }
-}
-
-var ConfigOps = {
- __proto__: null,
- getRuleSeverity: getRuleSeverity,
- normalizeToStrings: normalizeToStrings,
- isErrorSeverity: isErrorSeverity,
- isValidSeverity: isValidSeverity,
- isEverySeverityValid: isEverySeverityValid,
- normalizeConfigGlobal: normalizeConfigGlobal
-};
-
-/**
- * @fileoverview Provide the function that emits deprecation warnings.
- * @author Toru Nagashima
- */
-
-//------------------------------------------------------------------------------
-// Private
-//------------------------------------------------------------------------------
-
-// Defitions for deprecation warnings.
-const deprecationWarningMessages = {
- ESLINT_LEGACY_ECMAFEATURES:
- "The 'ecmaFeatures' config file property is deprecated and has no effect.",
- ESLINT_PERSONAL_CONFIG_LOAD:
- "'~/.eslintrc.*' config files have been deprecated. " +
- "Please use a config file per project or the '--config' option.",
- ESLINT_PERSONAL_CONFIG_SUPPRESS:
- "'~/.eslintrc.*' config files have been deprecated. " +
- "Please remove it or add 'root:true' to the config files in your " +
- "projects in order to avoid loading '~/.eslintrc.*' accidentally."
-};
-
-const sourceFileErrorCache = new Set();
-
-/**
- * Emits a deprecation warning containing a given filepath. A new deprecation warning is emitted
- * for each unique file path, but repeated invocations with the same file path have no effect.
- * No warnings are emitted if the `--no-deprecation` or `--no-warnings` Node runtime flags are active.
- * @param {string} source The name of the configuration source to report the warning for.
- * @param {string} errorCode The warning message to show.
- * @returns {void}
- */
-function emitDeprecationWarning(source, errorCode) {
- const cacheKey = JSON.stringify({ source, errorCode });
-
- if (sourceFileErrorCache.has(cacheKey)) {
- return;
- }
- sourceFileErrorCache.add(cacheKey);
-
- const rel = path__default["default"].relative(process.cwd(), source);
- const message = deprecationWarningMessages[errorCode];
-
- process.emitWarning(
- `${message} (found in "${rel}")`,
- "DeprecationWarning",
- errorCode
- );
-}
-
-/**
- * @fileoverview The instance of Ajv validator.
- * @author Evgeny Poberezkin
- */
-
-//-----------------------------------------------------------------------------
-// Helpers
-//-----------------------------------------------------------------------------
-
-/*
- * Copied from ajv/lib/refs/json-schema-draft-04.json
- * The MIT License (MIT)
- * Copyright (c) 2015-2017 Evgeny Poberezkin
- */
-const metaSchema = {
- id: "http://json-schema.org/draft-04/schema#",
- $schema: "http://json-schema.org/draft-04/schema#",
- description: "Core schema meta-schema",
- definitions: {
- schemaArray: {
- type: "array",
- minItems: 1,
- items: { $ref: "#" }
- },
- positiveInteger: {
- type: "integer",
- minimum: 0
- },
- positiveIntegerDefault0: {
- allOf: [{ $ref: "#/definitions/positiveInteger" }, { default: 0 }]
- },
- simpleTypes: {
- enum: ["array", "boolean", "integer", "null", "number", "object", "string"]
- },
- stringArray: {
- type: "array",
- items: { type: "string" },
- minItems: 1,
- uniqueItems: true
- }
- },
- type: "object",
- properties: {
- id: {
- type: "string"
- },
- $schema: {
- type: "string"
- },
- title: {
- type: "string"
- },
- description: {
- type: "string"
- },
- default: { },
- multipleOf: {
- type: "number",
- minimum: 0,
- exclusiveMinimum: true
- },
- maximum: {
- type: "number"
- },
- exclusiveMaximum: {
- type: "boolean",
- default: false
- },
- minimum: {
- type: "number"
- },
- exclusiveMinimum: {
- type: "boolean",
- default: false
- },
- maxLength: { $ref: "#/definitions/positiveInteger" },
- minLength: { $ref: "#/definitions/positiveIntegerDefault0" },
- pattern: {
- type: "string",
- format: "regex"
- },
- additionalItems: {
- anyOf: [
- { type: "boolean" },
- { $ref: "#" }
- ],
- default: { }
- },
- items: {
- anyOf: [
- { $ref: "#" },
- { $ref: "#/definitions/schemaArray" }
- ],
- default: { }
- },
- maxItems: { $ref: "#/definitions/positiveInteger" },
- minItems: { $ref: "#/definitions/positiveIntegerDefault0" },
- uniqueItems: {
- type: "boolean",
- default: false
- },
- maxProperties: { $ref: "#/definitions/positiveInteger" },
- minProperties: { $ref: "#/definitions/positiveIntegerDefault0" },
- required: { $ref: "#/definitions/stringArray" },
- additionalProperties: {
- anyOf: [
- { type: "boolean" },
- { $ref: "#" }
- ],
- default: { }
- },
- definitions: {
- type: "object",
- additionalProperties: { $ref: "#" },
- default: { }
- },
- properties: {
- type: "object",
- additionalProperties: { $ref: "#" },
- default: { }
- },
- patternProperties: {
- type: "object",
- additionalProperties: { $ref: "#" },
- default: { }
- },
- dependencies: {
- type: "object",
- additionalProperties: {
- anyOf: [
- { $ref: "#" },
- { $ref: "#/definitions/stringArray" }
- ]
- }
- },
- enum: {
- type: "array",
- minItems: 1,
- uniqueItems: true
- },
- type: {
- anyOf: [
- { $ref: "#/definitions/simpleTypes" },
- {
- type: "array",
- items: { $ref: "#/definitions/simpleTypes" },
- minItems: 1,
- uniqueItems: true
- }
- ]
- },
- format: { type: "string" },
- allOf: { $ref: "#/definitions/schemaArray" },
- anyOf: { $ref: "#/definitions/schemaArray" },
- oneOf: { $ref: "#/definitions/schemaArray" },
- not: { $ref: "#" }
- },
- dependencies: {
- exclusiveMaximum: ["maximum"],
- exclusiveMinimum: ["minimum"]
- },
- default: { }
-};
-
-//------------------------------------------------------------------------------
-// Public Interface
-//------------------------------------------------------------------------------
-
-var ajvOrig = (additionalOptions = {}) => {
- const ajv = new Ajv__default["default"]({
- meta: false,
- useDefaults: true,
- validateSchema: false,
- missingRefs: "ignore",
- verbose: true,
- schemaId: "auto",
- ...additionalOptions
- });
-
- ajv.addMetaSchema(metaSchema);
- // eslint-disable-next-line no-underscore-dangle
- ajv._opts.defaultMeta = metaSchema.id;
-
- return ajv;
-};
-
-/**
- * @fileoverview Defines a schema for configs.
- * @author Sylvan Mably
- */
-
-const baseConfigProperties = {
- $schema: { type: "string" },
- env: { type: "object" },
- extends: { $ref: "#/definitions/stringOrStrings" },
- globals: { type: "object" },
- overrides: {
- type: "array",
- items: { $ref: "#/definitions/overrideConfig" },
- additionalItems: false
- },
- parser: { type: ["string", "null"] },
- parserOptions: { type: "object" },
- plugins: { type: "array" },
- processor: { type: "string" },
- rules: { type: "object" },
- settings: { type: "object" },
- noInlineConfig: { type: "boolean" },
- reportUnusedDisableDirectives: { type: "boolean" },
-
- ecmaFeatures: { type: "object" } // deprecated; logs a warning when used
-};
-
-const configSchema = {
- definitions: {
- stringOrStrings: {
- oneOf: [
- { type: "string" },
- {
- type: "array",
- items: { type: "string" },
- additionalItems: false
- }
- ]
- },
- stringOrStringsRequired: {
- oneOf: [
- { type: "string" },
- {
- type: "array",
- items: { type: "string" },
- additionalItems: false,
- minItems: 1
- }
- ]
- },
-
- // Config at top-level.
- objectConfig: {
- type: "object",
- properties: {
- root: { type: "boolean" },
- ignorePatterns: { $ref: "#/definitions/stringOrStrings" },
- ...baseConfigProperties
- },
- additionalProperties: false
- },
-
- // Config in `overrides`.
- overrideConfig: {
- type: "object",
- properties: {
- excludedFiles: { $ref: "#/definitions/stringOrStrings" },
- files: { $ref: "#/definitions/stringOrStringsRequired" },
- ...baseConfigProperties
- },
- required: ["files"],
- additionalProperties: false
- }
- },
-
- $ref: "#/definitions/objectConfig"
-};
-
-/**
- * @fileoverview Defines environment settings and globals.
- * @author Elan Shanker
- */
-
-//------------------------------------------------------------------------------
-// Helpers
-//------------------------------------------------------------------------------
-
-/**
- * Get the object that has difference.
- * @param {Record} current The newer object.
- * @param {Record} prev The older object.
- * @returns {Record} The difference object.
- */
-function getDiff(current, prev) {
- const retv = {};
-
- for (const [key, value] of Object.entries(current)) {
- if (!Object.hasOwnProperty.call(prev, key)) {
- retv[key] = value;
- }
- }
-
- return retv;
-}
-
-const newGlobals2015 = getDiff(globals__default["default"].es2015, globals__default["default"].es5); // 19 variables such as Promise, Map, ...
-const newGlobals2017 = {
- Atomics: false,
- SharedArrayBuffer: false
-};
-const newGlobals2020 = {
- BigInt: false,
- BigInt64Array: false,
- BigUint64Array: false,
- globalThis: false
-};
-
-const newGlobals2021 = {
- AggregateError: false,
- FinalizationRegistry: false,
- WeakRef: false
-};
-
-//------------------------------------------------------------------------------
-// Public Interface
-//------------------------------------------------------------------------------
-
-/** @type {Map} */
-var environments = new Map(Object.entries({
-
- // Language
- builtin: {
- globals: globals__default["default"].es5
- },
- es6: {
- globals: newGlobals2015,
- parserOptions: {
- ecmaVersion: 6
- }
- },
- es2015: {
- globals: newGlobals2015,
- parserOptions: {
- ecmaVersion: 6
- }
- },
- es2016: {
- globals: newGlobals2015,
- parserOptions: {
- ecmaVersion: 7
- }
- },
- es2017: {
- globals: { ...newGlobals2015, ...newGlobals2017 },
- parserOptions: {
- ecmaVersion: 8
- }
- },
- es2018: {
- globals: { ...newGlobals2015, ...newGlobals2017 },
- parserOptions: {
- ecmaVersion: 9
- }
- },
- es2019: {
- globals: { ...newGlobals2015, ...newGlobals2017 },
- parserOptions: {
- ecmaVersion: 10
- }
- },
- es2020: {
- globals: { ...newGlobals2015, ...newGlobals2017, ...newGlobals2020 },
- parserOptions: {
- ecmaVersion: 11
- }
- },
- es2021: {
- globals: { ...newGlobals2015, ...newGlobals2017, ...newGlobals2020, ...newGlobals2021 },
- parserOptions: {
- ecmaVersion: 12
- }
- },
- es2022: {
- globals: { ...newGlobals2015, ...newGlobals2017, ...newGlobals2020, ...newGlobals2021 },
- parserOptions: {
- ecmaVersion: 13
- }
- },
- es2023: {
- globals: { ...newGlobals2015, ...newGlobals2017, ...newGlobals2020, ...newGlobals2021 },
- parserOptions: {
- ecmaVersion: 14
- }
- },
- es2024: {
- globals: { ...newGlobals2015, ...newGlobals2017, ...newGlobals2020, ...newGlobals2021 },
- parserOptions: {
- ecmaVersion: 15
- }
- },
-
- // Platforms
- browser: {
- globals: globals__default["default"].browser
- },
- node: {
- globals: globals__default["default"].node,
- parserOptions: {
- ecmaFeatures: {
- globalReturn: true
- }
- }
- },
- "shared-node-browser": {
- globals: globals__default["default"]["shared-node-browser"]
- },
- worker: {
- globals: globals__default["default"].worker
- },
- serviceworker: {
- globals: globals__default["default"].serviceworker
- },
-
- // Frameworks
- commonjs: {
- globals: globals__default["default"].commonjs,
- parserOptions: {
- ecmaFeatures: {
- globalReturn: true
- }
- }
- },
- amd: {
- globals: globals__default["default"].amd
- },
- mocha: {
- globals: globals__default["default"].mocha
- },
- jasmine: {
- globals: globals__default["default"].jasmine
- },
- jest: {
- globals: globals__default["default"].jest
- },
- phantomjs: {
- globals: globals__default["default"].phantomjs
- },
- jquery: {
- globals: globals__default["default"].jquery
- },
- qunit: {
- globals: globals__default["default"].qunit
- },
- prototypejs: {
- globals: globals__default["default"].prototypejs
- },
- shelljs: {
- globals: globals__default["default"].shelljs
- },
- meteor: {
- globals: globals__default["default"].meteor
- },
- mongo: {
- globals: globals__default["default"].mongo
- },
- protractor: {
- globals: globals__default["default"].protractor
- },
- applescript: {
- globals: globals__default["default"].applescript
- },
- nashorn: {
- globals: globals__default["default"].nashorn
- },
- atomtest: {
- globals: globals__default["default"].atomtest
- },
- embertest: {
- globals: globals__default["default"].embertest
- },
- webextensions: {
- globals: globals__default["default"].webextensions
- },
- greasemonkey: {
- globals: globals__default["default"].greasemonkey
- }
-}));
-
-/**
- * @fileoverview Validates configs.
- * @author Brandon Mills
- */
-
-const ajv = ajvOrig();
-
-const ruleValidators = new WeakMap();
-const noop = Function.prototype;
-
-//------------------------------------------------------------------------------
-// Private
-//------------------------------------------------------------------------------
-let validateSchema;
-const severityMap = {
- error: 2,
- warn: 1,
- off: 0
-};
-
-const validated = new WeakSet();
-
-//-----------------------------------------------------------------------------
-// Exports
-//-----------------------------------------------------------------------------
-
-class ConfigValidator {
- constructor({ builtInRules = new Map() } = {}) {
- this.builtInRules = builtInRules;
- }
-
- /**
- * Gets a complete options schema for a rule.
- * @param {{create: Function, schema: (Array|null)}} rule A new-style rule object
- * @returns {Object} JSON Schema for the rule's options.
- */
- getRuleOptionsSchema(rule) {
- if (!rule) {
- return null;
- }
-
- const schema = rule.schema || rule.meta && rule.meta.schema;
-
- // Given a tuple of schemas, insert warning level at the beginning
- if (Array.isArray(schema)) {
- if (schema.length) {
- return {
- type: "array",
- items: schema,
- minItems: 0,
- maxItems: schema.length
- };
- }
- return {
- type: "array",
- minItems: 0,
- maxItems: 0
- };
-
- }
-
- // Given a full schema, leave it alone
- return schema || null;
- }
-
- /**
- * Validates a rule's severity and returns the severity value. Throws an error if the severity is invalid.
- * @param {options} options The given options for the rule.
- * @returns {number|string} The rule's severity value
- */
- validateRuleSeverity(options) {
- const severity = Array.isArray(options) ? options[0] : options;
- const normSeverity = typeof severity === "string" ? severityMap[severity.toLowerCase()] : severity;
-
- if (normSeverity === 0 || normSeverity === 1 || normSeverity === 2) {
- return normSeverity;
- }
-
- throw new Error(`\tSeverity should be one of the following: 0 = off, 1 = warn, 2 = error (you passed '${util__default["default"].inspect(severity).replace(/'/gu, "\"").replace(/\n/gu, "")}').\n`);
-
- }
-
- /**
- * Validates the non-severity options passed to a rule, based on its schema.
- * @param {{create: Function}} rule The rule to validate
- * @param {Array} localOptions The options for the rule, excluding severity
- * @returns {void}
- */
- validateRuleSchema(rule, localOptions) {
- if (!ruleValidators.has(rule)) {
- const schema = this.getRuleOptionsSchema(rule);
-
- if (schema) {
- ruleValidators.set(rule, ajv.compile(schema));
- }
- }
-
- const validateRule = ruleValidators.get(rule);
-
- if (validateRule) {
- validateRule(localOptions);
- if (validateRule.errors) {
- throw new Error(validateRule.errors.map(
- error => `\tValue ${JSON.stringify(error.data)} ${error.message}.\n`
- ).join(""));
- }
- }
- }
-
- /**
- * Validates a rule's options against its schema.
- * @param {{create: Function}|null} rule The rule that the config is being validated for
- * @param {string} ruleId The rule's unique name.
- * @param {Array|number} options The given options for the rule.
- * @param {string|null} source The name of the configuration source to report in any errors. If null or undefined,
- * no source is prepended to the message.
- * @returns {void}
- */
- validateRuleOptions(rule, ruleId, options, source = null) {
- try {
- const severity = this.validateRuleSeverity(options);
-
- if (severity !== 0) {
- this.validateRuleSchema(rule, Array.isArray(options) ? options.slice(1) : []);
- }
- } catch (err) {
- const enhancedMessage = `Configuration for rule "${ruleId}" is invalid:\n${err.message}`;
-
- if (typeof source === "string") {
- throw new Error(`${source}:\n\t${enhancedMessage}`);
- } else {
- throw new Error(enhancedMessage);
- }
- }
- }
-
- /**
- * Validates an environment object
- * @param {Object} environment The environment config object to validate.
- * @param {string} source The name of the configuration source to report in any errors.
- * @param {function(envId:string): Object} [getAdditionalEnv] A map from strings to loaded environments.
- * @returns {void}
- */
- validateEnvironment(
- environment,
- source,
- getAdditionalEnv = noop
- ) {
-
- // not having an environment is ok
- if (!environment) {
- return;
- }
-
- Object.keys(environment).forEach(id => {
- const env = getAdditionalEnv(id) || environments.get(id) || null;
-
- if (!env) {
- const message = `${source}:\n\tEnvironment key "${id}" is unknown\n`;
-
- throw new Error(message);
- }
- });
- }
-
- /**
- * Validates a rules config object
- * @param {Object} rulesConfig The rules config object to validate.
- * @param {string} source The name of the configuration source to report in any errors.
- * @param {function(ruleId:string): Object} getAdditionalRule A map from strings to loaded rules
- * @returns {void}
- */
- validateRules(
- rulesConfig,
- source,
- getAdditionalRule = noop
- ) {
- if (!rulesConfig) {
- return;
- }
-
- Object.keys(rulesConfig).forEach(id => {
- const rule = getAdditionalRule(id) || this.builtInRules.get(id) || null;
-
- this.validateRuleOptions(rule, id, rulesConfig[id], source);
- });
- }
-
- /**
- * Validates a `globals` section of a config file
- * @param {Object} globalsConfig The `globals` section
- * @param {string|null} source The name of the configuration source to report in the event of an error.
- * @returns {void}
- */
- validateGlobals(globalsConfig, source = null) {
- if (!globalsConfig) {
- return;
- }
-
- Object.entries(globalsConfig)
- .forEach(([configuredGlobal, configuredValue]) => {
- try {
- normalizeConfigGlobal(configuredValue);
- } catch (err) {
- throw new Error(`ESLint configuration of global '${configuredGlobal}' in ${source} is invalid:\n${err.message}`);
- }
- });
- }
-
- /**
- * Validate `processor` configuration.
- * @param {string|undefined} processorName The processor name.
- * @param {string} source The name of config file.
- * @param {function(id:string): Processor} getProcessor The getter of defined processors.
- * @returns {void}
- */
- validateProcessor(processorName, source, getProcessor) {
- if (processorName && !getProcessor(processorName)) {
- throw new Error(`ESLint configuration of processor in '${source}' is invalid: '${processorName}' was not found.`);
- }
- }
-
- /**
- * Formats an array of schema validation errors.
- * @param {Array} errors An array of error messages to format.
- * @returns {string} Formatted error message
- */
- formatErrors(errors) {
- return errors.map(error => {
- if (error.keyword === "additionalProperties") {
- const formattedPropertyPath = error.dataPath.length ? `${error.dataPath.slice(1)}.${error.params.additionalProperty}` : error.params.additionalProperty;
-
- return `Unexpected top-level property "${formattedPropertyPath}"`;
- }
- if (error.keyword === "type") {
- const formattedField = error.dataPath.slice(1);
- const formattedExpectedType = Array.isArray(error.schema) ? error.schema.join("/") : error.schema;
- const formattedValue = JSON.stringify(error.data);
-
- return `Property "${formattedField}" is the wrong type (expected ${formattedExpectedType} but got \`${formattedValue}\`)`;
- }
-
- const field = error.dataPath[0] === "." ? error.dataPath.slice(1) : error.dataPath;
-
- return `"${field}" ${error.message}. Value: ${JSON.stringify(error.data)}`;
- }).map(message => `\t- ${message}.\n`).join("");
- }
-
- /**
- * Validates the top level properties of the config object.
- * @param {Object} config The config object to validate.
- * @param {string} source The name of the configuration source to report in any errors.
- * @returns {void}
- */
- validateConfigSchema(config, source = null) {
- validateSchema = validateSchema || ajv.compile(configSchema);
-
- if (!validateSchema(config)) {
- throw new Error(`ESLint configuration in ${source} is invalid:\n${this.formatErrors(validateSchema.errors)}`);
- }
-
- if (Object.hasOwnProperty.call(config, "ecmaFeatures")) {
- emitDeprecationWarning(source, "ESLINT_LEGACY_ECMAFEATURES");
- }
- }
-
- /**
- * Validates an entire config object.
- * @param {Object} config The config object to validate.
- * @param {string} source The name of the configuration source to report in any errors.
- * @param {function(ruleId:string): Object} [getAdditionalRule] A map from strings to loaded rules.
- * @param {function(envId:string): Object} [getAdditionalEnv] A map from strings to loaded envs.
- * @returns {void}
- */
- validate(config, source, getAdditionalRule, getAdditionalEnv) {
- this.validateConfigSchema(config, source);
- this.validateRules(config.rules, source, getAdditionalRule);
- this.validateEnvironment(config.env, source, getAdditionalEnv);
- this.validateGlobals(config.globals, source);
-
- for (const override of config.overrides || []) {
- this.validateRules(override.rules, source, getAdditionalRule);
- this.validateEnvironment(override.env, source, getAdditionalEnv);
- this.validateGlobals(config.globals, source);
- }
- }
-
- /**
- * Validate config array object.
- * @param {ConfigArray} configArray The config array to validate.
- * @returns {void}
- */
- validateConfigArray(configArray) {
- const getPluginEnv = Map.prototype.get.bind(configArray.pluginEnvironments);
- const getPluginProcessor = Map.prototype.get.bind(configArray.pluginProcessors);
- const getPluginRule = Map.prototype.get.bind(configArray.pluginRules);
-
- // Validate.
- for (const element of configArray) {
- if (validated.has(element)) {
- continue;
- }
- validated.add(element);
-
- this.validateEnvironment(element.env, element.name, getPluginEnv);
- this.validateGlobals(element.globals, element.name);
- this.validateProcessor(element.processor, element.name, getPluginProcessor);
- this.validateRules(element.rules, element.name, getPluginRule);
- }
- }
-
-}
-
-/**
- * @fileoverview Common helpers for naming of plugins, formatters and configs
- */
-
-const NAMESPACE_REGEX = /^@.*\//iu;
-
-/**
- * Brings package name to correct format based on prefix
- * @param {string} name The name of the package.
- * @param {string} prefix Can be either "eslint-plugin", "eslint-config" or "eslint-formatter"
- * @returns {string} Normalized name of the package
- * @private
- */
-function normalizePackageName(name, prefix) {
- let normalizedName = name;
-
- /**
- * On Windows, name can come in with Windows slashes instead of Unix slashes.
- * Normalize to Unix first to avoid errors later on.
- * https://github.com/eslint/eslint/issues/5644
- */
- if (normalizedName.includes("\\")) {
- normalizedName = normalizedName.replace(/\\/gu, "/");
- }
-
- if (normalizedName.charAt(0) === "@") {
-
- /**
- * it's a scoped package
- * package name is the prefix, or just a username
- */
- const scopedPackageShortcutRegex = new RegExp(`^(@[^/]+)(?:/(?:${prefix})?)?$`, "u"),
- scopedPackageNameRegex = new RegExp(`^${prefix}(-|$)`, "u");
-
- if (scopedPackageShortcutRegex.test(normalizedName)) {
- normalizedName = normalizedName.replace(scopedPackageShortcutRegex, `$1/${prefix}`);
- } else if (!scopedPackageNameRegex.test(normalizedName.split("/")[1])) {
-
- /**
- * for scoped packages, insert the prefix after the first / unless
- * the path is already @scope/eslint or @scope/eslint-xxx-yyy
- */
- normalizedName = normalizedName.replace(/^@([^/]+)\/(.*)$/u, `@$1/${prefix}-$2`);
- }
- } else if (!normalizedName.startsWith(`${prefix}-`)) {
- normalizedName = `${prefix}-${normalizedName}`;
- }
-
- return normalizedName;
-}
-
-/**
- * Removes the prefix from a fullname.
- * @param {string} fullname The term which may have the prefix.
- * @param {string} prefix The prefix to remove.
- * @returns {string} The term without prefix.
- */
-function getShorthandName(fullname, prefix) {
- if (fullname[0] === "@") {
- let matchResult = new RegExp(`^(@[^/]+)/${prefix}$`, "u").exec(fullname);
-
- if (matchResult) {
- return matchResult[1];
- }
-
- matchResult = new RegExp(`^(@[^/]+)/${prefix}-(.+)$`, "u").exec(fullname);
- if (matchResult) {
- return `${matchResult[1]}/${matchResult[2]}`;
- }
- } else if (fullname.startsWith(`${prefix}-`)) {
- return fullname.slice(prefix.length + 1);
- }
-
- return fullname;
-}
-
-/**
- * Gets the scope (namespace) of a term.
- * @param {string} term The term which may have the namespace.
- * @returns {string} The namespace of the term if it has one.
- */
-function getNamespaceFromTerm(term) {
- const match = term.match(NAMESPACE_REGEX);
-
- return match ? match[0] : "";
-}
-
-var naming = {
- __proto__: null,
- normalizePackageName: normalizePackageName,
- getShorthandName: getShorthandName,
- getNamespaceFromTerm: getNamespaceFromTerm
-};
-
-/**
- * @fileoverview Package exports for @eslint/eslintrc
- * @author Nicholas C. Zakas
- */
-
-//-----------------------------------------------------------------------------
-// Exports
-//-----------------------------------------------------------------------------
-
-const Legacy = {
- environments,
-
- // shared
- ConfigOps,
- ConfigValidator,
- naming
-};
-
-exports.Legacy = Legacy;
-//# sourceMappingURL=eslintrc-universal.cjs.map
diff --git a/node_modules/@eslint/eslintrc/dist/eslintrc-universal.cjs.map b/node_modules/@eslint/eslintrc/dist/eslintrc-universal.cjs.map
deleted file mode 100644
index 12895a6..0000000
--- a/node_modules/@eslint/eslintrc/dist/eslintrc-universal.cjs.map
+++ /dev/null
@@ -1 +0,0 @@
-{"version":3,"file":"eslintrc-universal.cjs","sources":["../lib/shared/config-ops.js","../lib/shared/deprecation-warnings.js","../lib/shared/ajv.js","../conf/config-schema.js","../conf/environments.js","../lib/shared/config-validator.js","../lib/shared/naming.js","../lib/index-universal.js"],"sourcesContent":["/**\n * @fileoverview Config file operations. This file must be usable in the browser,\n * so no Node-specific code can be here.\n * @author Nicholas C. Zakas\n */\n\n//------------------------------------------------------------------------------\n// Private\n//------------------------------------------------------------------------------\n\nconst RULE_SEVERITY_STRINGS = [\"off\", \"warn\", \"error\"],\n RULE_SEVERITY = RULE_SEVERITY_STRINGS.reduce((map, value, index) => {\n map[value] = index;\n return map;\n }, {}),\n VALID_SEVERITIES = [0, 1, 2, \"off\", \"warn\", \"error\"];\n\n//------------------------------------------------------------------------------\n// Public Interface\n//------------------------------------------------------------------------------\n\n/**\n * Normalizes the severity value of a rule's configuration to a number\n * @param {(number|string|[number, ...*]|[string, ...*])} ruleConfig A rule's configuration value, generally\n * received from the user. A valid config value is either 0, 1, 2, the string \"off\" (treated the same as 0),\n * the string \"warn\" (treated the same as 1), the string \"error\" (treated the same as 2), or an array\n * whose first element is one of the above values. Strings are matched case-insensitively.\n * @returns {(0|1|2)} The numeric severity value if the config value was valid, otherwise 0.\n */\nfunction getRuleSeverity(ruleConfig) {\n const severityValue = Array.isArray(ruleConfig) ? ruleConfig[0] : ruleConfig;\n\n if (severityValue === 0 || severityValue === 1 || severityValue === 2) {\n return severityValue;\n }\n\n if (typeof severityValue === \"string\") {\n return RULE_SEVERITY[severityValue.toLowerCase()] || 0;\n }\n\n return 0;\n}\n\n/**\n * Converts old-style severity settings (0, 1, 2) into new-style\n * severity settings (off, warn, error) for all rules. Assumption is that severity\n * values have already been validated as correct.\n * @param {Object} config The config object to normalize.\n * @returns {void}\n */\nfunction normalizeToStrings(config) {\n\n if (config.rules) {\n Object.keys(config.rules).forEach(ruleId => {\n const ruleConfig = config.rules[ruleId];\n\n if (typeof ruleConfig === \"number\") {\n config.rules[ruleId] = RULE_SEVERITY_STRINGS[ruleConfig] || RULE_SEVERITY_STRINGS[0];\n } else if (Array.isArray(ruleConfig) && typeof ruleConfig[0] === \"number\") {\n ruleConfig[0] = RULE_SEVERITY_STRINGS[ruleConfig[0]] || RULE_SEVERITY_STRINGS[0];\n }\n });\n }\n}\n\n/**\n * Determines if the severity for the given rule configuration represents an error.\n * @param {int|string|Array} ruleConfig The configuration for an individual rule.\n * @returns {boolean} True if the rule represents an error, false if not.\n */\nfunction isErrorSeverity(ruleConfig) {\n return getRuleSeverity(ruleConfig) === 2;\n}\n\n/**\n * Checks whether a given config has valid severity or not.\n * @param {number|string|Array} ruleConfig The configuration for an individual rule.\n * @returns {boolean} `true` if the configuration has valid severity.\n */\nfunction isValidSeverity(ruleConfig) {\n let severity = Array.isArray(ruleConfig) ? ruleConfig[0] : ruleConfig;\n\n if (typeof severity === \"string\") {\n severity = severity.toLowerCase();\n }\n return VALID_SEVERITIES.indexOf(severity) !== -1;\n}\n\n/**\n * Checks whether every rule of a given config has valid severity or not.\n * @param {Object} config The configuration for rules.\n * @returns {boolean} `true` if the configuration has valid severity.\n */\nfunction isEverySeverityValid(config) {\n return Object.keys(config).every(ruleId => isValidSeverity(config[ruleId]));\n}\n\n/**\n * Normalizes a value for a global in a config\n * @param {(boolean|string|null)} configuredValue The value given for a global in configuration or in\n * a global directive comment\n * @returns {(\"readable\"|\"writeable\"|\"off\")} The value normalized as a string\n * @throws Error if global value is invalid\n */\nfunction normalizeConfigGlobal(configuredValue) {\n switch (configuredValue) {\n case \"off\":\n return \"off\";\n\n case true:\n case \"true\":\n case \"writeable\":\n case \"writable\":\n return \"writable\";\n\n case null:\n case false:\n case \"false\":\n case \"readable\":\n case \"readonly\":\n return \"readonly\";\n\n default:\n throw new Error(`'${configuredValue}' is not a valid configuration for a global (use 'readonly', 'writable', or 'off')`);\n }\n}\n\nexport {\n getRuleSeverity,\n normalizeToStrings,\n isErrorSeverity,\n isValidSeverity,\n isEverySeverityValid,\n normalizeConfigGlobal\n};\n","/**\n * @fileoverview Provide the function that emits deprecation warnings.\n * @author Toru Nagashima \n */\n\n//------------------------------------------------------------------------------\n// Requirements\n//------------------------------------------------------------------------------\n\nimport path from \"path\";\n\n//------------------------------------------------------------------------------\n// Private\n//------------------------------------------------------------------------------\n\n// Defitions for deprecation warnings.\nconst deprecationWarningMessages = {\n ESLINT_LEGACY_ECMAFEATURES:\n \"The 'ecmaFeatures' config file property is deprecated and has no effect.\",\n ESLINT_PERSONAL_CONFIG_LOAD:\n \"'~/.eslintrc.*' config files have been deprecated. \" +\n \"Please use a config file per project or the '--config' option.\",\n ESLINT_PERSONAL_CONFIG_SUPPRESS:\n \"'~/.eslintrc.*' config files have been deprecated. \" +\n \"Please remove it or add 'root:true' to the config files in your \" +\n \"projects in order to avoid loading '~/.eslintrc.*' accidentally.\"\n};\n\nconst sourceFileErrorCache = new Set();\n\n/**\n * Emits a deprecation warning containing a given filepath. A new deprecation warning is emitted\n * for each unique file path, but repeated invocations with the same file path have no effect.\n * No warnings are emitted if the `--no-deprecation` or `--no-warnings` Node runtime flags are active.\n * @param {string} source The name of the configuration source to report the warning for.\n * @param {string} errorCode The warning message to show.\n * @returns {void}\n */\nfunction emitDeprecationWarning(source, errorCode) {\n const cacheKey = JSON.stringify({ source, errorCode });\n\n if (sourceFileErrorCache.has(cacheKey)) {\n return;\n }\n sourceFileErrorCache.add(cacheKey);\n\n const rel = path.relative(process.cwd(), source);\n const message = deprecationWarningMessages[errorCode];\n\n process.emitWarning(\n `${message} (found in \"${rel}\")`,\n \"DeprecationWarning\",\n errorCode\n );\n}\n\n//------------------------------------------------------------------------------\n// Public Interface\n//------------------------------------------------------------------------------\n\nexport {\n emitDeprecationWarning\n};\n","/**\n * @fileoverview The instance of Ajv validator.\n * @author Evgeny Poberezkin\n */\n\n//------------------------------------------------------------------------------\n// Requirements\n//------------------------------------------------------------------------------\n\nimport Ajv from \"ajv\";\n\n//-----------------------------------------------------------------------------\n// Helpers\n//-----------------------------------------------------------------------------\n\n/*\n * Copied from ajv/lib/refs/json-schema-draft-04.json\n * The MIT License (MIT)\n * Copyright (c) 2015-2017 Evgeny Poberezkin\n */\nconst metaSchema = {\n id: \"http://json-schema.org/draft-04/schema#\",\n $schema: \"http://json-schema.org/draft-04/schema#\",\n description: \"Core schema meta-schema\",\n definitions: {\n schemaArray: {\n type: \"array\",\n minItems: 1,\n items: { $ref: \"#\" }\n },\n positiveInteger: {\n type: \"integer\",\n minimum: 0\n },\n positiveIntegerDefault0: {\n allOf: [{ $ref: \"#/definitions/positiveInteger\" }, { default: 0 }]\n },\n simpleTypes: {\n enum: [\"array\", \"boolean\", \"integer\", \"null\", \"number\", \"object\", \"string\"]\n },\n stringArray: {\n type: \"array\",\n items: { type: \"string\" },\n minItems: 1,\n uniqueItems: true\n }\n },\n type: \"object\",\n properties: {\n id: {\n type: \"string\"\n },\n $schema: {\n type: \"string\"\n },\n title: {\n type: \"string\"\n },\n description: {\n type: \"string\"\n },\n default: { },\n multipleOf: {\n type: \"number\",\n minimum: 0,\n exclusiveMinimum: true\n },\n maximum: {\n type: \"number\"\n },\n exclusiveMaximum: {\n type: \"boolean\",\n default: false\n },\n minimum: {\n type: \"number\"\n },\n exclusiveMinimum: {\n type: \"boolean\",\n default: false\n },\n maxLength: { $ref: \"#/definitions/positiveInteger\" },\n minLength: { $ref: \"#/definitions/positiveIntegerDefault0\" },\n pattern: {\n type: \"string\",\n format: \"regex\"\n },\n additionalItems: {\n anyOf: [\n { type: \"boolean\" },\n { $ref: \"#\" }\n ],\n default: { }\n },\n items: {\n anyOf: [\n { $ref: \"#\" },\n { $ref: \"#/definitions/schemaArray\" }\n ],\n default: { }\n },\n maxItems: { $ref: \"#/definitions/positiveInteger\" },\n minItems: { $ref: \"#/definitions/positiveIntegerDefault0\" },\n uniqueItems: {\n type: \"boolean\",\n default: false\n },\n maxProperties: { $ref: \"#/definitions/positiveInteger\" },\n minProperties: { $ref: \"#/definitions/positiveIntegerDefault0\" },\n required: { $ref: \"#/definitions/stringArray\" },\n additionalProperties: {\n anyOf: [\n { type: \"boolean\" },\n { $ref: \"#\" }\n ],\n default: { }\n },\n definitions: {\n type: \"object\",\n additionalProperties: { $ref: \"#\" },\n default: { }\n },\n properties: {\n type: \"object\",\n additionalProperties: { $ref: \"#\" },\n default: { }\n },\n patternProperties: {\n type: \"object\",\n additionalProperties: { $ref: \"#\" },\n default: { }\n },\n dependencies: {\n type: \"object\",\n additionalProperties: {\n anyOf: [\n { $ref: \"#\" },\n { $ref: \"#/definitions/stringArray\" }\n ]\n }\n },\n enum: {\n type: \"array\",\n minItems: 1,\n uniqueItems: true\n },\n type: {\n anyOf: [\n { $ref: \"#/definitions/simpleTypes\" },\n {\n type: \"array\",\n items: { $ref: \"#/definitions/simpleTypes\" },\n minItems: 1,\n uniqueItems: true\n }\n ]\n },\n format: { type: \"string\" },\n allOf: { $ref: \"#/definitions/schemaArray\" },\n anyOf: { $ref: \"#/definitions/schemaArray\" },\n oneOf: { $ref: \"#/definitions/schemaArray\" },\n not: { $ref: \"#\" }\n },\n dependencies: {\n exclusiveMaximum: [\"maximum\"],\n exclusiveMinimum: [\"minimum\"]\n },\n default: { }\n};\n\n//------------------------------------------------------------------------------\n// Public Interface\n//------------------------------------------------------------------------------\n\nexport default (additionalOptions = {}) => {\n const ajv = new Ajv({\n meta: false,\n useDefaults: true,\n validateSchema: false,\n missingRefs: \"ignore\",\n verbose: true,\n schemaId: \"auto\",\n ...additionalOptions\n });\n\n ajv.addMetaSchema(metaSchema);\n // eslint-disable-next-line no-underscore-dangle\n ajv._opts.defaultMeta = metaSchema.id;\n\n return ajv;\n};\n","/**\n * @fileoverview Defines a schema for configs.\n * @author Sylvan Mably\n */\n\nconst baseConfigProperties = {\n $schema: { type: \"string\" },\n env: { type: \"object\" },\n extends: { $ref: \"#/definitions/stringOrStrings\" },\n globals: { type: \"object\" },\n overrides: {\n type: \"array\",\n items: { $ref: \"#/definitions/overrideConfig\" },\n additionalItems: false\n },\n parser: { type: [\"string\", \"null\"] },\n parserOptions: { type: \"object\" },\n plugins: { type: \"array\" },\n processor: { type: \"string\" },\n rules: { type: \"object\" },\n settings: { type: \"object\" },\n noInlineConfig: { type: \"boolean\" },\n reportUnusedDisableDirectives: { type: \"boolean\" },\n\n ecmaFeatures: { type: \"object\" } // deprecated; logs a warning when used\n};\n\nconst configSchema = {\n definitions: {\n stringOrStrings: {\n oneOf: [\n { type: \"string\" },\n {\n type: \"array\",\n items: { type: \"string\" },\n additionalItems: false\n }\n ]\n },\n stringOrStringsRequired: {\n oneOf: [\n { type: \"string\" },\n {\n type: \"array\",\n items: { type: \"string\" },\n additionalItems: false,\n minItems: 1\n }\n ]\n },\n\n // Config at top-level.\n objectConfig: {\n type: \"object\",\n properties: {\n root: { type: \"boolean\" },\n ignorePatterns: { $ref: \"#/definitions/stringOrStrings\" },\n ...baseConfigProperties\n },\n additionalProperties: false\n },\n\n // Config in `overrides`.\n overrideConfig: {\n type: \"object\",\n properties: {\n excludedFiles: { $ref: \"#/definitions/stringOrStrings\" },\n files: { $ref: \"#/definitions/stringOrStringsRequired\" },\n ...baseConfigProperties\n },\n required: [\"files\"],\n additionalProperties: false\n }\n },\n\n $ref: \"#/definitions/objectConfig\"\n};\n\nexport default configSchema;\n","/**\n * @fileoverview Defines environment settings and globals.\n * @author Elan Shanker\n */\n\n//------------------------------------------------------------------------------\n// Requirements\n//------------------------------------------------------------------------------\n\nimport globals from \"globals\";\n\n//------------------------------------------------------------------------------\n// Helpers\n//------------------------------------------------------------------------------\n\n/**\n * Get the object that has difference.\n * @param {Record} current The newer object.\n * @param {Record} prev The older object.\n * @returns {Record} The difference object.\n */\nfunction getDiff(current, prev) {\n const retv = {};\n\n for (const [key, value] of Object.entries(current)) {\n if (!Object.hasOwnProperty.call(prev, key)) {\n retv[key] = value;\n }\n }\n\n return retv;\n}\n\nconst newGlobals2015 = getDiff(globals.es2015, globals.es5); // 19 variables such as Promise, Map, ...\nconst newGlobals2017 = {\n Atomics: false,\n SharedArrayBuffer: false\n};\nconst newGlobals2020 = {\n BigInt: false,\n BigInt64Array: false,\n BigUint64Array: false,\n globalThis: false\n};\n\nconst newGlobals2021 = {\n AggregateError: false,\n FinalizationRegistry: false,\n WeakRef: false\n};\n\n//------------------------------------------------------------------------------\n// Public Interface\n//------------------------------------------------------------------------------\n\n/** @type {Map} */\nexport default new Map(Object.entries({\n\n // Language\n builtin: {\n globals: globals.es5\n },\n es6: {\n globals: newGlobals2015,\n parserOptions: {\n ecmaVersion: 6\n }\n },\n es2015: {\n globals: newGlobals2015,\n parserOptions: {\n ecmaVersion: 6\n }\n },\n es2016: {\n globals: newGlobals2015,\n parserOptions: {\n ecmaVersion: 7\n }\n },\n es2017: {\n globals: { ...newGlobals2015, ...newGlobals2017 },\n parserOptions: {\n ecmaVersion: 8\n }\n },\n es2018: {\n globals: { ...newGlobals2015, ...newGlobals2017 },\n parserOptions: {\n ecmaVersion: 9\n }\n },\n es2019: {\n globals: { ...newGlobals2015, ...newGlobals2017 },\n parserOptions: {\n ecmaVersion: 10\n }\n },\n es2020: {\n globals: { ...newGlobals2015, ...newGlobals2017, ...newGlobals2020 },\n parserOptions: {\n ecmaVersion: 11\n }\n },\n es2021: {\n globals: { ...newGlobals2015, ...newGlobals2017, ...newGlobals2020, ...newGlobals2021 },\n parserOptions: {\n ecmaVersion: 12\n }\n },\n es2022: {\n globals: { ...newGlobals2015, ...newGlobals2017, ...newGlobals2020, ...newGlobals2021 },\n parserOptions: {\n ecmaVersion: 13\n }\n },\n es2023: {\n globals: { ...newGlobals2015, ...newGlobals2017, ...newGlobals2020, ...newGlobals2021 },\n parserOptions: {\n ecmaVersion: 14\n }\n },\n es2024: {\n globals: { ...newGlobals2015, ...newGlobals2017, ...newGlobals2020, ...newGlobals2021 },\n parserOptions: {\n ecmaVersion: 15\n }\n },\n\n // Platforms\n browser: {\n globals: globals.browser\n },\n node: {\n globals: globals.node,\n parserOptions: {\n ecmaFeatures: {\n globalReturn: true\n }\n }\n },\n \"shared-node-browser\": {\n globals: globals[\"shared-node-browser\"]\n },\n worker: {\n globals: globals.worker\n },\n serviceworker: {\n globals: globals.serviceworker\n },\n\n // Frameworks\n commonjs: {\n globals: globals.commonjs,\n parserOptions: {\n ecmaFeatures: {\n globalReturn: true\n }\n }\n },\n amd: {\n globals: globals.amd\n },\n mocha: {\n globals: globals.mocha\n },\n jasmine: {\n globals: globals.jasmine\n },\n jest: {\n globals: globals.jest\n },\n phantomjs: {\n globals: globals.phantomjs\n },\n jquery: {\n globals: globals.jquery\n },\n qunit: {\n globals: globals.qunit\n },\n prototypejs: {\n globals: globals.prototypejs\n },\n shelljs: {\n globals: globals.shelljs\n },\n meteor: {\n globals: globals.meteor\n },\n mongo: {\n globals: globals.mongo\n },\n protractor: {\n globals: globals.protractor\n },\n applescript: {\n globals: globals.applescript\n },\n nashorn: {\n globals: globals.nashorn\n },\n atomtest: {\n globals: globals.atomtest\n },\n embertest: {\n globals: globals.embertest\n },\n webextensions: {\n globals: globals.webextensions\n },\n greasemonkey: {\n globals: globals.greasemonkey\n }\n}));\n","/**\n * @fileoverview Validates configs.\n * @author Brandon Mills\n */\n\n/* eslint class-methods-use-this: \"off\" */\n\n//------------------------------------------------------------------------------\n// Requirements\n//------------------------------------------------------------------------------\n\nimport util from \"util\";\nimport * as ConfigOps from \"./config-ops.js\";\nimport { emitDeprecationWarning } from \"./deprecation-warnings.js\";\nimport ajvOrig from \"./ajv.js\";\nimport configSchema from \"../../conf/config-schema.js\";\nimport BuiltInEnvironments from \"../../conf/environments.js\";\n\nconst ajv = ajvOrig();\n\nconst ruleValidators = new WeakMap();\nconst noop = Function.prototype;\n\n//------------------------------------------------------------------------------\n// Private\n//------------------------------------------------------------------------------\nlet validateSchema;\nconst severityMap = {\n error: 2,\n warn: 1,\n off: 0\n};\n\nconst validated = new WeakSet();\n\n//-----------------------------------------------------------------------------\n// Exports\n//-----------------------------------------------------------------------------\n\nexport default class ConfigValidator {\n constructor({ builtInRules = new Map() } = {}) {\n this.builtInRules = builtInRules;\n }\n\n /**\n * Gets a complete options schema for a rule.\n * @param {{create: Function, schema: (Array|null)}} rule A new-style rule object\n * @returns {Object} JSON Schema for the rule's options.\n */\n getRuleOptionsSchema(rule) {\n if (!rule) {\n return null;\n }\n\n const schema = rule.schema || rule.meta && rule.meta.schema;\n\n // Given a tuple of schemas, insert warning level at the beginning\n if (Array.isArray(schema)) {\n if (schema.length) {\n return {\n type: \"array\",\n items: schema,\n minItems: 0,\n maxItems: schema.length\n };\n }\n return {\n type: \"array\",\n minItems: 0,\n maxItems: 0\n };\n\n }\n\n // Given a full schema, leave it alone\n return schema || null;\n }\n\n /**\n * Validates a rule's severity and returns the severity value. Throws an error if the severity is invalid.\n * @param {options} options The given options for the rule.\n * @returns {number|string} The rule's severity value\n */\n validateRuleSeverity(options) {\n const severity = Array.isArray(options) ? options[0] : options;\n const normSeverity = typeof severity === \"string\" ? severityMap[severity.toLowerCase()] : severity;\n\n if (normSeverity === 0 || normSeverity === 1 || normSeverity === 2) {\n return normSeverity;\n }\n\n throw new Error(`\\tSeverity should be one of the following: 0 = off, 1 = warn, 2 = error (you passed '${util.inspect(severity).replace(/'/gu, \"\\\"\").replace(/\\n/gu, \"\")}').\\n`);\n\n }\n\n /**\n * Validates the non-severity options passed to a rule, based on its schema.\n * @param {{create: Function}} rule The rule to validate\n * @param {Array} localOptions The options for the rule, excluding severity\n * @returns {void}\n */\n validateRuleSchema(rule, localOptions) {\n if (!ruleValidators.has(rule)) {\n const schema = this.getRuleOptionsSchema(rule);\n\n if (schema) {\n ruleValidators.set(rule, ajv.compile(schema));\n }\n }\n\n const validateRule = ruleValidators.get(rule);\n\n if (validateRule) {\n validateRule(localOptions);\n if (validateRule.errors) {\n throw new Error(validateRule.errors.map(\n error => `\\tValue ${JSON.stringify(error.data)} ${error.message}.\\n`\n ).join(\"\"));\n }\n }\n }\n\n /**\n * Validates a rule's options against its schema.\n * @param {{create: Function}|null} rule The rule that the config is being validated for\n * @param {string} ruleId The rule's unique name.\n * @param {Array|number} options The given options for the rule.\n * @param {string|null} source The name of the configuration source to report in any errors. If null or undefined,\n * no source is prepended to the message.\n * @returns {void}\n */\n validateRuleOptions(rule, ruleId, options, source = null) {\n try {\n const severity = this.validateRuleSeverity(options);\n\n if (severity !== 0) {\n this.validateRuleSchema(rule, Array.isArray(options) ? options.slice(1) : []);\n }\n } catch (err) {\n const enhancedMessage = `Configuration for rule \"${ruleId}\" is invalid:\\n${err.message}`;\n\n if (typeof source === \"string\") {\n throw new Error(`${source}:\\n\\t${enhancedMessage}`);\n } else {\n throw new Error(enhancedMessage);\n }\n }\n }\n\n /**\n * Validates an environment object\n * @param {Object} environment The environment config object to validate.\n * @param {string} source The name of the configuration source to report in any errors.\n * @param {function(envId:string): Object} [getAdditionalEnv] A map from strings to loaded environments.\n * @returns {void}\n */\n validateEnvironment(\n environment,\n source,\n getAdditionalEnv = noop\n ) {\n\n // not having an environment is ok\n if (!environment) {\n return;\n }\n\n Object.keys(environment).forEach(id => {\n const env = getAdditionalEnv(id) || BuiltInEnvironments.get(id) || null;\n\n if (!env) {\n const message = `${source}:\\n\\tEnvironment key \"${id}\" is unknown\\n`;\n\n throw new Error(message);\n }\n });\n }\n\n /**\n * Validates a rules config object\n * @param {Object} rulesConfig The rules config object to validate.\n * @param {string} source The name of the configuration source to report in any errors.\n * @param {function(ruleId:string): Object} getAdditionalRule A map from strings to loaded rules\n * @returns {void}\n */\n validateRules(\n rulesConfig,\n source,\n getAdditionalRule = noop\n ) {\n if (!rulesConfig) {\n return;\n }\n\n Object.keys(rulesConfig).forEach(id => {\n const rule = getAdditionalRule(id) || this.builtInRules.get(id) || null;\n\n this.validateRuleOptions(rule, id, rulesConfig[id], source);\n });\n }\n\n /**\n * Validates a `globals` section of a config file\n * @param {Object} globalsConfig The `globals` section\n * @param {string|null} source The name of the configuration source to report in the event of an error.\n * @returns {void}\n */\n validateGlobals(globalsConfig, source = null) {\n if (!globalsConfig) {\n return;\n }\n\n Object.entries(globalsConfig)\n .forEach(([configuredGlobal, configuredValue]) => {\n try {\n ConfigOps.normalizeConfigGlobal(configuredValue);\n } catch (err) {\n throw new Error(`ESLint configuration of global '${configuredGlobal}' in ${source} is invalid:\\n${err.message}`);\n }\n });\n }\n\n /**\n * Validate `processor` configuration.\n * @param {string|undefined} processorName The processor name.\n * @param {string} source The name of config file.\n * @param {function(id:string): Processor} getProcessor The getter of defined processors.\n * @returns {void}\n */\n validateProcessor(processorName, source, getProcessor) {\n if (processorName && !getProcessor(processorName)) {\n throw new Error(`ESLint configuration of processor in '${source}' is invalid: '${processorName}' was not found.`);\n }\n }\n\n /**\n * Formats an array of schema validation errors.\n * @param {Array} errors An array of error messages to format.\n * @returns {string} Formatted error message\n */\n formatErrors(errors) {\n return errors.map(error => {\n if (error.keyword === \"additionalProperties\") {\n const formattedPropertyPath = error.dataPath.length ? `${error.dataPath.slice(1)}.${error.params.additionalProperty}` : error.params.additionalProperty;\n\n return `Unexpected top-level property \"${formattedPropertyPath}\"`;\n }\n if (error.keyword === \"type\") {\n const formattedField = error.dataPath.slice(1);\n const formattedExpectedType = Array.isArray(error.schema) ? error.schema.join(\"/\") : error.schema;\n const formattedValue = JSON.stringify(error.data);\n\n return `Property \"${formattedField}\" is the wrong type (expected ${formattedExpectedType} but got \\`${formattedValue}\\`)`;\n }\n\n const field = error.dataPath[0] === \".\" ? error.dataPath.slice(1) : error.dataPath;\n\n return `\"${field}\" ${error.message}. Value: ${JSON.stringify(error.data)}`;\n }).map(message => `\\t- ${message}.\\n`).join(\"\");\n }\n\n /**\n * Validates the top level properties of the config object.\n * @param {Object} config The config object to validate.\n * @param {string} source The name of the configuration source to report in any errors.\n * @returns {void}\n */\n validateConfigSchema(config, source = null) {\n validateSchema = validateSchema || ajv.compile(configSchema);\n\n if (!validateSchema(config)) {\n throw new Error(`ESLint configuration in ${source} is invalid:\\n${this.formatErrors(validateSchema.errors)}`);\n }\n\n if (Object.hasOwnProperty.call(config, \"ecmaFeatures\")) {\n emitDeprecationWarning(source, \"ESLINT_LEGACY_ECMAFEATURES\");\n }\n }\n\n /**\n * Validates an entire config object.\n * @param {Object} config The config object to validate.\n * @param {string} source The name of the configuration source to report in any errors.\n * @param {function(ruleId:string): Object} [getAdditionalRule] A map from strings to loaded rules.\n * @param {function(envId:string): Object} [getAdditionalEnv] A map from strings to loaded envs.\n * @returns {void}\n */\n validate(config, source, getAdditionalRule, getAdditionalEnv) {\n this.validateConfigSchema(config, source);\n this.validateRules(config.rules, source, getAdditionalRule);\n this.validateEnvironment(config.env, source, getAdditionalEnv);\n this.validateGlobals(config.globals, source);\n\n for (const override of config.overrides || []) {\n this.validateRules(override.rules, source, getAdditionalRule);\n this.validateEnvironment(override.env, source, getAdditionalEnv);\n this.validateGlobals(config.globals, source);\n }\n }\n\n /**\n * Validate config array object.\n * @param {ConfigArray} configArray The config array to validate.\n * @returns {void}\n */\n validateConfigArray(configArray) {\n const getPluginEnv = Map.prototype.get.bind(configArray.pluginEnvironments);\n const getPluginProcessor = Map.prototype.get.bind(configArray.pluginProcessors);\n const getPluginRule = Map.prototype.get.bind(configArray.pluginRules);\n\n // Validate.\n for (const element of configArray) {\n if (validated.has(element)) {\n continue;\n }\n validated.add(element);\n\n this.validateEnvironment(element.env, element.name, getPluginEnv);\n this.validateGlobals(element.globals, element.name);\n this.validateProcessor(element.processor, element.name, getPluginProcessor);\n this.validateRules(element.rules, element.name, getPluginRule);\n }\n }\n\n}\n","/**\n * @fileoverview Common helpers for naming of plugins, formatters and configs\n */\n\nconst NAMESPACE_REGEX = /^@.*\\//iu;\n\n/**\n * Brings package name to correct format based on prefix\n * @param {string} name The name of the package.\n * @param {string} prefix Can be either \"eslint-plugin\", \"eslint-config\" or \"eslint-formatter\"\n * @returns {string} Normalized name of the package\n * @private\n */\nfunction normalizePackageName(name, prefix) {\n let normalizedName = name;\n\n /**\n * On Windows, name can come in with Windows slashes instead of Unix slashes.\n * Normalize to Unix first to avoid errors later on.\n * https://github.com/eslint/eslint/issues/5644\n */\n if (normalizedName.includes(\"\\\\\")) {\n normalizedName = normalizedName.replace(/\\\\/gu, \"/\");\n }\n\n if (normalizedName.charAt(0) === \"@\") {\n\n /**\n * it's a scoped package\n * package name is the prefix, or just a username\n */\n const scopedPackageShortcutRegex = new RegExp(`^(@[^/]+)(?:/(?:${prefix})?)?$`, \"u\"),\n scopedPackageNameRegex = new RegExp(`^${prefix}(-|$)`, \"u\");\n\n if (scopedPackageShortcutRegex.test(normalizedName)) {\n normalizedName = normalizedName.replace(scopedPackageShortcutRegex, `$1/${prefix}`);\n } else if (!scopedPackageNameRegex.test(normalizedName.split(\"/\")[1])) {\n\n /**\n * for scoped packages, insert the prefix after the first / unless\n * the path is already @scope/eslint or @scope/eslint-xxx-yyy\n */\n normalizedName = normalizedName.replace(/^@([^/]+)\\/(.*)$/u, `@$1/${prefix}-$2`);\n }\n } else if (!normalizedName.startsWith(`${prefix}-`)) {\n normalizedName = `${prefix}-${normalizedName}`;\n }\n\n return normalizedName;\n}\n\n/**\n * Removes the prefix from a fullname.\n * @param {string} fullname The term which may have the prefix.\n * @param {string} prefix The prefix to remove.\n * @returns {string} The term without prefix.\n */\nfunction getShorthandName(fullname, prefix) {\n if (fullname[0] === \"@\") {\n let matchResult = new RegExp(`^(@[^/]+)/${prefix}$`, \"u\").exec(fullname);\n\n if (matchResult) {\n return matchResult[1];\n }\n\n matchResult = new RegExp(`^(@[^/]+)/${prefix}-(.+)$`, \"u\").exec(fullname);\n if (matchResult) {\n return `${matchResult[1]}/${matchResult[2]}`;\n }\n } else if (fullname.startsWith(`${prefix}-`)) {\n return fullname.slice(prefix.length + 1);\n }\n\n return fullname;\n}\n\n/**\n * Gets the scope (namespace) of a term.\n * @param {string} term The term which may have the namespace.\n * @returns {string} The namespace of the term if it has one.\n */\nfunction getNamespaceFromTerm(term) {\n const match = term.match(NAMESPACE_REGEX);\n\n return match ? match[0] : \"\";\n}\n\n//------------------------------------------------------------------------------\n// Public Interface\n//------------------------------------------------------------------------------\n\nexport {\n normalizePackageName,\n getShorthandName,\n getNamespaceFromTerm\n};\n","/**\n * @fileoverview Package exports for @eslint/eslintrc\n * @author Nicholas C. Zakas\n */\n//------------------------------------------------------------------------------\n// Requirements\n//------------------------------------------------------------------------------\n\nimport * as ConfigOps from \"./shared/config-ops.js\";\nimport ConfigValidator from \"./shared/config-validator.js\";\nimport * as naming from \"./shared/naming.js\";\nimport environments from \"../conf/environments.js\";\n\n//-----------------------------------------------------------------------------\n// Exports\n//-----------------------------------------------------------------------------\n\nconst Legacy = {\n environments,\n\n // shared\n ConfigOps,\n ConfigValidator,\n naming\n};\n\nexport {\n Legacy\n};\n"],"names":["path","Ajv","globals","util","BuiltInEnvironments","ConfigOps.normalizeConfigGlobal"],"mappings":";;;;;;;;;;;;;;;;AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,MAAM,qBAAqB,GAAG,CAAC,KAAK,EAAE,MAAM,EAAE,OAAO,CAAC;AACtD,IAAI,aAAa,GAAG,qBAAqB,CAAC,MAAM,CAAC,CAAC,GAAG,EAAE,KAAK,EAAE,KAAK,KAAK;AACxE,QAAQ,GAAG,CAAC,KAAK,CAAC,GAAG,KAAK,CAAC;AAC3B,QAAQ,OAAO,GAAG,CAAC;AACnB,KAAK,EAAE,EAAE,CAAC;AACV,IAAI,gBAAgB,GAAG,CAAC,CAAC,EAAE,CAAC,EAAE,CAAC,EAAE,KAAK,EAAE,MAAM,EAAE,OAAO,CAAC,CAAC;AACzD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS,eAAe,CAAC,UAAU,EAAE;AACrC,IAAI,MAAM,aAAa,GAAG,KAAK,CAAC,OAAO,CAAC,UAAU,CAAC,GAAG,UAAU,CAAC,CAAC,CAAC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;AACT,KAAK,MAAM,IAAI,QAAQ,CAAC,UAAU,CAAC,CAAC,EAAE,MAAM,CAAC,CAAC,CAAC,CAAC,EAAE;AAClD,QAAQ,OAAO,QAAQ,CAAC,KAAK,CAAC,MAAM,CAAC,MAAM,GAAG,CAAC,CAAC,CAAC;AACjD,KAAK;AACL;AACA,IAAI,OAAO,QAAQ,CAAC;AACpB,CAAC;AACD;AACA;AACA;AACA;AACA;AACA;AACA,SAAS,oBAAoB,CAAC,IAAI,EAAE;AACpC,IAAI,MAAM,KAAK,GAAG,IAAI,CAAC,KAAK,CAAC,eAAe,CAAC,CAAC;AAC9C;AACA,IAAI,OAAO,KAAK,GAAG,KAAK,CAAC,CAAC,CAAC,GAAG,EAAE,CAAC;AACjC;;;;;;;;;ACrFA;AACA;AACA;AACA;AASA;AACA;AACA;AACA;AACA;AACK,MAAC,MAAM,GAAG;AACf,IAAI,YAAY;AAChB;AACA;AACA,IAAI,SAAS;AACb,IAAI,eAAe;AACnB,IAAI,MAAM;AACV;;;;"}
\ No newline at end of file
diff --git a/node_modules/@eslint/eslintrc/dist/eslintrc.cjs b/node_modules/@eslint/eslintrc/dist/eslintrc.cjs
deleted file mode 100644
index eb2ed8d..0000000
--- a/node_modules/@eslint/eslintrc/dist/eslintrc.cjs
+++ /dev/null
@@ -1,4344 +0,0 @@
-'use strict';
-
-Object.defineProperty(exports, '__esModule', { value: true });
-
-var debugOrig = require('debug');
-var fs = require('fs');
-var importFresh = require('import-fresh');
-var Module = require('module');
-var path = require('path');
-var stripComments = require('strip-json-comments');
-var assert = require('assert');
-var ignore = require('ignore');
-var util = require('util');
-var minimatch = require('minimatch');
-var Ajv = require('ajv');
-var globals = require('globals');
-var os = require('os');
-
-function _interopDefaultLegacy (e) { return e && typeof e === 'object' && 'default' in e ? e : { 'default': e }; }
-
-var debugOrig__default = /*#__PURE__*/_interopDefaultLegacy(debugOrig);
-var fs__default = /*#__PURE__*/_interopDefaultLegacy(fs);
-var importFresh__default = /*#__PURE__*/_interopDefaultLegacy(importFresh);
-var Module__default = /*#__PURE__*/_interopDefaultLegacy(Module);
-var path__default = /*#__PURE__*/_interopDefaultLegacy(path);
-var stripComments__default = /*#__PURE__*/_interopDefaultLegacy(stripComments);
-var assert__default = /*#__PURE__*/_interopDefaultLegacy(assert);
-var ignore__default = /*#__PURE__*/_interopDefaultLegacy(ignore);
-var util__default = /*#__PURE__*/_interopDefaultLegacy(util);
-var minimatch__default = /*#__PURE__*/_interopDefaultLegacy(minimatch);
-var Ajv__default = /*#__PURE__*/_interopDefaultLegacy(Ajv);
-var globals__default = /*#__PURE__*/_interopDefaultLegacy(globals);
-var os__default = /*#__PURE__*/_interopDefaultLegacy(os);
-
-/**
- * @fileoverview `IgnorePattern` class.
- *
- * `IgnorePattern` class has the set of glob patterns and the base path.
- *
- * It provides two static methods.
- *
- * - `IgnorePattern.createDefaultIgnore(cwd)`
- * Create the default predicate function.
- * - `IgnorePattern.createIgnore(ignorePatterns)`
- * Create the predicate function from multiple `IgnorePattern` objects.
- *
- * It provides two properties and a method.
- *
- * - `patterns`
- * The glob patterns that ignore to lint.
- * - `basePath`
- * The base path of the glob patterns. If absolute paths existed in the
- * glob patterns, those are handled as relative paths to the base path.
- * - `getPatternsRelativeTo(basePath)`
- * Get `patterns` as modified for a given base path. It modifies the
- * absolute paths in the patterns as prepending the difference of two base
- * paths.
- *
- * `ConfigArrayFactory` creates `IgnorePattern` objects when it processes
- * `ignorePatterns` properties.
- *
- * @author Toru Nagashima
- */
-
-const debug$3 = debugOrig__default["default"]("eslintrc:ignore-pattern");
-
-/** @typedef {ReturnType} Ignore */
-
-//------------------------------------------------------------------------------
-// Helpers
-//------------------------------------------------------------------------------
-
-/**
- * Get the path to the common ancestor directory of given paths.
- * @param {string[]} sourcePaths The paths to calculate the common ancestor.
- * @returns {string} The path to the common ancestor directory.
- */
-function getCommonAncestorPath(sourcePaths) {
- let result = sourcePaths[0];
-
- for (let i = 1; i < sourcePaths.length; ++i) {
- const a = result;
- const b = sourcePaths[i];
-
- // Set the shorter one (it's the common ancestor if one includes the other).
- result = a.length < b.length ? a : b;
-
- // Set the common ancestor.
- for (let j = 0, lastSepPos = 0; j < a.length && j < b.length; ++j) {
- if (a[j] !== b[j]) {
- result = a.slice(0, lastSepPos);
- break;
- }
- if (a[j] === path__default["default"].sep) {
- lastSepPos = j;
- }
- }
- }
-
- let resolvedResult = result || path__default["default"].sep;
-
- // if Windows common ancestor is root of drive must have trailing slash to be absolute.
- if (resolvedResult && resolvedResult.endsWith(":") && process.platform === "win32") {
- resolvedResult += path__default["default"].sep;
- }
- return resolvedResult;
-}
-
-/**
- * Make relative path.
- * @param {string} from The source path to get relative path.
- * @param {string} to The destination path to get relative path.
- * @returns {string} The relative path.
- */
-function relative(from, to) {
- const relPath = path__default["default"].relative(from, to);
-
- if (path__default["default"].sep === "/") {
- return relPath;
- }
- return relPath.split(path__default["default"].sep).join("/");
-}
-
-/**
- * Get the trailing slash if existed.
- * @param {string} filePath The path to check.
- * @returns {string} The trailing slash if existed.
- */
-function dirSuffix(filePath) {
- const isDir = (
- filePath.endsWith(path__default["default"].sep) ||
- (process.platform === "win32" && filePath.endsWith("/"))
- );
-
- return isDir ? "/" : "";
-}
-
-const DefaultPatterns = Object.freeze(["/**/node_modules/*"]);
-const DotPatterns = Object.freeze([".*", "!.eslintrc.*", "!../"]);
-
-//------------------------------------------------------------------------------
-// Public
-//------------------------------------------------------------------------------
-
-class IgnorePattern {
-
- /**
- * The default patterns.
- * @type {string[]}
- */
- static get DefaultPatterns() {
- return DefaultPatterns;
- }
-
- /**
- * Create the default predicate function.
- * @param {string} cwd The current working directory.
- * @returns {((filePath:string, dot:boolean) => boolean) & {basePath:string; patterns:string[]}}
- * The preficate function.
- * The first argument is an absolute path that is checked.
- * The second argument is the flag to not ignore dotfiles.
- * If the predicate function returned `true`, it means the path should be ignored.
- */
- static createDefaultIgnore(cwd) {
- return this.createIgnore([new IgnorePattern(DefaultPatterns, cwd)]);
- }
-
- /**
- * Create the predicate function from multiple `IgnorePattern` objects.
- * @param {IgnorePattern[]} ignorePatterns The list of ignore patterns.
- * @returns {((filePath:string, dot?:boolean) => boolean) & {basePath:string; patterns:string[]}}
- * The preficate function.
- * The first argument is an absolute path that is checked.
- * The second argument is the flag to not ignore dotfiles.
- * If the predicate function returned `true`, it means the path should be ignored.
- */
- static createIgnore(ignorePatterns) {
- debug$3("Create with: %o", ignorePatterns);
-
- const basePath = getCommonAncestorPath(ignorePatterns.map(p => p.basePath));
- const patterns = [].concat(
- ...ignorePatterns.map(p => p.getPatternsRelativeTo(basePath))
- );
- const ig = ignore__default["default"]({ allowRelativePaths: true }).add([...DotPatterns, ...patterns]);
- const dotIg = ignore__default["default"]({ allowRelativePaths: true }).add(patterns);
-
- debug$3(" processed: %o", { basePath, patterns });
-
- return Object.assign(
- (filePath, dot = false) => {
- assert__default["default"](path__default["default"].isAbsolute(filePath), "'filePath' should be an absolute path.");
- const relPathRaw = relative(basePath, filePath);
- const relPath = relPathRaw && (relPathRaw + dirSuffix(filePath));
- const adoptedIg = dot ? dotIg : ig;
- const result = relPath !== "" && adoptedIg.ignores(relPath);
-
- debug$3("Check", { filePath, dot, relativePath: relPath, result });
- return result;
- },
- { basePath, patterns }
- );
- }
-
- /**
- * Initialize a new `IgnorePattern` instance.
- * @param {string[]} patterns The glob patterns that ignore to lint.
- * @param {string} basePath The base path of `patterns`.
- */
- constructor(patterns, basePath) {
- assert__default["default"](path__default["default"].isAbsolute(basePath), "'basePath' should be an absolute path.");
-
- /**
- * The glob patterns that ignore to lint.
- * @type {string[]}
- */
- this.patterns = patterns;
-
- /**
- * The base path of `patterns`.
- * @type {string}
- */
- this.basePath = basePath;
-
- /**
- * If `true` then patterns which don't start with `/` will match the paths to the outside of `basePath`. Defaults to `false`.
- *
- * It's set `true` for `.eslintignore`, `package.json`, and `--ignore-path` for backward compatibility.
- * It's `false` as-is for `ignorePatterns` property in config files.
- * @type {boolean}
- */
- this.loose = false;
- }
-
- /**
- * Get `patterns` as modified for a given base path. It modifies the
- * absolute paths in the patterns as prepending the difference of two base
- * paths.
- * @param {string} newBasePath The base path.
- * @returns {string[]} Modifired patterns.
- */
- getPatternsRelativeTo(newBasePath) {
- assert__default["default"](path__default["default"].isAbsolute(newBasePath), "'newBasePath' should be an absolute path.");
- const { basePath, loose, patterns } = this;
-
- if (newBasePath === basePath) {
- return patterns;
- }
- const prefix = `/${relative(newBasePath, basePath)}`;
-
- return patterns.map(pattern => {
- const negative = pattern.startsWith("!");
- const head = negative ? "!" : "";
- const body = negative ? pattern.slice(1) : pattern;
-
- if (body.startsWith("/") || body.startsWith("../")) {
- return `${head}${prefix}${body}`;
- }
- return loose ? pattern : `${head}${prefix}/**/${body}`;
- });
- }
-}
-
-/**
- * @fileoverview `ExtractedConfig` class.
- *
- * `ExtractedConfig` class expresses a final configuration for a specific file.
- *
- * It provides one method.
- *
- * - `toCompatibleObjectAsConfigFileContent()`
- * Convert this configuration to the compatible object as the content of
- * config files. It converts the loaded parser and plugins to strings.
- * `CLIEngine#getConfigForFile(filePath)` method uses this method.
- *
- * `ConfigArray#extractConfig(filePath)` creates a `ExtractedConfig` instance.
- *
- * @author Toru Nagashima
- */
-
-// For VSCode intellisense
-/** @typedef {import("../../shared/types").ConfigData} ConfigData */
-/** @typedef {import("../../shared/types").GlobalConf} GlobalConf */
-/** @typedef {import("../../shared/types").SeverityConf} SeverityConf */
-/** @typedef {import("./config-dependency").DependentParser} DependentParser */
-/** @typedef {import("./config-dependency").DependentPlugin} DependentPlugin */
-
-/**
- * Check if `xs` starts with `ys`.
- * @template T
- * @param {T[]} xs The array to check.
- * @param {T[]} ys The array that may be the first part of `xs`.
- * @returns {boolean} `true` if `xs` starts with `ys`.
- */
-function startsWith(xs, ys) {
- return xs.length >= ys.length && ys.every((y, i) => y === xs[i]);
-}
-
-/**
- * The class for extracted config data.
- */
-class ExtractedConfig {
- constructor() {
-
- /**
- * The config name what `noInlineConfig` setting came from.
- * @type {string}
- */
- this.configNameOfNoInlineConfig = "";
-
- /**
- * Environments.
- * @type {Record}
- */
- this.env = {};
-
- /**
- * Global variables.
- * @type {Record}
- */
- this.globals = {};
-
- /**
- * The glob patterns that ignore to lint.
- * @type {(((filePath:string, dot?:boolean) => boolean) & { basePath:string; patterns:string[] }) | undefined}
- */
- this.ignores = void 0;
-
- /**
- * The flag that disables directive comments.
- * @type {boolean|undefined}
- */
- this.noInlineConfig = void 0;
-
- /**
- * Parser definition.
- * @type {DependentParser|null}
- */
- this.parser = null;
-
- /**
- * Options for the parser.
- * @type {Object}
- */
- this.parserOptions = {};
-
- /**
- * Plugin definitions.
- * @type {Record}
- */
- this.plugins = {};
-
- /**
- * Processor ID.
- * @type {string|null}
- */
- this.processor = null;
-
- /**
- * The flag that reports unused `eslint-disable` directive comments.
- * @type {boolean|undefined}
- */
- this.reportUnusedDisableDirectives = void 0;
-
- /**
- * Rule settings.
- * @type {Record}
- */
- this.rules = {};
-
- /**
- * Shared settings.
- * @type {Object}
- */
- this.settings = {};
- }
-
- /**
- * Convert this config to the compatible object as a config file content.
- * @returns {ConfigData} The converted object.
- */
- toCompatibleObjectAsConfigFileContent() {
- const {
- /* eslint-disable no-unused-vars */
- configNameOfNoInlineConfig: _ignore1,
- processor: _ignore2,
- /* eslint-enable no-unused-vars */
- ignores,
- ...config
- } = this;
-
- config.parser = config.parser && config.parser.filePath;
- config.plugins = Object.keys(config.plugins).filter(Boolean).reverse();
- config.ignorePatterns = ignores ? ignores.patterns : [];
-
- // Strip the default patterns from `ignorePatterns`.
- if (startsWith(config.ignorePatterns, IgnorePattern.DefaultPatterns)) {
- config.ignorePatterns =
- config.ignorePatterns.slice(IgnorePattern.DefaultPatterns.length);
- }
-
- return config;
- }
-}
-
-/**
- * @fileoverview `ConfigArray` class.
- *
- * `ConfigArray` class expresses the full of a configuration. It has the entry
- * config file, base config files that were extended, loaded parsers, and loaded
- * plugins.
- *
- * `ConfigArray` class provides three properties and two methods.
- *
- * - `pluginEnvironments`
- * - `pluginProcessors`
- * - `pluginRules`
- * The `Map` objects that contain the members of all plugins that this
- * config array contains. Those map objects don't have mutation methods.
- * Those keys are the member ID such as `pluginId/memberName`.
- * - `isRoot()`
- * If `true` then this configuration has `root:true` property.
- * - `extractConfig(filePath)`
- * Extract the final configuration for a given file. This means merging
- * every config array element which that `criteria` property matched. The
- * `filePath` argument must be an absolute path.
- *
- * `ConfigArrayFactory` provides the loading logic of config files.
- *
- * @author Toru Nagashima
- */
-
-//------------------------------------------------------------------------------
-// Helpers
-//------------------------------------------------------------------------------
-
-// Define types for VSCode IntelliSense.
-/** @typedef {import("../../shared/types").Environment} Environment */
-/** @typedef {import("../../shared/types").GlobalConf} GlobalConf */
-/** @typedef {import("../../shared/types").RuleConf} RuleConf */
-/** @typedef {import("../../shared/types").Rule} Rule */
-/** @typedef {import("../../shared/types").Plugin} Plugin */
-/** @typedef {import("../../shared/types").Processor} Processor */
-/** @typedef {import("./config-dependency").DependentParser} DependentParser */
-/** @typedef {import("./config-dependency").DependentPlugin} DependentPlugin */
-/** @typedef {import("./override-tester")["OverrideTester"]} OverrideTester */
-
-/**
- * @typedef {Object} ConfigArrayElement
- * @property {string} name The name of this config element.
- * @property {string} filePath The path to the source file of this config element.
- * @property {InstanceType|null} criteria The tester for the `files` and `excludedFiles` of this config element.
- * @property {Record|undefined} env The environment settings.
- * @property {Record|undefined} globals The global variable settings.
- * @property {IgnorePattern|undefined} ignorePattern The ignore patterns.
- * @property {boolean|undefined} noInlineConfig The flag that disables directive comments.
- * @property {DependentParser|undefined} parser The parser loader.
- * @property {Object|undefined} parserOptions The parser options.
- * @property {Record|undefined} plugins The plugin loaders.
- * @property {string|undefined} processor The processor name to refer plugin's processor.
- * @property {boolean|undefined} reportUnusedDisableDirectives The flag to report unused `eslint-disable` comments.
- * @property {boolean|undefined} root The flag to express root.
- * @property {Record|undefined} rules The rule settings
- * @property {Object|undefined} settings The shared settings.
- * @property {"config" | "ignore" | "implicit-processor"} type The element type.
- */
-
-/**
- * @typedef {Object} ConfigArrayInternalSlots
- * @property {Map} cache The cache to extract configs.
- * @property {ReadonlyMap|null} envMap The map from environment ID to environment definition.
- * @property {ReadonlyMap|null} processorMap The map from processor ID to environment definition.
- * @property {ReadonlyMap|null} ruleMap The map from rule ID to rule definition.
- */
-
-/** @type {WeakMap} */
-const internalSlotsMap$2 = new class extends WeakMap {
- get(key) {
- let value = super.get(key);
-
- if (!value) {
- value = {
- cache: new Map(),
- envMap: null,
- processorMap: null,
- ruleMap: null
- };
- super.set(key, value);
- }
-
- return value;
- }
-}();
-
-/**
- * Get the indices which are matched to a given file.
- * @param {ConfigArrayElement[]} elements The elements.
- * @param {string} filePath The path to a target file.
- * @returns {number[]} The indices.
- */
-function getMatchedIndices(elements, filePath) {
- const indices = [];
-
- for (let i = elements.length - 1; i >= 0; --i) {
- const element = elements[i];
-
- if (!element.criteria || (filePath && element.criteria.test(filePath))) {
- indices.push(i);
- }
- }
-
- return indices;
-}
-
-/**
- * Check if a value is a non-null object.
- * @param {any} x The value to check.
- * @returns {boolean} `true` if the value is a non-null object.
- */
-function isNonNullObject(x) {
- return typeof x === "object" && x !== null;
-}
-
-/**
- * Merge two objects.
- *
- * Assign every property values of `y` to `x` if `x` doesn't have the property.
- * If `x`'s property value is an object, it does recursive.
- * @param {Object} target The destination to merge
- * @param {Object|undefined} source The source to merge.
- * @returns {void}
- */
-function mergeWithoutOverwrite(target, source) {
- if (!isNonNullObject(source)) {
- return;
- }
-
- for (const key of Object.keys(source)) {
- if (key === "__proto__") {
- continue;
- }
-
- if (isNonNullObject(target[key])) {
- mergeWithoutOverwrite(target[key], source[key]);
- } else if (target[key] === void 0) {
- if (isNonNullObject(source[key])) {
- target[key] = Array.isArray(source[key]) ? [] : {};
- mergeWithoutOverwrite(target[key], source[key]);
- } else if (source[key] !== void 0) {
- target[key] = source[key];
- }
- }
- }
-}
-
-/**
- * The error for plugin conflicts.
- */
-class PluginConflictError extends Error {
-
- /**
- * Initialize this error object.
- * @param {string} pluginId The plugin ID.
- * @param {{filePath:string, importerName:string}[]} plugins The resolved plugins.
- */
- constructor(pluginId, plugins) {
- super(`Plugin "${pluginId}" was conflicted between ${plugins.map(p => `"${p.importerName}"`).join(" and ")}.`);
- this.messageTemplate = "plugin-conflict";
- this.messageData = { pluginId, plugins };
- }
-}
-
-/**
- * Merge plugins.
- * `target`'s definition is prior to `source`'s.
- * @param {Record} target The destination to merge
- * @param {Record|undefined} source The source to merge.
- * @returns {void}
- */
-function mergePlugins(target, source) {
- if (!isNonNullObject(source)) {
- return;
- }
-
- for (const key of Object.keys(source)) {
- if (key === "__proto__") {
- continue;
- }
- const targetValue = target[key];
- const sourceValue = source[key];
-
- // Adopt the plugin which was found at first.
- if (targetValue === void 0) {
- if (sourceValue.error) {
- throw sourceValue.error;
- }
- target[key] = sourceValue;
- } else if (sourceValue.filePath !== targetValue.filePath) {
- throw new PluginConflictError(key, [
- {
- filePath: targetValue.filePath,
- importerName: targetValue.importerName
- },
- {
- filePath: sourceValue.filePath,
- importerName: sourceValue.importerName
- }
- ]);
- }
- }
-}
-
-/**
- * Merge rule configs.
- * `target`'s definition is prior to `source`'s.
- * @param {Record} target The destination to merge
- * @param {Record|undefined} source The source to merge.
- * @returns {void}
- */
-function mergeRuleConfigs(target, source) {
- if (!isNonNullObject(source)) {
- return;
- }
-
- for (const key of Object.keys(source)) {
- if (key === "__proto__") {
- continue;
- }
- const targetDef = target[key];
- const sourceDef = source[key];
-
- // Adopt the rule config which was found at first.
- if (targetDef === void 0) {
- if (Array.isArray(sourceDef)) {
- target[key] = [...sourceDef];
- } else {
- target[key] = [sourceDef];
- }
-
- /*
- * If the first found rule config is severity only and the current rule
- * config has options, merge the severity and the options.
- */
- } else if (
- targetDef.length === 1 &&
- Array.isArray(sourceDef) &&
- sourceDef.length >= 2
- ) {
- targetDef.push(...sourceDef.slice(1));
- }
- }
-}
-
-/**
- * Create the extracted config.
- * @param {ConfigArray} instance The config elements.
- * @param {number[]} indices The indices to use.
- * @returns {ExtractedConfig} The extracted config.
- */
-function createConfig(instance, indices) {
- const config = new ExtractedConfig();
- const ignorePatterns = [];
-
- // Merge elements.
- for (const index of indices) {
- const element = instance[index];
-
- // Adopt the parser which was found at first.
- if (!config.parser && element.parser) {
- if (element.parser.error) {
- throw element.parser.error;
- }
- config.parser = element.parser;
- }
-
- // Adopt the processor which was found at first.
- if (!config.processor && element.processor) {
- config.processor = element.processor;
- }
-
- // Adopt the noInlineConfig which was found at first.
- if (config.noInlineConfig === void 0 && element.noInlineConfig !== void 0) {
- config.noInlineConfig = element.noInlineConfig;
- config.configNameOfNoInlineConfig = element.name;
- }
-
- // Adopt the reportUnusedDisableDirectives which was found at first.
- if (config.reportUnusedDisableDirectives === void 0 && element.reportUnusedDisableDirectives !== void 0) {
- config.reportUnusedDisableDirectives = element.reportUnusedDisableDirectives;
- }
-
- // Collect ignorePatterns
- if (element.ignorePattern) {
- ignorePatterns.push(element.ignorePattern);
- }
-
- // Merge others.
- mergeWithoutOverwrite(config.env, element.env);
- mergeWithoutOverwrite(config.globals, element.globals);
- mergeWithoutOverwrite(config.parserOptions, element.parserOptions);
- mergeWithoutOverwrite(config.settings, element.settings);
- mergePlugins(config.plugins, element.plugins);
- mergeRuleConfigs(config.rules, element.rules);
- }
-
- // Create the predicate function for ignore patterns.
- if (ignorePatterns.length > 0) {
- config.ignores = IgnorePattern.createIgnore(ignorePatterns.reverse());
- }
-
- return config;
-}
-
-/**
- * Collect definitions.
- * @template T, U
- * @param {string} pluginId The plugin ID for prefix.
- * @param {Record} defs The definitions to collect.
- * @param {Map} map The map to output.
- * @param {function(T): U} [normalize] The normalize function for each value.
- * @returns {void}
- */
-function collect(pluginId, defs, map, normalize) {
- if (defs) {
- const prefix = pluginId && `${pluginId}/`;
-
- for (const [key, value] of Object.entries(defs)) {
- map.set(
- `${prefix}${key}`,
- normalize ? normalize(value) : value
- );
- }
- }
-}
-
-/**
- * Normalize a rule definition.
- * @param {Function|Rule} rule The rule definition to normalize.
- * @returns {Rule} The normalized rule definition.
- */
-function normalizePluginRule(rule) {
- return typeof rule === "function" ? { create: rule } : rule;
-}
-
-/**
- * Delete the mutation methods from a given map.
- * @param {Map} map The map object to delete.
- * @returns {void}
- */
-function deleteMutationMethods(map) {
- Object.defineProperties(map, {
- clear: { configurable: true, value: void 0 },
- delete: { configurable: true, value: void 0 },
- set: { configurable: true, value: void 0 }
- });
-}
-
-/**
- * Create `envMap`, `processorMap`, `ruleMap` with the plugins in the config array.
- * @param {ConfigArrayElement[]} elements The config elements.
- * @param {ConfigArrayInternalSlots} slots The internal slots.
- * @returns {void}
- */
-function initPluginMemberMaps(elements, slots) {
- const processed = new Set();
-
- slots.envMap = new Map();
- slots.processorMap = new Map();
- slots.ruleMap = new Map();
-
- for (const element of elements) {
- if (!element.plugins) {
- continue;
- }
-
- for (const [pluginId, value] of Object.entries(element.plugins)) {
- const plugin = value.definition;
-
- if (!plugin || processed.has(pluginId)) {
- continue;
- }
- processed.add(pluginId);
-
- collect(pluginId, plugin.environments, slots.envMap);
- collect(pluginId, plugin.processors, slots.processorMap);
- collect(pluginId, plugin.rules, slots.ruleMap, normalizePluginRule);
- }
- }
-
- deleteMutationMethods(slots.envMap);
- deleteMutationMethods(slots.processorMap);
- deleteMutationMethods(slots.ruleMap);
-}
-
-/**
- * Create `envMap`, `processorMap`, `ruleMap` with the plugins in the config array.
- * @param {ConfigArray} instance The config elements.
- * @returns {ConfigArrayInternalSlots} The extracted config.
- */
-function ensurePluginMemberMaps(instance) {
- const slots = internalSlotsMap$2.get(instance);
-
- if (!slots.ruleMap) {
- initPluginMemberMaps(instance, slots);
- }
-
- return slots;
-}
-
-//------------------------------------------------------------------------------
-// Public Interface
-//------------------------------------------------------------------------------
-
-/**
- * The Config Array.
- *
- * `ConfigArray` instance contains all settings, parsers, and plugins.
- * You need to call `ConfigArray#extractConfig(filePath)` method in order to
- * extract, merge and get only the config data which is related to an arbitrary
- * file.
- * @extends {Array}
- */
-class ConfigArray extends Array {
-
- /**
- * Get the plugin environments.
- * The returned map cannot be mutated.
- * @type {ReadonlyMap} The plugin environments.
- */
- get pluginEnvironments() {
- return ensurePluginMemberMaps(this).envMap;
- }
-
- /**
- * Get the plugin processors.
- * The returned map cannot be mutated.
- * @type {ReadonlyMap} The plugin processors.
- */
- get pluginProcessors() {
- return ensurePluginMemberMaps(this).processorMap;
- }
-
- /**
- * Get the plugin rules.
- * The returned map cannot be mutated.
- * @returns {ReadonlyMap} The plugin rules.
- */
- get pluginRules() {
- return ensurePluginMemberMaps(this).ruleMap;
- }
-
- /**
- * Check if this config has `root` flag.
- * @returns {boolean} `true` if this config array is root.
- */
- isRoot() {
- for (let i = this.length - 1; i >= 0; --i) {
- const root = this[i].root;
-
- if (typeof root === "boolean") {
- return root;
- }
- }
- return false;
- }
-
- /**
- * Extract the config data which is related to a given file.
- * @param {string} filePath The absolute path to the target file.
- * @returns {ExtractedConfig} The extracted config data.
- */
- extractConfig(filePath) {
- const { cache } = internalSlotsMap$2.get(this);
- const indices = getMatchedIndices(this, filePath);
- const cacheKey = indices.join(",");
-
- if (!cache.has(cacheKey)) {
- cache.set(cacheKey, createConfig(this, indices));
- }
-
- return cache.get(cacheKey);
- }
-
- /**
- * Check if a given path is an additional lint target.
- * @param {string} filePath The absolute path to the target file.
- * @returns {boolean} `true` if the file is an additional lint target.
- */
- isAdditionalTargetPath(filePath) {
- for (const { criteria, type } of this) {
- if (
- type === "config" &&
- criteria &&
- !criteria.endsWithWildcard &&
- criteria.test(filePath)
- ) {
- return true;
- }
- }
- return false;
- }
-}
-
-/**
- * Get the used extracted configs.
- * CLIEngine will use this method to collect used deprecated rules.
- * @param {ConfigArray} instance The config array object to get.
- * @returns {ExtractedConfig[]} The used extracted configs.
- * @private
- */
-function getUsedExtractedConfigs(instance) {
- const { cache } = internalSlotsMap$2.get(instance);
-
- return Array.from(cache.values());
-}
-
-/**
- * @fileoverview `ConfigDependency` class.
- *
- * `ConfigDependency` class expresses a loaded parser or plugin.
- *
- * If the parser or plugin was loaded successfully, it has `definition` property
- * and `filePath` property. Otherwise, it has `error` property.
- *
- * When `JSON.stringify()` converted a `ConfigDependency` object to a JSON, it
- * omits `definition` property.
- *
- * `ConfigArrayFactory` creates `ConfigDependency` objects when it loads parsers
- * or plugins.
- *
- * @author Toru Nagashima
- */
-
-/**
- * The class is to store parsers or plugins.
- * This class hides the loaded object from `JSON.stringify()` and `console.log`.
- * @template T
- */
-class ConfigDependency {
-
- /**
- * Initialize this instance.
- * @param {Object} data The dependency data.
- * @param {T} [data.definition] The dependency if the loading succeeded.
- * @param {T} [data.original] The original, non-normalized dependency if the loading succeeded.
- * @param {Error} [data.error] The error object if the loading failed.
- * @param {string} [data.filePath] The actual path to the dependency if the loading succeeded.
- * @param {string} data.id The ID of this dependency.
- * @param {string} data.importerName The name of the config file which loads this dependency.
- * @param {string} data.importerPath The path to the config file which loads this dependency.
- */
- constructor({
- definition = null,
- original = null,
- error = null,
- filePath = null,
- id,
- importerName,
- importerPath
- }) {
-
- /**
- * The loaded dependency if the loading succeeded.
- * @type {T|null}
- */
- this.definition = definition;
-
- /**
- * The original dependency as loaded directly from disk if the loading succeeded.
- * @type {T|null}
- */
- this.original = original;
-
- /**
- * The error object if the loading failed.
- * @type {Error|null}
- */
- this.error = error;
-
- /**
- * The loaded dependency if the loading succeeded.
- * @type {string|null}
- */
- this.filePath = filePath;
-
- /**
- * The ID of this dependency.
- * @type {string}
- */
- this.id = id;
-
- /**
- * The name of the config file which loads this dependency.
- * @type {string}
- */
- this.importerName = importerName;
-
- /**
- * The path to the config file which loads this dependency.
- * @type {string}
- */
- this.importerPath = importerPath;
- }
-
- // eslint-disable-next-line jsdoc/require-description
- /**
- * @returns {Object} a JSON compatible object.
- */
- toJSON() {
- const obj = this[util__default["default"].inspect.custom]();
-
- // Display `error.message` (`Error#message` is unenumerable).
- if (obj.error instanceof Error) {
- obj.error = { ...obj.error, message: obj.error.message };
- }
-
- return obj;
- }
-
- // eslint-disable-next-line jsdoc/require-description
- /**
- * @returns {Object} an object to display by `console.log()`.
- */
- [util__default["default"].inspect.custom]() {
- const {
- definition: _ignore1, // eslint-disable-line no-unused-vars
- original: _ignore2, // eslint-disable-line no-unused-vars
- ...obj
- } = this;
-
- return obj;
- }
-}
-
-/**
- * @fileoverview `OverrideTester` class.
- *
- * `OverrideTester` class handles `files` property and `excludedFiles` property
- * of `overrides` config.
- *
- * It provides one method.
- *
- * - `test(filePath)`
- * Test if a file path matches the pair of `files` property and
- * `excludedFiles` property. The `filePath` argument must be an absolute
- * path.
- *
- * `ConfigArrayFactory` creates `OverrideTester` objects when it processes
- * `overrides` properties.
- *
- * @author Toru Nagashima
- */
-
-const { Minimatch } = minimatch__default["default"];
-
-const minimatchOpts = { dot: true, matchBase: true };
-
-/**
- * @typedef {Object} Pattern
- * @property {InstanceType[] | null} includes The positive matchers.
- * @property {InstanceType[] | null} excludes The negative matchers.
- */
-
-/**
- * Normalize a given pattern to an array.
- * @param {string|string[]|undefined} patterns A glob pattern or an array of glob patterns.
- * @returns {string[]|null} Normalized patterns.
- * @private
- */
-function normalizePatterns(patterns) {
- if (Array.isArray(patterns)) {
- return patterns.filter(Boolean);
- }
- if (typeof patterns === "string" && patterns) {
- return [patterns];
- }
- return [];
-}
-
-/**
- * Create the matchers of given patterns.
- * @param {string[]} patterns The patterns.
- * @returns {InstanceType[] | null} The matchers.
- */
-function toMatcher(patterns) {
- if (patterns.length === 0) {
- return null;
- }
- return patterns.map(pattern => {
- if (/^\.[/\\]/u.test(pattern)) {
- return new Minimatch(
- pattern.slice(2),
-
- // `./*.js` should not match with `subdir/foo.js`
- { ...minimatchOpts, matchBase: false }
- );
- }
- return new Minimatch(pattern, minimatchOpts);
- });
-}
-
-/**
- * Convert a given matcher to string.
- * @param {Pattern} matchers The matchers.
- * @returns {string} The string expression of the matcher.
- */
-function patternToJson({ includes, excludes }) {
- return {
- includes: includes && includes.map(m => m.pattern),
- excludes: excludes && excludes.map(m => m.pattern)
- };
-}
-
-/**
- * The class to test given paths are matched by the patterns.
- */
-class OverrideTester {
-
- /**
- * Create a tester with given criteria.
- * If there are no criteria, returns `null`.
- * @param {string|string[]} files The glob patterns for included files.
- * @param {string|string[]} excludedFiles The glob patterns for excluded files.
- * @param {string} basePath The path to the base directory to test paths.
- * @returns {OverrideTester|null} The created instance or `null`.
- */
- static create(files, excludedFiles, basePath) {
- const includePatterns = normalizePatterns(files);
- const excludePatterns = normalizePatterns(excludedFiles);
- let endsWithWildcard = false;
-
- if (includePatterns.length === 0) {
- return null;
- }
-
- // Rejects absolute paths or relative paths to parents.
- for (const pattern of includePatterns) {
- if (path__default["default"].isAbsolute(pattern) || pattern.includes("..")) {
- throw new Error(`Invalid override pattern (expected relative path not containing '..'): ${pattern}`);
- }
- if (pattern.endsWith("*")) {
- endsWithWildcard = true;
- }
- }
- for (const pattern of excludePatterns) {
- if (path__default["default"].isAbsolute(pattern) || pattern.includes("..")) {
- throw new Error(`Invalid override pattern (expected relative path not containing '..'): ${pattern}`);
- }
- }
-
- const includes = toMatcher(includePatterns);
- const excludes = toMatcher(excludePatterns);
-
- return new OverrideTester(
- [{ includes, excludes }],
- basePath,
- endsWithWildcard
- );
- }
-
- /**
- * Combine two testers by logical and.
- * If either of the testers was `null`, returns the other tester.
- * The `basePath` property of the two must be the same value.
- * @param {OverrideTester|null} a A tester.
- * @param {OverrideTester|null} b Another tester.
- * @returns {OverrideTester|null} Combined tester.
- */
- static and(a, b) {
- if (!b) {
- return a && new OverrideTester(
- a.patterns,
- a.basePath,
- a.endsWithWildcard
- );
- }
- if (!a) {
- return new OverrideTester(
- b.patterns,
- b.basePath,
- b.endsWithWildcard
- );
- }
-
- assert__default["default"].strictEqual(a.basePath, b.basePath);
- return new OverrideTester(
- a.patterns.concat(b.patterns),
- a.basePath,
- a.endsWithWildcard || b.endsWithWildcard
- );
- }
-
- /**
- * Initialize this instance.
- * @param {Pattern[]} patterns The matchers.
- * @param {string} basePath The base path.
- * @param {boolean} endsWithWildcard If `true` then a pattern ends with `*`.
- */
- constructor(patterns, basePath, endsWithWildcard = false) {
-
- /** @type {Pattern[]} */
- this.patterns = patterns;
-
- /** @type {string} */
- this.basePath = basePath;
-
- /** @type {boolean} */
- this.endsWithWildcard = endsWithWildcard;
- }
-
- /**
- * Test if a given path is matched or not.
- * @param {string} filePath The absolute path to the target file.
- * @returns {boolean} `true` if the path was matched.
- */
- test(filePath) {
- if (typeof filePath !== "string" || !path__default["default"].isAbsolute(filePath)) {
- throw new Error(`'filePath' should be an absolute path, but got ${filePath}.`);
- }
- const relativePath = path__default["default"].relative(this.basePath, filePath);
-
- return this.patterns.every(({ includes, excludes }) => (
- (!includes || includes.some(m => m.match(relativePath))) &&
- (!excludes || !excludes.some(m => m.match(relativePath)))
- ));
- }
-
- // eslint-disable-next-line jsdoc/require-description
- /**
- * @returns {Object} a JSON compatible object.
- */
- toJSON() {
- if (this.patterns.length === 1) {
- return {
- ...patternToJson(this.patterns[0]),
- basePath: this.basePath
- };
- }
- return {
- AND: this.patterns.map(patternToJson),
- basePath: this.basePath
- };
- }
-
- // eslint-disable-next-line jsdoc/require-description
- /**
- * @returns {Object} an object to display by `console.log()`.
- */
- [util__default["default"].inspect.custom]() {
- return this.toJSON();
- }
-}
-
-/**
- * @fileoverview `ConfigArray` class.
- * @author Toru Nagashima
- */
-
-/**
- * @fileoverview Config file operations. This file must be usable in the browser,
- * so no Node-specific code can be here.
- * @author Nicholas C. Zakas
- */
-
-//------------------------------------------------------------------------------
-// Private
-//------------------------------------------------------------------------------
-
-const RULE_SEVERITY_STRINGS = ["off", "warn", "error"],
- RULE_SEVERITY = RULE_SEVERITY_STRINGS.reduce((map, value, index) => {
- map[value] = index;
- return map;
- }, {}),
- VALID_SEVERITIES = [0, 1, 2, "off", "warn", "error"];
-
-//------------------------------------------------------------------------------
-// Public Interface
-//------------------------------------------------------------------------------
-
-/**
- * Normalizes the severity value of a rule's configuration to a number
- * @param {(number|string|[number, ...*]|[string, ...*])} ruleConfig A rule's configuration value, generally
- * received from the user. A valid config value is either 0, 1, 2, the string "off" (treated the same as 0),
- * the string "warn" (treated the same as 1), the string "error" (treated the same as 2), or an array
- * whose first element is one of the above values. Strings are matched case-insensitively.
- * @returns {(0|1|2)} The numeric severity value if the config value was valid, otherwise 0.
- */
-function getRuleSeverity(ruleConfig) {
- const severityValue = Array.isArray(ruleConfig) ? ruleConfig[0] : ruleConfig;
-
- if (severityValue === 0 || severityValue === 1 || severityValue === 2) {
- return severityValue;
- }
-
- if (typeof severityValue === "string") {
- return RULE_SEVERITY[severityValue.toLowerCase()] || 0;
- }
-
- return 0;
-}
-
-/**
- * Converts old-style severity settings (0, 1, 2) into new-style
- * severity settings (off, warn, error) for all rules. Assumption is that severity
- * values have already been validated as correct.
- * @param {Object} config The config object to normalize.
- * @returns {void}
- */
-function normalizeToStrings(config) {
-
- if (config.rules) {
- Object.keys(config.rules).forEach(ruleId => {
- const ruleConfig = config.rules[ruleId];
-
- if (typeof ruleConfig === "number") {
- config.rules[ruleId] = RULE_SEVERITY_STRINGS[ruleConfig] || RULE_SEVERITY_STRINGS[0];
- } else if (Array.isArray(ruleConfig) && typeof ruleConfig[0] === "number") {
- ruleConfig[0] = RULE_SEVERITY_STRINGS[ruleConfig[0]] || RULE_SEVERITY_STRINGS[0];
- }
- });
- }
-}
-
-/**
- * Determines if the severity for the given rule configuration represents an error.
- * @param {int|string|Array} ruleConfig The configuration for an individual rule.
- * @returns {boolean} True if the rule represents an error, false if not.
- */
-function isErrorSeverity(ruleConfig) {
- return getRuleSeverity(ruleConfig) === 2;
-}
-
-/**
- * Checks whether a given config has valid severity or not.
- * @param {number|string|Array} ruleConfig The configuration for an individual rule.
- * @returns {boolean} `true` if the configuration has valid severity.
- */
-function isValidSeverity(ruleConfig) {
- let severity = Array.isArray(ruleConfig) ? ruleConfig[0] : ruleConfig;
-
- if (typeof severity === "string") {
- severity = severity.toLowerCase();
- }
- return VALID_SEVERITIES.indexOf(severity) !== -1;
-}
-
-/**
- * Checks whether every rule of a given config has valid severity or not.
- * @param {Object} config The configuration for rules.
- * @returns {boolean} `true` if the configuration has valid severity.
- */
-function isEverySeverityValid(config) {
- return Object.keys(config).every(ruleId => isValidSeverity(config[ruleId]));
-}
-
-/**
- * Normalizes a value for a global in a config
- * @param {(boolean|string|null)} configuredValue The value given for a global in configuration or in
- * a global directive comment
- * @returns {("readable"|"writeable"|"off")} The value normalized as a string
- * @throws Error if global value is invalid
- */
-function normalizeConfigGlobal(configuredValue) {
- switch (configuredValue) {
- case "off":
- return "off";
-
- case true:
- case "true":
- case "writeable":
- case "writable":
- return "writable";
-
- case null:
- case false:
- case "false":
- case "readable":
- case "readonly":
- return "readonly";
-
- default:
- throw new Error(`'${configuredValue}' is not a valid configuration for a global (use 'readonly', 'writable', or 'off')`);
- }
-}
-
-var ConfigOps = {
- __proto__: null,
- getRuleSeverity: getRuleSeverity,
- normalizeToStrings: normalizeToStrings,
- isErrorSeverity: isErrorSeverity,
- isValidSeverity: isValidSeverity,
- isEverySeverityValid: isEverySeverityValid,
- normalizeConfigGlobal: normalizeConfigGlobal
-};
-
-/**
- * @fileoverview Provide the function that emits deprecation warnings.
- * @author Toru Nagashima
- */
-
-//------------------------------------------------------------------------------
-// Private
-//------------------------------------------------------------------------------
-
-// Defitions for deprecation warnings.
-const deprecationWarningMessages = {
- ESLINT_LEGACY_ECMAFEATURES:
- "The 'ecmaFeatures' config file property is deprecated and has no effect.",
- ESLINT_PERSONAL_CONFIG_LOAD:
- "'~/.eslintrc.*' config files have been deprecated. " +
- "Please use a config file per project or the '--config' option.",
- ESLINT_PERSONAL_CONFIG_SUPPRESS:
- "'~/.eslintrc.*' config files have been deprecated. " +
- "Please remove it or add 'root:true' to the config files in your " +
- "projects in order to avoid loading '~/.eslintrc.*' accidentally."
-};
-
-const sourceFileErrorCache = new Set();
-
-/**
- * Emits a deprecation warning containing a given filepath. A new deprecation warning is emitted
- * for each unique file path, but repeated invocations with the same file path have no effect.
- * No warnings are emitted if the `--no-deprecation` or `--no-warnings` Node runtime flags are active.
- * @param {string} source The name of the configuration source to report the warning for.
- * @param {string} errorCode The warning message to show.
- * @returns {void}
- */
-function emitDeprecationWarning(source, errorCode) {
- const cacheKey = JSON.stringify({ source, errorCode });
-
- if (sourceFileErrorCache.has(cacheKey)) {
- return;
- }
- sourceFileErrorCache.add(cacheKey);
-
- const rel = path__default["default"].relative(process.cwd(), source);
- const message = deprecationWarningMessages[errorCode];
-
- process.emitWarning(
- `${message} (found in "${rel}")`,
- "DeprecationWarning",
- errorCode
- );
-}
-
-/**
- * @fileoverview The instance of Ajv validator.
- * @author Evgeny Poberezkin
- */
-
-//-----------------------------------------------------------------------------
-// Helpers
-//-----------------------------------------------------------------------------
-
-/*
- * Copied from ajv/lib/refs/json-schema-draft-04.json
- * The MIT License (MIT)
- * Copyright (c) 2015-2017 Evgeny Poberezkin
- */
-const metaSchema = {
- id: "http://json-schema.org/draft-04/schema#",
- $schema: "http://json-schema.org/draft-04/schema#",
- description: "Core schema meta-schema",
- definitions: {
- schemaArray: {
- type: "array",
- minItems: 1,
- items: { $ref: "#" }
- },
- positiveInteger: {
- type: "integer",
- minimum: 0
- },
- positiveIntegerDefault0: {
- allOf: [{ $ref: "#/definitions/positiveInteger" }, { default: 0 }]
- },
- simpleTypes: {
- enum: ["array", "boolean", "integer", "null", "number", "object", "string"]
- },
- stringArray: {
- type: "array",
- items: { type: "string" },
- minItems: 1,
- uniqueItems: true
- }
- },
- type: "object",
- properties: {
- id: {
- type: "string"
- },
- $schema: {
- type: "string"
- },
- title: {
- type: "string"
- },
- description: {
- type: "string"
- },
- default: { },
- multipleOf: {
- type: "number",
- minimum: 0,
- exclusiveMinimum: true
- },
- maximum: {
- type: "number"
- },
- exclusiveMaximum: {
- type: "boolean",
- default: false
- },
- minimum: {
- type: "number"
- },
- exclusiveMinimum: {
- type: "boolean",
- default: false
- },
- maxLength: { $ref: "#/definitions/positiveInteger" },
- minLength: { $ref: "#/definitions/positiveIntegerDefault0" },
- pattern: {
- type: "string",
- format: "regex"
- },
- additionalItems: {
- anyOf: [
- { type: "boolean" },
- { $ref: "#" }
- ],
- default: { }
- },
- items: {
- anyOf: [
- { $ref: "#" },
- { $ref: "#/definitions/schemaArray" }
- ],
- default: { }
- },
- maxItems: { $ref: "#/definitions/positiveInteger" },
- minItems: { $ref: "#/definitions/positiveIntegerDefault0" },
- uniqueItems: {
- type: "boolean",
- default: false
- },
- maxProperties: { $ref: "#/definitions/positiveInteger" },
- minProperties: { $ref: "#/definitions/positiveIntegerDefault0" },
- required: { $ref: "#/definitions/stringArray" },
- additionalProperties: {
- anyOf: [
- { type: "boolean" },
- { $ref: "#" }
- ],
- default: { }
- },
- definitions: {
- type: "object",
- additionalProperties: { $ref: "#" },
- default: { }
- },
- properties: {
- type: "object",
- additionalProperties: { $ref: "#" },
- default: { }
- },
- patternProperties: {
- type: "object",
- additionalProperties: { $ref: "#" },
- default: { }
- },
- dependencies: {
- type: "object",
- additionalProperties: {
- anyOf: [
- { $ref: "#" },
- { $ref: "#/definitions/stringArray" }
- ]
- }
- },
- enum: {
- type: "array",
- minItems: 1,
- uniqueItems: true
- },
- type: {
- anyOf: [
- { $ref: "#/definitions/simpleTypes" },
- {
- type: "array",
- items: { $ref: "#/definitions/simpleTypes" },
- minItems: 1,
- uniqueItems: true
- }
- ]
- },
- format: { type: "string" },
- allOf: { $ref: "#/definitions/schemaArray" },
- anyOf: { $ref: "#/definitions/schemaArray" },
- oneOf: { $ref: "#/definitions/schemaArray" },
- not: { $ref: "#" }
- },
- dependencies: {
- exclusiveMaximum: ["maximum"],
- exclusiveMinimum: ["minimum"]
- },
- default: { }
-};
-
-//------------------------------------------------------------------------------
-// Public Interface
-//------------------------------------------------------------------------------
-
-var ajvOrig = (additionalOptions = {}) => {
- const ajv = new Ajv__default["default"]({
- meta: false,
- useDefaults: true,
- validateSchema: false,
- missingRefs: "ignore",
- verbose: true,
- schemaId: "auto",
- ...additionalOptions
- });
-
- ajv.addMetaSchema(metaSchema);
- // eslint-disable-next-line no-underscore-dangle
- ajv._opts.defaultMeta = metaSchema.id;
-
- return ajv;
-};
-
-/**
- * @fileoverview Defines a schema for configs.
- * @author Sylvan Mably
- */
-
-const baseConfigProperties = {
- $schema: { type: "string" },
- env: { type: "object" },
- extends: { $ref: "#/definitions/stringOrStrings" },
- globals: { type: "object" },
- overrides: {
- type: "array",
- items: { $ref: "#/definitions/overrideConfig" },
- additionalItems: false
- },
- parser: { type: ["string", "null"] },
- parserOptions: { type: "object" },
- plugins: { type: "array" },
- processor: { type: "string" },
- rules: { type: "object" },
- settings: { type: "object" },
- noInlineConfig: { type: "boolean" },
- reportUnusedDisableDirectives: { type: "boolean" },
-
- ecmaFeatures: { type: "object" } // deprecated; logs a warning when used
-};
-
-const configSchema = {
- definitions: {
- stringOrStrings: {
- oneOf: [
- { type: "string" },
- {
- type: "array",
- items: { type: "string" },
- additionalItems: false
- }
- ]
- },
- stringOrStringsRequired: {
- oneOf: [
- { type: "string" },
- {
- type: "array",
- items: { type: "string" },
- additionalItems: false,
- minItems: 1
- }
- ]
- },
-
- // Config at top-level.
- objectConfig: {
- type: "object",
- properties: {
- root: { type: "boolean" },
- ignorePatterns: { $ref: "#/definitions/stringOrStrings" },
- ...baseConfigProperties
- },
- additionalProperties: false
- },
-
- // Config in `overrides`.
- overrideConfig: {
- type: "object",
- properties: {
- excludedFiles: { $ref: "#/definitions/stringOrStrings" },
- files: { $ref: "#/definitions/stringOrStringsRequired" },
- ...baseConfigProperties
- },
- required: ["files"],
- additionalProperties: false
- }
- },
-
- $ref: "#/definitions/objectConfig"
-};
-
-/**
- * @fileoverview Defines environment settings and globals.
- * @author Elan Shanker
- */
-
-//------------------------------------------------------------------------------
-// Helpers
-//------------------------------------------------------------------------------
-
-/**
- * Get the object that has difference.
- * @param {Record} current The newer object.
- * @param {Record} prev The older object.
- * @returns {Record} The difference object.
- */
-function getDiff(current, prev) {
- const retv = {};
-
- for (const [key, value] of Object.entries(current)) {
- if (!Object.hasOwnProperty.call(prev, key)) {
- retv[key] = value;
- }
- }
-
- return retv;
-}
-
-const newGlobals2015 = getDiff(globals__default["default"].es2015, globals__default["default"].es5); // 19 variables such as Promise, Map, ...
-const newGlobals2017 = {
- Atomics: false,
- SharedArrayBuffer: false
-};
-const newGlobals2020 = {
- BigInt: false,
- BigInt64Array: false,
- BigUint64Array: false,
- globalThis: false
-};
-
-const newGlobals2021 = {
- AggregateError: false,
- FinalizationRegistry: false,
- WeakRef: false
-};
-
-//------------------------------------------------------------------------------
-// Public Interface
-//------------------------------------------------------------------------------
-
-/** @type {Map} */
-var environments = new Map(Object.entries({
-
- // Language
- builtin: {
- globals: globals__default["default"].es5
- },
- es6: {
- globals: newGlobals2015,
- parserOptions: {
- ecmaVersion: 6
- }
- },
- es2015: {
- globals: newGlobals2015,
- parserOptions: {
- ecmaVersion: 6
- }
- },
- es2016: {
- globals: newGlobals2015,
- parserOptions: {
- ecmaVersion: 7
- }
- },
- es2017: {
- globals: { ...newGlobals2015, ...newGlobals2017 },
- parserOptions: {
- ecmaVersion: 8
- }
- },
- es2018: {
- globals: { ...newGlobals2015, ...newGlobals2017 },
- parserOptions: {
- ecmaVersion: 9
- }
- },
- es2019: {
- globals: { ...newGlobals2015, ...newGlobals2017 },
- parserOptions: {
- ecmaVersion: 10
- }
- },
- es2020: {
- globals: { ...newGlobals2015, ...newGlobals2017, ...newGlobals2020 },
- parserOptions: {
- ecmaVersion: 11
- }
- },
- es2021: {
- globals: { ...newGlobals2015, ...newGlobals2017, ...newGlobals2020, ...newGlobals2021 },
- parserOptions: {
- ecmaVersion: 12
- }
- },
- es2022: {
- globals: { ...newGlobals2015, ...newGlobals2017, ...newGlobals2020, ...newGlobals2021 },
- parserOptions: {
- ecmaVersion: 13
- }
- },
- es2023: {
- globals: { ...newGlobals2015, ...newGlobals2017, ...newGlobals2020, ...newGlobals2021 },
- parserOptions: {
- ecmaVersion: 14
- }
- },
- es2024: {
- globals: { ...newGlobals2015, ...newGlobals2017, ...newGlobals2020, ...newGlobals2021 },
- parserOptions: {
- ecmaVersion: 15
- }
- },
-
- // Platforms
- browser: {
- globals: globals__default["default"].browser
- },
- node: {
- globals: globals__default["default"].node,
- parserOptions: {
- ecmaFeatures: {
- globalReturn: true
- }
- }
- },
- "shared-node-browser": {
- globals: globals__default["default"]["shared-node-browser"]
- },
- worker: {
- globals: globals__default["default"].worker
- },
- serviceworker: {
- globals: globals__default["default"].serviceworker
- },
-
- // Frameworks
- commonjs: {
- globals: globals__default["default"].commonjs,
- parserOptions: {
- ecmaFeatures: {
- globalReturn: true
- }
- }
- },
- amd: {
- globals: globals__default["default"].amd
- },
- mocha: {
- globals: globals__default["default"].mocha
- },
- jasmine: {
- globals: globals__default["default"].jasmine
- },
- jest: {
- globals: globals__default["default"].jest
- },
- phantomjs: {
- globals: globals__default["default"].phantomjs
- },
- jquery: {
- globals: globals__default["default"].jquery
- },
- qunit: {
- globals: globals__default["default"].qunit
- },
- prototypejs: {
- globals: globals__default["default"].prototypejs
- },
- shelljs: {
- globals: globals__default["default"].shelljs
- },
- meteor: {
- globals: globals__default["default"].meteor
- },
- mongo: {
- globals: globals__default["default"].mongo
- },
- protractor: {
- globals: globals__default["default"].protractor
- },
- applescript: {
- globals: globals__default["default"].applescript
- },
- nashorn: {
- globals: globals__default["default"].nashorn
- },
- atomtest: {
- globals: globals__default["default"].atomtest
- },
- embertest: {
- globals: globals__default["default"].embertest
- },
- webextensions: {
- globals: globals__default["default"].webextensions
- },
- greasemonkey: {
- globals: globals__default["default"].greasemonkey
- }
-}));
-
-/**
- * @fileoverview Validates configs.
- * @author Brandon Mills
- */
-
-const ajv = ajvOrig();
-
-const ruleValidators = new WeakMap();
-const noop = Function.prototype;
-
-//------------------------------------------------------------------------------
-// Private
-//------------------------------------------------------------------------------
-let validateSchema;
-const severityMap = {
- error: 2,
- warn: 1,
- off: 0
-};
-
-const validated = new WeakSet();
-
-//-----------------------------------------------------------------------------
-// Exports
-//-----------------------------------------------------------------------------
-
-class ConfigValidator {
- constructor({ builtInRules = new Map() } = {}) {
- this.builtInRules = builtInRules;
- }
-
- /**
- * Gets a complete options schema for a rule.
- * @param {{create: Function, schema: (Array|null)}} rule A new-style rule object
- * @returns {Object} JSON Schema for the rule's options.
- */
- getRuleOptionsSchema(rule) {
- if (!rule) {
- return null;
- }
-
- const schema = rule.schema || rule.meta && rule.meta.schema;
-
- // Given a tuple of schemas, insert warning level at the beginning
- if (Array.isArray(schema)) {
- if (schema.length) {
- return {
- type: "array",
- items: schema,
- minItems: 0,
- maxItems: schema.length
- };
- }
- return {
- type: "array",
- minItems: 0,
- maxItems: 0
- };
-
- }
-
- // Given a full schema, leave it alone
- return schema || null;
- }
-
- /**
- * Validates a rule's severity and returns the severity value. Throws an error if the severity is invalid.
- * @param {options} options The given options for the rule.
- * @returns {number|string} The rule's severity value
- */
- validateRuleSeverity(options) {
- const severity = Array.isArray(options) ? options[0] : options;
- const normSeverity = typeof severity === "string" ? severityMap[severity.toLowerCase()] : severity;
-
- if (normSeverity === 0 || normSeverity === 1 || normSeverity === 2) {
- return normSeverity;
- }
-
- throw new Error(`\tSeverity should be one of the following: 0 = off, 1 = warn, 2 = error (you passed '${util__default["default"].inspect(severity).replace(/'/gu, "\"").replace(/\n/gu, "")}').\n`);
-
- }
-
- /**
- * Validates the non-severity options passed to a rule, based on its schema.
- * @param {{create: Function}} rule The rule to validate
- * @param {Array} localOptions The options for the rule, excluding severity
- * @returns {void}
- */
- validateRuleSchema(rule, localOptions) {
- if (!ruleValidators.has(rule)) {
- const schema = this.getRuleOptionsSchema(rule);
-
- if (schema) {
- ruleValidators.set(rule, ajv.compile(schema));
- }
- }
-
- const validateRule = ruleValidators.get(rule);
-
- if (validateRule) {
- validateRule(localOptions);
- if (validateRule.errors) {
- throw new Error(validateRule.errors.map(
- error => `\tValue ${JSON.stringify(error.data)} ${error.message}.\n`
- ).join(""));
- }
- }
- }
-
- /**
- * Validates a rule's options against its schema.
- * @param {{create: Function}|null} rule The rule that the config is being validated for
- * @param {string} ruleId The rule's unique name.
- * @param {Array|number} options The given options for the rule.
- * @param {string|null} source The name of the configuration source to report in any errors. If null or undefined,
- * no source is prepended to the message.
- * @returns {void}
- */
- validateRuleOptions(rule, ruleId, options, source = null) {
- try {
- const severity = this.validateRuleSeverity(options);
-
- if (severity !== 0) {
- this.validateRuleSchema(rule, Array.isArray(options) ? options.slice(1) : []);
- }
- } catch (err) {
- const enhancedMessage = `Configuration for rule "${ruleId}" is invalid:\n${err.message}`;
-
- if (typeof source === "string") {
- throw new Error(`${source}:\n\t${enhancedMessage}`);
- } else {
- throw new Error(enhancedMessage);
- }
- }
- }
-
- /**
- * Validates an environment object
- * @param {Object} environment The environment config object to validate.
- * @param {string} source The name of the configuration source to report in any errors.
- * @param {function(envId:string): Object} [getAdditionalEnv] A map from strings to loaded environments.
- * @returns {void}
- */
- validateEnvironment(
- environment,
- source,
- getAdditionalEnv = noop
- ) {
-
- // not having an environment is ok
- if (!environment) {
- return;
- }
-
- Object.keys(environment).forEach(id => {
- const env = getAdditionalEnv(id) || environments.get(id) || null;
-
- if (!env) {
- const message = `${source}:\n\tEnvironment key "${id}" is unknown\n`;
-
- throw new Error(message);
- }
- });
- }
-
- /**
- * Validates a rules config object
- * @param {Object} rulesConfig The rules config object to validate.
- * @param {string} source The name of the configuration source to report in any errors.
- * @param {function(ruleId:string): Object} getAdditionalRule A map from strings to loaded rules
- * @returns {void}
- */
- validateRules(
- rulesConfig,
- source,
- getAdditionalRule = noop
- ) {
- if (!rulesConfig) {
- return;
- }
-
- Object.keys(rulesConfig).forEach(id => {
- const rule = getAdditionalRule(id) || this.builtInRules.get(id) || null;
-
- this.validateRuleOptions(rule, id, rulesConfig[id], source);
- });
- }
-
- /**
- * Validates a `globals` section of a config file
- * @param {Object} globalsConfig The `globals` section
- * @param {string|null} source The name of the configuration source to report in the event of an error.
- * @returns {void}
- */
- validateGlobals(globalsConfig, source = null) {
- if (!globalsConfig) {
- return;
- }
-
- Object.entries(globalsConfig)
- .forEach(([configuredGlobal, configuredValue]) => {
- try {
- normalizeConfigGlobal(configuredValue);
- } catch (err) {
- throw new Error(`ESLint configuration of global '${configuredGlobal}' in ${source} is invalid:\n${err.message}`);
- }
- });
- }
-
- /**
- * Validate `processor` configuration.
- * @param {string|undefined} processorName The processor name.
- * @param {string} source The name of config file.
- * @param {function(id:string): Processor} getProcessor The getter of defined processors.
- * @returns {void}
- */
- validateProcessor(processorName, source, getProcessor) {
- if (processorName && !getProcessor(processorName)) {
- throw new Error(`ESLint configuration of processor in '${source}' is invalid: '${processorName}' was not found.`);
- }
- }
-
- /**
- * Formats an array of schema validation errors.
- * @param {Array} errors An array of error messages to format.
- * @returns {string} Formatted error message
- */
- formatErrors(errors) {
- return errors.map(error => {
- if (error.keyword === "additionalProperties") {
- const formattedPropertyPath = error.dataPath.length ? `${error.dataPath.slice(1)}.${error.params.additionalProperty}` : error.params.additionalProperty;
-
- return `Unexpected top-level property "${formattedPropertyPath}"`;
- }
- if (error.keyword === "type") {
- const formattedField = error.dataPath.slice(1);
- const formattedExpectedType = Array.isArray(error.schema) ? error.schema.join("/") : error.schema;
- const formattedValue = JSON.stringify(error.data);
-
- return `Property "${formattedField}" is the wrong type (expected ${formattedExpectedType} but got \`${formattedValue}\`)`;
- }
-
- const field = error.dataPath[0] === "." ? error.dataPath.slice(1) : error.dataPath;
-
- return `"${field}" ${error.message}. Value: ${JSON.stringify(error.data)}`;
- }).map(message => `\t- ${message}.\n`).join("");
- }
-
- /**
- * Validates the top level properties of the config object.
- * @param {Object} config The config object to validate.
- * @param {string} source The name of the configuration source to report in any errors.
- * @returns {void}
- */
- validateConfigSchema(config, source = null) {
- validateSchema = validateSchema || ajv.compile(configSchema);
-
- if (!validateSchema(config)) {
- throw new Error(`ESLint configuration in ${source} is invalid:\n${this.formatErrors(validateSchema.errors)}`);
- }
-
- if (Object.hasOwnProperty.call(config, "ecmaFeatures")) {
- emitDeprecationWarning(source, "ESLINT_LEGACY_ECMAFEATURES");
- }
- }
-
- /**
- * Validates an entire config object.
- * @param {Object} config The config object to validate.
- * @param {string} source The name of the configuration source to report in any errors.
- * @param {function(ruleId:string): Object} [getAdditionalRule] A map from strings to loaded rules.
- * @param {function(envId:string): Object} [getAdditionalEnv] A map from strings to loaded envs.
- * @returns {void}
- */
- validate(config, source, getAdditionalRule, getAdditionalEnv) {
- this.validateConfigSchema(config, source);
- this.validateRules(config.rules, source, getAdditionalRule);
- this.validateEnvironment(config.env, source, getAdditionalEnv);
- this.validateGlobals(config.globals, source);
-
- for (const override of config.overrides || []) {
- this.validateRules(override.rules, source, getAdditionalRule);
- this.validateEnvironment(override.env, source, getAdditionalEnv);
- this.validateGlobals(config.globals, source);
- }
- }
-
- /**
- * Validate config array object.
- * @param {ConfigArray} configArray The config array to validate.
- * @returns {void}
- */
- validateConfigArray(configArray) {
- const getPluginEnv = Map.prototype.get.bind(configArray.pluginEnvironments);
- const getPluginProcessor = Map.prototype.get.bind(configArray.pluginProcessors);
- const getPluginRule = Map.prototype.get.bind(configArray.pluginRules);
-
- // Validate.
- for (const element of configArray) {
- if (validated.has(element)) {
- continue;
- }
- validated.add(element);
-
- this.validateEnvironment(element.env, element.name, getPluginEnv);
- this.validateGlobals(element.globals, element.name);
- this.validateProcessor(element.processor, element.name, getPluginProcessor);
- this.validateRules(element.rules, element.name, getPluginRule);
- }
- }
-
-}
-
-/**
- * @fileoverview Common helpers for naming of plugins, formatters and configs
- */
-
-const NAMESPACE_REGEX = /^@.*\//iu;
-
-/**
- * Brings package name to correct format based on prefix
- * @param {string} name The name of the package.
- * @param {string} prefix Can be either "eslint-plugin", "eslint-config" or "eslint-formatter"
- * @returns {string} Normalized name of the package
- * @private
- */
-function normalizePackageName(name, prefix) {
- let normalizedName = name;
-
- /**
- * On Windows, name can come in with Windows slashes instead of Unix slashes.
- * Normalize to Unix first to avoid errors later on.
- * https://github.com/eslint/eslint/issues/5644
- */
- if (normalizedName.includes("\\")) {
- normalizedName = normalizedName.replace(/\\/gu, "/");
- }
-
- if (normalizedName.charAt(0) === "@") {
-
- /**
- * it's a scoped package
- * package name is the prefix, or just a username
- */
- const scopedPackageShortcutRegex = new RegExp(`^(@[^/]+)(?:/(?:${prefix})?)?$`, "u"),
- scopedPackageNameRegex = new RegExp(`^${prefix}(-|$)`, "u");
-
- if (scopedPackageShortcutRegex.test(normalizedName)) {
- normalizedName = normalizedName.replace(scopedPackageShortcutRegex, `$1/${prefix}`);
- } else if (!scopedPackageNameRegex.test(normalizedName.split("/")[1])) {
-
- /**
- * for scoped packages, insert the prefix after the first / unless
- * the path is already @scope/eslint or @scope/eslint-xxx-yyy
- */
- normalizedName = normalizedName.replace(/^@([^/]+)\/(.*)$/u, `@$1/${prefix}-$2`);
- }
- } else if (!normalizedName.startsWith(`${prefix}-`)) {
- normalizedName = `${prefix}-${normalizedName}`;
- }
-
- return normalizedName;
-}
-
-/**
- * Removes the prefix from a fullname.
- * @param {string} fullname The term which may have the prefix.
- * @param {string} prefix The prefix to remove.
- * @returns {string} The term without prefix.
- */
-function getShorthandName(fullname, prefix) {
- if (fullname[0] === "@") {
- let matchResult = new RegExp(`^(@[^/]+)/${prefix}$`, "u").exec(fullname);
-
- if (matchResult) {
- return matchResult[1];
- }
-
- matchResult = new RegExp(`^(@[^/]+)/${prefix}-(.+)$`, "u").exec(fullname);
- if (matchResult) {
- return `${matchResult[1]}/${matchResult[2]}`;
- }
- } else if (fullname.startsWith(`${prefix}-`)) {
- return fullname.slice(prefix.length + 1);
- }
-
- return fullname;
-}
-
-/**
- * Gets the scope (namespace) of a term.
- * @param {string} term The term which may have the namespace.
- * @returns {string} The namespace of the term if it has one.
- */
-function getNamespaceFromTerm(term) {
- const match = term.match(NAMESPACE_REGEX);
-
- return match ? match[0] : "";
-}
-
-var naming = {
- __proto__: null,
- normalizePackageName: normalizePackageName,
- getShorthandName: getShorthandName,
- getNamespaceFromTerm: getNamespaceFromTerm
-};
-
-/**
- * Utility for resolving a module relative to another module
- * @author Teddy Katz
- */
-
-/*
- * `Module.createRequire` is added in v12.2.0. It supports URL as well.
- * We only support the case where the argument is a filepath, not a URL.
- */
-const createRequire = Module__default["default"].createRequire;
-
-/**
- * Resolves a Node module relative to another module
- * @param {string} moduleName The name of a Node module, or a path to a Node module.
- * @param {string} relativeToPath An absolute path indicating the module that `moduleName` should be resolved relative to. This must be
- * a file rather than a directory, but the file need not actually exist.
- * @returns {string} The absolute path that would result from calling `require.resolve(moduleName)` in a file located at `relativeToPath`
- */
-function resolve(moduleName, relativeToPath) {
- try {
- return createRequire(relativeToPath).resolve(moduleName);
- } catch (error) {
-
- // This `if` block is for older Node.js than 12.0.0. We can remove this block in the future.
- if (
- typeof error === "object" &&
- error !== null &&
- error.code === "MODULE_NOT_FOUND" &&
- !error.requireStack &&
- error.message.includes(moduleName)
- ) {
- error.message += `\nRequire stack:\n- ${relativeToPath}`;
- }
- throw error;
- }
-}
-
-var ModuleResolver = {
- __proto__: null,
- resolve: resolve
-};
-
-/**
- * @fileoverview The factory of `ConfigArray` objects.
- *
- * This class provides methods to create `ConfigArray` instance.
- *
- * - `create(configData, options)`
- * Create a `ConfigArray` instance from a config data. This is to handle CLI
- * options except `--config`.
- * - `loadFile(filePath, options)`
- * Create a `ConfigArray` instance from a config file. This is to handle
- * `--config` option. If the file was not found, throws the following error:
- * - If the filename was `*.js`, a `MODULE_NOT_FOUND` error.
- * - If the filename was `package.json`, an IO error or an
- * `ESLINT_CONFIG_FIELD_NOT_FOUND` error.
- * - Otherwise, an IO error such as `ENOENT`.
- * - `loadInDirectory(directoryPath, options)`
- * Create a `ConfigArray` instance from a config file which is on a given
- * directory. This tries to load `.eslintrc.*` or `package.json`. If not
- * found, returns an empty `ConfigArray`.
- * - `loadESLintIgnore(filePath)`
- * Create a `ConfigArray` instance from a config file that is `.eslintignore`
- * format. This is to handle `--ignore-path` option.
- * - `loadDefaultESLintIgnore()`
- * Create a `ConfigArray` instance from `.eslintignore` or `package.json` in
- * the current working directory.
- *
- * `ConfigArrayFactory` class has the responsibility that loads configuration
- * files, including loading `extends`, `parser`, and `plugins`. The created
- * `ConfigArray` instance has the loaded `extends`, `parser`, and `plugins`.
- *
- * But this class doesn't handle cascading. `CascadingConfigArrayFactory` class
- * handles cascading and hierarchy.
- *
- * @author Toru Nagashima
- */
-
-const require$1 = Module.createRequire(require('url').pathToFileURL(__filename).toString());
-
-const debug$2 = debugOrig__default["default"]("eslintrc:config-array-factory");
-
-//------------------------------------------------------------------------------
-// Helpers
-//------------------------------------------------------------------------------
-
-const configFilenames = [
- ".eslintrc.js",
- ".eslintrc.cjs",
- ".eslintrc.yaml",
- ".eslintrc.yml",
- ".eslintrc.json",
- ".eslintrc",
- "package.json"
-];
-
-// Define types for VSCode IntelliSense.
-/** @typedef {import("./shared/types").ConfigData} ConfigData */
-/** @typedef {import("./shared/types").OverrideConfigData} OverrideConfigData */
-/** @typedef {import("./shared/types").Parser} Parser */
-/** @typedef {import("./shared/types").Plugin} Plugin */
-/** @typedef {import("./shared/types").Rule} Rule */
-/** @typedef {import("./config-array/config-dependency").DependentParser} DependentParser */
-/** @typedef {import("./config-array/config-dependency").DependentPlugin} DependentPlugin */
-/** @typedef {ConfigArray[0]} ConfigArrayElement */
-
-/**
- * @typedef {Object} ConfigArrayFactoryOptions
- * @property {Map} [additionalPluginPool] The map for additional plugins.
- * @property {string} [cwd] The path to the current working directory.
- * @property {string} [resolvePluginsRelativeTo] A path to the directory that plugins should be resolved from. Defaults to `cwd`.
- * @property {Map} builtInRules The rules that are built in to ESLint.
- * @property {Object} [resolver=ModuleResolver] The module resolver object.
- * @property {string} eslintAllPath The path to the definitions for eslint:all.
- * @property {Function} getEslintAllConfig Returns the config data for eslint:all.
- * @property {string} eslintRecommendedPath The path to the definitions for eslint:recommended.
- * @property {Function} getEslintRecommendedConfig Returns the config data for eslint:recommended.
- */
-
-/**
- * @typedef {Object} ConfigArrayFactoryInternalSlots
- * @property {Map} additionalPluginPool The map for additional plugins.
- * @property {string} cwd The path to the current working directory.
- * @property {string | undefined} resolvePluginsRelativeTo An absolute path the the directory that plugins should be resolved from.
- * @property {Map} builtInRules The rules that are built in to ESLint.
- * @property {Object} [resolver=ModuleResolver] The module resolver object.
- * @property {string} eslintAllPath The path to the definitions for eslint:all.
- * @property {Function} getEslintAllConfig Returns the config data for eslint:all.
- * @property {string} eslintRecommendedPath The path to the definitions for eslint:recommended.
- * @property {Function} getEslintRecommendedConfig Returns the config data for eslint:recommended.
- */
-
-/**
- * @typedef {Object} ConfigArrayFactoryLoadingContext
- * @property {string} filePath The path to the current configuration.
- * @property {string} matchBasePath The base path to resolve relative paths in `overrides[].files`, `overrides[].excludedFiles`, and `ignorePatterns`.
- * @property {string} name The name of the current configuration.
- * @property {string} pluginBasePath The base path to resolve plugins.
- * @property {"config" | "ignore" | "implicit-processor"} type The type of the current configuration. This is `"config"` in normal. This is `"ignore"` if it came from `.eslintignore`. This is `"implicit-processor"` if it came from legacy file-extension processors.
- */
-
-/**
- * @typedef {Object} ConfigArrayFactoryLoadingContext
- * @property {string} filePath The path to the current configuration.
- * @property {string} matchBasePath The base path to resolve relative paths in `overrides[].files`, `overrides[].excludedFiles`, and `ignorePatterns`.
- * @property {string} name The name of the current configuration.
- * @property {"config" | "ignore" | "implicit-processor"} type The type of the current configuration. This is `"config"` in normal. This is `"ignore"` if it came from `.eslintignore`. This is `"implicit-processor"` if it came from legacy file-extension processors.
- */
-
-/** @type {WeakMap} */
-const internalSlotsMap$1 = new WeakMap();
-
-/** @type {WeakMap} */
-const normalizedPlugins = new WeakMap();
-
-/**
- * Check if a given string is a file path.
- * @param {string} nameOrPath A module name or file path.
- * @returns {boolean} `true` if the `nameOrPath` is a file path.
- */
-function isFilePath(nameOrPath) {
- return (
- /^\.{1,2}[/\\]/u.test(nameOrPath) ||
- path__default["default"].isAbsolute(nameOrPath)
- );
-}
-
-/**
- * Convenience wrapper for synchronously reading file contents.
- * @param {string} filePath The filename to read.
- * @returns {string} The file contents, with the BOM removed.
- * @private
- */
-function readFile(filePath) {
- return fs__default["default"].readFileSync(filePath, "utf8").replace(/^\ufeff/u, "");
-}
-
-/**
- * Loads a YAML configuration from a file.
- * @param {string} filePath The filename to load.
- * @returns {ConfigData} The configuration object from the file.
- * @throws {Error} If the file cannot be read.
- * @private
- */
-function loadYAMLConfigFile(filePath) {
- debug$2(`Loading YAML config file: ${filePath}`);
-
- // lazy load YAML to improve performance when not used
- const yaml = require$1("js-yaml");
-
- try {
-
- // empty YAML file can be null, so always use
- return yaml.load(readFile(filePath)) || {};
- } catch (e) {
- debug$2(`Error reading YAML file: ${filePath}`);
- e.message = `Cannot read config file: ${filePath}\nError: ${e.message}`;
- throw e;
- }
-}
-
-/**
- * Loads a JSON configuration from a file.
- * @param {string} filePath The filename to load.
- * @returns {ConfigData} The configuration object from the file.
- * @throws {Error} If the file cannot be read.
- * @private
- */
-function loadJSONConfigFile(filePath) {
- debug$2(`Loading JSON config file: ${filePath}`);
-
- try {
- return JSON.parse(stripComments__default["default"](readFile(filePath)));
- } catch (e) {
- debug$2(`Error reading JSON file: ${filePath}`);
- e.message = `Cannot read config file: ${filePath}\nError: ${e.message}`;
- e.messageTemplate = "failed-to-read-json";
- e.messageData = {
- path: filePath,
- message: e.message
- };
- throw e;
- }
-}
-
-/**
- * Loads a legacy (.eslintrc) configuration from a file.
- * @param {string} filePath The filename to load.
- * @returns {ConfigData} The configuration object from the file.
- * @throws {Error} If the file cannot be read.
- * @private
- */
-function loadLegacyConfigFile(filePath) {
- debug$2(`Loading legacy config file: ${filePath}`);
-
- // lazy load YAML to improve performance when not used
- const yaml = require$1("js-yaml");
-
- try {
- return yaml.load(stripComments__default["default"](readFile(filePath))) || /* istanbul ignore next */ {};
- } catch (e) {
- debug$2("Error reading YAML file: %s\n%o", filePath, e);
- e.message = `Cannot read config file: ${filePath}\nError: ${e.message}`;
- throw e;
- }
-}
-
-/**
- * Loads a JavaScript configuration from a file.
- * @param {string} filePath The filename to load.
- * @returns {ConfigData} The configuration object from the file.
- * @throws {Error} If the file cannot be read.
- * @private
- */
-function loadJSConfigFile(filePath) {
- debug$2(`Loading JS config file: ${filePath}`);
- try {
- return importFresh__default["default"](filePath);
- } catch (e) {
- debug$2(`Error reading JavaScript file: ${filePath}`);
- e.message = `Cannot read config file: ${filePath}\nError: ${e.message}`;
- throw e;
- }
-}
-
-/**
- * Loads a configuration from a package.json file.
- * @param {string} filePath The filename to load.
- * @returns {ConfigData} The configuration object from the file.
- * @throws {Error} If the file cannot be read.
- * @private
- */
-function loadPackageJSONConfigFile(filePath) {
- debug$2(`Loading package.json config file: ${filePath}`);
- try {
- const packageData = loadJSONConfigFile(filePath);
-
- if (!Object.hasOwnProperty.call(packageData, "eslintConfig")) {
- throw Object.assign(
- new Error("package.json file doesn't have 'eslintConfig' field."),
- { code: "ESLINT_CONFIG_FIELD_NOT_FOUND" }
- );
- }
-
- return packageData.eslintConfig;
- } catch (e) {
- debug$2(`Error reading package.json file: ${filePath}`);
- e.message = `Cannot read config file: ${filePath}\nError: ${e.message}`;
- throw e;
- }
-}
-
-/**
- * Loads a `.eslintignore` from a file.
- * @param {string} filePath The filename to load.
- * @returns {string[]} The ignore patterns from the file.
- * @private
- */
-function loadESLintIgnoreFile(filePath) {
- debug$2(`Loading .eslintignore file: ${filePath}`);
-
- try {
- return readFile(filePath)
- .split(/\r?\n/gu)
- .filter(line => line.trim() !== "" && !line.startsWith("#"));
- } catch (e) {
- debug$2(`Error reading .eslintignore file: ${filePath}`);
- e.message = `Cannot read .eslintignore file: ${filePath}\nError: ${e.message}`;
- throw e;
- }
-}
-
-/**
- * Creates an error to notify about a missing config to extend from.
- * @param {string} configName The name of the missing config.
- * @param {string} importerName The name of the config that imported the missing config
- * @param {string} messageTemplate The text template to source error strings from.
- * @returns {Error} The error object to throw
- * @private
- */
-function configInvalidError(configName, importerName, messageTemplate) {
- return Object.assign(
- new Error(`Failed to load config "${configName}" to extend from.`),
- {
- messageTemplate,
- messageData: { configName, importerName }
- }
- );
-}
-
-/**
- * Loads a configuration file regardless of the source. Inspects the file path
- * to determine the correctly way to load the config file.
- * @param {string} filePath The path to the configuration.
- * @returns {ConfigData|null} The configuration information.
- * @private
- */
-function loadConfigFile(filePath) {
- switch (path__default["default"].extname(filePath)) {
- case ".js":
- case ".cjs":
- return loadJSConfigFile(filePath);
-
- case ".json":
- if (path__default["default"].basename(filePath) === "package.json") {
- return loadPackageJSONConfigFile(filePath);
- }
- return loadJSONConfigFile(filePath);
-
- case ".yaml":
- case ".yml":
- return loadYAMLConfigFile(filePath);
-
- default:
- return loadLegacyConfigFile(filePath);
- }
-}
-
-/**
- * Write debug log.
- * @param {string} request The requested module name.
- * @param {string} relativeTo The file path to resolve the request relative to.
- * @param {string} filePath The resolved file path.
- * @returns {void}
- */
-function writeDebugLogForLoading(request, relativeTo, filePath) {
- /* istanbul ignore next */
- if (debug$2.enabled) {
- let nameAndVersion = null;
-
- try {
- const packageJsonPath = resolve(
- `${request}/package.json`,
- relativeTo
- );
- const { version = "unknown" } = require$1(packageJsonPath);
-
- nameAndVersion = `${request}@${version}`;
- } catch (error) {
- debug$2("package.json was not found:", error.message);
- nameAndVersion = request;
- }
-
- debug$2("Loaded: %s (%s)", nameAndVersion, filePath);
- }
-}
-
-/**
- * Create a new context with default values.
- * @param {ConfigArrayFactoryInternalSlots} slots The internal slots.
- * @param {"config" | "ignore" | "implicit-processor" | undefined} providedType The type of the current configuration. Default is `"config"`.
- * @param {string | undefined} providedName The name of the current configuration. Default is the relative path from `cwd` to `filePath`.
- * @param {string | undefined} providedFilePath The path to the current configuration. Default is empty string.
- * @param {string | undefined} providedMatchBasePath The type of the current configuration. Default is the directory of `filePath` or `cwd`.
- * @returns {ConfigArrayFactoryLoadingContext} The created context.
- */
-function createContext(
- { cwd, resolvePluginsRelativeTo },
- providedType,
- providedName,
- providedFilePath,
- providedMatchBasePath
-) {
- const filePath = providedFilePath
- ? path__default["default"].resolve(cwd, providedFilePath)
- : "";
- const matchBasePath =
- (providedMatchBasePath && path__default["default"].resolve(cwd, providedMatchBasePath)) ||
- (filePath && path__default["default"].dirname(filePath)) ||
- cwd;
- const name =
- providedName ||
- (filePath && path__default["default"].relative(cwd, filePath)) ||
- "";
- const pluginBasePath =
- resolvePluginsRelativeTo ||
- (filePath && path__default["default"].dirname(filePath)) ||
- cwd;
- const type = providedType || "config";
-
- return { filePath, matchBasePath, name, pluginBasePath, type };
-}
-
-/**
- * Normalize a given plugin.
- * - Ensure the object to have four properties: configs, environments, processors, and rules.
- * - Ensure the object to not have other properties.
- * @param {Plugin} plugin The plugin to normalize.
- * @returns {Plugin} The normalized plugin.
- */
-function normalizePlugin(plugin) {
-
- // first check the cache
- let normalizedPlugin = normalizedPlugins.get(plugin);
-
- if (normalizedPlugin) {
- return normalizedPlugin;
- }
-
- normalizedPlugin = {
- configs: plugin.configs || {},
- environments: plugin.environments || {},
- processors: plugin.processors || {},
- rules: plugin.rules || {}
- };
-
- // save the reference for later
- normalizedPlugins.set(plugin, normalizedPlugin);
-
- return normalizedPlugin;
-}
-
-//------------------------------------------------------------------------------
-// Public Interface
-//------------------------------------------------------------------------------
-
-/**
- * The factory of `ConfigArray` objects.
- */
-class ConfigArrayFactory {
-
- /**
- * Initialize this instance.
- * @param {ConfigArrayFactoryOptions} [options] The map for additional plugins.
- */
- constructor({
- additionalPluginPool = new Map(),
- cwd = process.cwd(),
- resolvePluginsRelativeTo,
- builtInRules,
- resolver = ModuleResolver,
- eslintAllPath,
- getEslintAllConfig,
- eslintRecommendedPath,
- getEslintRecommendedConfig
- } = {}) {
- internalSlotsMap$1.set(this, {
- additionalPluginPool,
- cwd,
- resolvePluginsRelativeTo:
- resolvePluginsRelativeTo &&
- path__default["default"].resolve(cwd, resolvePluginsRelativeTo),
- builtInRules,
- resolver,
- eslintAllPath,
- getEslintAllConfig,
- eslintRecommendedPath,
- getEslintRecommendedConfig
- });
- }
-
- /**
- * Create `ConfigArray` instance from a config data.
- * @param {ConfigData|null} configData The config data to create.
- * @param {Object} [options] The options.
- * @param {string} [options.basePath] The base path to resolve relative paths in `overrides[].files`, `overrides[].excludedFiles`, and `ignorePatterns`.
- * @param {string} [options.filePath] The path to this config data.
- * @param {string} [options.name] The config name.
- * @returns {ConfigArray} Loaded config.
- */
- create(configData, { basePath, filePath, name } = {}) {
- if (!configData) {
- return new ConfigArray();
- }
-
- const slots = internalSlotsMap$1.get(this);
- const ctx = createContext(slots, "config", name, filePath, basePath);
- const elements = this._normalizeConfigData(configData, ctx);
-
- return new ConfigArray(...elements);
- }
-
- /**
- * Load a config file.
- * @param {string} filePath The path to a config file.
- * @param {Object} [options] The options.
- * @param {string} [options.basePath] The base path to resolve relative paths in `overrides[].files`, `overrides[].excludedFiles`, and `ignorePatterns`.
- * @param {string} [options.name] The config name.
- * @returns {ConfigArray} Loaded config.
- */
- loadFile(filePath, { basePath, name } = {}) {
- const slots = internalSlotsMap$1.get(this);
- const ctx = createContext(slots, "config", name, filePath, basePath);
-
- return new ConfigArray(...this._loadConfigData(ctx));
- }
-
- /**
- * Load the config file on a given directory if exists.
- * @param {string} directoryPath The path to a directory.
- * @param {Object} [options] The options.
- * @param {string} [options.basePath] The base path to resolve relative paths in `overrides[].files`, `overrides[].excludedFiles`, and `ignorePatterns`.
- * @param {string} [options.name] The config name.
- * @returns {ConfigArray} Loaded config. An empty `ConfigArray` if any config doesn't exist.
- */
- loadInDirectory(directoryPath, { basePath, name } = {}) {
- const slots = internalSlotsMap$1.get(this);
-
- for (const filename of configFilenames) {
- const ctx = createContext(
- slots,
- "config",
- name,
- path__default["default"].join(directoryPath, filename),
- basePath
- );
-
- if (fs__default["default"].existsSync(ctx.filePath) && fs__default["default"].statSync(ctx.filePath).isFile()) {
- let configData;
-
- try {
- configData = loadConfigFile(ctx.filePath);
- } catch (error) {
- if (!error || error.code !== "ESLINT_CONFIG_FIELD_NOT_FOUND") {
- throw error;
- }
- }
-
- if (configData) {
- debug$2(`Config file found: ${ctx.filePath}`);
- return new ConfigArray(
- ...this._normalizeConfigData(configData, ctx)
- );
- }
- }
- }
-
- debug$2(`Config file not found on ${directoryPath}`);
- return new ConfigArray();
- }
-
- /**
- * Check if a config file on a given directory exists or not.
- * @param {string} directoryPath The path to a directory.
- * @returns {string | null} The path to the found config file. If not found then null.
- */
- static getPathToConfigFileInDirectory(directoryPath) {
- for (const filename of configFilenames) {
- const filePath = path__default["default"].join(directoryPath, filename);
-
- if (fs__default["default"].existsSync(filePath)) {
- if (filename === "package.json") {
- try {
- loadPackageJSONConfigFile(filePath);
- return filePath;
- } catch { /* ignore */ }
- } else {
- return filePath;
- }
- }
- }
- return null;
- }
-
- /**
- * Load `.eslintignore` file.
- * @param {string} filePath The path to a `.eslintignore` file to load.
- * @returns {ConfigArray} Loaded config. An empty `ConfigArray` if any config doesn't exist.
- */
- loadESLintIgnore(filePath) {
- const slots = internalSlotsMap$1.get(this);
- const ctx = createContext(
- slots,
- "ignore",
- void 0,
- filePath,
- slots.cwd
- );
- const ignorePatterns = loadESLintIgnoreFile(ctx.filePath);
-
- return new ConfigArray(
- ...this._normalizeESLintIgnoreData(ignorePatterns, ctx)
- );
- }
-
- /**
- * Load `.eslintignore` file in the current working directory.
- * @returns {ConfigArray} Loaded config. An empty `ConfigArray` if any config doesn't exist.
- */
- loadDefaultESLintIgnore() {
- const slots = internalSlotsMap$1.get(this);
- const eslintIgnorePath = path__default["default"].resolve(slots.cwd, ".eslintignore");
- const packageJsonPath = path__default["default"].resolve(slots.cwd, "package.json");
-
- if (fs__default["default"].existsSync(eslintIgnorePath)) {
- return this.loadESLintIgnore(eslintIgnorePath);
- }
- if (fs__default["default"].existsSync(packageJsonPath)) {
- const data = loadJSONConfigFile(packageJsonPath);
-
- if (Object.hasOwnProperty.call(data, "eslintIgnore")) {
- if (!Array.isArray(data.eslintIgnore)) {
- throw new Error("Package.json eslintIgnore property requires an array of paths");
- }
- const ctx = createContext(
- slots,
- "ignore",
- "eslintIgnore in package.json",
- packageJsonPath,
- slots.cwd
- );
-
- return new ConfigArray(
- ...this._normalizeESLintIgnoreData(data.eslintIgnore, ctx)
- );
- }
- }
-
- return new ConfigArray();
- }
-
- /**
- * Load a given config file.
- * @param {ConfigArrayFactoryLoadingContext} ctx The loading context.
- * @returns {IterableIterator} Loaded config.
- * @private
- */
- _loadConfigData(ctx) {
- return this._normalizeConfigData(loadConfigFile(ctx.filePath), ctx);
- }
-
- /**
- * Normalize a given `.eslintignore` data to config array elements.
- * @param {string[]} ignorePatterns The patterns to ignore files.
- * @param {ConfigArrayFactoryLoadingContext} ctx The loading context.
- * @returns {IterableIterator} The normalized config.
- * @private
- */
- *_normalizeESLintIgnoreData(ignorePatterns, ctx) {
- const elements = this._normalizeObjectConfigData(
- { ignorePatterns },
- ctx
- );
-
- // Set `ignorePattern.loose` flag for backward compatibility.
- for (const element of elements) {
- if (element.ignorePattern) {
- element.ignorePattern.loose = true;
- }
- yield element;
- }
- }
-
- /**
- * Normalize a given config to an array.
- * @param {ConfigData} configData The config data to normalize.
- * @param {ConfigArrayFactoryLoadingContext} ctx The loading context.
- * @returns {IterableIterator} The normalized config.
- * @private
- */
- _normalizeConfigData(configData, ctx) {
- const validator = new ConfigValidator();
-
- validator.validateConfigSchema(configData, ctx.name || ctx.filePath);
- return this._normalizeObjectConfigData(configData, ctx);
- }
-
- /**
- * Normalize a given config to an array.
- * @param {ConfigData|OverrideConfigData} configData The config data to normalize.
- * @param {ConfigArrayFactoryLoadingContext} ctx The loading context.
- * @returns {IterableIterator} The normalized config.
- * @private
- */
- *_normalizeObjectConfigData(configData, ctx) {
- const { files, excludedFiles, ...configBody } = configData;
- const criteria = OverrideTester.create(
- files,
- excludedFiles,
- ctx.matchBasePath
- );
- const elements = this._normalizeObjectConfigDataBody(configBody, ctx);
-
- // Apply the criteria to every element.
- for (const element of elements) {
-
- /*
- * Merge the criteria.
- * This is for the `overrides` entries that came from the
- * configurations of `overrides[].extends`.
- */
- element.criteria = OverrideTester.and(criteria, element.criteria);
-
- /*
- * Remove `root` property to ignore `root` settings which came from
- * `extends` in `overrides`.
- */
- if (element.criteria) {
- element.root = void 0;
- }
-
- yield element;
- }
- }
-
- /**
- * Normalize a given config to an array.
- * @param {ConfigData} configData The config data to normalize.
- * @param {ConfigArrayFactoryLoadingContext} ctx The loading context.
- * @returns {IterableIterator} The normalized config.
- * @private
- */
- *_normalizeObjectConfigDataBody(
- {
- env,
- extends: extend,
- globals,
- ignorePatterns,
- noInlineConfig,
- parser: parserName,
- parserOptions,
- plugins: pluginList,
- processor,
- reportUnusedDisableDirectives,
- root,
- rules,
- settings,
- overrides: overrideList = []
- },
- ctx
- ) {
- const extendList = Array.isArray(extend) ? extend : [extend];
- const ignorePattern = ignorePatterns && new IgnorePattern(
- Array.isArray(ignorePatterns) ? ignorePatterns : [ignorePatterns],
- ctx.matchBasePath
- );
-
- // Flatten `extends`.
- for (const extendName of extendList.filter(Boolean)) {
- yield* this._loadExtends(extendName, ctx);
- }
-
- // Load parser & plugins.
- const parser = parserName && this._loadParser(parserName, ctx);
- const plugins = pluginList && this._loadPlugins(pluginList, ctx);
-
- // Yield pseudo config data for file extension processors.
- if (plugins) {
- yield* this._takeFileExtensionProcessors(plugins, ctx);
- }
-
- // Yield the config data except `extends` and `overrides`.
- yield {
-
- // Debug information.
- type: ctx.type,
- name: ctx.name,
- filePath: ctx.filePath,
-
- // Config data.
- criteria: null,
- env,
- globals,
- ignorePattern,
- noInlineConfig,
- parser,
- parserOptions,
- plugins,
- processor,
- reportUnusedDisableDirectives,
- root,
- rules,
- settings
- };
-
- // Flatten `overries`.
- for (let i = 0; i < overrideList.length; ++i) {
- yield* this._normalizeObjectConfigData(
- overrideList[i],
- { ...ctx, name: `${ctx.name}#overrides[${i}]` }
- );
- }
- }
-
- /**
- * Load configs of an element in `extends`.
- * @param {string} extendName The name of a base config.
- * @param {ConfigArrayFactoryLoadingContext} ctx The loading context.
- * @returns {IterableIterator} The normalized config.
- * @private
- */
- _loadExtends(extendName, ctx) {
- debug$2("Loading {extends:%j} relative to %s", extendName, ctx.filePath);
- try {
- if (extendName.startsWith("eslint:")) {
- return this._loadExtendedBuiltInConfig(extendName, ctx);
- }
- if (extendName.startsWith("plugin:")) {
- return this._loadExtendedPluginConfig(extendName, ctx);
- }
- return this._loadExtendedShareableConfig(extendName, ctx);
- } catch (error) {
- error.message += `\nReferenced from: ${ctx.filePath || ctx.name}`;
- throw error;
- }
- }
-
- /**
- * Load configs of an element in `extends`.
- * @param {string} extendName The name of a base config.
- * @param {ConfigArrayFactoryLoadingContext} ctx The loading context.
- * @returns {IterableIterator} The normalized config.
- * @private
- */
- _loadExtendedBuiltInConfig(extendName, ctx) {
- const {
- eslintAllPath,
- getEslintAllConfig,
- eslintRecommendedPath,
- getEslintRecommendedConfig
- } = internalSlotsMap$1.get(this);
-
- if (extendName === "eslint:recommended") {
- const name = `${ctx.name} » ${extendName}`;
-
- if (getEslintRecommendedConfig) {
- if (typeof getEslintRecommendedConfig !== "function") {
- throw new Error(`getEslintRecommendedConfig must be a function instead of '${getEslintRecommendedConfig}'`);
- }
- return this._normalizeConfigData(getEslintRecommendedConfig(), { ...ctx, name, filePath: "" });
- }
- return this._loadConfigData({
- ...ctx,
- name,
- filePath: eslintRecommendedPath
- });
- }
- if (extendName === "eslint:all") {
- const name = `${ctx.name} » ${extendName}`;
-
- if (getEslintAllConfig) {
- if (typeof getEslintAllConfig !== "function") {
- throw new Error(`getEslintAllConfig must be a function instead of '${getEslintAllConfig}'`);
- }
- return this._normalizeConfigData(getEslintAllConfig(), { ...ctx, name, filePath: "" });
- }
- return this._loadConfigData({
- ...ctx,
- name,
- filePath: eslintAllPath
- });
- }
-
- throw configInvalidError(extendName, ctx.name, "extend-config-missing");
- }
-
- /**
- * Load configs of an element in `extends`.
- * @param {string} extendName The name of a base config.
- * @param {ConfigArrayFactoryLoadingContext} ctx The loading context.
- * @returns {IterableIterator} The normalized config.
- * @private
- */
- _loadExtendedPluginConfig(extendName, ctx) {
- const slashIndex = extendName.lastIndexOf("/");
-
- if (slashIndex === -1) {
- throw configInvalidError(extendName, ctx.filePath, "plugin-invalid");
- }
-
- const pluginName = extendName.slice("plugin:".length, slashIndex);
- const configName = extendName.slice(slashIndex + 1);
-
- if (isFilePath(pluginName)) {
- throw new Error("'extends' cannot use a file path for plugins.");
- }
-
- const plugin = this._loadPlugin(pluginName, ctx);
- const configData =
- plugin.definition &&
- plugin.definition.configs[configName];
-
- if (configData) {
- return this._normalizeConfigData(configData, {
- ...ctx,
- filePath: plugin.filePath || ctx.filePath,
- name: `${ctx.name} » plugin:${plugin.id}/${configName}`
- });
- }
-
- throw plugin.error || configInvalidError(extendName, ctx.filePath, "extend-config-missing");
- }
-
- /**
- * Load configs of an element in `extends`.
- * @param {string} extendName The name of a base config.
- * @param {ConfigArrayFactoryLoadingContext} ctx The loading context.
- * @returns {IterableIterator} The normalized config.
- * @private
- */
- _loadExtendedShareableConfig(extendName, ctx) {
- const { cwd, resolver } = internalSlotsMap$1.get(this);
- const relativeTo = ctx.filePath || path__default["default"].join(cwd, "__placeholder__.js");
- let request;
-
- if (isFilePath(extendName)) {
- request = extendName;
- } else if (extendName.startsWith(".")) {
- request = `./${extendName}`; // For backward compatibility. A ton of tests depended on this behavior.
- } else {
- request = normalizePackageName(
- extendName,
- "eslint-config"
- );
- }
-
- let filePath;
-
- try {
- filePath = resolver.resolve(request, relativeTo);
- } catch (error) {
- /* istanbul ignore else */
- if (error && error.code === "MODULE_NOT_FOUND") {
- throw configInvalidError(extendName, ctx.filePath, "extend-config-missing");
- }
- throw error;
- }
-
- writeDebugLogForLoading(request, relativeTo, filePath);
- return this._loadConfigData({
- ...ctx,
- filePath,
- name: `${ctx.name} » ${request}`
- });
- }
-
- /**
- * Load given plugins.
- * @param {string[]} names The plugin names to load.
- * @param {ConfigArrayFactoryLoadingContext} ctx The loading context.
- * @returns {Record} The loaded parser.
- * @private
- */
- _loadPlugins(names, ctx) {
- return names.reduce((map, name) => {
- if (isFilePath(name)) {
- throw new Error("Plugins array cannot includes file paths.");
- }
- const plugin = this._loadPlugin(name, ctx);
-
- map[plugin.id] = plugin;
-
- return map;
- }, {});
- }
-
- /**
- * Load a given parser.
- * @param {string} nameOrPath The package name or the path to a parser file.
- * @param {ConfigArrayFactoryLoadingContext} ctx The loading context.
- * @returns {DependentParser} The loaded parser.
- */
- _loadParser(nameOrPath, ctx) {
- debug$2("Loading parser %j from %s", nameOrPath, ctx.filePath);
-
- const { cwd, resolver } = internalSlotsMap$1.get(this);
- const relativeTo = ctx.filePath || path__default["default"].join(cwd, "__placeholder__.js");
-
- try {
- const filePath = resolver.resolve(nameOrPath, relativeTo);
-
- writeDebugLogForLoading(nameOrPath, relativeTo, filePath);
-
- return new ConfigDependency({
- definition: require$1(filePath),
- filePath,
- id: nameOrPath,
- importerName: ctx.name,
- importerPath: ctx.filePath
- });
- } catch (error) {
-
- // If the parser name is "espree", load the espree of ESLint.
- if (nameOrPath === "espree") {
- debug$2("Fallback espree.");
- return new ConfigDependency({
- definition: require$1("espree"),
- filePath: require$1.resolve("espree"),
- id: nameOrPath,
- importerName: ctx.name,
- importerPath: ctx.filePath
- });
- }
-
- debug$2("Failed to load parser '%s' declared in '%s'.", nameOrPath, ctx.name);
- error.message = `Failed to load parser '${nameOrPath}' declared in '${ctx.name}': ${error.message}`;
-
- return new ConfigDependency({
- error,
- id: nameOrPath,
- importerName: ctx.name,
- importerPath: ctx.filePath
- });
- }
- }
-
- /**
- * Load a given plugin.
- * @param {string} name The plugin name to load.
- * @param {ConfigArrayFactoryLoadingContext} ctx The loading context.
- * @returns {DependentPlugin} The loaded plugin.
- * @private
- */
- _loadPlugin(name, ctx) {
- debug$2("Loading plugin %j from %s", name, ctx.filePath);
-
- const { additionalPluginPool, resolver } = internalSlotsMap$1.get(this);
- const request = normalizePackageName(name, "eslint-plugin");
- const id = getShorthandName(request, "eslint-plugin");
- const relativeTo = path__default["default"].join(ctx.pluginBasePath, "__placeholder__.js");
-
- if (name.match(/\s+/u)) {
- const error = Object.assign(
- new Error(`Whitespace found in plugin name '${name}'`),
- {
- messageTemplate: "whitespace-found",
- messageData: { pluginName: request }
- }
- );
-
- return new ConfigDependency({
- error,
- id,
- importerName: ctx.name,
- importerPath: ctx.filePath
- });
- }
-
- // Check for additional pool.
- const plugin =
- additionalPluginPool.get(request) ||
- additionalPluginPool.get(id);
-
- if (plugin) {
- return new ConfigDependency({
- definition: normalizePlugin(plugin),
- original: plugin,
- filePath: "", // It's unknown where the plugin came from.
- id,
- importerName: ctx.name,
- importerPath: ctx.filePath
- });
- }
-
- let filePath;
- let error;
-
- try {
- filePath = resolver.resolve(request, relativeTo);
- } catch (resolveError) {
- error = resolveError;
- /* istanbul ignore else */
- if (error && error.code === "MODULE_NOT_FOUND") {
- error.messageTemplate = "plugin-missing";
- error.messageData = {
- pluginName: request,
- resolvePluginsRelativeTo: ctx.pluginBasePath,
- importerName: ctx.name
- };
- }
- }
-
- if (filePath) {
- try {
- writeDebugLogForLoading(request, relativeTo, filePath);
-
- const startTime = Date.now();
- const pluginDefinition = require$1(filePath);
-
- debug$2(`Plugin ${filePath} loaded in: ${Date.now() - startTime}ms`);
-
- return new ConfigDependency({
- definition: normalizePlugin(pluginDefinition),
- original: pluginDefinition,
- filePath,
- id,
- importerName: ctx.name,
- importerPath: ctx.filePath
- });
- } catch (loadError) {
- error = loadError;
- }
- }
-
- debug$2("Failed to load plugin '%s' declared in '%s'.", name, ctx.name);
- error.message = `Failed to load plugin '${name}' declared in '${ctx.name}': ${error.message}`;
- return new ConfigDependency({
- error,
- id,
- importerName: ctx.name,
- importerPath: ctx.filePath
- });
- }
-
- /**
- * Take file expression processors as config array elements.
- * @param {Record} plugins The plugin definitions.
- * @param {ConfigArrayFactoryLoadingContext} ctx The loading context.
- * @returns {IterableIterator} The config array elements of file expression processors.
- * @private
- */
- *_takeFileExtensionProcessors(plugins, ctx) {
- for (const pluginId of Object.keys(plugins)) {
- const processors =
- plugins[pluginId] &&
- plugins[pluginId].definition &&
- plugins[pluginId].definition.processors;
-
- if (!processors) {
- continue;
- }
-
- for (const processorId of Object.keys(processors)) {
- if (processorId.startsWith(".")) {
- yield* this._normalizeObjectConfigData(
- {
- files: [`*${processorId}`],
- processor: `${pluginId}/${processorId}`
- },
- {
- ...ctx,
- type: "implicit-processor",
- name: `${ctx.name}#processors["${pluginId}/${processorId}"]`
- }
- );
- }
- }
- }
- }
-}
-
-/**
- * @fileoverview `CascadingConfigArrayFactory` class.
- *
- * `CascadingConfigArrayFactory` class has a responsibility:
- *
- * 1. Handles cascading of config files.
- *
- * It provides two methods:
- *
- * - `getConfigArrayForFile(filePath)`
- * Get the corresponded configuration of a given file. This method doesn't
- * throw even if the given file didn't exist.
- * - `clearCache()`
- * Clear the internal cache. You have to call this method when
- * `additionalPluginPool` was updated if `baseConfig` or `cliConfig` depends
- * on the additional plugins. (`CLIEngine#addPlugin()` method calls this.)
- *
- * @author Toru Nagashima
- */
-
-const debug$1 = debugOrig__default["default"]("eslintrc:cascading-config-array-factory");
-
-//------------------------------------------------------------------------------
-// Helpers
-//------------------------------------------------------------------------------
-
-// Define types for VSCode IntelliSense.
-/** @typedef {import("./shared/types").ConfigData} ConfigData */
-/** @typedef {import("./shared/types").Parser} Parser */
-/** @typedef {import("./shared/types").Plugin} Plugin */
-/** @typedef {import("./shared/types").Rule} Rule */
-/** @typedef {ReturnType} ConfigArray */
-
-/**
- * @typedef {Object} CascadingConfigArrayFactoryOptions
- * @property {Map} [additionalPluginPool] The map for additional plugins.
- * @property {ConfigData} [baseConfig] The config by `baseConfig` option.
- * @property {ConfigData} [cliConfig] The config by CLI options (`--env`, `--global`, `--ignore-pattern`, `--parser`, `--parser-options`, `--plugin`, and `--rule`). CLI options overwrite the setting in config files.
- * @property {string} [cwd] The base directory to start lookup.
- * @property {string} [ignorePath] The path to the alternative file of `.eslintignore`.
- * @property {string[]} [rulePaths] The value of `--rulesdir` option.
- * @property {string} [specificConfigPath] The value of `--config` option.
- * @property {boolean} [useEslintrc] if `false` then it doesn't load config files.
- * @property {Function} loadRules The function to use to load rules.
- * @property {Map} builtInRules The rules that are built in to ESLint.
- * @property {Object} [resolver=ModuleResolver] The module resolver object.
- * @property {string} eslintAllPath The path to the definitions for eslint:all.
- * @property {Function} getEslintAllConfig Returns the config data for eslint:all.
- * @property {string} eslintRecommendedPath The path to the definitions for eslint:recommended.
- * @property {Function} getEslintRecommendedConfig Returns the config data for eslint:recommended.
- */
-
-/**
- * @typedef {Object} CascadingConfigArrayFactoryInternalSlots
- * @property {ConfigArray} baseConfigArray The config array of `baseConfig` option.
- * @property {ConfigData} baseConfigData The config data of `baseConfig` option. This is used to reset `baseConfigArray`.
- * @property {ConfigArray} cliConfigArray The config array of CLI options.
- * @property {ConfigData} cliConfigData The config data of CLI options. This is used to reset `cliConfigArray`.
- * @property {ConfigArrayFactory} configArrayFactory The factory for config arrays.
- * @property {Map} configCache The cache from directory paths to config arrays.
- * @property {string} cwd The base directory to start lookup.
- * @property {WeakMap} finalizeCache The cache from config arrays to finalized config arrays.
- * @property {string} [ignorePath] The path to the alternative file of `.eslintignore`.
- * @property {string[]|null} rulePaths The value of `--rulesdir` option. This is used to reset `baseConfigArray`.
- * @property {string|null} specificConfigPath The value of `--config` option. This is used to reset `cliConfigArray`.
- * @property {boolean} useEslintrc if `false` then it doesn't load config files.
- * @property {Function} loadRules The function to use to load rules.
- * @property {Map} builtInRules The rules that are built in to ESLint.
- * @property {Object} [resolver=ModuleResolver] The module resolver object.
- * @property {string} eslintAllPath The path to the definitions for eslint:all.
- * @property {Function} getEslintAllConfig Returns the config data for eslint:all.
- * @property {string} eslintRecommendedPath The path to the definitions for eslint:recommended.
- * @property {Function} getEslintRecommendedConfig Returns the config data for eslint:recommended.
- */
-
-/** @type {WeakMap} */
-const internalSlotsMap = new WeakMap();
-
-/**
- * Create the config array from `baseConfig` and `rulePaths`.
- * @param {CascadingConfigArrayFactoryInternalSlots} slots The slots.
- * @returns {ConfigArray} The config array of the base configs.
- */
-function createBaseConfigArray({
- configArrayFactory,
- baseConfigData,
- rulePaths,
- cwd,
- loadRules
-}) {
- const baseConfigArray = configArrayFactory.create(
- baseConfigData,
- { name: "BaseConfig" }
- );
-
- /*
- * Create the config array element for the default ignore patterns.
- * This element has `ignorePattern` property that ignores the default
- * patterns in the current working directory.
- */
- baseConfigArray.unshift(configArrayFactory.create(
- { ignorePatterns: IgnorePattern.DefaultPatterns },
- { name: "DefaultIgnorePattern" }
- )[0]);
-
- /*
- * Load rules `--rulesdir` option as a pseudo plugin.
- * Use a pseudo plugin to define rules of `--rulesdir`, so we can validate
- * the rule's options with only information in the config array.
- */
- if (rulePaths && rulePaths.length > 0) {
- baseConfigArray.push({
- type: "config",
- name: "--rulesdir",
- filePath: "",
- plugins: {
- "": new ConfigDependency({
- definition: {
- rules: rulePaths.reduce(
- (map, rulesPath) => Object.assign(
- map,
- loadRules(rulesPath, cwd)
- ),
- {}
- )
- },
- filePath: "",
- id: "",
- importerName: "--rulesdir",
- importerPath: ""
- })
- }
- });
- }
-
- return baseConfigArray;
-}
-
-/**
- * Create the config array from CLI options.
- * @param {CascadingConfigArrayFactoryInternalSlots} slots The slots.
- * @returns {ConfigArray} The config array of the base configs.
- */
-function createCLIConfigArray({
- cliConfigData,
- configArrayFactory,
- cwd,
- ignorePath,
- specificConfigPath
-}) {
- const cliConfigArray = configArrayFactory.create(
- cliConfigData,
- { name: "CLIOptions" }
- );
-
- cliConfigArray.unshift(
- ...(ignorePath
- ? configArrayFactory.loadESLintIgnore(ignorePath)
- : configArrayFactory.loadDefaultESLintIgnore())
- );
-
- if (specificConfigPath) {
- cliConfigArray.unshift(
- ...configArrayFactory.loadFile(
- specificConfigPath,
- { name: "--config", basePath: cwd }
- )
- );
- }
-
- return cliConfigArray;
-}
-
-/**
- * The error type when there are files matched by a glob, but all of them have been ignored.
- */
-class ConfigurationNotFoundError extends Error {
-
- // eslint-disable-next-line jsdoc/require-description
- /**
- * @param {string} directoryPath The directory path.
- */
- constructor(directoryPath) {
- super(`No ESLint configuration found in ${directoryPath}.`);
- this.messageTemplate = "no-config-found";
- this.messageData = { directoryPath };
- }
-}
-
-/**
- * This class provides the functionality that enumerates every file which is
- * matched by given glob patterns and that configuration.
- */
-class CascadingConfigArrayFactory {
-
- /**
- * Initialize this enumerator.
- * @param {CascadingConfigArrayFactoryOptions} options The options.
- */
- constructor({
- additionalPluginPool = new Map(),
- baseConfig: baseConfigData = null,
- cliConfig: cliConfigData = null,
- cwd = process.cwd(),
- ignorePath,
- resolvePluginsRelativeTo,
- rulePaths = [],
- specificConfigPath = null,
- useEslintrc = true,
- builtInRules = new Map(),
- loadRules,
- resolver,
- eslintRecommendedPath,
- getEslintRecommendedConfig,
- eslintAllPath,
- getEslintAllConfig
- } = {}) {
- const configArrayFactory = new ConfigArrayFactory({
- additionalPluginPool,
- cwd,
- resolvePluginsRelativeTo,
- builtInRules,
- resolver,
- eslintRecommendedPath,
- getEslintRecommendedConfig,
- eslintAllPath,
- getEslintAllConfig
- });
-
- internalSlotsMap.set(this, {
- baseConfigArray: createBaseConfigArray({
- baseConfigData,
- configArrayFactory,
- cwd,
- rulePaths,
- loadRules
- }),
- baseConfigData,
- cliConfigArray: createCLIConfigArray({
- cliConfigData,
- configArrayFactory,
- cwd,
- ignorePath,
- specificConfigPath
- }),
- cliConfigData,
- configArrayFactory,
- configCache: new Map(),
- cwd,
- finalizeCache: new WeakMap(),
- ignorePath,
- rulePaths,
- specificConfigPath,
- useEslintrc,
- builtInRules,
- loadRules
- });
- }
-
- /**
- * The path to the current working directory.
- * This is used by tests.
- * @type {string}
- */
- get cwd() {
- const { cwd } = internalSlotsMap.get(this);
-
- return cwd;
- }
-
- /**
- * Get the config array of a given file.
- * If `filePath` was not given, it returns the config which contains only
- * `baseConfigData` and `cliConfigData`.
- * @param {string} [filePath] The file path to a file.
- * @param {Object} [options] The options.
- * @param {boolean} [options.ignoreNotFoundError] If `true` then it doesn't throw `ConfigurationNotFoundError`.
- * @returns {ConfigArray} The config array of the file.
- */
- getConfigArrayForFile(filePath, { ignoreNotFoundError = false } = {}) {
- const {
- baseConfigArray,
- cliConfigArray,
- cwd
- } = internalSlotsMap.get(this);
-
- if (!filePath) {
- return new ConfigArray(...baseConfigArray, ...cliConfigArray);
- }
-
- const directoryPath = path__default["default"].dirname(path__default["default"].resolve(cwd, filePath));
-
- debug$1(`Load config files for ${directoryPath}.`);
-
- return this._finalizeConfigArray(
- this._loadConfigInAncestors(directoryPath),
- directoryPath,
- ignoreNotFoundError
- );
- }
-
- /**
- * Set the config data to override all configs.
- * Require to call `clearCache()` method after this method is called.
- * @param {ConfigData} configData The config data to override all configs.
- * @returns {void}
- */
- setOverrideConfig(configData) {
- const slots = internalSlotsMap.get(this);
-
- slots.cliConfigData = configData;
- }
-
- /**
- * Clear config cache.
- * @returns {void}
- */
- clearCache() {
- const slots = internalSlotsMap.get(this);
-
- slots.baseConfigArray = createBaseConfigArray(slots);
- slots.cliConfigArray = createCLIConfigArray(slots);
- slots.configCache.clear();
- }
-
- /**
- * Load and normalize config files from the ancestor directories.
- * @param {string} directoryPath The path to a leaf directory.
- * @param {boolean} configsExistInSubdirs `true` if configurations exist in subdirectories.
- * @returns {ConfigArray} The loaded config.
- * @private
- */
- _loadConfigInAncestors(directoryPath, configsExistInSubdirs = false) {
- const {
- baseConfigArray,
- configArrayFactory,
- configCache,
- cwd,
- useEslintrc
- } = internalSlotsMap.get(this);
-
- if (!useEslintrc) {
- return baseConfigArray;
- }
-
- let configArray = configCache.get(directoryPath);
-
- // Hit cache.
- if (configArray) {
- debug$1(`Cache hit: ${directoryPath}.`);
- return configArray;
- }
- debug$1(`No cache found: ${directoryPath}.`);
-
- const homePath = os__default["default"].homedir();
-
- // Consider this is root.
- if (directoryPath === homePath && cwd !== homePath) {
- debug$1("Stop traversing because of considered root.");
- if (configsExistInSubdirs) {
- const filePath = ConfigArrayFactory.getPathToConfigFileInDirectory(directoryPath);
-
- if (filePath) {
- emitDeprecationWarning(
- filePath,
- "ESLINT_PERSONAL_CONFIG_SUPPRESS"
- );
- }
- }
- return this._cacheConfig(directoryPath, baseConfigArray);
- }
-
- // Load the config on this directory.
- try {
- configArray = configArrayFactory.loadInDirectory(directoryPath);
- } catch (error) {
- /* istanbul ignore next */
- if (error.code === "EACCES") {
- debug$1("Stop traversing because of 'EACCES' error.");
- return this._cacheConfig(directoryPath, baseConfigArray);
- }
- throw error;
- }
-
- if (configArray.length > 0 && configArray.isRoot()) {
- debug$1("Stop traversing because of 'root:true'.");
- configArray.unshift(...baseConfigArray);
- return this._cacheConfig(directoryPath, configArray);
- }
-
- // Load from the ancestors and merge it.
- const parentPath = path__default["default"].dirname(directoryPath);
- const parentConfigArray = parentPath && parentPath !== directoryPath
- ? this._loadConfigInAncestors(
- parentPath,
- configsExistInSubdirs || configArray.length > 0
- )
- : baseConfigArray;
-
- if (configArray.length > 0) {
- configArray.unshift(...parentConfigArray);
- } else {
- configArray = parentConfigArray;
- }
-
- // Cache and return.
- return this._cacheConfig(directoryPath, configArray);
- }
-
- /**
- * Freeze and cache a given config.
- * @param {string} directoryPath The path to a directory as a cache key.
- * @param {ConfigArray} configArray The config array as a cache value.
- * @returns {ConfigArray} The `configArray` (frozen).
- */
- _cacheConfig(directoryPath, configArray) {
- const { configCache } = internalSlotsMap.get(this);
-
- Object.freeze(configArray);
- configCache.set(directoryPath, configArray);
-
- return configArray;
- }
-
- /**
- * Finalize a given config array.
- * Concatenate `--config` and other CLI options.
- * @param {ConfigArray} configArray The parent config array.
- * @param {string} directoryPath The path to the leaf directory to find config files.
- * @param {boolean} ignoreNotFoundError If `true` then it doesn't throw `ConfigurationNotFoundError`.
- * @returns {ConfigArray} The loaded config.
- * @private
- */
- _finalizeConfigArray(configArray, directoryPath, ignoreNotFoundError) {
- const {
- cliConfigArray,
- configArrayFactory,
- finalizeCache,
- useEslintrc,
- builtInRules
- } = internalSlotsMap.get(this);
-
- let finalConfigArray = finalizeCache.get(configArray);
-
- if (!finalConfigArray) {
- finalConfigArray = configArray;
-
- // Load the personal config if there are no regular config files.
- if (
- useEslintrc &&
- configArray.every(c => !c.filePath) &&
- cliConfigArray.every(c => !c.filePath) // `--config` option can be a file.
- ) {
- const homePath = os__default["default"].homedir();
-
- debug$1("Loading the config file of the home directory:", homePath);
-
- const personalConfigArray = configArrayFactory.loadInDirectory(
- homePath,
- { name: "PersonalConfig" }
- );
-
- if (
- personalConfigArray.length > 0 &&
- !directoryPath.startsWith(homePath)
- ) {
- const lastElement =
- personalConfigArray[personalConfigArray.length - 1];
-
- emitDeprecationWarning(
- lastElement.filePath,
- "ESLINT_PERSONAL_CONFIG_LOAD"
- );
- }
-
- finalConfigArray = finalConfigArray.concat(personalConfigArray);
- }
-
- // Apply CLI options.
- if (cliConfigArray.length > 0) {
- finalConfigArray = finalConfigArray.concat(cliConfigArray);
- }
-
- // Validate rule settings and environments.
- const validator = new ConfigValidator({
- builtInRules
- });
-
- validator.validateConfigArray(finalConfigArray);
-
- // Cache it.
- Object.freeze(finalConfigArray);
- finalizeCache.set(configArray, finalConfigArray);
-
- debug$1(
- "Configuration was determined: %o on %s",
- finalConfigArray,
- directoryPath
- );
- }
-
- // At least one element (the default ignore patterns) exists.
- if (!ignoreNotFoundError && useEslintrc && finalConfigArray.length <= 1) {
- throw new ConfigurationNotFoundError(directoryPath);
- }
-
- return finalConfigArray;
- }
-}
-
-/**
- * @fileoverview Compatibility class for flat config.
- * @author Nicholas C. Zakas
- */
-
-//-----------------------------------------------------------------------------
-// Helpers
-//-----------------------------------------------------------------------------
-
-/** @typedef {import("../../shared/types").Environment} Environment */
-/** @typedef {import("../../shared/types").Processor} Processor */
-
-const debug = debugOrig__default["default"]("eslintrc:flat-compat");
-const cafactory = Symbol("cafactory");
-
-/**
- * Translates an ESLintRC-style config object into a flag-config-style config
- * object.
- * @param {Object} eslintrcConfig An ESLintRC-style config object.
- * @param {Object} options Options to help translate the config.
- * @param {string} options.resolveConfigRelativeTo To the directory to resolve
- * configs from.
- * @param {string} options.resolvePluginsRelativeTo The directory to resolve
- * plugins from.
- * @param {ReadOnlyMap} options.pluginEnvironments A map of plugin environment
- * names to objects.
- * @param {ReadOnlyMap} options.pluginProcessors A map of plugin processor
- * names to objects.
- * @returns {Object} A flag-config-style config object.
- */
-function translateESLintRC(eslintrcConfig, {
- resolveConfigRelativeTo,
- resolvePluginsRelativeTo,
- pluginEnvironments,
- pluginProcessors
-}) {
-
- const flatConfig = {};
- const configs = [];
- const languageOptions = {};
- const linterOptions = {};
- const keysToCopy = ["settings", "rules", "processor"];
- const languageOptionsKeysToCopy = ["globals", "parser", "parserOptions"];
- const linterOptionsKeysToCopy = ["noInlineConfig", "reportUnusedDisableDirectives"];
-
- // copy over simple translations
- for (const key of keysToCopy) {
- if (key in eslintrcConfig && typeof eslintrcConfig[key] !== "undefined") {
- flatConfig[key] = eslintrcConfig[key];
- }
- }
-
- // copy over languageOptions
- for (const key of languageOptionsKeysToCopy) {
- if (key in eslintrcConfig && typeof eslintrcConfig[key] !== "undefined") {
-
- // create the languageOptions key in the flat config
- flatConfig.languageOptions = languageOptions;
-
- if (key === "parser") {
- debug(`Resolving parser '${languageOptions[key]}' relative to ${resolveConfigRelativeTo}`);
-
- if (eslintrcConfig[key].error) {
- throw eslintrcConfig[key].error;
- }
-
- languageOptions[key] = eslintrcConfig[key].definition;
- continue;
- }
-
- // clone any object values that are in the eslintrc config
- if (eslintrcConfig[key] && typeof eslintrcConfig[key] === "object") {
- languageOptions[key] = {
- ...eslintrcConfig[key]
- };
- } else {
- languageOptions[key] = eslintrcConfig[key];
- }
- }
- }
-
- // copy over linterOptions
- for (const key of linterOptionsKeysToCopy) {
- if (key in eslintrcConfig && typeof eslintrcConfig[key] !== "undefined") {
- flatConfig.linterOptions = linterOptions;
- linterOptions[key] = eslintrcConfig[key];
- }
- }
-
- // move ecmaVersion a level up
- if (languageOptions.parserOptions) {
-
- if ("ecmaVersion" in languageOptions.parserOptions) {
- languageOptions.ecmaVersion = languageOptions.parserOptions.ecmaVersion;
- delete languageOptions.parserOptions.ecmaVersion;
- }
-
- if ("sourceType" in languageOptions.parserOptions) {
- languageOptions.sourceType = languageOptions.parserOptions.sourceType;
- delete languageOptions.parserOptions.sourceType;
- }
-
- // check to see if we even need parserOptions anymore and remove it if not
- if (Object.keys(languageOptions.parserOptions).length === 0) {
- delete languageOptions.parserOptions;
- }
- }
-
- // overrides
- if (eslintrcConfig.criteria) {
- flatConfig.files = [absoluteFilePath => eslintrcConfig.criteria.test(absoluteFilePath)];
- }
-
- // translate plugins
- if (eslintrcConfig.plugins && typeof eslintrcConfig.plugins === "object") {
- debug(`Translating plugins: ${eslintrcConfig.plugins}`);
-
- flatConfig.plugins = {};
-
- for (const pluginName of Object.keys(eslintrcConfig.plugins)) {
-
- debug(`Translating plugin: ${pluginName}`);
- debug(`Resolving plugin '${pluginName} relative to ${resolvePluginsRelativeTo}`);
-
- const { original: plugin, error } = eslintrcConfig.plugins[pluginName];
-
- if (error) {
- throw error;
- }
-
- flatConfig.plugins[pluginName] = plugin;
-
- // create a config for any processors
- if (plugin.processors) {
- for (const processorName of Object.keys(plugin.processors)) {
- if (processorName.startsWith(".")) {
- debug(`Assigning processor: ${pluginName}/${processorName}`);
-
- configs.unshift({
- files: [`**/*${processorName}`],
- processor: pluginProcessors.get(`${pluginName}/${processorName}`)
- });
- }
-
- }
- }
- }
- }
-
- // translate env - must come after plugins
- if (eslintrcConfig.env && typeof eslintrcConfig.env === "object") {
- for (const envName of Object.keys(eslintrcConfig.env)) {
-
- // only add environments that are true
- if (eslintrcConfig.env[envName]) {
- debug(`Translating environment: ${envName}`);
-
- if (environments.has(envName)) {
-
- // built-in environments should be defined first
- configs.unshift(...translateESLintRC({
- criteria: eslintrcConfig.criteria,
- ...environments.get(envName)
- }, {
- resolveConfigRelativeTo,
- resolvePluginsRelativeTo
- }));
- } else if (pluginEnvironments.has(envName)) {
-
- // if the environment comes from a plugin, it should come after the plugin config
- configs.push(...translateESLintRC({
- criteria: eslintrcConfig.criteria,
- ...pluginEnvironments.get(envName)
- }, {
- resolveConfigRelativeTo,
- resolvePluginsRelativeTo
- }));
- }
- }
- }
- }
-
- // only add if there are actually keys in the config
- if (Object.keys(flatConfig).length > 0) {
- configs.push(flatConfig);
- }
-
- return configs;
-}
-
-
-//-----------------------------------------------------------------------------
-// Exports
-//-----------------------------------------------------------------------------
-
-/**
- * A compatibility class for working with configs.
- */
-class FlatCompat {
-
- constructor({
- baseDirectory = process.cwd(),
- resolvePluginsRelativeTo = baseDirectory,
- recommendedConfig,
- allConfig
- } = {}) {
- this.baseDirectory = baseDirectory;
- this.resolvePluginsRelativeTo = resolvePluginsRelativeTo;
- this[cafactory] = new ConfigArrayFactory({
- cwd: baseDirectory,
- resolvePluginsRelativeTo,
- getEslintAllConfig: () => {
-
- if (!allConfig) {
- throw new TypeError("Missing parameter 'allConfig' in FlatCompat constructor.");
- }
-
- return allConfig;
- },
- getEslintRecommendedConfig: () => {
-
- if (!recommendedConfig) {
- throw new TypeError("Missing parameter 'recommendedConfig' in FlatCompat constructor.");
- }
-
- return recommendedConfig;
- }
- });
- }
-
- /**
- * Translates an ESLintRC-style config into a flag-config-style config.
- * @param {Object} eslintrcConfig The ESLintRC-style config object.
- * @returns {Object} A flag-config-style config object.
- */
- config(eslintrcConfig) {
- const eslintrcArray = this[cafactory].create(eslintrcConfig, {
- basePath: this.baseDirectory
- });
-
- const flatArray = [];
- let hasIgnorePatterns = false;
-
- eslintrcArray.forEach(configData => {
- if (configData.type === "config") {
- hasIgnorePatterns = hasIgnorePatterns || configData.ignorePattern;
- flatArray.push(...translateESLintRC(configData, {
- resolveConfigRelativeTo: path__default["default"].join(this.baseDirectory, "__placeholder.js"),
- resolvePluginsRelativeTo: path__default["default"].join(this.resolvePluginsRelativeTo, "__placeholder.js"),
- pluginEnvironments: eslintrcArray.pluginEnvironments,
- pluginProcessors: eslintrcArray.pluginProcessors
- }));
- }
- });
-
- // combine ignorePatterns to emulate ESLintRC behavior better
- if (hasIgnorePatterns) {
- flatArray.unshift({
- ignores: [filePath => {
-
- // Compute the final config for this file.
- // This filters config array elements by `files`/`excludedFiles` then merges the elements.
- const finalConfig = eslintrcArray.extractConfig(filePath);
-
- // Test the `ignorePattern` properties of the final config.
- return Boolean(finalConfig.ignores) && finalConfig.ignores(filePath);
- }]
- });
- }
-
- return flatArray;
- }
-
- /**
- * Translates the `env` section of an ESLintRC-style config.
- * @param {Object} envConfig The `env` section of an ESLintRC config.
- * @returns {Object[]} An array of flag-config objects representing the environments.
- */
- env(envConfig) {
- return this.config({
- env: envConfig
- });
- }
-
- /**
- * Translates the `extends` section of an ESLintRC-style config.
- * @param {...string} configsToExtend The names of the configs to load.
- * @returns {Object[]} An array of flag-config objects representing the config.
- */
- extends(...configsToExtend) {
- return this.config({
- extends: configsToExtend
- });
- }
-
- /**
- * Translates the `plugins` section of an ESLintRC-style config.
- * @param {...string} plugins The names of the plugins to load.
- * @returns {Object[]} An array of flag-config objects representing the plugins.
- */
- plugins(...plugins) {
- return this.config({
- plugins
- });
- }
-}
-
-/**
- * @fileoverview Package exports for @eslint/eslintrc
- * @author Nicholas C. Zakas
- */
-
-//-----------------------------------------------------------------------------
-// Exports
-//-----------------------------------------------------------------------------
-
-const Legacy = {
- ConfigArray,
- createConfigArrayFactoryContext: createContext,
- CascadingConfigArrayFactory,
- ConfigArrayFactory,
- ConfigDependency,
- ExtractedConfig,
- IgnorePattern,
- OverrideTester,
- getUsedExtractedConfigs,
- environments,
-
- // shared
- ConfigOps,
- ConfigValidator,
- ModuleResolver,
- naming
-};
-
-exports.FlatCompat = FlatCompat;
-exports.Legacy = Legacy;
-//# sourceMappingURL=eslintrc.cjs.map
diff --git a/node_modules/@eslint/eslintrc/dist/eslintrc.cjs.map b/node_modules/@eslint/eslintrc/dist/eslintrc.cjs.map
deleted file mode 100644
index c4f4fce..0000000
--- a/node_modules/@eslint/eslintrc/dist/eslintrc.cjs.map
+++ /dev/null
@@ -1 +0,0 @@
-{"version":3,"file":"eslintrc.cjs","sources":["../lib/config-array/ignore-pattern.js","../lib/config-array/extracted-config.js","../lib/config-array/config-array.js","../lib/config-array/config-dependency.js","../lib/config-array/override-tester.js","../lib/config-array/index.js","../lib/shared/config-ops.js","../lib/shared/deprecation-warnings.js","../lib/shared/ajv.js","../conf/config-schema.js","../conf/environments.js","../lib/shared/config-validator.js","../lib/shared/naming.js","../lib/shared/relative-module-resolver.js","../lib/config-array-factory.js","../lib/cascading-config-array-factory.js","../lib/flat-compat.js","../lib/index.js"],"sourcesContent":["/**\n * @fileoverview `IgnorePattern` class.\n *\n * `IgnorePattern` class has the set of glob patterns and the base path.\n *\n * It provides two static methods.\n *\n * - `IgnorePattern.createDefaultIgnore(cwd)`\n * Create the default predicate function.\n * - `IgnorePattern.createIgnore(ignorePatterns)`\n * Create the predicate function from multiple `IgnorePattern` objects.\n *\n * It provides two properties and a method.\n *\n * - `patterns`\n * The glob patterns that ignore to lint.\n * - `basePath`\n * The base path of the glob patterns. If absolute paths existed in the\n * glob patterns, those are handled as relative paths to the base path.\n * - `getPatternsRelativeTo(basePath)`\n * Get `patterns` as modified for a given base path. It modifies the\n * absolute paths in the patterns as prepending the difference of two base\n * paths.\n *\n * `ConfigArrayFactory` creates `IgnorePattern` objects when it processes\n * `ignorePatterns` properties.\n *\n * @author Toru Nagashima \n */\n\n//------------------------------------------------------------------------------\n// Requirements\n//------------------------------------------------------------------------------\n\nimport assert from \"assert\";\nimport path from \"path\";\nimport ignore from \"ignore\";\nimport debugOrig from \"debug\";\n\nconst debug = debugOrig(\"eslintrc:ignore-pattern\");\n\n/** @typedef {ReturnType} Ignore */\n\n//------------------------------------------------------------------------------\n// Helpers\n//------------------------------------------------------------------------------\n\n/**\n * Get the path to the common ancestor directory of given paths.\n * @param {string[]} sourcePaths The paths to calculate the common ancestor.\n * @returns {string} The path to the common ancestor directory.\n */\nfunction getCommonAncestorPath(sourcePaths) {\n let result = sourcePaths[0];\n\n for (let i = 1; i < sourcePaths.length; ++i) {\n const a = result;\n const b = sourcePaths[i];\n\n // Set the shorter one (it's the common ancestor if one includes the other).\n result = a.length < b.length ? a : b;\n\n // Set the common ancestor.\n for (let j = 0, lastSepPos = 0; j < a.length && j < b.length; ++j) {\n if (a[j] !== b[j]) {\n result = a.slice(0, lastSepPos);\n break;\n }\n if (a[j] === path.sep) {\n lastSepPos = j;\n }\n }\n }\n\n let resolvedResult = result || path.sep;\n\n // if Windows common ancestor is root of drive must have trailing slash to be absolute.\n if (resolvedResult && resolvedResult.endsWith(\":\") && process.platform === \"win32\") {\n resolvedResult += path.sep;\n }\n return resolvedResult;\n}\n\n/**\n * Make relative path.\n * @param {string} from The source path to get relative path.\n * @param {string} to The destination path to get relative path.\n * @returns {string} The relative path.\n */\nfunction relative(from, to) {\n const relPath = path.relative(from, to);\n\n if (path.sep === \"/\") {\n return relPath;\n }\n return relPath.split(path.sep).join(\"/\");\n}\n\n/**\n * Get the trailing slash if existed.\n * @param {string} filePath The path to check.\n * @returns {string} The trailing slash if existed.\n */\nfunction dirSuffix(filePath) {\n const isDir = (\n filePath.endsWith(path.sep) ||\n (process.platform === \"win32\" && filePath.endsWith(\"/\"))\n );\n\n return isDir ? \"/\" : \"\";\n}\n\nconst DefaultPatterns = Object.freeze([\"/**/node_modules/*\"]);\nconst DotPatterns = Object.freeze([\".*\", \"!.eslintrc.*\", \"!../\"]);\n\n//------------------------------------------------------------------------------\n// Public\n//------------------------------------------------------------------------------\n\nclass IgnorePattern {\n\n /**\n * The default patterns.\n * @type {string[]}\n */\n static get DefaultPatterns() {\n return DefaultPatterns;\n }\n\n /**\n * Create the default predicate function.\n * @param {string} cwd The current working directory.\n * @returns {((filePath:string, dot:boolean) => boolean) & {basePath:string; patterns:string[]}}\n * The preficate function.\n * The first argument is an absolute path that is checked.\n * The second argument is the flag to not ignore dotfiles.\n * If the predicate function returned `true`, it means the path should be ignored.\n */\n static createDefaultIgnore(cwd) {\n return this.createIgnore([new IgnorePattern(DefaultPatterns, cwd)]);\n }\n\n /**\n * Create the predicate function from multiple `IgnorePattern` objects.\n * @param {IgnorePattern[]} ignorePatterns The list of ignore patterns.\n * @returns {((filePath:string, dot?:boolean) => boolean) & {basePath:string; patterns:string[]}}\n * The preficate function.\n * The first argument is an absolute path that is checked.\n * The second argument is the flag to not ignore dotfiles.\n * If the predicate function returned `true`, it means the path should be ignored.\n */\n static createIgnore(ignorePatterns) {\n debug(\"Create with: %o\", ignorePatterns);\n\n const basePath = getCommonAncestorPath(ignorePatterns.map(p => p.basePath));\n const patterns = [].concat(\n ...ignorePatterns.map(p => p.getPatternsRelativeTo(basePath))\n );\n const ig = ignore({ allowRelativePaths: true }).add([...DotPatterns, ...patterns]);\n const dotIg = ignore({ allowRelativePaths: true }).add(patterns);\n\n debug(\" processed: %o\", { basePath, patterns });\n\n return Object.assign(\n (filePath, dot = false) => {\n assert(path.isAbsolute(filePath), \"'filePath' should be an absolute path.\");\n const relPathRaw = relative(basePath, filePath);\n const relPath = relPathRaw && (relPathRaw + dirSuffix(filePath));\n const adoptedIg = dot ? dotIg : ig;\n const result = relPath !== \"\" && adoptedIg.ignores(relPath);\n\n debug(\"Check\", { filePath, dot, relativePath: relPath, result });\n return result;\n },\n { basePath, patterns }\n );\n }\n\n /**\n * Initialize a new `IgnorePattern` instance.\n * @param {string[]} patterns The glob patterns that ignore to lint.\n * @param {string} basePath The base path of `patterns`.\n */\n constructor(patterns, basePath) {\n assert(path.isAbsolute(basePath), \"'basePath' should be an absolute path.\");\n\n /**\n * The glob patterns that ignore to lint.\n * @type {string[]}\n */\n this.patterns = patterns;\n\n /**\n * The base path of `patterns`.\n * @type {string}\n */\n this.basePath = basePath;\n\n /**\n * If `true` then patterns which don't start with `/` will match the paths to the outside of `basePath`. Defaults to `false`.\n *\n * It's set `true` for `.eslintignore`, `package.json`, and `--ignore-path` for backward compatibility.\n * It's `false` as-is for `ignorePatterns` property in config files.\n * @type {boolean}\n */\n this.loose = false;\n }\n\n /**\n * Get `patterns` as modified for a given base path. It modifies the\n * absolute paths in the patterns as prepending the difference of two base\n * paths.\n * @param {string} newBasePath The base path.\n * @returns {string[]} Modifired patterns.\n */\n getPatternsRelativeTo(newBasePath) {\n assert(path.isAbsolute(newBasePath), \"'newBasePath' should be an absolute path.\");\n const { basePath, loose, patterns } = this;\n\n if (newBasePath === basePath) {\n return patterns;\n }\n const prefix = `/${relative(newBasePath, basePath)}`;\n\n return patterns.map(pattern => {\n const negative = pattern.startsWith(\"!\");\n const head = negative ? \"!\" : \"\";\n const body = negative ? pattern.slice(1) : pattern;\n\n if (body.startsWith(\"/\") || body.startsWith(\"../\")) {\n return `${head}${prefix}${body}`;\n }\n return loose ? pattern : `${head}${prefix}/**/${body}`;\n });\n }\n}\n\nexport { IgnorePattern };\n","/**\n * @fileoverview `ExtractedConfig` class.\n *\n * `ExtractedConfig` class expresses a final configuration for a specific file.\n *\n * It provides one method.\n *\n * - `toCompatibleObjectAsConfigFileContent()`\n * Convert this configuration to the compatible object as the content of\n * config files. It converts the loaded parser and plugins to strings.\n * `CLIEngine#getConfigForFile(filePath)` method uses this method.\n *\n * `ConfigArray#extractConfig(filePath)` creates a `ExtractedConfig` instance.\n *\n * @author Toru Nagashima \n */\n\nimport { IgnorePattern } from \"./ignore-pattern.js\";\n\n// For VSCode intellisense\n/** @typedef {import(\"../../shared/types\").ConfigData} ConfigData */\n/** @typedef {import(\"../../shared/types\").GlobalConf} GlobalConf */\n/** @typedef {import(\"../../shared/types\").SeverityConf} SeverityConf */\n/** @typedef {import(\"./config-dependency\").DependentParser} DependentParser */\n/** @typedef {import(\"./config-dependency\").DependentPlugin} DependentPlugin */\n\n/**\n * Check if `xs` starts with `ys`.\n * @template T\n * @param {T[]} xs The array to check.\n * @param {T[]} ys The array that may be the first part of `xs`.\n * @returns {boolean} `true` if `xs` starts with `ys`.\n */\nfunction startsWith(xs, ys) {\n return xs.length >= ys.length && ys.every((y, i) => y === xs[i]);\n}\n\n/**\n * The class for extracted config data.\n */\nclass ExtractedConfig {\n constructor() {\n\n /**\n * The config name what `noInlineConfig` setting came from.\n * @type {string}\n */\n this.configNameOfNoInlineConfig = \"\";\n\n /**\n * Environments.\n * @type {Record}\n */\n this.env = {};\n\n /**\n * Global variables.\n * @type {Record}\n */\n this.globals = {};\n\n /**\n * The glob patterns that ignore to lint.\n * @type {(((filePath:string, dot?:boolean) => boolean) & { basePath:string; patterns:string[] }) | undefined}\n */\n this.ignores = void 0;\n\n /**\n * The flag that disables directive comments.\n * @type {boolean|undefined}\n */\n this.noInlineConfig = void 0;\n\n /**\n * Parser definition.\n * @type {DependentParser|null}\n */\n this.parser = null;\n\n /**\n * Options for the parser.\n * @type {Object}\n */\n this.parserOptions = {};\n\n /**\n * Plugin definitions.\n * @type {Record}\n */\n this.plugins = {};\n\n /**\n * Processor ID.\n * @type {string|null}\n */\n this.processor = null;\n\n /**\n * The flag that reports unused `eslint-disable` directive comments.\n * @type {boolean|undefined}\n */\n this.reportUnusedDisableDirectives = void 0;\n\n /**\n * Rule settings.\n * @type {Record}\n */\n this.rules = {};\n\n /**\n * Shared settings.\n * @type {Object}\n */\n this.settings = {};\n }\n\n /**\n * Convert this config to the compatible object as a config file content.\n * @returns {ConfigData} The converted object.\n */\n toCompatibleObjectAsConfigFileContent() {\n const {\n /* eslint-disable no-unused-vars */\n configNameOfNoInlineConfig: _ignore1,\n processor: _ignore2,\n /* eslint-enable no-unused-vars */\n ignores,\n ...config\n } = this;\n\n config.parser = config.parser && config.parser.filePath;\n config.plugins = Object.keys(config.plugins).filter(Boolean).reverse();\n config.ignorePatterns = ignores ? ignores.patterns : [];\n\n // Strip the default patterns from `ignorePatterns`.\n if (startsWith(config.ignorePatterns, IgnorePattern.DefaultPatterns)) {\n config.ignorePatterns =\n config.ignorePatterns.slice(IgnorePattern.DefaultPatterns.length);\n }\n\n return config;\n }\n}\n\nexport { ExtractedConfig };\n","/**\n * @fileoverview `ConfigArray` class.\n *\n * `ConfigArray` class expresses the full of a configuration. It has the entry\n * config file, base config files that were extended, loaded parsers, and loaded\n * plugins.\n *\n * `ConfigArray` class provides three properties and two methods.\n *\n * - `pluginEnvironments`\n * - `pluginProcessors`\n * - `pluginRules`\n * The `Map` objects that contain the members of all plugins that this\n * config array contains. Those map objects don't have mutation methods.\n * Those keys are the member ID such as `pluginId/memberName`.\n * - `isRoot()`\n * If `true` then this configuration has `root:true` property.\n * - `extractConfig(filePath)`\n * Extract the final configuration for a given file. This means merging\n * every config array element which that `criteria` property matched. The\n * `filePath` argument must be an absolute path.\n *\n * `ConfigArrayFactory` provides the loading logic of config files.\n *\n * @author Toru Nagashima \n */\n\n//------------------------------------------------------------------------------\n// Requirements\n//------------------------------------------------------------------------------\n\nimport { ExtractedConfig } from \"./extracted-config.js\";\nimport { IgnorePattern } from \"./ignore-pattern.js\";\n\n//------------------------------------------------------------------------------\n// Helpers\n//------------------------------------------------------------------------------\n\n// Define types for VSCode IntelliSense.\n/** @typedef {import(\"../../shared/types\").Environment} Environment */\n/** @typedef {import(\"../../shared/types\").GlobalConf} GlobalConf */\n/** @typedef {import(\"../../shared/types\").RuleConf} RuleConf */\n/** @typedef {import(\"../../shared/types\").Rule} Rule */\n/** @typedef {import(\"../../shared/types\").Plugin} Plugin */\n/** @typedef {import(\"../../shared/types\").Processor} Processor */\n/** @typedef {import(\"./config-dependency\").DependentParser} DependentParser */\n/** @typedef {import(\"./config-dependency\").DependentPlugin} DependentPlugin */\n/** @typedef {import(\"./override-tester\")[\"OverrideTester\"]} OverrideTester */\n\n/**\n * @typedef {Object} ConfigArrayElement\n * @property {string} name The name of this config element.\n * @property {string} filePath The path to the source file of this config element.\n * @property {InstanceType|null} criteria The tester for the `files` and `excludedFiles` of this config element.\n * @property {Record|undefined} env The environment settings.\n * @property {Record|undefined} globals The global variable settings.\n * @property {IgnorePattern|undefined} ignorePattern The ignore patterns.\n * @property {boolean|undefined} noInlineConfig The flag that disables directive comments.\n * @property {DependentParser|undefined} parser The parser loader.\n * @property {Object|undefined} parserOptions The parser options.\n * @property {Record|undefined} plugins The plugin loaders.\n * @property {string|undefined} processor The processor name to refer plugin's processor.\n * @property {boolean|undefined} reportUnusedDisableDirectives The flag to report unused `eslint-disable` comments.\n * @property {boolean|undefined} root The flag to express root.\n * @property {Record|undefined} rules The rule settings\n * @property {Object|undefined} settings The shared settings.\n * @property {\"config\" | \"ignore\" | \"implicit-processor\"} type The element type.\n */\n\n/**\n * @typedef {Object} ConfigArrayInternalSlots\n * @property {Map} cache The cache to extract configs.\n * @property {ReadonlyMap|null} envMap The map from environment ID to environment definition.\n * @property {ReadonlyMap|null} processorMap The map from processor ID to environment definition.\n * @property {ReadonlyMap|null} ruleMap The map from rule ID to rule definition.\n */\n\n/** @type {WeakMap} */\nconst internalSlotsMap = new class extends WeakMap {\n get(key) {\n let value = super.get(key);\n\n if (!value) {\n value = {\n cache: new Map(),\n envMap: null,\n processorMap: null,\n ruleMap: null\n };\n super.set(key, value);\n }\n\n return value;\n }\n}();\n\n/**\n * Get the indices which are matched to a given file.\n * @param {ConfigArrayElement[]} elements The elements.\n * @param {string} filePath The path to a target file.\n * @returns {number[]} The indices.\n */\nfunction getMatchedIndices(elements, filePath) {\n const indices = [];\n\n for (let i = elements.length - 1; i >= 0; --i) {\n const element = elements[i];\n\n if (!element.criteria || (filePath && element.criteria.test(filePath))) {\n indices.push(i);\n }\n }\n\n return indices;\n}\n\n/**\n * Check if a value is a non-null object.\n * @param {any} x The value to check.\n * @returns {boolean} `true` if the value is a non-null object.\n */\nfunction isNonNullObject(x) {\n return typeof x === \"object\" && x !== null;\n}\n\n/**\n * Merge two objects.\n *\n * Assign every property values of `y` to `x` if `x` doesn't have the property.\n * If `x`'s property value is an object, it does recursive.\n * @param {Object} target The destination to merge\n * @param {Object|undefined} source The source to merge.\n * @returns {void}\n */\nfunction mergeWithoutOverwrite(target, source) {\n if (!isNonNullObject(source)) {\n return;\n }\n\n for (const key of Object.keys(source)) {\n if (key === \"__proto__\") {\n continue;\n }\n\n if (isNonNullObject(target[key])) {\n mergeWithoutOverwrite(target[key], source[key]);\n } else if (target[key] === void 0) {\n if (isNonNullObject(source[key])) {\n target[key] = Array.isArray(source[key]) ? [] : {};\n mergeWithoutOverwrite(target[key], source[key]);\n } else if (source[key] !== void 0) {\n target[key] = source[key];\n }\n }\n }\n}\n\n/**\n * The error for plugin conflicts.\n */\nclass PluginConflictError extends Error {\n\n /**\n * Initialize this error object.\n * @param {string} pluginId The plugin ID.\n * @param {{filePath:string, importerName:string}[]} plugins The resolved plugins.\n */\n constructor(pluginId, plugins) {\n super(`Plugin \"${pluginId}\" was conflicted between ${plugins.map(p => `\"${p.importerName}\"`).join(\" and \")}.`);\n this.messageTemplate = \"plugin-conflict\";\n this.messageData = { pluginId, plugins };\n }\n}\n\n/**\n * Merge plugins.\n * `target`'s definition is prior to `source`'s.\n * @param {Record} target The destination to merge\n * @param {Record|undefined} source The source to merge.\n * @returns {void}\n */\nfunction mergePlugins(target, source) {\n if (!isNonNullObject(source)) {\n return;\n }\n\n for (const key of Object.keys(source)) {\n if (key === \"__proto__\") {\n continue;\n }\n const targetValue = target[key];\n const sourceValue = source[key];\n\n // Adopt the plugin which was found at first.\n if (targetValue === void 0) {\n if (sourceValue.error) {\n throw sourceValue.error;\n }\n target[key] = sourceValue;\n } else if (sourceValue.filePath !== targetValue.filePath) {\n throw new PluginConflictError(key, [\n {\n filePath: targetValue.filePath,\n importerName: targetValue.importerName\n },\n {\n filePath: sourceValue.filePath,\n importerName: sourceValue.importerName\n }\n ]);\n }\n }\n}\n\n/**\n * Merge rule configs.\n * `target`'s definition is prior to `source`'s.\n * @param {Record} target The destination to merge\n * @param {Record|undefined} source The source to merge.\n * @returns {void}\n */\nfunction mergeRuleConfigs(target, source) {\n if (!isNonNullObject(source)) {\n return;\n }\n\n for (const key of Object.keys(source)) {\n if (key === \"__proto__\") {\n continue;\n }\n const targetDef = target[key];\n const sourceDef = source[key];\n\n // Adopt the rule config which was found at first.\n if (targetDef === void 0) {\n if (Array.isArray(sourceDef)) {\n target[key] = [...sourceDef];\n } else {\n target[key] = [sourceDef];\n }\n\n /*\n * If the first found rule config is severity only and the current rule\n * config has options, merge the severity and the options.\n */\n } else if (\n targetDef.length === 1 &&\n Array.isArray(sourceDef) &&\n sourceDef.length >= 2\n ) {\n targetDef.push(...sourceDef.slice(1));\n }\n }\n}\n\n/**\n * Create the extracted config.\n * @param {ConfigArray} instance The config elements.\n * @param {number[]} indices The indices to use.\n * @returns {ExtractedConfig} The extracted config.\n */\nfunction createConfig(instance, indices) {\n const config = new ExtractedConfig();\n const ignorePatterns = [];\n\n // Merge elements.\n for (const index of indices) {\n const element = instance[index];\n\n // Adopt the parser which was found at first.\n if (!config.parser && element.parser) {\n if (element.parser.error) {\n throw element.parser.error;\n }\n config.parser = element.parser;\n }\n\n // Adopt the processor which was found at first.\n if (!config.processor && element.processor) {\n config.processor = element.processor;\n }\n\n // Adopt the noInlineConfig which was found at first.\n if (config.noInlineConfig === void 0 && element.noInlineConfig !== void 0) {\n config.noInlineConfig = element.noInlineConfig;\n config.configNameOfNoInlineConfig = element.name;\n }\n\n // Adopt the reportUnusedDisableDirectives which was found at first.\n if (config.reportUnusedDisableDirectives === void 0 && element.reportUnusedDisableDirectives !== void 0) {\n config.reportUnusedDisableDirectives = element.reportUnusedDisableDirectives;\n }\n\n // Collect ignorePatterns\n if (element.ignorePattern) {\n ignorePatterns.push(element.ignorePattern);\n }\n\n // Merge others.\n mergeWithoutOverwrite(config.env, element.env);\n mergeWithoutOverwrite(config.globals, element.globals);\n mergeWithoutOverwrite(config.parserOptions, element.parserOptions);\n mergeWithoutOverwrite(config.settings, element.settings);\n mergePlugins(config.plugins, element.plugins);\n mergeRuleConfigs(config.rules, element.rules);\n }\n\n // Create the predicate function for ignore patterns.\n if (ignorePatterns.length > 0) {\n config.ignores = IgnorePattern.createIgnore(ignorePatterns.reverse());\n }\n\n return config;\n}\n\n/**\n * Collect definitions.\n * @template T, U\n * @param {string} pluginId The plugin ID for prefix.\n * @param {Record} defs The definitions to collect.\n * @param {Map} map The map to output.\n * @param {function(T): U} [normalize] The normalize function for each value.\n * @returns {void}\n */\nfunction collect(pluginId, defs, map, normalize) {\n if (defs) {\n const prefix = pluginId && `${pluginId}/`;\n\n for (const [key, value] of Object.entries(defs)) {\n map.set(\n `${prefix}${key}`,\n normalize ? normalize(value) : value\n );\n }\n }\n}\n\n/**\n * Normalize a rule definition.\n * @param {Function|Rule} rule The rule definition to normalize.\n * @returns {Rule} The normalized rule definition.\n */\nfunction normalizePluginRule(rule) {\n return typeof rule === \"function\" ? { create: rule } : rule;\n}\n\n/**\n * Delete the mutation methods from a given map.\n * @param {Map} map The map object to delete.\n * @returns {void}\n */\nfunction deleteMutationMethods(map) {\n Object.defineProperties(map, {\n clear: { configurable: true, value: void 0 },\n delete: { configurable: true, value: void 0 },\n set: { configurable: true, value: void 0 }\n });\n}\n\n/**\n * Create `envMap`, `processorMap`, `ruleMap` with the plugins in the config array.\n * @param {ConfigArrayElement[]} elements The config elements.\n * @param {ConfigArrayInternalSlots} slots The internal slots.\n * @returns {void}\n */\nfunction initPluginMemberMaps(elements, slots) {\n const processed = new Set();\n\n slots.envMap = new Map();\n slots.processorMap = new Map();\n slots.ruleMap = new Map();\n\n for (const element of elements) {\n if (!element.plugins) {\n continue;\n }\n\n for (const [pluginId, value] of Object.entries(element.plugins)) {\n const plugin = value.definition;\n\n if (!plugin || processed.has(pluginId)) {\n continue;\n }\n processed.add(pluginId);\n\n collect(pluginId, plugin.environments, slots.envMap);\n collect(pluginId, plugin.processors, slots.processorMap);\n collect(pluginId, plugin.rules, slots.ruleMap, normalizePluginRule);\n }\n }\n\n deleteMutationMethods(slots.envMap);\n deleteMutationMethods(slots.processorMap);\n deleteMutationMethods(slots.ruleMap);\n}\n\n/**\n * Create `envMap`, `processorMap`, `ruleMap` with the plugins in the config array.\n * @param {ConfigArray} instance The config elements.\n * @returns {ConfigArrayInternalSlots} The extracted config.\n */\nfunction ensurePluginMemberMaps(instance) {\n const slots = internalSlotsMap.get(instance);\n\n if (!slots.ruleMap) {\n initPluginMemberMaps(instance, slots);\n }\n\n return slots;\n}\n\n//------------------------------------------------------------------------------\n// Public Interface\n//------------------------------------------------------------------------------\n\n/**\n * The Config Array.\n *\n * `ConfigArray` instance contains all settings, parsers, and plugins.\n * You need to call `ConfigArray#extractConfig(filePath)` method in order to\n * extract, merge and get only the config data which is related to an arbitrary\n * file.\n * @extends {Array}\n */\nclass ConfigArray extends Array {\n\n /**\n * Get the plugin environments.\n * The returned map cannot be mutated.\n * @type {ReadonlyMap} The plugin environments.\n */\n get pluginEnvironments() {\n return ensurePluginMemberMaps(this).envMap;\n }\n\n /**\n * Get the plugin processors.\n * The returned map cannot be mutated.\n * @type {ReadonlyMap} The plugin processors.\n */\n get pluginProcessors() {\n return ensurePluginMemberMaps(this).processorMap;\n }\n\n /**\n * Get the plugin rules.\n * The returned map cannot be mutated.\n * @returns {ReadonlyMap} The plugin rules.\n */\n get pluginRules() {\n return ensurePluginMemberMaps(this).ruleMap;\n }\n\n /**\n * Check if this config has `root` flag.\n * @returns {boolean} `true` if this config array is root.\n */\n isRoot() {\n for (let i = this.length - 1; i >= 0; --i) {\n const root = this[i].root;\n\n if (typeof root === \"boolean\") {\n return root;\n }\n }\n return false;\n }\n\n /**\n * Extract the config data which is related to a given file.\n * @param {string} filePath The absolute path to the target file.\n * @returns {ExtractedConfig} The extracted config data.\n */\n extractConfig(filePath) {\n const { cache } = internalSlotsMap.get(this);\n const indices = getMatchedIndices(this, filePath);\n const cacheKey = indices.join(\",\");\n\n if (!cache.has(cacheKey)) {\n cache.set(cacheKey, createConfig(this, indices));\n }\n\n return cache.get(cacheKey);\n }\n\n /**\n * Check if a given path is an additional lint target.\n * @param {string} filePath The absolute path to the target file.\n * @returns {boolean} `true` if the file is an additional lint target.\n */\n isAdditionalTargetPath(filePath) {\n for (const { criteria, type } of this) {\n if (\n type === \"config\" &&\n criteria &&\n !criteria.endsWithWildcard &&\n criteria.test(filePath)\n ) {\n return true;\n }\n }\n return false;\n }\n}\n\n/**\n * Get the used extracted configs.\n * CLIEngine will use this method to collect used deprecated rules.\n * @param {ConfigArray} instance The config array object to get.\n * @returns {ExtractedConfig[]} The used extracted configs.\n * @private\n */\nfunction getUsedExtractedConfigs(instance) {\n const { cache } = internalSlotsMap.get(instance);\n\n return Array.from(cache.values());\n}\n\n\nexport {\n ConfigArray,\n getUsedExtractedConfigs\n};\n","/**\n * @fileoverview `ConfigDependency` class.\n *\n * `ConfigDependency` class expresses a loaded parser or plugin.\n *\n * If the parser or plugin was loaded successfully, it has `definition` property\n * and `filePath` property. Otherwise, it has `error` property.\n *\n * When `JSON.stringify()` converted a `ConfigDependency` object to a JSON, it\n * omits `definition` property.\n *\n * `ConfigArrayFactory` creates `ConfigDependency` objects when it loads parsers\n * or plugins.\n *\n * @author Toru Nagashima \n */\n\nimport util from \"util\";\n\n/**\n * The class is to store parsers or plugins.\n * This class hides the loaded object from `JSON.stringify()` and `console.log`.\n * @template T\n */\nclass ConfigDependency {\n\n /**\n * Initialize this instance.\n * @param {Object} data The dependency data.\n * @param {T} [data.definition] The dependency if the loading succeeded.\n * @param {T} [data.original] The original, non-normalized dependency if the loading succeeded.\n * @param {Error} [data.error] The error object if the loading failed.\n * @param {string} [data.filePath] The actual path to the dependency if the loading succeeded.\n * @param {string} data.id The ID of this dependency.\n * @param {string} data.importerName The name of the config file which loads this dependency.\n * @param {string} data.importerPath The path to the config file which loads this dependency.\n */\n constructor({\n definition = null,\n original = null,\n error = null,\n filePath = null,\n id,\n importerName,\n importerPath\n }) {\n\n /**\n * The loaded dependency if the loading succeeded.\n * @type {T|null}\n */\n this.definition = definition;\n\n /**\n * The original dependency as loaded directly from disk if the loading succeeded.\n * @type {T|null}\n */\n this.original = original;\n\n /**\n * The error object if the loading failed.\n * @type {Error|null}\n */\n this.error = error;\n\n /**\n * The loaded dependency if the loading succeeded.\n * @type {string|null}\n */\n this.filePath = filePath;\n\n /**\n * The ID of this dependency.\n * @type {string}\n */\n this.id = id;\n\n /**\n * The name of the config file which loads this dependency.\n * @type {string}\n */\n this.importerName = importerName;\n\n /**\n * The path to the config file which loads this dependency.\n * @type {string}\n */\n this.importerPath = importerPath;\n }\n\n // eslint-disable-next-line jsdoc/require-description\n /**\n * @returns {Object} a JSON compatible object.\n */\n toJSON() {\n const obj = this[util.inspect.custom]();\n\n // Display `error.message` (`Error#message` is unenumerable).\n if (obj.error instanceof Error) {\n obj.error = { ...obj.error, message: obj.error.message };\n }\n\n return obj;\n }\n\n // eslint-disable-next-line jsdoc/require-description\n /**\n * @returns {Object} an object to display by `console.log()`.\n */\n [util.inspect.custom]() {\n const {\n definition: _ignore1, // eslint-disable-line no-unused-vars\n original: _ignore2, // eslint-disable-line no-unused-vars\n ...obj\n } = this;\n\n return obj;\n }\n}\n\n/** @typedef {ConfigDependency} DependentParser */\n/** @typedef {ConfigDependency} DependentPlugin */\n\nexport { ConfigDependency };\n","/**\n * @fileoverview `OverrideTester` class.\n *\n * `OverrideTester` class handles `files` property and `excludedFiles` property\n * of `overrides` config.\n *\n * It provides one method.\n *\n * - `test(filePath)`\n * Test if a file path matches the pair of `files` property and\n * `excludedFiles` property. The `filePath` argument must be an absolute\n * path.\n *\n * `ConfigArrayFactory` creates `OverrideTester` objects when it processes\n * `overrides` properties.\n *\n * @author Toru Nagashima \n */\n\nimport assert from \"assert\";\nimport path from \"path\";\nimport util from \"util\";\nimport minimatch from \"minimatch\";\n\nconst { Minimatch } = minimatch;\n\nconst minimatchOpts = { dot: true, matchBase: true };\n\n/**\n * @typedef {Object} Pattern\n * @property {InstanceType[] | null} includes The positive matchers.\n * @property {InstanceType[] | null} excludes The negative matchers.\n */\n\n/**\n * Normalize a given pattern to an array.\n * @param {string|string[]|undefined} patterns A glob pattern or an array of glob patterns.\n * @returns {string[]|null} Normalized patterns.\n * @private\n */\nfunction normalizePatterns(patterns) {\n if (Array.isArray(patterns)) {\n return patterns.filter(Boolean);\n }\n if (typeof patterns === \"string\" && patterns) {\n return [patterns];\n }\n return [];\n}\n\n/**\n * Create the matchers of given patterns.\n * @param {string[]} patterns The patterns.\n * @returns {InstanceType[] | null} The matchers.\n */\nfunction toMatcher(patterns) {\n if (patterns.length === 0) {\n return null;\n }\n return patterns.map(pattern => {\n if (/^\\.[/\\\\]/u.test(pattern)) {\n return new Minimatch(\n pattern.slice(2),\n\n // `./*.js` should not match with `subdir/foo.js`\n { ...minimatchOpts, matchBase: false }\n );\n }\n return new Minimatch(pattern, minimatchOpts);\n });\n}\n\n/**\n * Convert a given matcher to string.\n * @param {Pattern} matchers The matchers.\n * @returns {string} The string expression of the matcher.\n */\nfunction patternToJson({ includes, excludes }) {\n return {\n includes: includes && includes.map(m => m.pattern),\n excludes: excludes && excludes.map(m => m.pattern)\n };\n}\n\n/**\n * The class to test given paths are matched by the patterns.\n */\nclass OverrideTester {\n\n /**\n * Create a tester with given criteria.\n * If there are no criteria, returns `null`.\n * @param {string|string[]} files The glob patterns for included files.\n * @param {string|string[]} excludedFiles The glob patterns for excluded files.\n * @param {string} basePath The path to the base directory to test paths.\n * @returns {OverrideTester|null} The created instance or `null`.\n */\n static create(files, excludedFiles, basePath) {\n const includePatterns = normalizePatterns(files);\n const excludePatterns = normalizePatterns(excludedFiles);\n let endsWithWildcard = false;\n\n if (includePatterns.length === 0) {\n return null;\n }\n\n // Rejects absolute paths or relative paths to parents.\n for (const pattern of includePatterns) {\n if (path.isAbsolute(pattern) || pattern.includes(\"..\")) {\n throw new Error(`Invalid override pattern (expected relative path not containing '..'): ${pattern}`);\n }\n if (pattern.endsWith(\"*\")) {\n endsWithWildcard = true;\n }\n }\n for (const pattern of excludePatterns) {\n if (path.isAbsolute(pattern) || pattern.includes(\"..\")) {\n throw new Error(`Invalid override pattern (expected relative path not containing '..'): ${pattern}`);\n }\n }\n\n const includes = toMatcher(includePatterns);\n const excludes = toMatcher(excludePatterns);\n\n return new OverrideTester(\n [{ includes, excludes }],\n basePath,\n endsWithWildcard\n );\n }\n\n /**\n * Combine two testers by logical and.\n * If either of the testers was `null`, returns the other tester.\n * The `basePath` property of the two must be the same value.\n * @param {OverrideTester|null} a A tester.\n * @param {OverrideTester|null} b Another tester.\n * @returns {OverrideTester|null} Combined tester.\n */\n static and(a, b) {\n if (!b) {\n return a && new OverrideTester(\n a.patterns,\n a.basePath,\n a.endsWithWildcard\n );\n }\n if (!a) {\n return new OverrideTester(\n b.patterns,\n b.basePath,\n b.endsWithWildcard\n );\n }\n\n assert.strictEqual(a.basePath, b.basePath);\n return new OverrideTester(\n a.patterns.concat(b.patterns),\n a.basePath,\n a.endsWithWildcard || b.endsWithWildcard\n );\n }\n\n /**\n * Initialize this instance.\n * @param {Pattern[]} patterns The matchers.\n * @param {string} basePath The base path.\n * @param {boolean} endsWithWildcard If `true` then a pattern ends with `*`.\n */\n constructor(patterns, basePath, endsWithWildcard = false) {\n\n /** @type {Pattern[]} */\n this.patterns = patterns;\n\n /** @type {string} */\n this.basePath = basePath;\n\n /** @type {boolean} */\n this.endsWithWildcard = endsWithWildcard;\n }\n\n /**\n * Test if a given path is matched or not.\n * @param {string} filePath The absolute path to the target file.\n * @returns {boolean} `true` if the path was matched.\n */\n test(filePath) {\n if (typeof filePath !== \"string\" || !path.isAbsolute(filePath)) {\n throw new Error(`'filePath' should be an absolute path, but got ${filePath}.`);\n }\n const relativePath = path.relative(this.basePath, filePath);\n\n return this.patterns.every(({ includes, excludes }) => (\n (!includes || includes.some(m => m.match(relativePath))) &&\n (!excludes || !excludes.some(m => m.match(relativePath)))\n ));\n }\n\n // eslint-disable-next-line jsdoc/require-description\n /**\n * @returns {Object} a JSON compatible object.\n */\n toJSON() {\n if (this.patterns.length === 1) {\n return {\n ...patternToJson(this.patterns[0]),\n basePath: this.basePath\n };\n }\n return {\n AND: this.patterns.map(patternToJson),\n basePath: this.basePath\n };\n }\n\n // eslint-disable-next-line jsdoc/require-description\n /**\n * @returns {Object} an object to display by `console.log()`.\n */\n [util.inspect.custom]() {\n return this.toJSON();\n }\n}\n\nexport { OverrideTester };\n","/**\n * @fileoverview `ConfigArray` class.\n * @author Toru Nagashima \n */\n\nimport { ConfigArray, getUsedExtractedConfigs } from \"./config-array.js\";\nimport { ConfigDependency } from \"./config-dependency.js\";\nimport { ExtractedConfig } from \"./extracted-config.js\";\nimport { IgnorePattern } from \"./ignore-pattern.js\";\nimport { OverrideTester } from \"./override-tester.js\";\n\nexport {\n ConfigArray,\n ConfigDependency,\n ExtractedConfig,\n IgnorePattern,\n OverrideTester,\n getUsedExtractedConfigs\n};\n","/**\n * @fileoverview Config file operations. This file must be usable in the browser,\n * so no Node-specific code can be here.\n * @author Nicholas C. Zakas\n */\n\n//------------------------------------------------------------------------------\n// Private\n//------------------------------------------------------------------------------\n\nconst RULE_SEVERITY_STRINGS = [\"off\", \"warn\", \"error\"],\n RULE_SEVERITY = RULE_SEVERITY_STRINGS.reduce((map, value, index) => {\n map[value] = index;\n return map;\n }, {}),\n VALID_SEVERITIES = [0, 1, 2, \"off\", \"warn\", \"error\"];\n\n//------------------------------------------------------------------------------\n// Public Interface\n//------------------------------------------------------------------------------\n\n/**\n * Normalizes the severity value of a rule's configuration to a number\n * @param {(number|string|[number, ...*]|[string, ...*])} ruleConfig A rule's configuration value, generally\n * received from the user. A valid config value is either 0, 1, 2, the string \"off\" (treated the same as 0),\n * the string \"warn\" (treated the same as 1), the string \"error\" (treated the same as 2), or an array\n * whose first element is one of the above values. Strings are matched case-insensitively.\n * @returns {(0|1|2)} The numeric severity value if the config value was valid, otherwise 0.\n */\nfunction getRuleSeverity(ruleConfig) {\n const severityValue = Array.isArray(ruleConfig) ? ruleConfig[0] : ruleConfig;\n\n if (severityValue === 0 || severityValue === 1 || severityValue === 2) {\n return severityValue;\n }\n\n if (typeof severityValue === \"string\") {\n return RULE_SEVERITY[severityValue.toLowerCase()] || 0;\n }\n\n return 0;\n}\n\n/**\n * Converts old-style severity settings (0, 1, 2) into new-style\n * severity settings (off, warn, error) for all rules. Assumption is that severity\n * values have already been validated as correct.\n * @param {Object} config The config object to normalize.\n * @returns {void}\n */\nfunction normalizeToStrings(config) {\n\n if (config.rules) {\n Object.keys(config.rules).forEach(ruleId => {\n const ruleConfig = config.rules[ruleId];\n\n if (typeof ruleConfig === \"number\") {\n config.rules[ruleId] = RULE_SEVERITY_STRINGS[ruleConfig] || RULE_SEVERITY_STRINGS[0];\n } else if (Array.isArray(ruleConfig) && typeof ruleConfig[0] === \"number\") {\n ruleConfig[0] = RULE_SEVERITY_STRINGS[ruleConfig[0]] || RULE_SEVERITY_STRINGS[0];\n }\n });\n }\n}\n\n/**\n * Determines if the severity for the given rule configuration represents an error.\n * @param {int|string|Array} ruleConfig The configuration for an individual rule.\n * @returns {boolean} True if the rule represents an error, false if not.\n */\nfunction isErrorSeverity(ruleConfig) {\n return getRuleSeverity(ruleConfig) === 2;\n}\n\n/**\n * Checks whether a given config has valid severity or not.\n * @param {number|string|Array} ruleConfig The configuration for an individual rule.\n * @returns {boolean} `true` if the configuration has valid severity.\n */\nfunction isValidSeverity(ruleConfig) {\n let severity = Array.isArray(ruleConfig) ? ruleConfig[0] : ruleConfig;\n\n if (typeof severity === \"string\") {\n severity = severity.toLowerCase();\n }\n return VALID_SEVERITIES.indexOf(severity) !== -1;\n}\n\n/**\n * Checks whether every rule of a given config has valid severity or not.\n * @param {Object} config The configuration for rules.\n * @returns {boolean} `true` if the configuration has valid severity.\n */\nfunction isEverySeverityValid(config) {\n return Object.keys(config).every(ruleId => isValidSeverity(config[ruleId]));\n}\n\n/**\n * Normalizes a value for a global in a config\n * @param {(boolean|string|null)} configuredValue The value given for a global in configuration or in\n * a global directive comment\n * @returns {(\"readable\"|\"writeable\"|\"off\")} The value normalized as a string\n * @throws Error if global value is invalid\n */\nfunction normalizeConfigGlobal(configuredValue) {\n switch (configuredValue) {\n case \"off\":\n return \"off\";\n\n case true:\n case \"true\":\n case \"writeable\":\n case \"writable\":\n return \"writable\";\n\n case null:\n case false:\n case \"false\":\n case \"readable\":\n case \"readonly\":\n return \"readonly\";\n\n default:\n throw new Error(`'${configuredValue}' is not a valid configuration for a global (use 'readonly', 'writable', or 'off')`);\n }\n}\n\nexport {\n getRuleSeverity,\n normalizeToStrings,\n isErrorSeverity,\n isValidSeverity,\n isEverySeverityValid,\n normalizeConfigGlobal\n};\n","/**\n * @fileoverview Provide the function that emits deprecation warnings.\n * @author Toru Nagashima \n */\n\n//------------------------------------------------------------------------------\n// Requirements\n//------------------------------------------------------------------------------\n\nimport path from \"path\";\n\n//------------------------------------------------------------------------------\n// Private\n//------------------------------------------------------------------------------\n\n// Defitions for deprecation warnings.\nconst deprecationWarningMessages = {\n ESLINT_LEGACY_ECMAFEATURES:\n \"The 'ecmaFeatures' config file property is deprecated and has no effect.\",\n ESLINT_PERSONAL_CONFIG_LOAD:\n \"'~/.eslintrc.*' config files have been deprecated. \" +\n \"Please use a config file per project or the '--config' option.\",\n ESLINT_PERSONAL_CONFIG_SUPPRESS:\n \"'~/.eslintrc.*' config files have been deprecated. \" +\n \"Please remove it or add 'root:true' to the config files in your \" +\n \"projects in order to avoid loading '~/.eslintrc.*' accidentally.\"\n};\n\nconst sourceFileErrorCache = new Set();\n\n/**\n * Emits a deprecation warning containing a given filepath. A new deprecation warning is emitted\n * for each unique file path, but repeated invocations with the same file path have no effect.\n * No warnings are emitted if the `--no-deprecation` or `--no-warnings` Node runtime flags are active.\n * @param {string} source The name of the configuration source to report the warning for.\n * @param {string} errorCode The warning message to show.\n * @returns {void}\n */\nfunction emitDeprecationWarning(source, errorCode) {\n const cacheKey = JSON.stringify({ source, errorCode });\n\n if (sourceFileErrorCache.has(cacheKey)) {\n return;\n }\n sourceFileErrorCache.add(cacheKey);\n\n const rel = path.relative(process.cwd(), source);\n const message = deprecationWarningMessages[errorCode];\n\n process.emitWarning(\n `${message} (found in \"${rel}\")`,\n \"DeprecationWarning\",\n errorCode\n );\n}\n\n//------------------------------------------------------------------------------\n// Public Interface\n//------------------------------------------------------------------------------\n\nexport {\n emitDeprecationWarning\n};\n","/**\n * @fileoverview The instance of Ajv validator.\n * @author Evgeny Poberezkin\n */\n\n//------------------------------------------------------------------------------\n// Requirements\n//------------------------------------------------------------------------------\n\nimport Ajv from \"ajv\";\n\n//-----------------------------------------------------------------------------\n// Helpers\n//-----------------------------------------------------------------------------\n\n/*\n * Copied from ajv/lib/refs/json-schema-draft-04.json\n * The MIT License (MIT)\n * Copyright (c) 2015-2017 Evgeny Poberezkin\n */\nconst metaSchema = {\n id: \"http://json-schema.org/draft-04/schema#\",\n $schema: \"http://json-schema.org/draft-04/schema#\",\n description: \"Core schema meta-schema\",\n definitions: {\n schemaArray: {\n type: \"array\",\n minItems: 1,\n items: { $ref: \"#\" }\n },\n positiveInteger: {\n type: \"integer\",\n minimum: 0\n },\n positiveIntegerDefault0: {\n allOf: [{ $ref: \"#/definitions/positiveInteger\" }, { default: 0 }]\n },\n simpleTypes: {\n enum: [\"array\", \"boolean\", \"integer\", \"null\", \"number\", \"object\", \"string\"]\n },\n stringArray: {\n type: \"array\",\n items: { type: \"string\" },\n minItems: 1,\n uniqueItems: true\n }\n },\n type: \"object\",\n properties: {\n id: {\n type: \"string\"\n },\n $schema: {\n type: \"string\"\n },\n title: {\n type: \"string\"\n },\n description: {\n type: \"string\"\n },\n default: { },\n multipleOf: {\n type: \"number\",\n minimum: 0,\n exclusiveMinimum: true\n },\n maximum: {\n type: \"number\"\n },\n exclusiveMaximum: {\n type: \"boolean\",\n default: false\n },\n minimum: {\n type: \"number\"\n },\n exclusiveMinimum: {\n type: \"boolean\",\n default: false\n },\n maxLength: { $ref: \"#/definitions/positiveInteger\" },\n minLength: { $ref: \"#/definitions/positiveIntegerDefault0\" },\n pattern: {\n type: \"string\",\n format: \"regex\"\n },\n additionalItems: {\n anyOf: [\n { type: \"boolean\" },\n { $ref: \"#\" }\n ],\n default: { }\n },\n items: {\n anyOf: [\n { $ref: \"#\" },\n { $ref: \"#/definitions/schemaArray\" }\n ],\n default: { }\n },\n maxItems: { $ref: \"#/definitions/positiveInteger\" },\n minItems: { $ref: \"#/definitions/positiveIntegerDefault0\" },\n uniqueItems: {\n type: \"boolean\",\n default: false\n },\n maxProperties: { $ref: \"#/definitions/positiveInteger\" },\n minProperties: { $ref: \"#/definitions/positiveIntegerDefault0\" },\n required: { $ref: \"#/definitions/stringArray\" },\n additionalProperties: {\n anyOf: [\n { type: \"boolean\" },\n { $ref: \"#\" }\n ],\n default: { }\n },\n definitions: {\n type: \"object\",\n additionalProperties: { $ref: \"#\" },\n default: { }\n },\n properties: {\n type: \"object\",\n additionalProperties: { $ref: \"#\" },\n default: { }\n },\n patternProperties: {\n type: \"object\",\n additionalProperties: { $ref: \"#\" },\n default: { }\n },\n dependencies: {\n type: \"object\",\n additionalProperties: {\n anyOf: [\n { $ref: \"#\" },\n { $ref: \"#/definitions/stringArray\" }\n ]\n }\n },\n enum: {\n type: \"array\",\n minItems: 1,\n uniqueItems: true\n },\n type: {\n anyOf: [\n { $ref: \"#/definitions/simpleTypes\" },\n {\n type: \"array\",\n items: { $ref: \"#/definitions/simpleTypes\" },\n minItems: 1,\n uniqueItems: true\n }\n ]\n },\n format: { type: \"string\" },\n allOf: { $ref: \"#/definitions/schemaArray\" },\n anyOf: { $ref: \"#/definitions/schemaArray\" },\n oneOf: { $ref: \"#/definitions/schemaArray\" },\n not: { $ref: \"#\" }\n },\n dependencies: {\n exclusiveMaximum: [\"maximum\"],\n exclusiveMinimum: [\"minimum\"]\n },\n default: { }\n};\n\n//------------------------------------------------------------------------------\n// Public Interface\n//------------------------------------------------------------------------------\n\nexport default (additionalOptions = {}) => {\n const ajv = new Ajv({\n meta: false,\n useDefaults: true,\n validateSchema: false,\n missingRefs: \"ignore\",\n verbose: true,\n schemaId: \"auto\",\n ...additionalOptions\n });\n\n ajv.addMetaSchema(metaSchema);\n // eslint-disable-next-line no-underscore-dangle\n ajv._opts.defaultMeta = metaSchema.id;\n\n return ajv;\n};\n","/**\n * @fileoverview Defines a schema for configs.\n * @author Sylvan Mably\n */\n\nconst baseConfigProperties = {\n $schema: { type: \"string\" },\n env: { type: \"object\" },\n extends: { $ref: \"#/definitions/stringOrStrings\" },\n globals: { type: \"object\" },\n overrides: {\n type: \"array\",\n items: { $ref: \"#/definitions/overrideConfig\" },\n additionalItems: false\n },\n parser: { type: [\"string\", \"null\"] },\n parserOptions: { type: \"object\" },\n plugins: { type: \"array\" },\n processor: { type: \"string\" },\n rules: { type: \"object\" },\n settings: { type: \"object\" },\n noInlineConfig: { type: \"boolean\" },\n reportUnusedDisableDirectives: { type: \"boolean\" },\n\n ecmaFeatures: { type: \"object\" } // deprecated; logs a warning when used\n};\n\nconst configSchema = {\n definitions: {\n stringOrStrings: {\n oneOf: [\n { type: \"string\" },\n {\n type: \"array\",\n items: { type: \"string\" },\n additionalItems: false\n }\n ]\n },\n stringOrStringsRequired: {\n oneOf: [\n { type: \"string\" },\n {\n type: \"array\",\n items: { type: \"string\" },\n additionalItems: false,\n minItems: 1\n }\n ]\n },\n\n // Config at top-level.\n objectConfig: {\n type: \"object\",\n properties: {\n root: { type: \"boolean\" },\n ignorePatterns: { $ref: \"#/definitions/stringOrStrings\" },\n ...baseConfigProperties\n },\n additionalProperties: false\n },\n\n // Config in `overrides`.\n overrideConfig: {\n type: \"object\",\n properties: {\n excludedFiles: { $ref: \"#/definitions/stringOrStrings\" },\n files: { $ref: \"#/definitions/stringOrStringsRequired\" },\n ...baseConfigProperties\n },\n required: [\"files\"],\n additionalProperties: false\n }\n },\n\n $ref: \"#/definitions/objectConfig\"\n};\n\nexport default configSchema;\n","/**\n * @fileoverview Defines environment settings and globals.\n * @author Elan Shanker\n */\n\n//------------------------------------------------------------------------------\n// Requirements\n//------------------------------------------------------------------------------\n\nimport globals from \"globals\";\n\n//------------------------------------------------------------------------------\n// Helpers\n//------------------------------------------------------------------------------\n\n/**\n * Get the object that has difference.\n * @param {Record} current The newer object.\n * @param {Record} prev The older object.\n * @returns {Record} The difference object.\n */\nfunction getDiff(current, prev) {\n const retv = {};\n\n for (const [key, value] of Object.entries(current)) {\n if (!Object.hasOwnProperty.call(prev, key)) {\n retv[key] = value;\n }\n }\n\n return retv;\n}\n\nconst newGlobals2015 = getDiff(globals.es2015, globals.es5); // 19 variables such as Promise, Map, ...\nconst newGlobals2017 = {\n Atomics: false,\n SharedArrayBuffer: false\n};\nconst newGlobals2020 = {\n BigInt: false,\n BigInt64Array: false,\n BigUint64Array: false,\n globalThis: false\n};\n\nconst newGlobals2021 = {\n AggregateError: false,\n FinalizationRegistry: false,\n WeakRef: false\n};\n\n//------------------------------------------------------------------------------\n// Public Interface\n//------------------------------------------------------------------------------\n\n/** @type {Map} */\nexport default new Map(Object.entries({\n\n // Language\n builtin: {\n globals: globals.es5\n },\n es6: {\n globals: newGlobals2015,\n parserOptions: {\n ecmaVersion: 6\n }\n },\n es2015: {\n globals: newGlobals2015,\n parserOptions: {\n ecmaVersion: 6\n }\n },\n es2016: {\n globals: newGlobals2015,\n parserOptions: {\n ecmaVersion: 7\n }\n },\n es2017: {\n globals: { ...newGlobals2015, ...newGlobals2017 },\n parserOptions: {\n ecmaVersion: 8\n }\n },\n es2018: {\n globals: { ...newGlobals2015, ...newGlobals2017 },\n parserOptions: {\n ecmaVersion: 9\n }\n },\n es2019: {\n globals: { ...newGlobals2015, ...newGlobals2017 },\n parserOptions: {\n ecmaVersion: 10\n }\n },\n es2020: {\n globals: { ...newGlobals2015, ...newGlobals2017, ...newGlobals2020 },\n parserOptions: {\n ecmaVersion: 11\n }\n },\n es2021: {\n globals: { ...newGlobals2015, ...newGlobals2017, ...newGlobals2020, ...newGlobals2021 },\n parserOptions: {\n ecmaVersion: 12\n }\n },\n es2022: {\n globals: { ...newGlobals2015, ...newGlobals2017, ...newGlobals2020, ...newGlobals2021 },\n parserOptions: {\n ecmaVersion: 13\n }\n },\n es2023: {\n globals: { ...newGlobals2015, ...newGlobals2017, ...newGlobals2020, ...newGlobals2021 },\n parserOptions: {\n ecmaVersion: 14\n }\n },\n es2024: {\n globals: { ...newGlobals2015, ...newGlobals2017, ...newGlobals2020, ...newGlobals2021 },\n parserOptions: {\n ecmaVersion: 15\n }\n },\n\n // Platforms\n browser: {\n globals: globals.browser\n },\n node: {\n globals: globals.node,\n parserOptions: {\n ecmaFeatures: {\n globalReturn: true\n }\n }\n },\n \"shared-node-browser\": {\n globals: globals[\"shared-node-browser\"]\n },\n worker: {\n globals: globals.worker\n },\n serviceworker: {\n globals: globals.serviceworker\n },\n\n // Frameworks\n commonjs: {\n globals: globals.commonjs,\n parserOptions: {\n ecmaFeatures: {\n globalReturn: true\n }\n }\n },\n amd: {\n globals: globals.amd\n },\n mocha: {\n globals: globals.mocha\n },\n jasmine: {\n globals: globals.jasmine\n },\n jest: {\n globals: globals.jest\n },\n phantomjs: {\n globals: globals.phantomjs\n },\n jquery: {\n globals: globals.jquery\n },\n qunit: {\n globals: globals.qunit\n },\n prototypejs: {\n globals: globals.prototypejs\n },\n shelljs: {\n globals: globals.shelljs\n },\n meteor: {\n globals: globals.meteor\n },\n mongo: {\n globals: globals.mongo\n },\n protractor: {\n globals: globals.protractor\n },\n applescript: {\n globals: globals.applescript\n },\n nashorn: {\n globals: globals.nashorn\n },\n atomtest: {\n globals: globals.atomtest\n },\n embertest: {\n globals: globals.embertest\n },\n webextensions: {\n globals: globals.webextensions\n },\n greasemonkey: {\n globals: globals.greasemonkey\n }\n}));\n","/**\n * @fileoverview Validates configs.\n * @author Brandon Mills\n */\n\n/* eslint class-methods-use-this: \"off\" */\n\n//------------------------------------------------------------------------------\n// Requirements\n//------------------------------------------------------------------------------\n\nimport util from \"util\";\nimport * as ConfigOps from \"./config-ops.js\";\nimport { emitDeprecationWarning } from \"./deprecation-warnings.js\";\nimport ajvOrig from \"./ajv.js\";\nimport configSchema from \"../../conf/config-schema.js\";\nimport BuiltInEnvironments from \"../../conf/environments.js\";\n\nconst ajv = ajvOrig();\n\nconst ruleValidators = new WeakMap();\nconst noop = Function.prototype;\n\n//------------------------------------------------------------------------------\n// Private\n//------------------------------------------------------------------------------\nlet validateSchema;\nconst severityMap = {\n error: 2,\n warn: 1,\n off: 0\n};\n\nconst validated = new WeakSet();\n\n//-----------------------------------------------------------------------------\n// Exports\n//-----------------------------------------------------------------------------\n\nexport default class ConfigValidator {\n constructor({ builtInRules = new Map() } = {}) {\n this.builtInRules = builtInRules;\n }\n\n /**\n * Gets a complete options schema for a rule.\n * @param {{create: Function, schema: (Array|null)}} rule A new-style rule object\n * @returns {Object} JSON Schema for the rule's options.\n */\n getRuleOptionsSchema(rule) {\n if (!rule) {\n return null;\n }\n\n const schema = rule.schema || rule.meta && rule.meta.schema;\n\n // Given a tuple of schemas, insert warning level at the beginning\n if (Array.isArray(schema)) {\n if (schema.length) {\n return {\n type: \"array\",\n items: schema,\n minItems: 0,\n maxItems: schema.length\n };\n }\n return {\n type: \"array\",\n minItems: 0,\n maxItems: 0\n };\n\n }\n\n // Given a full schema, leave it alone\n return schema || null;\n }\n\n /**\n * Validates a rule's severity and returns the severity value. Throws an error if the severity is invalid.\n * @param {options} options The given options for the rule.\n * @returns {number|string} The rule's severity value\n */\n validateRuleSeverity(options) {\n const severity = Array.isArray(options) ? options[0] : options;\n const normSeverity = typeof severity === \"string\" ? severityMap[severity.toLowerCase()] : severity;\n\n if (normSeverity === 0 || normSeverity === 1 || normSeverity === 2) {\n return normSeverity;\n }\n\n throw new Error(`\\tSeverity should be one of the following: 0 = off, 1 = warn, 2 = error (you passed '${util.inspect(severity).replace(/'/gu, \"\\\"\").replace(/\\n/gu, \"\")}').\\n`);\n\n }\n\n /**\n * Validates the non-severity options passed to a rule, based on its schema.\n * @param {{create: Function}} rule The rule to validate\n * @param {Array} localOptions The options for the rule, excluding severity\n * @returns {void}\n */\n validateRuleSchema(rule, localOptions) {\n if (!ruleValidators.has(rule)) {\n const schema = this.getRuleOptionsSchema(rule);\n\n if (schema) {\n ruleValidators.set(rule, ajv.compile(schema));\n }\n }\n\n const validateRule = ruleValidators.get(rule);\n\n if (validateRule) {\n validateRule(localOptions);\n if (validateRule.errors) {\n throw new Error(validateRule.errors.map(\n error => `\\tValue ${JSON.stringify(error.data)} ${error.message}.\\n`\n ).join(\"\"));\n }\n }\n }\n\n /**\n * Validates a rule's options against its schema.\n * @param {{create: Function}|null} rule The rule that the config is being validated for\n * @param {string} ruleId The rule's unique name.\n * @param {Array|number} options The given options for the rule.\n * @param {string|null} source The name of the configuration source to report in any errors. If null or undefined,\n * no source is prepended to the message.\n * @returns {void}\n */\n validateRuleOptions(rule, ruleId, options, source = null) {\n try {\n const severity = this.validateRuleSeverity(options);\n\n if (severity !== 0) {\n this.validateRuleSchema(rule, Array.isArray(options) ? options.slice(1) : []);\n }\n } catch (err) {\n const enhancedMessage = `Configuration for rule \"${ruleId}\" is invalid:\\n${err.message}`;\n\n if (typeof source === \"string\") {\n throw new Error(`${source}:\\n\\t${enhancedMessage}`);\n } else {\n throw new Error(enhancedMessage);\n }\n }\n }\n\n /**\n * Validates an environment object\n * @param {Object} environment The environment config object to validate.\n * @param {string} source The name of the configuration source to report in any errors.\n * @param {function(envId:string): Object} [getAdditionalEnv] A map from strings to loaded environments.\n * @returns {void}\n */\n validateEnvironment(\n environment,\n source,\n getAdditionalEnv = noop\n ) {\n\n // not having an environment is ok\n if (!environment) {\n return;\n }\n\n Object.keys(environment).forEach(id => {\n const env = getAdditionalEnv(id) || BuiltInEnvironments.get(id) || null;\n\n if (!env) {\n const message = `${source}:\\n\\tEnvironment key \"${id}\" is unknown\\n`;\n\n throw new Error(message);\n }\n });\n }\n\n /**\n * Validates a rules config object\n * @param {Object} rulesConfig The rules config object to validate.\n * @param {string} source The name of the configuration source to report in any errors.\n * @param {function(ruleId:string): Object} getAdditionalRule A map from strings to loaded rules\n * @returns {void}\n */\n validateRules(\n rulesConfig,\n source,\n getAdditionalRule = noop\n ) {\n if (!rulesConfig) {\n return;\n }\n\n Object.keys(rulesConfig).forEach(id => {\n const rule = getAdditionalRule(id) || this.builtInRules.get(id) || null;\n\n this.validateRuleOptions(rule, id, rulesConfig[id], source);\n });\n }\n\n /**\n * Validates a `globals` section of a config file\n * @param {Object} globalsConfig The `globals` section\n * @param {string|null} source The name of the configuration source to report in the event of an error.\n * @returns {void}\n */\n validateGlobals(globalsConfig, source = null) {\n if (!globalsConfig) {\n return;\n }\n\n Object.entries(globalsConfig)\n .forEach(([configuredGlobal, configuredValue]) => {\n try {\n ConfigOps.normalizeConfigGlobal(configuredValue);\n } catch (err) {\n throw new Error(`ESLint configuration of global '${configuredGlobal}' in ${source} is invalid:\\n${err.message}`);\n }\n });\n }\n\n /**\n * Validate `processor` configuration.\n * @param {string|undefined} processorName The processor name.\n * @param {string} source The name of config file.\n * @param {function(id:string): Processor} getProcessor The getter of defined processors.\n * @returns {void}\n */\n validateProcessor(processorName, source, getProcessor) {\n if (processorName && !getProcessor(processorName)) {\n throw new Error(`ESLint configuration of processor in '${source}' is invalid: '${processorName}' was not found.`);\n }\n }\n\n /**\n * Formats an array of schema validation errors.\n * @param {Array} errors An array of error messages to format.\n * @returns {string} Formatted error message\n */\n formatErrors(errors) {\n return errors.map(error => {\n if (error.keyword === \"additionalProperties\") {\n const formattedPropertyPath = error.dataPath.length ? `${error.dataPath.slice(1)}.${error.params.additionalProperty}` : error.params.additionalProperty;\n\n return `Unexpected top-level property \"${formattedPropertyPath}\"`;\n }\n if (error.keyword === \"type\") {\n const formattedField = error.dataPath.slice(1);\n const formattedExpectedType = Array.isArray(error.schema) ? error.schema.join(\"/\") : error.schema;\n const formattedValue = JSON.stringify(error.data);\n\n return `Property \"${formattedField}\" is the wrong type (expected ${formattedExpectedType} but got \\`${formattedValue}\\`)`;\n }\n\n const field = error.dataPath[0] === \".\" ? error.dataPath.slice(1) : error.dataPath;\n\n return `\"${field}\" ${error.message}. Value: ${JSON.stringify(error.data)}`;\n }).map(message => `\\t- ${message}.\\n`).join(\"\");\n }\n\n /**\n * Validates the top level properties of the config object.\n * @param {Object} config The config object to validate.\n * @param {string} source The name of the configuration source to report in any errors.\n * @returns {void}\n */\n validateConfigSchema(config, source = null) {\n validateSchema = validateSchema || ajv.compile(configSchema);\n\n if (!validateSchema(config)) {\n throw new Error(`ESLint configuration in ${source} is invalid:\\n${this.formatErrors(validateSchema.errors)}`);\n }\n\n if (Object.hasOwnProperty.call(config, \"ecmaFeatures\")) {\n emitDeprecationWarning(source, \"ESLINT_LEGACY_ECMAFEATURES\");\n }\n }\n\n /**\n * Validates an entire config object.\n * @param {Object} config The config object to validate.\n * @param {string} source The name of the configuration source to report in any errors.\n * @param {function(ruleId:string): Object} [getAdditionalRule] A map from strings to loaded rules.\n * @param {function(envId:string): Object} [getAdditionalEnv] A map from strings to loaded envs.\n * @returns {void}\n */\n validate(config, source, getAdditionalRule, getAdditionalEnv) {\n this.validateConfigSchema(config, source);\n this.validateRules(config.rules, source, getAdditionalRule);\n this.validateEnvironment(config.env, source, getAdditionalEnv);\n this.validateGlobals(config.globals, source);\n\n for (const override of config.overrides || []) {\n this.validateRules(override.rules, source, getAdditionalRule);\n this.validateEnvironment(override.env, source, getAdditionalEnv);\n this.validateGlobals(config.globals, source);\n }\n }\n\n /**\n * Validate config array object.\n * @param {ConfigArray} configArray The config array to validate.\n * @returns {void}\n */\n validateConfigArray(configArray) {\n const getPluginEnv = Map.prototype.get.bind(configArray.pluginEnvironments);\n const getPluginProcessor = Map.prototype.get.bind(configArray.pluginProcessors);\n const getPluginRule = Map.prototype.get.bind(configArray.pluginRules);\n\n // Validate.\n for (const element of configArray) {\n if (validated.has(element)) {\n continue;\n }\n validated.add(element);\n\n this.validateEnvironment(element.env, element.name, getPluginEnv);\n this.validateGlobals(element.globals, element.name);\n this.validateProcessor(element.processor, element.name, getPluginProcessor);\n this.validateRules(element.rules, element.name, getPluginRule);\n }\n }\n\n}\n","/**\n * @fileoverview Common helpers for naming of plugins, formatters and configs\n */\n\nconst NAMESPACE_REGEX = /^@.*\\//iu;\n\n/**\n * Brings package name to correct format based on prefix\n * @param {string} name The name of the package.\n * @param {string} prefix Can be either \"eslint-plugin\", \"eslint-config\" or \"eslint-formatter\"\n * @returns {string} Normalized name of the package\n * @private\n */\nfunction normalizePackageName(name, prefix) {\n let normalizedName = name;\n\n /**\n * On Windows, name can come in with Windows slashes instead of Unix slashes.\n * Normalize to Unix first to avoid errors later on.\n * https://github.com/eslint/eslint/issues/5644\n */\n if (normalizedName.includes(\"\\\\\")) {\n normalizedName = normalizedName.replace(/\\\\/gu, \"/\");\n }\n\n if (normalizedName.charAt(0) === \"@\") {\n\n /**\n * it's a scoped package\n * package name is the prefix, or just a username\n */\n const scopedPackageShortcutRegex = new RegExp(`^(@[^/]+)(?:/(?:${prefix})?)?$`, \"u\"),\n scopedPackageNameRegex = new RegExp(`^${prefix}(-|$)`, \"u\");\n\n if (scopedPackageShortcutRegex.test(normalizedName)) {\n normalizedName = normalizedName.replace(scopedPackageShortcutRegex, `$1/${prefix}`);\n } else if (!scopedPackageNameRegex.test(normalizedName.split(\"/\")[1])) {\n\n /**\n * for scoped packages, insert the prefix after the first / unless\n * the path is already @scope/eslint or @scope/eslint-xxx-yyy\n */\n normalizedName = normalizedName.replace(/^@([^/]+)\\/(.*)$/u, `@$1/${prefix}-$2`);\n }\n } else if (!normalizedName.startsWith(`${prefix}-`)) {\n normalizedName = `${prefix}-${normalizedName}`;\n }\n\n return normalizedName;\n}\n\n/**\n * Removes the prefix from a fullname.\n * @param {string} fullname The term which may have the prefix.\n * @param {string} prefix The prefix to remove.\n * @returns {string} The term without prefix.\n */\nfunction getShorthandName(fullname, prefix) {\n if (fullname[0] === \"@\") {\n let matchResult = new RegExp(`^(@[^/]+)/${prefix}$`, \"u\").exec(fullname);\n\n if (matchResult) {\n return matchResult[1];\n }\n\n matchResult = new RegExp(`^(@[^/]+)/${prefix}-(.+)$`, \"u\").exec(fullname);\n if (matchResult) {\n return `${matchResult[1]}/${matchResult[2]}`;\n }\n } else if (fullname.startsWith(`${prefix}-`)) {\n return fullname.slice(prefix.length + 1);\n }\n\n return fullname;\n}\n\n/**\n * Gets the scope (namespace) of a term.\n * @param {string} term The term which may have the namespace.\n * @returns {string} The namespace of the term if it has one.\n */\nfunction getNamespaceFromTerm(term) {\n const match = term.match(NAMESPACE_REGEX);\n\n return match ? match[0] : \"\";\n}\n\n//------------------------------------------------------------------------------\n// Public Interface\n//------------------------------------------------------------------------------\n\nexport {\n normalizePackageName,\n getShorthandName,\n getNamespaceFromTerm\n};\n","/**\n * Utility for resolving a module relative to another module\n * @author Teddy Katz\n */\n\nimport Module from \"module\";\n\n/*\n * `Module.createRequire` is added in v12.2.0. It supports URL as well.\n * We only support the case where the argument is a filepath, not a URL.\n */\nconst createRequire = Module.createRequire;\n\n/**\n * Resolves a Node module relative to another module\n * @param {string} moduleName The name of a Node module, or a path to a Node module.\n * @param {string} relativeToPath An absolute path indicating the module that `moduleName` should be resolved relative to. This must be\n * a file rather than a directory, but the file need not actually exist.\n * @returns {string} The absolute path that would result from calling `require.resolve(moduleName)` in a file located at `relativeToPath`\n */\nfunction resolve(moduleName, relativeToPath) {\n try {\n return createRequire(relativeToPath).resolve(moduleName);\n } catch (error) {\n\n // This `if` block is for older Node.js than 12.0.0. We can remove this block in the future.\n if (\n typeof error === \"object\" &&\n error !== null &&\n error.code === \"MODULE_NOT_FOUND\" &&\n !error.requireStack &&\n error.message.includes(moduleName)\n ) {\n error.message += `\\nRequire stack:\\n- ${relativeToPath}`;\n }\n throw error;\n }\n}\n\nexport {\n resolve\n};\n","/**\n * @fileoverview The factory of `ConfigArray` objects.\n *\n * This class provides methods to create `ConfigArray` instance.\n *\n * - `create(configData, options)`\n * Create a `ConfigArray` instance from a config data. This is to handle CLI\n * options except `--config`.\n * - `loadFile(filePath, options)`\n * Create a `ConfigArray` instance from a config file. This is to handle\n * `--config` option. If the file was not found, throws the following error:\n * - If the filename was `*.js`, a `MODULE_NOT_FOUND` error.\n * - If the filename was `package.json`, an IO error or an\n * `ESLINT_CONFIG_FIELD_NOT_FOUND` error.\n * - Otherwise, an IO error such as `ENOENT`.\n * - `loadInDirectory(directoryPath, options)`\n * Create a `ConfigArray` instance from a config file which is on a given\n * directory. This tries to load `.eslintrc.*` or `package.json`. If not\n * found, returns an empty `ConfigArray`.\n * - `loadESLintIgnore(filePath)`\n * Create a `ConfigArray` instance from a config file that is `.eslintignore`\n * format. This is to handle `--ignore-path` option.\n * - `loadDefaultESLintIgnore()`\n * Create a `ConfigArray` instance from `.eslintignore` or `package.json` in\n * the current working directory.\n *\n * `ConfigArrayFactory` class has the responsibility that loads configuration\n * files, including loading `extends`, `parser`, and `plugins`. The created\n * `ConfigArray` instance has the loaded `extends`, `parser`, and `plugins`.\n *\n * But this class doesn't handle cascading. `CascadingConfigArrayFactory` class\n * handles cascading and hierarchy.\n *\n * @author Toru Nagashima \n */\n\n//------------------------------------------------------------------------------\n// Requirements\n//------------------------------------------------------------------------------\n\nimport debugOrig from \"debug\";\nimport fs from \"fs\";\nimport importFresh from \"import-fresh\";\nimport { createRequire } from \"module\";\nimport path from \"path\";\nimport stripComments from \"strip-json-comments\";\n\nimport {\n ConfigArray,\n ConfigDependency,\n IgnorePattern,\n OverrideTester\n} from \"./config-array/index.js\";\nimport ConfigValidator from \"./shared/config-validator.js\";\nimport * as naming from \"./shared/naming.js\";\nimport * as ModuleResolver from \"./shared/relative-module-resolver.js\";\n\nconst require = createRequire(import.meta.url);\n\nconst debug = debugOrig(\"eslintrc:config-array-factory\");\n\n//------------------------------------------------------------------------------\n// Helpers\n//------------------------------------------------------------------------------\n\nconst configFilenames = [\n \".eslintrc.js\",\n \".eslintrc.cjs\",\n \".eslintrc.yaml\",\n \".eslintrc.yml\",\n \".eslintrc.json\",\n \".eslintrc\",\n \"package.json\"\n];\n\n// Define types for VSCode IntelliSense.\n/** @typedef {import(\"./shared/types\").ConfigData} ConfigData */\n/** @typedef {import(\"./shared/types\").OverrideConfigData} OverrideConfigData */\n/** @typedef {import(\"./shared/types\").Parser} Parser */\n/** @typedef {import(\"./shared/types\").Plugin} Plugin */\n/** @typedef {import(\"./shared/types\").Rule} Rule */\n/** @typedef {import(\"./config-array/config-dependency\").DependentParser} DependentParser */\n/** @typedef {import(\"./config-array/config-dependency\").DependentPlugin} DependentPlugin */\n/** @typedef {ConfigArray[0]} ConfigArrayElement */\n\n/**\n * @typedef {Object} ConfigArrayFactoryOptions\n * @property {Map} [additionalPluginPool] The map for additional plugins.\n * @property {string} [cwd] The path to the current working directory.\n * @property {string} [resolvePluginsRelativeTo] A path to the directory that plugins should be resolved from. Defaults to `cwd`.\n * @property {Map} builtInRules The rules that are built in to ESLint.\n * @property {Object} [resolver=ModuleResolver] The module resolver object.\n * @property {string} eslintAllPath The path to the definitions for eslint:all.\n * @property {Function} getEslintAllConfig Returns the config data for eslint:all.\n * @property {string} eslintRecommendedPath The path to the definitions for eslint:recommended.\n * @property {Function} getEslintRecommendedConfig Returns the config data for eslint:recommended.\n */\n\n/**\n * @typedef {Object} ConfigArrayFactoryInternalSlots\n * @property {Map} additionalPluginPool The map for additional plugins.\n * @property {string} cwd The path to the current working directory.\n * @property {string | undefined} resolvePluginsRelativeTo An absolute path the the directory that plugins should be resolved from.\n * @property {Map} builtInRules The rules that are built in to ESLint.\n * @property {Object} [resolver=ModuleResolver] The module resolver object.\n * @property {string} eslintAllPath The path to the definitions for eslint:all.\n * @property {Function} getEslintAllConfig Returns the config data for eslint:all.\n * @property {string} eslintRecommendedPath The path to the definitions for eslint:recommended.\n * @property {Function} getEslintRecommendedConfig Returns the config data for eslint:recommended.\n */\n\n/**\n * @typedef {Object} ConfigArrayFactoryLoadingContext\n * @property {string} filePath The path to the current configuration.\n * @property {string} matchBasePath The base path to resolve relative paths in `overrides[].files`, `overrides[].excludedFiles`, and `ignorePatterns`.\n * @property {string} name The name of the current configuration.\n * @property {string} pluginBasePath The base path to resolve plugins.\n * @property {\"config\" | \"ignore\" | \"implicit-processor\"} type The type of the current configuration. This is `\"config\"` in normal. This is `\"ignore\"` if it came from `.eslintignore`. This is `\"implicit-processor\"` if it came from legacy file-extension processors.\n */\n\n/**\n * @typedef {Object} ConfigArrayFactoryLoadingContext\n * @property {string} filePath The path to the current configuration.\n * @property {string} matchBasePath The base path to resolve relative paths in `overrides[].files`, `overrides[].excludedFiles`, and `ignorePatterns`.\n * @property {string} name The name of the current configuration.\n * @property {\"config\" | \"ignore\" | \"implicit-processor\"} type The type of the current configuration. This is `\"config\"` in normal. This is `\"ignore\"` if it came from `.eslintignore`. This is `\"implicit-processor\"` if it came from legacy file-extension processors.\n */\n\n/** @type {WeakMap} */\nconst internalSlotsMap = new WeakMap();\n\n/** @type {WeakMap} */\nconst normalizedPlugins = new WeakMap();\n\n/**\n * Check if a given string is a file path.\n * @param {string} nameOrPath A module name or file path.\n * @returns {boolean} `true` if the `nameOrPath` is a file path.\n */\nfunction isFilePath(nameOrPath) {\n return (\n /^\\.{1,2}[/\\\\]/u.test(nameOrPath) ||\n path.isAbsolute(nameOrPath)\n );\n}\n\n/**\n * Convenience wrapper for synchronously reading file contents.\n * @param {string} filePath The filename to read.\n * @returns {string} The file contents, with the BOM removed.\n * @private\n */\nfunction readFile(filePath) {\n return fs.readFileSync(filePath, \"utf8\").replace(/^\\ufeff/u, \"\");\n}\n\n/**\n * Loads a YAML configuration from a file.\n * @param {string} filePath The filename to load.\n * @returns {ConfigData} The configuration object from the file.\n * @throws {Error} If the file cannot be read.\n * @private\n */\nfunction loadYAMLConfigFile(filePath) {\n debug(`Loading YAML config file: ${filePath}`);\n\n // lazy load YAML to improve performance when not used\n const yaml = require(\"js-yaml\");\n\n try {\n\n // empty YAML file can be null, so always use\n return yaml.load(readFile(filePath)) || {};\n } catch (e) {\n debug(`Error reading YAML file: ${filePath}`);\n e.message = `Cannot read config file: ${filePath}\\nError: ${e.message}`;\n throw e;\n }\n}\n\n/**\n * Loads a JSON configuration from a file.\n * @param {string} filePath The filename to load.\n * @returns {ConfigData} The configuration object from the file.\n * @throws {Error} If the file cannot be read.\n * @private\n */\nfunction loadJSONConfigFile(filePath) {\n debug(`Loading JSON config file: ${filePath}`);\n\n try {\n return JSON.parse(stripComments(readFile(filePath)));\n } catch (e) {\n debug(`Error reading JSON file: ${filePath}`);\n e.message = `Cannot read config file: ${filePath}\\nError: ${e.message}`;\n e.messageTemplate = \"failed-to-read-json\";\n e.messageData = {\n path: filePath,\n message: e.message\n };\n throw e;\n }\n}\n\n/**\n * Loads a legacy (.eslintrc) configuration from a file.\n * @param {string} filePath The filename to load.\n * @returns {ConfigData} The configuration object from the file.\n * @throws {Error} If the file cannot be read.\n * @private\n */\nfunction loadLegacyConfigFile(filePath) {\n debug(`Loading legacy config file: ${filePath}`);\n\n // lazy load YAML to improve performance when not used\n const yaml = require(\"js-yaml\");\n\n try {\n return yaml.load(stripComments(readFile(filePath))) || /* istanbul ignore next */ {};\n } catch (e) {\n debug(\"Error reading YAML file: %s\\n%o\", filePath, e);\n e.message = `Cannot read config file: ${filePath}\\nError: ${e.message}`;\n throw e;\n }\n}\n\n/**\n * Loads a JavaScript configuration from a file.\n * @param {string} filePath The filename to load.\n * @returns {ConfigData} The configuration object from the file.\n * @throws {Error} If the file cannot be read.\n * @private\n */\nfunction loadJSConfigFile(filePath) {\n debug(`Loading JS config file: ${filePath}`);\n try {\n return importFresh(filePath);\n } catch (e) {\n debug(`Error reading JavaScript file: ${filePath}`);\n e.message = `Cannot read config file: ${filePath}\\nError: ${e.message}`;\n throw e;\n }\n}\n\n/**\n * Loads a configuration from a package.json file.\n * @param {string} filePath The filename to load.\n * @returns {ConfigData} The configuration object from the file.\n * @throws {Error} If the file cannot be read.\n * @private\n */\nfunction loadPackageJSONConfigFile(filePath) {\n debug(`Loading package.json config file: ${filePath}`);\n try {\n const packageData = loadJSONConfigFile(filePath);\n\n if (!Object.hasOwnProperty.call(packageData, \"eslintConfig\")) {\n throw Object.assign(\n new Error(\"package.json file doesn't have 'eslintConfig' field.\"),\n { code: \"ESLINT_CONFIG_FIELD_NOT_FOUND\" }\n );\n }\n\n return packageData.eslintConfig;\n } catch (e) {\n debug(`Error reading package.json file: ${filePath}`);\n e.message = `Cannot read config file: ${filePath}\\nError: ${e.message}`;\n throw e;\n }\n}\n\n/**\n * Loads a `.eslintignore` from a file.\n * @param {string} filePath The filename to load.\n * @returns {string[]} The ignore patterns from the file.\n * @private\n */\nfunction loadESLintIgnoreFile(filePath) {\n debug(`Loading .eslintignore file: ${filePath}`);\n\n try {\n return readFile(filePath)\n .split(/\\r?\\n/gu)\n .filter(line => line.trim() !== \"\" && !line.startsWith(\"#\"));\n } catch (e) {\n debug(`Error reading .eslintignore file: ${filePath}`);\n e.message = `Cannot read .eslintignore file: ${filePath}\\nError: ${e.message}`;\n throw e;\n }\n}\n\n/**\n * Creates an error to notify about a missing config to extend from.\n * @param {string} configName The name of the missing config.\n * @param {string} importerName The name of the config that imported the missing config\n * @param {string} messageTemplate The text template to source error strings from.\n * @returns {Error} The error object to throw\n * @private\n */\nfunction configInvalidError(configName, importerName, messageTemplate) {\n return Object.assign(\n new Error(`Failed to load config \"${configName}\" to extend from.`),\n {\n messageTemplate,\n messageData: { configName, importerName }\n }\n );\n}\n\n/**\n * Loads a configuration file regardless of the source. Inspects the file path\n * to determine the correctly way to load the config file.\n * @param {string} filePath The path to the configuration.\n * @returns {ConfigData|null} The configuration information.\n * @private\n */\nfunction loadConfigFile(filePath) {\n switch (path.extname(filePath)) {\n case \".js\":\n case \".cjs\":\n return loadJSConfigFile(filePath);\n\n case \".json\":\n if (path.basename(filePath) === \"package.json\") {\n return loadPackageJSONConfigFile(filePath);\n }\n return loadJSONConfigFile(filePath);\n\n case \".yaml\":\n case \".yml\":\n return loadYAMLConfigFile(filePath);\n\n default:\n return loadLegacyConfigFile(filePath);\n }\n}\n\n/**\n * Write debug log.\n * @param {string} request The requested module name.\n * @param {string} relativeTo The file path to resolve the request relative to.\n * @param {string} filePath The resolved file path.\n * @returns {void}\n */\nfunction writeDebugLogForLoading(request, relativeTo, filePath) {\n /* istanbul ignore next */\n if (debug.enabled) {\n let nameAndVersion = null;\n\n try {\n const packageJsonPath = ModuleResolver.resolve(\n `${request}/package.json`,\n relativeTo\n );\n const { version = \"unknown\" } = require(packageJsonPath);\n\n nameAndVersion = `${request}@${version}`;\n } catch (error) {\n debug(\"package.json was not found:\", error.message);\n nameAndVersion = request;\n }\n\n debug(\"Loaded: %s (%s)\", nameAndVersion, filePath);\n }\n}\n\n/**\n * Create a new context with default values.\n * @param {ConfigArrayFactoryInternalSlots} slots The internal slots.\n * @param {\"config\" | \"ignore\" | \"implicit-processor\" | undefined} providedType The type of the current configuration. Default is `\"config\"`.\n * @param {string | undefined} providedName The name of the current configuration. Default is the relative path from `cwd` to `filePath`.\n * @param {string | undefined} providedFilePath The path to the current configuration. Default is empty string.\n * @param {string | undefined} providedMatchBasePath The type of the current configuration. Default is the directory of `filePath` or `cwd`.\n * @returns {ConfigArrayFactoryLoadingContext} The created context.\n */\nfunction createContext(\n { cwd, resolvePluginsRelativeTo },\n providedType,\n providedName,\n providedFilePath,\n providedMatchBasePath\n) {\n const filePath = providedFilePath\n ? path.resolve(cwd, providedFilePath)\n : \"\";\n const matchBasePath =\n (providedMatchBasePath && path.resolve(cwd, providedMatchBasePath)) ||\n (filePath && path.dirname(filePath)) ||\n cwd;\n const name =\n providedName ||\n (filePath && path.relative(cwd, filePath)) ||\n \"\";\n const pluginBasePath =\n resolvePluginsRelativeTo ||\n (filePath && path.dirname(filePath)) ||\n cwd;\n const type = providedType || \"config\";\n\n return { filePath, matchBasePath, name, pluginBasePath, type };\n}\n\n/**\n * Normalize a given plugin.\n * - Ensure the object to have four properties: configs, environments, processors, and rules.\n * - Ensure the object to not have other properties.\n * @param {Plugin} plugin The plugin to normalize.\n * @returns {Plugin} The normalized plugin.\n */\nfunction normalizePlugin(plugin) {\n\n // first check the cache\n let normalizedPlugin = normalizedPlugins.get(plugin);\n\n if (normalizedPlugin) {\n return normalizedPlugin;\n }\n\n normalizedPlugin = {\n configs: plugin.configs || {},\n environments: plugin.environments || {},\n processors: plugin.processors || {},\n rules: plugin.rules || {}\n };\n\n // save the reference for later\n normalizedPlugins.set(plugin, normalizedPlugin);\n\n return normalizedPlugin;\n}\n\n//------------------------------------------------------------------------------\n// Public Interface\n//------------------------------------------------------------------------------\n\n/**\n * The factory of `ConfigArray` objects.\n */\nclass ConfigArrayFactory {\n\n /**\n * Initialize this instance.\n * @param {ConfigArrayFactoryOptions} [options] The map for additional plugins.\n */\n constructor({\n additionalPluginPool = new Map(),\n cwd = process.cwd(),\n resolvePluginsRelativeTo,\n builtInRules,\n resolver = ModuleResolver,\n eslintAllPath,\n getEslintAllConfig,\n eslintRecommendedPath,\n getEslintRecommendedConfig\n } = {}) {\n internalSlotsMap.set(this, {\n additionalPluginPool,\n cwd,\n resolvePluginsRelativeTo:\n resolvePluginsRelativeTo &&\n path.resolve(cwd, resolvePluginsRelativeTo),\n builtInRules,\n resolver,\n eslintAllPath,\n getEslintAllConfig,\n eslintRecommendedPath,\n getEslintRecommendedConfig\n });\n }\n\n /**\n * Create `ConfigArray` instance from a config data.\n * @param {ConfigData|null} configData The config data to create.\n * @param {Object} [options] The options.\n * @param {string} [options.basePath] The base path to resolve relative paths in `overrides[].files`, `overrides[].excludedFiles`, and `ignorePatterns`.\n * @param {string} [options.filePath] The path to this config data.\n * @param {string} [options.name] The config name.\n * @returns {ConfigArray} Loaded config.\n */\n create(configData, { basePath, filePath, name } = {}) {\n if (!configData) {\n return new ConfigArray();\n }\n\n const slots = internalSlotsMap.get(this);\n const ctx = createContext(slots, \"config\", name, filePath, basePath);\n const elements = this._normalizeConfigData(configData, ctx);\n\n return new ConfigArray(...elements);\n }\n\n /**\n * Load a config file.\n * @param {string} filePath The path to a config file.\n * @param {Object} [options] The options.\n * @param {string} [options.basePath] The base path to resolve relative paths in `overrides[].files`, `overrides[].excludedFiles`, and `ignorePatterns`.\n * @param {string} [options.name] The config name.\n * @returns {ConfigArray} Loaded config.\n */\n loadFile(filePath, { basePath, name } = {}) {\n const slots = internalSlotsMap.get(this);\n const ctx = createContext(slots, \"config\", name, filePath, basePath);\n\n return new ConfigArray(...this._loadConfigData(ctx));\n }\n\n /**\n * Load the config file on a given directory if exists.\n * @param {string} directoryPath The path to a directory.\n * @param {Object} [options] The options.\n * @param {string} [options.basePath] The base path to resolve relative paths in `overrides[].files`, `overrides[].excludedFiles`, and `ignorePatterns`.\n * @param {string} [options.name] The config name.\n * @returns {ConfigArray} Loaded config. An empty `ConfigArray` if any config doesn't exist.\n */\n loadInDirectory(directoryPath, { basePath, name } = {}) {\n const slots = internalSlotsMap.get(this);\n\n for (const filename of configFilenames) {\n const ctx = createContext(\n slots,\n \"config\",\n name,\n path.join(directoryPath, filename),\n basePath\n );\n\n if (fs.existsSync(ctx.filePath) && fs.statSync(ctx.filePath).isFile()) {\n let configData;\n\n try {\n configData = loadConfigFile(ctx.filePath);\n } catch (error) {\n if (!error || error.code !== \"ESLINT_CONFIG_FIELD_NOT_FOUND\") {\n throw error;\n }\n }\n\n if (configData) {\n debug(`Config file found: ${ctx.filePath}`);\n return new ConfigArray(\n ...this._normalizeConfigData(configData, ctx)\n );\n }\n }\n }\n\n debug(`Config file not found on ${directoryPath}`);\n return new ConfigArray();\n }\n\n /**\n * Check if a config file on a given directory exists or not.\n * @param {string} directoryPath The path to a directory.\n * @returns {string | null} The path to the found config file. If not found then null.\n */\n static getPathToConfigFileInDirectory(directoryPath) {\n for (const filename of configFilenames) {\n const filePath = path.join(directoryPath, filename);\n\n if (fs.existsSync(filePath)) {\n if (filename === \"package.json\") {\n try {\n loadPackageJSONConfigFile(filePath);\n return filePath;\n } catch { /* ignore */ }\n } else {\n return filePath;\n }\n }\n }\n return null;\n }\n\n /**\n * Load `.eslintignore` file.\n * @param {string} filePath The path to a `.eslintignore` file to load.\n * @returns {ConfigArray} Loaded config. An empty `ConfigArray` if any config doesn't exist.\n */\n loadESLintIgnore(filePath) {\n const slots = internalSlotsMap.get(this);\n const ctx = createContext(\n slots,\n \"ignore\",\n void 0,\n filePath,\n slots.cwd\n );\n const ignorePatterns = loadESLintIgnoreFile(ctx.filePath);\n\n return new ConfigArray(\n ...this._normalizeESLintIgnoreData(ignorePatterns, ctx)\n );\n }\n\n /**\n * Load `.eslintignore` file in the current working directory.\n * @returns {ConfigArray} Loaded config. An empty `ConfigArray` if any config doesn't exist.\n */\n loadDefaultESLintIgnore() {\n const slots = internalSlotsMap.get(this);\n const eslintIgnorePath = path.resolve(slots.cwd, \".eslintignore\");\n const packageJsonPath = path.resolve(slots.cwd, \"package.json\");\n\n if (fs.existsSync(eslintIgnorePath)) {\n return this.loadESLintIgnore(eslintIgnorePath);\n }\n if (fs.existsSync(packageJsonPath)) {\n const data = loadJSONConfigFile(packageJsonPath);\n\n if (Object.hasOwnProperty.call(data, \"eslintIgnore\")) {\n if (!Array.isArray(data.eslintIgnore)) {\n throw new Error(\"Package.json eslintIgnore property requires an array of paths\");\n }\n const ctx = createContext(\n slots,\n \"ignore\",\n \"eslintIgnore in package.json\",\n packageJsonPath,\n slots.cwd\n );\n\n return new ConfigArray(\n ...this._normalizeESLintIgnoreData(data.eslintIgnore, ctx)\n );\n }\n }\n\n return new ConfigArray();\n }\n\n /**\n * Load a given config file.\n * @param {ConfigArrayFactoryLoadingContext} ctx The loading context.\n * @returns {IterableIterator} Loaded config.\n * @private\n */\n _loadConfigData(ctx) {\n return this._normalizeConfigData(loadConfigFile(ctx.filePath), ctx);\n }\n\n /**\n * Normalize a given `.eslintignore` data to config array elements.\n * @param {string[]} ignorePatterns The patterns to ignore files.\n * @param {ConfigArrayFactoryLoadingContext} ctx The loading context.\n * @returns {IterableIterator} The normalized config.\n * @private\n */\n *_normalizeESLintIgnoreData(ignorePatterns, ctx) {\n const elements = this._normalizeObjectConfigData(\n { ignorePatterns },\n ctx\n );\n\n // Set `ignorePattern.loose` flag for backward compatibility.\n for (const element of elements) {\n if (element.ignorePattern) {\n element.ignorePattern.loose = true;\n }\n yield element;\n }\n }\n\n /**\n * Normalize a given config to an array.\n * @param {ConfigData} configData The config data to normalize.\n * @param {ConfigArrayFactoryLoadingContext} ctx The loading context.\n * @returns {IterableIterator} The normalized config.\n * @private\n */\n _normalizeConfigData(configData, ctx) {\n const validator = new ConfigValidator();\n\n validator.validateConfigSchema(configData, ctx.name || ctx.filePath);\n return this._normalizeObjectConfigData(configData, ctx);\n }\n\n /**\n * Normalize a given config to an array.\n * @param {ConfigData|OverrideConfigData} configData The config data to normalize.\n * @param {ConfigArrayFactoryLoadingContext} ctx The loading context.\n * @returns {IterableIterator} The normalized config.\n * @private\n */\n *_normalizeObjectConfigData(configData, ctx) {\n const { files, excludedFiles, ...configBody } = configData;\n const criteria = OverrideTester.create(\n files,\n excludedFiles,\n ctx.matchBasePath\n );\n const elements = this._normalizeObjectConfigDataBody(configBody, ctx);\n\n // Apply the criteria to every element.\n for (const element of elements) {\n\n /*\n * Merge the criteria.\n * This is for the `overrides` entries that came from the\n * configurations of `overrides[].extends`.\n */\n element.criteria = OverrideTester.and(criteria, element.criteria);\n\n /*\n * Remove `root` property to ignore `root` settings which came from\n * `extends` in `overrides`.\n */\n if (element.criteria) {\n element.root = void 0;\n }\n\n yield element;\n }\n }\n\n /**\n * Normalize a given config to an array.\n * @param {ConfigData} configData The config data to normalize.\n * @param {ConfigArrayFactoryLoadingContext} ctx The loading context.\n * @returns {IterableIterator} The normalized config.\n * @private\n */\n *_normalizeObjectConfigDataBody(\n {\n env,\n extends: extend,\n globals,\n ignorePatterns,\n noInlineConfig,\n parser: parserName,\n parserOptions,\n plugins: pluginList,\n processor,\n reportUnusedDisableDirectives,\n root,\n rules,\n settings,\n overrides: overrideList = []\n },\n ctx\n ) {\n const extendList = Array.isArray(extend) ? extend : [extend];\n const ignorePattern = ignorePatterns && new IgnorePattern(\n Array.isArray(ignorePatterns) ? ignorePatterns : [ignorePatterns],\n ctx.matchBasePath\n );\n\n // Flatten `extends`.\n for (const extendName of extendList.filter(Boolean)) {\n yield* this._loadExtends(extendName, ctx);\n }\n\n // Load parser & plugins.\n const parser = parserName && this._loadParser(parserName, ctx);\n const plugins = pluginList && this._loadPlugins(pluginList, ctx);\n\n // Yield pseudo config data for file extension processors.\n if (plugins) {\n yield* this._takeFileExtensionProcessors(plugins, ctx);\n }\n\n // Yield the config data except `extends` and `overrides`.\n yield {\n\n // Debug information.\n type: ctx.type,\n name: ctx.name,\n filePath: ctx.filePath,\n\n // Config data.\n criteria: null,\n env,\n globals,\n ignorePattern,\n noInlineConfig,\n parser,\n parserOptions,\n plugins,\n processor,\n reportUnusedDisableDirectives,\n root,\n rules,\n settings\n };\n\n // Flatten `overries`.\n for (let i = 0; i < overrideList.length; ++i) {\n yield* this._normalizeObjectConfigData(\n overrideList[i],\n { ...ctx, name: `${ctx.name}#overrides[${i}]` }\n );\n }\n }\n\n /**\n * Load configs of an element in `extends`.\n * @param {string} extendName The name of a base config.\n * @param {ConfigArrayFactoryLoadingContext} ctx The loading context.\n * @returns {IterableIterator} The normalized config.\n * @private\n */\n _loadExtends(extendName, ctx) {\n debug(\"Loading {extends:%j} relative to %s\", extendName, ctx.filePath);\n try {\n if (extendName.startsWith(\"eslint:\")) {\n return this._loadExtendedBuiltInConfig(extendName, ctx);\n }\n if (extendName.startsWith(\"plugin:\")) {\n return this._loadExtendedPluginConfig(extendName, ctx);\n }\n return this._loadExtendedShareableConfig(extendName, ctx);\n } catch (error) {\n error.message += `\\nReferenced from: ${ctx.filePath || ctx.name}`;\n throw error;\n }\n }\n\n /**\n * Load configs of an element in `extends`.\n * @param {string} extendName The name of a base config.\n * @param {ConfigArrayFactoryLoadingContext} ctx The loading context.\n * @returns {IterableIterator} The normalized config.\n * @private\n */\n _loadExtendedBuiltInConfig(extendName, ctx) {\n const {\n eslintAllPath,\n getEslintAllConfig,\n eslintRecommendedPath,\n getEslintRecommendedConfig\n } = internalSlotsMap.get(this);\n\n if (extendName === \"eslint:recommended\") {\n const name = `${ctx.name} » ${extendName}`;\n\n if (getEslintRecommendedConfig) {\n if (typeof getEslintRecommendedConfig !== \"function\") {\n throw new Error(`getEslintRecommendedConfig must be a function instead of '${getEslintRecommendedConfig}'`);\n }\n return this._normalizeConfigData(getEslintRecommendedConfig(), { ...ctx, name, filePath: \"\" });\n }\n return this._loadConfigData({\n ...ctx,\n name,\n filePath: eslintRecommendedPath\n });\n }\n if (extendName === \"eslint:all\") {\n const name = `${ctx.name} » ${extendName}`;\n\n if (getEslintAllConfig) {\n if (typeof getEslintAllConfig !== \"function\") {\n throw new Error(`getEslintAllConfig must be a function instead of '${getEslintAllConfig}'`);\n }\n return this._normalizeConfigData(getEslintAllConfig(), { ...ctx, name, filePath: \"\" });\n }\n return this._loadConfigData({\n ...ctx,\n name,\n filePath: eslintAllPath\n });\n }\n\n throw configInvalidError(extendName, ctx.name, \"extend-config-missing\");\n }\n\n /**\n * Load configs of an element in `extends`.\n * @param {string} extendName The name of a base config.\n * @param {ConfigArrayFactoryLoadingContext} ctx The loading context.\n * @returns {IterableIterator} The normalized config.\n * @private\n */\n _loadExtendedPluginConfig(extendName, ctx) {\n const slashIndex = extendName.lastIndexOf(\"/\");\n\n if (slashIndex === -1) {\n throw configInvalidError(extendName, ctx.filePath, \"plugin-invalid\");\n }\n\n const pluginName = extendName.slice(\"plugin:\".length, slashIndex);\n const configName = extendName.slice(slashIndex + 1);\n\n if (isFilePath(pluginName)) {\n throw new Error(\"'extends' cannot use a file path for plugins.\");\n }\n\n const plugin = this._loadPlugin(pluginName, ctx);\n const configData =\n plugin.definition &&\n plugin.definition.configs[configName];\n\n if (configData) {\n return this._normalizeConfigData(configData, {\n ...ctx,\n filePath: plugin.filePath || ctx.filePath,\n name: `${ctx.name} » plugin:${plugin.id}/${configName}`\n });\n }\n\n throw plugin.error || configInvalidError(extendName, ctx.filePath, \"extend-config-missing\");\n }\n\n /**\n * Load configs of an element in `extends`.\n * @param {string} extendName The name of a base config.\n * @param {ConfigArrayFactoryLoadingContext} ctx The loading context.\n * @returns {IterableIterator} The normalized config.\n * @private\n */\n _loadExtendedShareableConfig(extendName, ctx) {\n const { cwd, resolver } = internalSlotsMap.get(this);\n const relativeTo = ctx.filePath || path.join(cwd, \"__placeholder__.js\");\n let request;\n\n if (isFilePath(extendName)) {\n request = extendName;\n } else if (extendName.startsWith(\".\")) {\n request = `./${extendName}`; // For backward compatibility. A ton of tests depended on this behavior.\n } else {\n request = naming.normalizePackageName(\n extendName,\n \"eslint-config\"\n );\n }\n\n let filePath;\n\n try {\n filePath = resolver.resolve(request, relativeTo);\n } catch (error) {\n /* istanbul ignore else */\n if (error && error.code === \"MODULE_NOT_FOUND\") {\n throw configInvalidError(extendName, ctx.filePath, \"extend-config-missing\");\n }\n throw error;\n }\n\n writeDebugLogForLoading(request, relativeTo, filePath);\n return this._loadConfigData({\n ...ctx,\n filePath,\n name: `${ctx.name} » ${request}`\n });\n }\n\n /**\n * Load given plugins.\n * @param {string[]} names The plugin names to load.\n * @param {ConfigArrayFactoryLoadingContext} ctx The loading context.\n * @returns {Record} The loaded parser.\n * @private\n */\n _loadPlugins(names, ctx) {\n return names.reduce((map, name) => {\n if (isFilePath(name)) {\n throw new Error(\"Plugins array cannot includes file paths.\");\n }\n const plugin = this._loadPlugin(name, ctx);\n\n map[plugin.id] = plugin;\n\n return map;\n }, {});\n }\n\n /**\n * Load a given parser.\n * @param {string} nameOrPath The package name or the path to a parser file.\n * @param {ConfigArrayFactoryLoadingContext} ctx The loading context.\n * @returns {DependentParser} The loaded parser.\n */\n _loadParser(nameOrPath, ctx) {\n debug(\"Loading parser %j from %s\", nameOrPath, ctx.filePath);\n\n const { cwd, resolver } = internalSlotsMap.get(this);\n const relativeTo = ctx.filePath || path.join(cwd, \"__placeholder__.js\");\n\n try {\n const filePath = resolver.resolve(nameOrPath, relativeTo);\n\n writeDebugLogForLoading(nameOrPath, relativeTo, filePath);\n\n return new ConfigDependency({\n definition: require(filePath),\n filePath,\n id: nameOrPath,\n importerName: ctx.name,\n importerPath: ctx.filePath\n });\n } catch (error) {\n\n // If the parser name is \"espree\", load the espree of ESLint.\n if (nameOrPath === \"espree\") {\n debug(\"Fallback espree.\");\n return new ConfigDependency({\n definition: require(\"espree\"),\n filePath: require.resolve(\"espree\"),\n id: nameOrPath,\n importerName: ctx.name,\n importerPath: ctx.filePath\n });\n }\n\n debug(\"Failed to load parser '%s' declared in '%s'.\", nameOrPath, ctx.name);\n error.message = `Failed to load parser '${nameOrPath}' declared in '${ctx.name}': ${error.message}`;\n\n return new ConfigDependency({\n error,\n id: nameOrPath,\n importerName: ctx.name,\n importerPath: ctx.filePath\n });\n }\n }\n\n /**\n * Load a given plugin.\n * @param {string} name The plugin name to load.\n * @param {ConfigArrayFactoryLoadingContext} ctx The loading context.\n * @returns {DependentPlugin} The loaded plugin.\n * @private\n */\n _loadPlugin(name, ctx) {\n debug(\"Loading plugin %j from %s\", name, ctx.filePath);\n\n const { additionalPluginPool, resolver } = internalSlotsMap.get(this);\n const request = naming.normalizePackageName(name, \"eslint-plugin\");\n const id = naming.getShorthandName(request, \"eslint-plugin\");\n const relativeTo = path.join(ctx.pluginBasePath, \"__placeholder__.js\");\n\n if (name.match(/\\s+/u)) {\n const error = Object.assign(\n new Error(`Whitespace found in plugin name '${name}'`),\n {\n messageTemplate: \"whitespace-found\",\n messageData: { pluginName: request }\n }\n );\n\n return new ConfigDependency({\n error,\n id,\n importerName: ctx.name,\n importerPath: ctx.filePath\n });\n }\n\n // Check for additional pool.\n const plugin =\n additionalPluginPool.get(request) ||\n additionalPluginPool.get(id);\n\n if (plugin) {\n return new ConfigDependency({\n definition: normalizePlugin(plugin),\n original: plugin,\n filePath: \"\", // It's unknown where the plugin came from.\n id,\n importerName: ctx.name,\n importerPath: ctx.filePath\n });\n }\n\n let filePath;\n let error;\n\n try {\n filePath = resolver.resolve(request, relativeTo);\n } catch (resolveError) {\n error = resolveError;\n /* istanbul ignore else */\n if (error && error.code === \"MODULE_NOT_FOUND\") {\n error.messageTemplate = \"plugin-missing\";\n error.messageData = {\n pluginName: request,\n resolvePluginsRelativeTo: ctx.pluginBasePath,\n importerName: ctx.name\n };\n }\n }\n\n if (filePath) {\n try {\n writeDebugLogForLoading(request, relativeTo, filePath);\n\n const startTime = Date.now();\n const pluginDefinition = require(filePath);\n\n debug(`Plugin ${filePath} loaded in: ${Date.now() - startTime}ms`);\n\n return new ConfigDependency({\n definition: normalizePlugin(pluginDefinition),\n original: pluginDefinition,\n filePath,\n id,\n importerName: ctx.name,\n importerPath: ctx.filePath\n });\n } catch (loadError) {\n error = loadError;\n }\n }\n\n debug(\"Failed to load plugin '%s' declared in '%s'.\", name, ctx.name);\n error.message = `Failed to load plugin '${name}' declared in '${ctx.name}': ${error.message}`;\n return new ConfigDependency({\n error,\n id,\n importerName: ctx.name,\n importerPath: ctx.filePath\n });\n }\n\n /**\n * Take file expression processors as config array elements.\n * @param {Record} plugins The plugin definitions.\n * @param {ConfigArrayFactoryLoadingContext} ctx The loading context.\n * @returns {IterableIterator} The config array elements of file expression processors.\n * @private\n */\n *_takeFileExtensionProcessors(plugins, ctx) {\n for (const pluginId of Object.keys(plugins)) {\n const processors =\n plugins[pluginId] &&\n plugins[pluginId].definition &&\n plugins[pluginId].definition.processors;\n\n if (!processors) {\n continue;\n }\n\n for (const processorId of Object.keys(processors)) {\n if (processorId.startsWith(\".\")) {\n yield* this._normalizeObjectConfigData(\n {\n files: [`*${processorId}`],\n processor: `${pluginId}/${processorId}`\n },\n {\n ...ctx,\n type: \"implicit-processor\",\n name: `${ctx.name}#processors[\"${pluginId}/${processorId}\"]`\n }\n );\n }\n }\n }\n }\n}\n\nexport { ConfigArrayFactory, createContext };\n","/**\n * @fileoverview `CascadingConfigArrayFactory` class.\n *\n * `CascadingConfigArrayFactory` class has a responsibility:\n *\n * 1. Handles cascading of config files.\n *\n * It provides two methods:\n *\n * - `getConfigArrayForFile(filePath)`\n * Get the corresponded configuration of a given file. This method doesn't\n * throw even if the given file didn't exist.\n * - `clearCache()`\n * Clear the internal cache. You have to call this method when\n * `additionalPluginPool` was updated if `baseConfig` or `cliConfig` depends\n * on the additional plugins. (`CLIEngine#addPlugin()` method calls this.)\n *\n * @author Toru Nagashima \n */\n\n//------------------------------------------------------------------------------\n// Requirements\n//------------------------------------------------------------------------------\n\nimport debugOrig from \"debug\";\nimport os from \"os\";\nimport path from \"path\";\n\nimport { ConfigArrayFactory } from \"./config-array-factory.js\";\nimport {\n ConfigArray,\n ConfigDependency,\n IgnorePattern\n} from \"./config-array/index.js\";\nimport ConfigValidator from \"./shared/config-validator.js\";\nimport { emitDeprecationWarning } from \"./shared/deprecation-warnings.js\";\n\nconst debug = debugOrig(\"eslintrc:cascading-config-array-factory\");\n\n//------------------------------------------------------------------------------\n// Helpers\n//------------------------------------------------------------------------------\n\n// Define types for VSCode IntelliSense.\n/** @typedef {import(\"./shared/types\").ConfigData} ConfigData */\n/** @typedef {import(\"./shared/types\").Parser} Parser */\n/** @typedef {import(\"./shared/types\").Plugin} Plugin */\n/** @typedef {import(\"./shared/types\").Rule} Rule */\n/** @typedef {ReturnType} ConfigArray */\n\n/**\n * @typedef {Object} CascadingConfigArrayFactoryOptions\n * @property {Map} [additionalPluginPool] The map for additional plugins.\n * @property {ConfigData} [baseConfig] The config by `baseConfig` option.\n * @property {ConfigData} [cliConfig] The config by CLI options (`--env`, `--global`, `--ignore-pattern`, `--parser`, `--parser-options`, `--plugin`, and `--rule`). CLI options overwrite the setting in config files.\n * @property {string} [cwd] The base directory to start lookup.\n * @property {string} [ignorePath] The path to the alternative file of `.eslintignore`.\n * @property {string[]} [rulePaths] The value of `--rulesdir` option.\n * @property {string} [specificConfigPath] The value of `--config` option.\n * @property {boolean} [useEslintrc] if `false` then it doesn't load config files.\n * @property {Function} loadRules The function to use to load rules.\n * @property {Map} builtInRules The rules that are built in to ESLint.\n * @property {Object} [resolver=ModuleResolver] The module resolver object.\n * @property {string} eslintAllPath The path to the definitions for eslint:all.\n * @property {Function} getEslintAllConfig Returns the config data for eslint:all.\n * @property {string} eslintRecommendedPath The path to the definitions for eslint:recommended.\n * @property {Function} getEslintRecommendedConfig Returns the config data for eslint:recommended.\n */\n\n/**\n * @typedef {Object} CascadingConfigArrayFactoryInternalSlots\n * @property {ConfigArray} baseConfigArray The config array of `baseConfig` option.\n * @property {ConfigData} baseConfigData The config data of `baseConfig` option. This is used to reset `baseConfigArray`.\n * @property {ConfigArray} cliConfigArray The config array of CLI options.\n * @property {ConfigData} cliConfigData The config data of CLI options. This is used to reset `cliConfigArray`.\n * @property {ConfigArrayFactory} configArrayFactory The factory for config arrays.\n * @property {Map} configCache The cache from directory paths to config arrays.\n * @property {string} cwd The base directory to start lookup.\n * @property {WeakMap} finalizeCache The cache from config arrays to finalized config arrays.\n * @property {string} [ignorePath] The path to the alternative file of `.eslintignore`.\n * @property {string[]|null} rulePaths The value of `--rulesdir` option. This is used to reset `baseConfigArray`.\n * @property {string|null} specificConfigPath The value of `--config` option. This is used to reset `cliConfigArray`.\n * @property {boolean} useEslintrc if `false` then it doesn't load config files.\n * @property {Function} loadRules The function to use to load rules.\n * @property {Map} builtInRules The rules that are built in to ESLint.\n * @property {Object} [resolver=ModuleResolver] The module resolver object.\n * @property {string} eslintAllPath The path to the definitions for eslint:all.\n * @property {Function} getEslintAllConfig Returns the config data for eslint:all.\n * @property {string} eslintRecommendedPath The path to the definitions for eslint:recommended.\n * @property {Function} getEslintRecommendedConfig Returns the config data for eslint:recommended.\n */\n\n/** @type {WeakMap} */\nconst internalSlotsMap = new WeakMap();\n\n/**\n * Create the config array from `baseConfig` and `rulePaths`.\n * @param {CascadingConfigArrayFactoryInternalSlots} slots The slots.\n * @returns {ConfigArray} The config array of the base configs.\n */\nfunction createBaseConfigArray({\n configArrayFactory,\n baseConfigData,\n rulePaths,\n cwd,\n loadRules\n}) {\n const baseConfigArray = configArrayFactory.create(\n baseConfigData,\n { name: \"BaseConfig\" }\n );\n\n /*\n * Create the config array element for the default ignore patterns.\n * This element has `ignorePattern` property that ignores the default\n * patterns in the current working directory.\n */\n baseConfigArray.unshift(configArrayFactory.create(\n { ignorePatterns: IgnorePattern.DefaultPatterns },\n { name: \"DefaultIgnorePattern\" }\n )[0]);\n\n /*\n * Load rules `--rulesdir` option as a pseudo plugin.\n * Use a pseudo plugin to define rules of `--rulesdir`, so we can validate\n * the rule's options with only information in the config array.\n */\n if (rulePaths && rulePaths.length > 0) {\n baseConfigArray.push({\n type: \"config\",\n name: \"--rulesdir\",\n filePath: \"\",\n plugins: {\n \"\": new ConfigDependency({\n definition: {\n rules: rulePaths.reduce(\n (map, rulesPath) => Object.assign(\n map,\n loadRules(rulesPath, cwd)\n ),\n {}\n )\n },\n filePath: \"\",\n id: \"\",\n importerName: \"--rulesdir\",\n importerPath: \"\"\n })\n }\n });\n }\n\n return baseConfigArray;\n}\n\n/**\n * Create the config array from CLI options.\n * @param {CascadingConfigArrayFactoryInternalSlots} slots The slots.\n * @returns {ConfigArray} The config array of the base configs.\n */\nfunction createCLIConfigArray({\n cliConfigData,\n configArrayFactory,\n cwd,\n ignorePath,\n specificConfigPath\n}) {\n const cliConfigArray = configArrayFactory.create(\n cliConfigData,\n { name: \"CLIOptions\" }\n );\n\n cliConfigArray.unshift(\n ...(ignorePath\n ? configArrayFactory.loadESLintIgnore(ignorePath)\n : configArrayFactory.loadDefaultESLintIgnore())\n );\n\n if (specificConfigPath) {\n cliConfigArray.unshift(\n ...configArrayFactory.loadFile(\n specificConfigPath,\n { name: \"--config\", basePath: cwd }\n )\n );\n }\n\n return cliConfigArray;\n}\n\n/**\n * The error type when there are files matched by a glob, but all of them have been ignored.\n */\nclass ConfigurationNotFoundError extends Error {\n\n // eslint-disable-next-line jsdoc/require-description\n /**\n * @param {string} directoryPath The directory path.\n */\n constructor(directoryPath) {\n super(`No ESLint configuration found in ${directoryPath}.`);\n this.messageTemplate = \"no-config-found\";\n this.messageData = { directoryPath };\n }\n}\n\n/**\n * This class provides the functionality that enumerates every file which is\n * matched by given glob patterns and that configuration.\n */\nclass CascadingConfigArrayFactory {\n\n /**\n * Initialize this enumerator.\n * @param {CascadingConfigArrayFactoryOptions} options The options.\n */\n constructor({\n additionalPluginPool = new Map(),\n baseConfig: baseConfigData = null,\n cliConfig: cliConfigData = null,\n cwd = process.cwd(),\n ignorePath,\n resolvePluginsRelativeTo,\n rulePaths = [],\n specificConfigPath = null,\n useEslintrc = true,\n builtInRules = new Map(),\n loadRules,\n resolver,\n eslintRecommendedPath,\n getEslintRecommendedConfig,\n eslintAllPath,\n getEslintAllConfig\n } = {}) {\n const configArrayFactory = new ConfigArrayFactory({\n additionalPluginPool,\n cwd,\n resolvePluginsRelativeTo,\n builtInRules,\n resolver,\n eslintRecommendedPath,\n getEslintRecommendedConfig,\n eslintAllPath,\n getEslintAllConfig\n });\n\n internalSlotsMap.set(this, {\n baseConfigArray: createBaseConfigArray({\n baseConfigData,\n configArrayFactory,\n cwd,\n rulePaths,\n loadRules\n }),\n baseConfigData,\n cliConfigArray: createCLIConfigArray({\n cliConfigData,\n configArrayFactory,\n cwd,\n ignorePath,\n specificConfigPath\n }),\n cliConfigData,\n configArrayFactory,\n configCache: new Map(),\n cwd,\n finalizeCache: new WeakMap(),\n ignorePath,\n rulePaths,\n specificConfigPath,\n useEslintrc,\n builtInRules,\n loadRules\n });\n }\n\n /**\n * The path to the current working directory.\n * This is used by tests.\n * @type {string}\n */\n get cwd() {\n const { cwd } = internalSlotsMap.get(this);\n\n return cwd;\n }\n\n /**\n * Get the config array of a given file.\n * If `filePath` was not given, it returns the config which contains only\n * `baseConfigData` and `cliConfigData`.\n * @param {string} [filePath] The file path to a file.\n * @param {Object} [options] The options.\n * @param {boolean} [options.ignoreNotFoundError] If `true` then it doesn't throw `ConfigurationNotFoundError`.\n * @returns {ConfigArray} The config array of the file.\n */\n getConfigArrayForFile(filePath, { ignoreNotFoundError = false } = {}) {\n const {\n baseConfigArray,\n cliConfigArray,\n cwd\n } = internalSlotsMap.get(this);\n\n if (!filePath) {\n return new ConfigArray(...baseConfigArray, ...cliConfigArray);\n }\n\n const directoryPath = path.dirname(path.resolve(cwd, filePath));\n\n debug(`Load config files for ${directoryPath}.`);\n\n return this._finalizeConfigArray(\n this._loadConfigInAncestors(directoryPath),\n directoryPath,\n ignoreNotFoundError\n );\n }\n\n /**\n * Set the config data to override all configs.\n * Require to call `clearCache()` method after this method is called.\n * @param {ConfigData} configData The config data to override all configs.\n * @returns {void}\n */\n setOverrideConfig(configData) {\n const slots = internalSlotsMap.get(this);\n\n slots.cliConfigData = configData;\n }\n\n /**\n * Clear config cache.\n * @returns {void}\n */\n clearCache() {\n const slots = internalSlotsMap.get(this);\n\n slots.baseConfigArray = createBaseConfigArray(slots);\n slots.cliConfigArray = createCLIConfigArray(slots);\n slots.configCache.clear();\n }\n\n /**\n * Load and normalize config files from the ancestor directories.\n * @param {string} directoryPath The path to a leaf directory.\n * @param {boolean} configsExistInSubdirs `true` if configurations exist in subdirectories.\n * @returns {ConfigArray} The loaded config.\n * @private\n */\n _loadConfigInAncestors(directoryPath, configsExistInSubdirs = false) {\n const {\n baseConfigArray,\n configArrayFactory,\n configCache,\n cwd,\n useEslintrc\n } = internalSlotsMap.get(this);\n\n if (!useEslintrc) {\n return baseConfigArray;\n }\n\n let configArray = configCache.get(directoryPath);\n\n // Hit cache.\n if (configArray) {\n debug(`Cache hit: ${directoryPath}.`);\n return configArray;\n }\n debug(`No cache found: ${directoryPath}.`);\n\n const homePath = os.homedir();\n\n // Consider this is root.\n if (directoryPath === homePath && cwd !== homePath) {\n debug(\"Stop traversing because of considered root.\");\n if (configsExistInSubdirs) {\n const filePath = ConfigArrayFactory.getPathToConfigFileInDirectory(directoryPath);\n\n if (filePath) {\n emitDeprecationWarning(\n filePath,\n \"ESLINT_PERSONAL_CONFIG_SUPPRESS\"\n );\n }\n }\n return this._cacheConfig(directoryPath, baseConfigArray);\n }\n\n // Load the config on this directory.\n try {\n configArray = configArrayFactory.loadInDirectory(directoryPath);\n } catch (error) {\n /* istanbul ignore next */\n if (error.code === \"EACCES\") {\n debug(\"Stop traversing because of 'EACCES' error.\");\n return this._cacheConfig(directoryPath, baseConfigArray);\n }\n throw error;\n }\n\n if (configArray.length > 0 && configArray.isRoot()) {\n debug(\"Stop traversing because of 'root:true'.\");\n configArray.unshift(...baseConfigArray);\n return this._cacheConfig(directoryPath, configArray);\n }\n\n // Load from the ancestors and merge it.\n const parentPath = path.dirname(directoryPath);\n const parentConfigArray = parentPath && parentPath !== directoryPath\n ? this._loadConfigInAncestors(\n parentPath,\n configsExistInSubdirs || configArray.length > 0\n )\n : baseConfigArray;\n\n if (configArray.length > 0) {\n configArray.unshift(...parentConfigArray);\n } else {\n configArray = parentConfigArray;\n }\n\n // Cache and return.\n return this._cacheConfig(directoryPath, configArray);\n }\n\n /**\n * Freeze and cache a given config.\n * @param {string} directoryPath The path to a directory as a cache key.\n * @param {ConfigArray} configArray The config array as a cache value.\n * @returns {ConfigArray} The `configArray` (frozen).\n */\n _cacheConfig(directoryPath, configArray) {\n const { configCache } = internalSlotsMap.get(this);\n\n Object.freeze(configArray);\n configCache.set(directoryPath, configArray);\n\n return configArray;\n }\n\n /**\n * Finalize a given config array.\n * Concatenate `--config` and other CLI options.\n * @param {ConfigArray} configArray The parent config array.\n * @param {string} directoryPath The path to the leaf directory to find config files.\n * @param {boolean} ignoreNotFoundError If `true` then it doesn't throw `ConfigurationNotFoundError`.\n * @returns {ConfigArray} The loaded config.\n * @private\n */\n _finalizeConfigArray(configArray, directoryPath, ignoreNotFoundError) {\n const {\n cliConfigArray,\n configArrayFactory,\n finalizeCache,\n useEslintrc,\n builtInRules\n } = internalSlotsMap.get(this);\n\n let finalConfigArray = finalizeCache.get(configArray);\n\n if (!finalConfigArray) {\n finalConfigArray = configArray;\n\n // Load the personal config if there are no regular config files.\n if (\n useEslintrc &&\n configArray.every(c => !c.filePath) &&\n cliConfigArray.every(c => !c.filePath) // `--config` option can be a file.\n ) {\n const homePath = os.homedir();\n\n debug(\"Loading the config file of the home directory:\", homePath);\n\n const personalConfigArray = configArrayFactory.loadInDirectory(\n homePath,\n { name: \"PersonalConfig\" }\n );\n\n if (\n personalConfigArray.length > 0 &&\n !directoryPath.startsWith(homePath)\n ) {\n const lastElement =\n personalConfigArray[personalConfigArray.length - 1];\n\n emitDeprecationWarning(\n lastElement.filePath,\n \"ESLINT_PERSONAL_CONFIG_LOAD\"\n );\n }\n\n finalConfigArray = finalConfigArray.concat(personalConfigArray);\n }\n\n // Apply CLI options.\n if (cliConfigArray.length > 0) {\n finalConfigArray = finalConfigArray.concat(cliConfigArray);\n }\n\n // Validate rule settings and environments.\n const validator = new ConfigValidator({\n builtInRules\n });\n\n validator.validateConfigArray(finalConfigArray);\n\n // Cache it.\n Object.freeze(finalConfigArray);\n finalizeCache.set(configArray, finalConfigArray);\n\n debug(\n \"Configuration was determined: %o on %s\",\n finalConfigArray,\n directoryPath\n );\n }\n\n // At least one element (the default ignore patterns) exists.\n if (!ignoreNotFoundError && useEslintrc && finalConfigArray.length <= 1) {\n throw new ConfigurationNotFoundError(directoryPath);\n }\n\n return finalConfigArray;\n }\n}\n\n//------------------------------------------------------------------------------\n// Public Interface\n//------------------------------------------------------------------------------\n\nexport { CascadingConfigArrayFactory };\n","/**\n * @fileoverview Compatibility class for flat config.\n * @author Nicholas C. Zakas\n */\n\n//-----------------------------------------------------------------------------\n// Requirements\n//-----------------------------------------------------------------------------\n\nimport createDebug from \"debug\";\nimport path from \"path\";\n\nimport environments from \"../conf/environments.js\";\nimport { ConfigArrayFactory } from \"./config-array-factory.js\";\n\n//-----------------------------------------------------------------------------\n// Helpers\n//-----------------------------------------------------------------------------\n\n/** @typedef {import(\"../../shared/types\").Environment} Environment */\n/** @typedef {import(\"../../shared/types\").Processor} Processor */\n\nconst debug = createDebug(\"eslintrc:flat-compat\");\nconst cafactory = Symbol(\"cafactory\");\n\n/**\n * Translates an ESLintRC-style config object into a flag-config-style config\n * object.\n * @param {Object} eslintrcConfig An ESLintRC-style config object.\n * @param {Object} options Options to help translate the config.\n * @param {string} options.resolveConfigRelativeTo To the directory to resolve\n * configs from.\n * @param {string} options.resolvePluginsRelativeTo The directory to resolve\n * plugins from.\n * @param {ReadOnlyMap} options.pluginEnvironments A map of plugin environment\n * names to objects.\n * @param {ReadOnlyMap} options.pluginProcessors A map of plugin processor\n * names to objects.\n * @returns {Object} A flag-config-style config object.\n */\nfunction translateESLintRC(eslintrcConfig, {\n resolveConfigRelativeTo,\n resolvePluginsRelativeTo,\n pluginEnvironments,\n pluginProcessors\n}) {\n\n const flatConfig = {};\n const configs = [];\n const languageOptions = {};\n const linterOptions = {};\n const keysToCopy = [\"settings\", \"rules\", \"processor\"];\n const languageOptionsKeysToCopy = [\"globals\", \"parser\", \"parserOptions\"];\n const linterOptionsKeysToCopy = [\"noInlineConfig\", \"reportUnusedDisableDirectives\"];\n\n // copy over simple translations\n for (const key of keysToCopy) {\n if (key in eslintrcConfig && typeof eslintrcConfig[key] !== \"undefined\") {\n flatConfig[key] = eslintrcConfig[key];\n }\n }\n\n // copy over languageOptions\n for (const key of languageOptionsKeysToCopy) {\n if (key in eslintrcConfig && typeof eslintrcConfig[key] !== \"undefined\") {\n\n // create the languageOptions key in the flat config\n flatConfig.languageOptions = languageOptions;\n\n if (key === \"parser\") {\n debug(`Resolving parser '${languageOptions[key]}' relative to ${resolveConfigRelativeTo}`);\n\n if (eslintrcConfig[key].error) {\n throw eslintrcConfig[key].error;\n }\n\n languageOptions[key] = eslintrcConfig[key].definition;\n continue;\n }\n\n // clone any object values that are in the eslintrc config\n if (eslintrcConfig[key] && typeof eslintrcConfig[key] === \"object\") {\n languageOptions[key] = {\n ...eslintrcConfig[key]\n };\n } else {\n languageOptions[key] = eslintrcConfig[key];\n }\n }\n }\n\n // copy over linterOptions\n for (const key of linterOptionsKeysToCopy) {\n if (key in eslintrcConfig && typeof eslintrcConfig[key] !== \"undefined\") {\n flatConfig.linterOptions = linterOptions;\n linterOptions[key] = eslintrcConfig[key];\n }\n }\n\n // move ecmaVersion a level up\n if (languageOptions.parserOptions) {\n\n if (\"ecmaVersion\" in languageOptions.parserOptions) {\n languageOptions.ecmaVersion = languageOptions.parserOptions.ecmaVersion;\n delete languageOptions.parserOptions.ecmaVersion;\n }\n\n if (\"sourceType\" in languageOptions.parserOptions) {\n languageOptions.sourceType = languageOptions.parserOptions.sourceType;\n delete languageOptions.parserOptions.sourceType;\n }\n\n // check to see if we even need parserOptions anymore and remove it if not\n if (Object.keys(languageOptions.parserOptions).length === 0) {\n delete languageOptions.parserOptions;\n }\n }\n\n // overrides\n if (eslintrcConfig.criteria) {\n flatConfig.files = [absoluteFilePath => eslintrcConfig.criteria.test(absoluteFilePath)];\n }\n\n // translate plugins\n if (eslintrcConfig.plugins && typeof eslintrcConfig.plugins === \"object\") {\n debug(`Translating plugins: ${eslintrcConfig.plugins}`);\n\n flatConfig.plugins = {};\n\n for (const pluginName of Object.keys(eslintrcConfig.plugins)) {\n\n debug(`Translating plugin: ${pluginName}`);\n debug(`Resolving plugin '${pluginName} relative to ${resolvePluginsRelativeTo}`);\n\n const { original: plugin, error } = eslintrcConfig.plugins[pluginName];\n\n if (error) {\n throw error;\n }\n\n flatConfig.plugins[pluginName] = plugin;\n\n // create a config for any processors\n if (plugin.processors) {\n for (const processorName of Object.keys(plugin.processors)) {\n if (processorName.startsWith(\".\")) {\n debug(`Assigning processor: ${pluginName}/${processorName}`);\n\n configs.unshift({\n files: [`**/*${processorName}`],\n processor: pluginProcessors.get(`${pluginName}/${processorName}`)\n });\n }\n\n }\n }\n }\n }\n\n // translate env - must come after plugins\n if (eslintrcConfig.env && typeof eslintrcConfig.env === \"object\") {\n for (const envName of Object.keys(eslintrcConfig.env)) {\n\n // only add environments that are true\n if (eslintrcConfig.env[envName]) {\n debug(`Translating environment: ${envName}`);\n\n if (environments.has(envName)) {\n\n // built-in environments should be defined first\n configs.unshift(...translateESLintRC({\n criteria: eslintrcConfig.criteria,\n ...environments.get(envName)\n }, {\n resolveConfigRelativeTo,\n resolvePluginsRelativeTo\n }));\n } else if (pluginEnvironments.has(envName)) {\n\n // if the environment comes from a plugin, it should come after the plugin config\n configs.push(...translateESLintRC({\n criteria: eslintrcConfig.criteria,\n ...pluginEnvironments.get(envName)\n }, {\n resolveConfigRelativeTo,\n resolvePluginsRelativeTo\n }));\n }\n }\n }\n }\n\n // only add if there are actually keys in the config\n if (Object.keys(flatConfig).length > 0) {\n configs.push(flatConfig);\n }\n\n return configs;\n}\n\n\n//-----------------------------------------------------------------------------\n// Exports\n//-----------------------------------------------------------------------------\n\n/**\n * A compatibility class for working with configs.\n */\nclass FlatCompat {\n\n constructor({\n baseDirectory = process.cwd(),\n resolvePluginsRelativeTo = baseDirectory,\n recommendedConfig,\n allConfig\n } = {}) {\n this.baseDirectory = baseDirectory;\n this.resolvePluginsRelativeTo = resolvePluginsRelativeTo;\n this[cafactory] = new ConfigArrayFactory({\n cwd: baseDirectory,\n resolvePluginsRelativeTo,\n getEslintAllConfig: () => {\n\n if (!allConfig) {\n throw new TypeError(\"Missing parameter 'allConfig' in FlatCompat constructor.\");\n }\n\n return allConfig;\n },\n getEslintRecommendedConfig: () => {\n\n if (!recommendedConfig) {\n throw new TypeError(\"Missing parameter 'recommendedConfig' in FlatCompat constructor.\");\n }\n\n return recommendedConfig;\n }\n });\n }\n\n /**\n * Translates an ESLintRC-style config into a flag-config-style config.\n * @param {Object} eslintrcConfig The ESLintRC-style config object.\n * @returns {Object} A flag-config-style config object.\n */\n config(eslintrcConfig) {\n const eslintrcArray = this[cafactory].create(eslintrcConfig, {\n basePath: this.baseDirectory\n });\n\n const flatArray = [];\n let hasIgnorePatterns = false;\n\n eslintrcArray.forEach(configData => {\n if (configData.type === \"config\") {\n hasIgnorePatterns = hasIgnorePatterns || configData.ignorePattern;\n flatArray.push(...translateESLintRC(configData, {\n resolveConfigRelativeTo: path.join(this.baseDirectory, \"__placeholder.js\"),\n resolvePluginsRelativeTo: path.join(this.resolvePluginsRelativeTo, \"__placeholder.js\"),\n pluginEnvironments: eslintrcArray.pluginEnvironments,\n pluginProcessors: eslintrcArray.pluginProcessors\n }));\n }\n });\n\n // combine ignorePatterns to emulate ESLintRC behavior better\n if (hasIgnorePatterns) {\n flatArray.unshift({\n ignores: [filePath => {\n\n // Compute the final config for this file.\n // This filters config array elements by `files`/`excludedFiles` then merges the elements.\n const finalConfig = eslintrcArray.extractConfig(filePath);\n\n // Test the `ignorePattern` properties of the final config.\n return Boolean(finalConfig.ignores) && finalConfig.ignores(filePath);\n }]\n });\n }\n\n return flatArray;\n }\n\n /**\n * Translates the `env` section of an ESLintRC-style config.\n * @param {Object} envConfig The `env` section of an ESLintRC config.\n * @returns {Object[]} An array of flag-config objects representing the environments.\n */\n env(envConfig) {\n return this.config({\n env: envConfig\n });\n }\n\n /**\n * Translates the `extends` section of an ESLintRC-style config.\n * @param {...string} configsToExtend The names of the configs to load.\n * @returns {Object[]} An array of flag-config objects representing the config.\n */\n extends(...configsToExtend) {\n return this.config({\n extends: configsToExtend\n });\n }\n\n /**\n * Translates the `plugins` section of an ESLintRC-style config.\n * @param {...string} plugins The names of the plugins to load.\n * @returns {Object[]} An array of flag-config objects representing the plugins.\n */\n plugins(...plugins) {\n return this.config({\n plugins\n });\n }\n}\n\nexport { FlatCompat };\n","/**\n * @fileoverview Package exports for @eslint/eslintrc\n * @author Nicholas C. Zakas\n */\n//------------------------------------------------------------------------------\n// Requirements\n//------------------------------------------------------------------------------\n\nimport {\n ConfigArrayFactory,\n createContext as createConfigArrayFactoryContext\n} from \"./config-array-factory.js\";\n\nimport { CascadingConfigArrayFactory } from \"./cascading-config-array-factory.js\";\nimport * as ModuleResolver from \"./shared/relative-module-resolver.js\";\nimport { ConfigArray, getUsedExtractedConfigs } from \"./config-array/index.js\";\nimport { ConfigDependency } from \"./config-array/config-dependency.js\";\nimport { ExtractedConfig } from \"./config-array/extracted-config.js\";\nimport { IgnorePattern } from \"./config-array/ignore-pattern.js\";\nimport { OverrideTester } from \"./config-array/override-tester.js\";\nimport * as ConfigOps from \"./shared/config-ops.js\";\nimport ConfigValidator from \"./shared/config-validator.js\";\nimport * as naming from \"./shared/naming.js\";\nimport { FlatCompat } from \"./flat-compat.js\";\nimport environments from \"../conf/environments.js\";\n\n//-----------------------------------------------------------------------------\n// Exports\n//-----------------------------------------------------------------------------\n\nconst Legacy = {\n ConfigArray,\n createConfigArrayFactoryContext,\n CascadingConfigArrayFactory,\n ConfigArrayFactory,\n ConfigDependency,\n ExtractedConfig,\n IgnorePattern,\n OverrideTester,\n getUsedExtractedConfigs,\n environments,\n\n // shared\n ConfigOps,\n ConfigValidator,\n ModuleResolver,\n naming\n};\n\nexport {\n\n Legacy,\n\n FlatCompat\n\n};\n"],"names":["debug","debugOrig","path","ignore","assert","internalSlotsMap","util","minimatch","Ajv","globals","BuiltInEnvironments","ConfigOps.normalizeConfigGlobal","Module","require","createRequire","fs","stripComments","importFresh","ModuleResolver.resolve","naming.normalizePackageName","naming.getShorthandName","os","createDebug","createConfigArrayFactoryContext"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAUA;AACA,MAAMA,OAAK,GAAGC,6BAAS,CAAC,yBAAyB,CAAC,CAAC;AACnD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS,qBAAqB,CAAC,WAAW,EAAE;AAC5C,IAAI,IAAI,MAAM,GAAG,WAAW,CAAC,CAAC,CAAC,CAAC;AAChC;AACA,IAAI,KAAK,IAAI,CAAC,GAAG,CAAC,EAAE,CAAC,GAAG,WAAW,CAAC,MAAM,EAAE,EAAE,CAAC,EAAE;AACjD,QAAQ,MAAM,CAAC,GAAG,MAAM,CAAC;AACzB,QAAQ,MAAM,CAAC,GAAG,WAAW,CAAC,CAAC,CAAC,CAAC;AACjC;AACA;AACA,QAAQ,MAAM,GAAG,CAAC,CAAC,MAAM,GAAG,CAAC,CAAC,MAAM,GAAG,CAAC,GAAG,CAAC,CAAC;AAC7C;AACA;AACA,QAAQ,KAAK,IAAI,CAAC,GAAG,CAAC,EAAE,UAAU,GAAG,CAAC,EAAE,CAAC,GAAG,CAAC,CAAC,MAAM,IAAI,CAAC,GAAG,CAAC,CAAC,MAAM,EAAE,EAAE,CAAC,EAAE;AAC3E,YAAY,IAAI,CAA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AC;AACpB,KAAK;AACL;;;;;;;ACrCA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAsBA;AACA,MAAMC,SAAO,GAAGC,oBAAa,CAAC,mDAAe,CAAC,CAAC;AAC/C;AACA,MAAMd,OAAK,GAAGC,6BAAS,CAAC,+BAA+B,CAAC,CAAC;AACzD;AACA;AACA;AACA;AACA;AACA,MAAM,eAAe,GAAG;AACxB,IAAI,cAAc;AAClB,IAAI,eAAe;AACnB,IAAI,gBAAgB;AACpB,IAAI,eAAe;AACnB,IAAI,gBAAgB;AACpB,IAAI,WAAW;AACf,IAAI,cAAc;AAClB,CAAC,CAAC;AACF;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,MAAMI,kBAAgB,GAAG,IAAI,OAAO,EAAE,CAAC;AACvC;AACA;AACA,MAAM,iBAAiB,GAAG,IAAI,OAAO,EAAE,CAAC;AACxC;AACA;AACA;AACA;AACA;AACA;AACA,SAAS,UAAU,CAAC,UAAU,EAAE;AAChC,IAAI;AACJ,QAAQ,gBAAgB,CAAC,IAAI,CAAC,UAAU,CAAC;AACzC,QAAQH,wBAAI,CAAC,UAAU,CAAC,UAAU,CAAC;AACnC,MAAM;AACN,CAAC;AACD;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS,QAAQ,CAAC,QAAQ,EAAE;AAC5B,IAAI,OAAOa,sBAAE,CAAC,YAAY,CAAC,QAAQ,EAAE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AQ,OAAO,IAAI,CAAC,MAAM,CAAC;AAC3B,YAAY,GAAG,EAAE,SAAS;AAC1B,SAAS,CAAC,CAAC;AACX,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA,IAAI,OAAO,CAAC,GAAG,eAAe,EAAE;AAChC,QAAQ,OAAO,IAAI,CAAC,MAAM,CAAC;AAC3B,YAAY,OAAO,EAAE,eAAe;AACpC,SAAS,CAAC,CAAC;AACX,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA,IAAI,OAAO,CAAC,GAAG,OAAO,EAAE;AACxB,QAAQ,OAAO,IAAI,CAAC,MAAM,CAAC;AAC3B,YAAY,OAAO;AACnB,SAAS,CAAC,CAAC;AACX,KAAK;AACL;;AC3TA;AACA;AACA;AACA;AAsBA;AACA;AACA;AACA;AACA;AACK,MAAC,MAAM,GAAG;AACf,IAAI,WAAW;AACf,qCAAIqB,aAA+B;AACnC,IAAI,2BAA2B;AAC/B,IAAI,kBAAkB;AACtB,IAAI,gBAAgB;AACpB,IAAI,eAAe;AACnB,IAAI,aAAa;AACjB,IAAI,cAAc;AAClB,IAAI,uBAAuB;AAC3B,IAAI,YAAY;AAChB;AACA;AACA,IAAI,SAAS;AACb,IAAI,eAAe;AACnB,IAAI,cAAc;AAClB,IAAI,MAAM;AACV;;;;;"}
\ No newline at end of file
diff --git a/node_modules/@eslint/eslintrc/lib/cascading-config-array-factory.js b/node_modules/@eslint/eslintrc/lib/cascading-config-array-factory.js
deleted file mode 100644
index 597352e..0000000
--- a/node_modules/@eslint/eslintrc/lib/cascading-config-array-factory.js
+++ /dev/null
@@ -1,532 +0,0 @@
-/**
- * @fileoverview `CascadingConfigArrayFactory` class.
- *
- * `CascadingConfigArrayFactory` class has a responsibility:
- *
- * 1. Handles cascading of config files.
- *
- * It provides two methods:
- *
- * - `getConfigArrayForFile(filePath)`
- * Get the corresponded configuration of a given file. This method doesn't
- * throw even if the given file didn't exist.
- * - `clearCache()`
- * Clear the internal cache. You have to call this method when
- * `additionalPluginPool` was updated if `baseConfig` or `cliConfig` depends
- * on the additional plugins. (`CLIEngine#addPlugin()` method calls this.)
- *
- * @author Toru Nagashima
- */
-
-//------------------------------------------------------------------------------
-// Requirements
-//------------------------------------------------------------------------------
-
-import debugOrig from "debug";
-import os from "os";
-import path from "path";
-
-import { ConfigArrayFactory } from "./config-array-factory.js";
-import {
- ConfigArray,
- ConfigDependency,
- IgnorePattern
-} from "./config-array/index.js";
-import ConfigValidator from "./shared/config-validator.js";
-import { emitDeprecationWarning } from "./shared/deprecation-warnings.js";
-
-const debug = debugOrig("eslintrc:cascading-config-array-factory");
-
-//------------------------------------------------------------------------------
-// Helpers
-//------------------------------------------------------------------------------
-
-// Define types for VSCode IntelliSense.
-/** @typedef {import("./shared/types").ConfigData} ConfigData */
-/** @typedef {import("./shared/types").Parser} Parser */
-/** @typedef {import("./shared/types").Plugin} Plugin */
-/** @typedef {import("./shared/types").Rule} Rule */
-/** @typedef {ReturnType} ConfigArray */
-
-/**
- * @typedef {Object} CascadingConfigArrayFactoryOptions
- * @property {Map} [additionalPluginPool] The map for additional plugins.
- * @property {ConfigData} [baseConfig] The config by `baseConfig` option.
- * @property {ConfigData} [cliConfig] The config by CLI options (`--env`, `--global`, `--ignore-pattern`, `--parser`, `--parser-options`, `--plugin`, and `--rule`). CLI options overwrite the setting in config files.
- * @property {string} [cwd] The base directory to start lookup.
- * @property {string} [ignorePath] The path to the alternative file of `.eslintignore`.
- * @property {string[]} [rulePaths] The value of `--rulesdir` option.
- * @property {string} [specificConfigPath] The value of `--config` option.
- * @property {boolean} [useEslintrc] if `false` then it doesn't load config files.
- * @property {Function} loadRules The function to use to load rules.
- * @property {Map} builtInRules The rules that are built in to ESLint.
- * @property {Object} [resolver=ModuleResolver] The module resolver object.
- * @property {string} eslintAllPath The path to the definitions for eslint:all.
- * @property {Function} getEslintAllConfig Returns the config data for eslint:all.
- * @property {string} eslintRecommendedPath The path to the definitions for eslint:recommended.
- * @property {Function} getEslintRecommendedConfig Returns the config data for eslint:recommended.
- */
-
-/**
- * @typedef {Object} CascadingConfigArrayFactoryInternalSlots
- * @property {ConfigArray} baseConfigArray The config array of `baseConfig` option.
- * @property {ConfigData} baseConfigData The config data of `baseConfig` option. This is used to reset `baseConfigArray`.
- * @property {ConfigArray} cliConfigArray The config array of CLI options.
- * @property {ConfigData} cliConfigData The config data of CLI options. This is used to reset `cliConfigArray`.
- * @property {ConfigArrayFactory} configArrayFactory The factory for config arrays.
- * @property {Map} configCache The cache from directory paths to config arrays.
- * @property {string} cwd The base directory to start lookup.
- * @property {WeakMap} finalizeCache The cache from config arrays to finalized config arrays.
- * @property {string} [ignorePath] The path to the alternative file of `.eslintignore`.
- * @property {string[]|null} rulePaths The value of `--rulesdir` option. This is used to reset `baseConfigArray`.
- * @property {string|null} specificConfigPath The value of `--config` option. This is used to reset `cliConfigArray`.
- * @property {boolean} useEslintrc if `false` then it doesn't load config files.
- * @property {Function} loadRules The function to use to load rules.
- * @property {Map} builtInRules The rules that are built in to ESLint.
- * @property {Object} [resolver=ModuleResolver] The module resolver object.
- * @property {string} eslintAllPath The path to the definitions for eslint:all.
- * @property {Function} getEslintAllConfig Returns the config data for eslint:all.
- * @property {string} eslintRecommendedPath The path to the definitions for eslint:recommended.
- * @property {Function} getEslintRecommendedConfig Returns the config data for eslint:recommended.
- */
-
-/** @type {WeakMap} */
-const internalSlotsMap = new WeakMap();
-
-/**
- * Create the config array from `baseConfig` and `rulePaths`.
- * @param {CascadingConfigArrayFactoryInternalSlots} slots The slots.
- * @returns {ConfigArray} The config array of the base configs.
- */
-function createBaseConfigArray({
- configArrayFactory,
- baseConfigData,
- rulePaths,
- cwd,
- loadRules
-}) {
- const baseConfigArray = configArrayFactory.create(
- baseConfigData,
- { name: "BaseConfig" }
- );
-
- /*
- * Create the config array element for the default ignore patterns.
- * This element has `ignorePattern` property that ignores the default
- * patterns in the current working directory.
- */
- baseConfigArray.unshift(configArrayFactory.create(
- { ignorePatterns: IgnorePattern.DefaultPatterns },
- { name: "DefaultIgnorePattern" }
- )[0]);
-
- /*
- * Load rules `--rulesdir` option as a pseudo plugin.
- * Use a pseudo plugin to define rules of `--rulesdir`, so we can validate
- * the rule's options with only information in the config array.
- */
- if (rulePaths && rulePaths.length > 0) {
- baseConfigArray.push({
- type: "config",
- name: "--rulesdir",
- filePath: "",
- plugins: {
- "": new ConfigDependency({
- definition: {
- rules: rulePaths.reduce(
- (map, rulesPath) => Object.assign(
- map,
- loadRules(rulesPath, cwd)
- ),
- {}
- )
- },
- filePath: "",
- id: "",
- importerName: "--rulesdir",
- importerPath: ""
- })
- }
- });
- }
-
- return baseConfigArray;
-}
-
-/**
- * Create the config array from CLI options.
- * @param {CascadingConfigArrayFactoryInternalSlots} slots The slots.
- * @returns {ConfigArray} The config array of the base configs.
- */
-function createCLIConfigArray({
- cliConfigData,
- configArrayFactory,
- cwd,
- ignorePath,
- specificConfigPath
-}) {
- const cliConfigArray = configArrayFactory.create(
- cliConfigData,
- { name: "CLIOptions" }
- );
-
- cliConfigArray.unshift(
- ...(ignorePath
- ? configArrayFactory.loadESLintIgnore(ignorePath)
- : configArrayFactory.loadDefaultESLintIgnore())
- );
-
- if (specificConfigPath) {
- cliConfigArray.unshift(
- ...configArrayFactory.loadFile(
- specificConfigPath,
- { name: "--config", basePath: cwd }
- )
- );
- }
-
- return cliConfigArray;
-}
-
-/**
- * The error type when there are files matched by a glob, but all of them have been ignored.
- */
-class ConfigurationNotFoundError extends Error {
-
- // eslint-disable-next-line jsdoc/require-description
- /**
- * @param {string} directoryPath The directory path.
- */
- constructor(directoryPath) {
- super(`No ESLint configuration found in ${directoryPath}.`);
- this.messageTemplate = "no-config-found";
- this.messageData = { directoryPath };
- }
-}
-
-/**
- * This class provides the functionality that enumerates every file which is
- * matched by given glob patterns and that configuration.
- */
-class CascadingConfigArrayFactory {
-
- /**
- * Initialize this enumerator.
- * @param {CascadingConfigArrayFactoryOptions} options The options.
- */
- constructor({
- additionalPluginPool = new Map(),
- baseConfig: baseConfigData = null,
- cliConfig: cliConfigData = null,
- cwd = process.cwd(),
- ignorePath,
- resolvePluginsRelativeTo,
- rulePaths = [],
- specificConfigPath = null,
- useEslintrc = true,
- builtInRules = new Map(),
- loadRules,
- resolver,
- eslintRecommendedPath,
- getEslintRecommendedConfig,
- eslintAllPath,
- getEslintAllConfig
- } = {}) {
- const configArrayFactory = new ConfigArrayFactory({
- additionalPluginPool,
- cwd,
- resolvePluginsRelativeTo,
- builtInRules,
- resolver,
- eslintRecommendedPath,
- getEslintRecommendedConfig,
- eslintAllPath,
- getEslintAllConfig
- });
-
- internalSlotsMap.set(this, {
- baseConfigArray: createBaseConfigArray({
- baseConfigData,
- configArrayFactory,
- cwd,
- rulePaths,
- loadRules
- }),
- baseConfigData,
- cliConfigArray: createCLIConfigArray({
- cliConfigData,
- configArrayFactory,
- cwd,
- ignorePath,
- specificConfigPath
- }),
- cliConfigData,
- configArrayFactory,
- configCache: new Map(),
- cwd,
- finalizeCache: new WeakMap(),
- ignorePath,
- rulePaths,
- specificConfigPath,
- useEslintrc,
- builtInRules,
- loadRules
- });
- }
-
- /**
- * The path to the current working directory.
- * This is used by tests.
- * @type {string}
- */
- get cwd() {
- const { cwd } = internalSlotsMap.get(this);
-
- return cwd;
- }
-
- /**
- * Get the config array of a given file.
- * If `filePath` was not given, it returns the config which contains only
- * `baseConfigData` and `cliConfigData`.
- * @param {string} [filePath] The file path to a file.
- * @param {Object} [options] The options.
- * @param {boolean} [options.ignoreNotFoundError] If `true` then it doesn't throw `ConfigurationNotFoundError`.
- * @returns {ConfigArray} The config array of the file.
- */
- getConfigArrayForFile(filePath, { ignoreNotFoundError = false } = {}) {
- const {
- baseConfigArray,
- cliConfigArray,
- cwd
- } = internalSlotsMap.get(this);
-
- if (!filePath) {
- return new ConfigArray(...baseConfigArray, ...cliConfigArray);
- }
-
- const directoryPath = path.dirname(path.resolve(cwd, filePath));
-
- debug(`Load config files for ${directoryPath}.`);
-
- return this._finalizeConfigArray(
- this._loadConfigInAncestors(directoryPath),
- directoryPath,
- ignoreNotFoundError
- );
- }
-
- /**
- * Set the config data to override all configs.
- * Require to call `clearCache()` method after this method is called.
- * @param {ConfigData} configData The config data to override all configs.
- * @returns {void}
- */
- setOverrideConfig(configData) {
- const slots = internalSlotsMap.get(this);
-
- slots.cliConfigData = configData;
- }
-
- /**
- * Clear config cache.
- * @returns {void}
- */
- clearCache() {
- const slots = internalSlotsMap.get(this);
-
- slots.baseConfigArray = createBaseConfigArray(slots);
- slots.cliConfigArray = createCLIConfigArray(slots);
- slots.configCache.clear();
- }
-
- /**
- * Load and normalize config files from the ancestor directories.
- * @param {string} directoryPath The path to a leaf directory.
- * @param {boolean} configsExistInSubdirs `true` if configurations exist in subdirectories.
- * @returns {ConfigArray} The loaded config.
- * @private
- */
- _loadConfigInAncestors(directoryPath, configsExistInSubdirs = false) {
- const {
- baseConfigArray,
- configArrayFactory,
- configCache,
- cwd,
- useEslintrc
- } = internalSlotsMap.get(this);
-
- if (!useEslintrc) {
- return baseConfigArray;
- }
-
- let configArray = configCache.get(directoryPath);
-
- // Hit cache.
- if (configArray) {
- debug(`Cache hit: ${directoryPath}.`);
- return configArray;
- }
- debug(`No cache found: ${directoryPath}.`);
-
- const homePath = os.homedir();
-
- // Consider this is root.
- if (directoryPath === homePath && cwd !== homePath) {
- debug("Stop traversing because of considered root.");
- if (configsExistInSubdirs) {
- const filePath = ConfigArrayFactory.getPathToConfigFileInDirectory(directoryPath);
-
- if (filePath) {
- emitDeprecationWarning(
- filePath,
- "ESLINT_PERSONAL_CONFIG_SUPPRESS"
- );
- }
- }
- return this._cacheConfig(directoryPath, baseConfigArray);
- }
-
- // Load the config on this directory.
- try {
- configArray = configArrayFactory.loadInDirectory(directoryPath);
- } catch (error) {
- /* istanbul ignore next */
- if (error.code === "EACCES") {
- debug("Stop traversing because of 'EACCES' error.");
- return this._cacheConfig(directoryPath, baseConfigArray);
- }
- throw error;
- }
-
- if (configArray.length > 0 && configArray.isRoot()) {
- debug("Stop traversing because of 'root:true'.");
- configArray.unshift(...baseConfigArray);
- return this._cacheConfig(directoryPath, configArray);
- }
-
- // Load from the ancestors and merge it.
- const parentPath = path.dirname(directoryPath);
- const parentConfigArray = parentPath && parentPath !== directoryPath
- ? this._loadConfigInAncestors(
- parentPath,
- configsExistInSubdirs || configArray.length > 0
- )
- : baseConfigArray;
-
- if (configArray.length > 0) {
- configArray.unshift(...parentConfigArray);
- } else {
- configArray = parentConfigArray;
- }
-
- // Cache and return.
- return this._cacheConfig(directoryPath, configArray);
- }
-
- /**
- * Freeze and cache a given config.
- * @param {string} directoryPath The path to a directory as a cache key.
- * @param {ConfigArray} configArray The config array as a cache value.
- * @returns {ConfigArray} The `configArray` (frozen).
- */
- _cacheConfig(directoryPath, configArray) {
- const { configCache } = internalSlotsMap.get(this);
-
- Object.freeze(configArray);
- configCache.set(directoryPath, configArray);
-
- return configArray;
- }
-
- /**
- * Finalize a given config array.
- * Concatenate `--config` and other CLI options.
- * @param {ConfigArray} configArray The parent config array.
- * @param {string} directoryPath The path to the leaf directory to find config files.
- * @param {boolean} ignoreNotFoundError If `true` then it doesn't throw `ConfigurationNotFoundError`.
- * @returns {ConfigArray} The loaded config.
- * @private
- */
- _finalizeConfigArray(configArray, directoryPath, ignoreNotFoundError) {
- const {
- cliConfigArray,
- configArrayFactory,
- finalizeCache,
- useEslintrc,
- builtInRules
- } = internalSlotsMap.get(this);
-
- let finalConfigArray = finalizeCache.get(configArray);
-
- if (!finalConfigArray) {
- finalConfigArray = configArray;
-
- // Load the personal config if there are no regular config files.
- if (
- useEslintrc &&
- configArray.every(c => !c.filePath) &&
- cliConfigArray.every(c => !c.filePath) // `--config` option can be a file.
- ) {
- const homePath = os.homedir();
-
- debug("Loading the config file of the home directory:", homePath);
-
- const personalConfigArray = configArrayFactory.loadInDirectory(
- homePath,
- { name: "PersonalConfig" }
- );
-
- if (
- personalConfigArray.length > 0 &&
- !directoryPath.startsWith(homePath)
- ) {
- const lastElement =
- personalConfigArray[personalConfigArray.length - 1];
-
- emitDeprecationWarning(
- lastElement.filePath,
- "ESLINT_PERSONAL_CONFIG_LOAD"
- );
- }
-
- finalConfigArray = finalConfigArray.concat(personalConfigArray);
- }
-
- // Apply CLI options.
- if (cliConfigArray.length > 0) {
- finalConfigArray = finalConfigArray.concat(cliConfigArray);
- }
-
- // Validate rule settings and environments.
- const validator = new ConfigValidator({
- builtInRules
- });
-
- validator.validateConfigArray(finalConfigArray);
-
- // Cache it.
- Object.freeze(finalConfigArray);
- finalizeCache.set(configArray, finalConfigArray);
-
- debug(
- "Configuration was determined: %o on %s",
- finalConfigArray,
- directoryPath
- );
- }
-
- // At least one element (the default ignore patterns) exists.
- if (!ignoreNotFoundError && useEslintrc && finalConfigArray.length <= 1) {
- throw new ConfigurationNotFoundError(directoryPath);
- }
-
- return finalConfigArray;
- }
-}
-
-//------------------------------------------------------------------------------
-// Public Interface
-//------------------------------------------------------------------------------
-
-export { CascadingConfigArrayFactory };
diff --git a/node_modules/@eslint/eslintrc/lib/config-array-factory.js b/node_modules/@eslint/eslintrc/lib/config-array-factory.js
deleted file mode 100644
index 58c1e80..0000000
--- a/node_modules/@eslint/eslintrc/lib/config-array-factory.js
+++ /dev/null
@@ -1,1151 +0,0 @@
-/**
- * @fileoverview The factory of `ConfigArray` objects.
- *
- * This class provides methods to create `ConfigArray` instance.
- *
- * - `create(configData, options)`
- * Create a `ConfigArray` instance from a config data. This is to handle CLI
- * options except `--config`.
- * - `loadFile(filePath, options)`
- * Create a `ConfigArray` instance from a config file. This is to handle
- * `--config` option. If the file was not found, throws the following error:
- * - If the filename was `*.js`, a `MODULE_NOT_FOUND` error.
- * - If the filename was `package.json`, an IO error or an
- * `ESLINT_CONFIG_FIELD_NOT_FOUND` error.
- * - Otherwise, an IO error such as `ENOENT`.
- * - `loadInDirectory(directoryPath, options)`
- * Create a `ConfigArray` instance from a config file which is on a given
- * directory. This tries to load `.eslintrc.*` or `package.json`. If not
- * found, returns an empty `ConfigArray`.
- * - `loadESLintIgnore(filePath)`
- * Create a `ConfigArray` instance from a config file that is `.eslintignore`
- * format. This is to handle `--ignore-path` option.
- * - `loadDefaultESLintIgnore()`
- * Create a `ConfigArray` instance from `.eslintignore` or `package.json` in
- * the current working directory.
- *
- * `ConfigArrayFactory` class has the responsibility that loads configuration
- * files, including loading `extends`, `parser`, and `plugins`. The created
- * `ConfigArray` instance has the loaded `extends`, `parser`, and `plugins`.
- *
- * But this class doesn't handle cascading. `CascadingConfigArrayFactory` class
- * handles cascading and hierarchy.
- *
- * @author Toru Nagashima
- */
-
-//------------------------------------------------------------------------------
-// Requirements
-//------------------------------------------------------------------------------
-
-import debugOrig from "debug";
-import fs from "fs";
-import importFresh from "import-fresh";
-import { createRequire } from "module";
-import path from "path";
-import stripComments from "strip-json-comments";
-
-import {
- ConfigArray,
- ConfigDependency,
- IgnorePattern,
- OverrideTester
-} from "./config-array/index.js";
-import ConfigValidator from "./shared/config-validator.js";
-import * as naming from "./shared/naming.js";
-import * as ModuleResolver from "./shared/relative-module-resolver.js";
-
-const require = createRequire(import.meta.url);
-
-const debug = debugOrig("eslintrc:config-array-factory");
-
-//------------------------------------------------------------------------------
-// Helpers
-//------------------------------------------------------------------------------
-
-const configFilenames = [
- ".eslintrc.js",
- ".eslintrc.cjs",
- ".eslintrc.yaml",
- ".eslintrc.yml",
- ".eslintrc.json",
- ".eslintrc",
- "package.json"
-];
-
-// Define types for VSCode IntelliSense.
-/** @typedef {import("./shared/types").ConfigData} ConfigData */
-/** @typedef {import("./shared/types").OverrideConfigData} OverrideConfigData */
-/** @typedef {import("./shared/types").Parser} Parser */
-/** @typedef {import("./shared/types").Plugin} Plugin */
-/** @typedef {import("./shared/types").Rule} Rule */
-/** @typedef {import("./config-array/config-dependency").DependentParser} DependentParser */
-/** @typedef {import("./config-array/config-dependency").DependentPlugin} DependentPlugin */
-/** @typedef {ConfigArray[0]} ConfigArrayElement */
-
-/**
- * @typedef {Object} ConfigArrayFactoryOptions
- * @property {Map} [additionalPluginPool] The map for additional plugins.
- * @property {string} [cwd] The path to the current working directory.
- * @property {string} [resolvePluginsRelativeTo] A path to the directory that plugins should be resolved from. Defaults to `cwd`.
- * @property {Map} builtInRules The rules that are built in to ESLint.
- * @property {Object} [resolver=ModuleResolver] The module resolver object.
- * @property {string} eslintAllPath The path to the definitions for eslint:all.
- * @property {Function} getEslintAllConfig Returns the config data for eslint:all.
- * @property {string} eslintRecommendedPath The path to the definitions for eslint:recommended.
- * @property {Function} getEslintRecommendedConfig Returns the config data for eslint:recommended.
- */
-
-/**
- * @typedef {Object} ConfigArrayFactoryInternalSlots
- * @property {Map} additionalPluginPool The map for additional plugins.
- * @property {string} cwd The path to the current working directory.
- * @property {string | undefined} resolvePluginsRelativeTo An absolute path the the directory that plugins should be resolved from.
- * @property {Map} builtInRules The rules that are built in to ESLint.
- * @property {Object} [resolver=ModuleResolver] The module resolver object.
- * @property {string} eslintAllPath The path to the definitions for eslint:all.
- * @property {Function} getEslintAllConfig Returns the config data for eslint:all.
- * @property {string} eslintRecommendedPath The path to the definitions for eslint:recommended.
- * @property {Function} getEslintRecommendedConfig Returns the config data for eslint:recommended.
- */
-
-/**
- * @typedef {Object} ConfigArrayFactoryLoadingContext
- * @property {string} filePath The path to the current configuration.
- * @property {string} matchBasePath The base path to resolve relative paths in `overrides[].files`, `overrides[].excludedFiles`, and `ignorePatterns`.
- * @property {string} name The name of the current configuration.
- * @property {string} pluginBasePath The base path to resolve plugins.
- * @property {"config" | "ignore" | "implicit-processor"} type The type of the current configuration. This is `"config"` in normal. This is `"ignore"` if it came from `.eslintignore`. This is `"implicit-processor"` if it came from legacy file-extension processors.
- */
-
-/**
- * @typedef {Object} ConfigArrayFactoryLoadingContext
- * @property {string} filePath The path to the current configuration.
- * @property {string} matchBasePath The base path to resolve relative paths in `overrides[].files`, `overrides[].excludedFiles`, and `ignorePatterns`.
- * @property {string} name The name of the current configuration.
- * @property {"config" | "ignore" | "implicit-processor"} type The type of the current configuration. This is `"config"` in normal. This is `"ignore"` if it came from `.eslintignore`. This is `"implicit-processor"` if it came from legacy file-extension processors.
- */
-
-/** @type {WeakMap} */
-const internalSlotsMap = new WeakMap();
-
-/** @type {WeakMap} */
-const normalizedPlugins = new WeakMap();
-
-/**
- * Check if a given string is a file path.
- * @param {string} nameOrPath A module name or file path.
- * @returns {boolean} `true` if the `nameOrPath` is a file path.
- */
-function isFilePath(nameOrPath) {
- return (
- /^\.{1,2}[/\\]/u.test(nameOrPath) ||
- path.isAbsolute(nameOrPath)
- );
-}
-
-/**
- * Convenience wrapper for synchronously reading file contents.
- * @param {string} filePath The filename to read.
- * @returns {string} The file contents, with the BOM removed.
- * @private
- */
-function readFile(filePath) {
- return fs.readFileSync(filePath, "utf8").replace(/^\ufeff/u, "");
-}
-
-/**
- * Loads a YAML configuration from a file.
- * @param {string} filePath The filename to load.
- * @returns {ConfigData} The configuration object from the file.
- * @throws {Error} If the file cannot be read.
- * @private
- */
-function loadYAMLConfigFile(filePath) {
- debug(`Loading YAML config file: ${filePath}`);
-
- // lazy load YAML to improve performance when not used
- const yaml = require("js-yaml");
-
- try {
-
- // empty YAML file can be null, so always use
- return yaml.load(readFile(filePath)) || {};
- } catch (e) {
- debug(`Error reading YAML file: ${filePath}`);
- e.message = `Cannot read config file: ${filePath}\nError: ${e.message}`;
- throw e;
- }
-}
-
-/**
- * Loads a JSON configuration from a file.
- * @param {string} filePath The filename to load.
- * @returns {ConfigData} The configuration object from the file.
- * @throws {Error} If the file cannot be read.
- * @private
- */
-function loadJSONConfigFile(filePath) {
- debug(`Loading JSON config file: ${filePath}`);
-
- try {
- return JSON.parse(stripComments(readFile(filePath)));
- } catch (e) {
- debug(`Error reading JSON file: ${filePath}`);
- e.message = `Cannot read config file: ${filePath}\nError: ${e.message}`;
- e.messageTemplate = "failed-to-read-json";
- e.messageData = {
- path: filePath,
- message: e.message
- };
- throw e;
- }
-}
-
-/**
- * Loads a legacy (.eslintrc) configuration from a file.
- * @param {string} filePath The filename to load.
- * @returns {ConfigData} The configuration object from the file.
- * @throws {Error} If the file cannot be read.
- * @private
- */
-function loadLegacyConfigFile(filePath) {
- debug(`Loading legacy config file: ${filePath}`);
-
- // lazy load YAML to improve performance when not used
- const yaml = require("js-yaml");
-
- try {
- return yaml.load(stripComments(readFile(filePath))) || /* istanbul ignore next */ {};
- } catch (e) {
- debug("Error reading YAML file: %s\n%o", filePath, e);
- e.message = `Cannot read config file: ${filePath}\nError: ${e.message}`;
- throw e;
- }
-}
-
-/**
- * Loads a JavaScript configuration from a file.
- * @param {string} filePath The filename to load.
- * @returns {ConfigData} The configuration object from the file.
- * @throws {Error} If the file cannot be read.
- * @private
- */
-function loadJSConfigFile(filePath) {
- debug(`Loading JS config file: ${filePath}`);
- try {
- return importFresh(filePath);
- } catch (e) {
- debug(`Error reading JavaScript file: ${filePath}`);
- e.message = `Cannot read config file: ${filePath}\nError: ${e.message}`;
- throw e;
- }
-}
-
-/**
- * Loads a configuration from a package.json file.
- * @param {string} filePath The filename to load.
- * @returns {ConfigData} The configuration object from the file.
- * @throws {Error} If the file cannot be read.
- * @private
- */
-function loadPackageJSONConfigFile(filePath) {
- debug(`Loading package.json config file: ${filePath}`);
- try {
- const packageData = loadJSONConfigFile(filePath);
-
- if (!Object.hasOwnProperty.call(packageData, "eslintConfig")) {
- throw Object.assign(
- new Error("package.json file doesn't have 'eslintConfig' field."),
- { code: "ESLINT_CONFIG_FIELD_NOT_FOUND" }
- );
- }
-
- return packageData.eslintConfig;
- } catch (e) {
- debug(`Error reading package.json file: ${filePath}`);
- e.message = `Cannot read config file: ${filePath}\nError: ${e.message}`;
- throw e;
- }
-}
-
-/**
- * Loads a `.eslintignore` from a file.
- * @param {string} filePath The filename to load.
- * @returns {string[]} The ignore patterns from the file.
- * @private
- */
-function loadESLintIgnoreFile(filePath) {
- debug(`Loading .eslintignore file: ${filePath}`);
-
- try {
- return readFile(filePath)
- .split(/\r?\n/gu)
- .filter(line => line.trim() !== "" && !line.startsWith("#"));
- } catch (e) {
- debug(`Error reading .eslintignore file: ${filePath}`);
- e.message = `Cannot read .eslintignore file: ${filePath}\nError: ${e.message}`;
- throw e;
- }
-}
-
-/**
- * Creates an error to notify about a missing config to extend from.
- * @param {string} configName The name of the missing config.
- * @param {string} importerName The name of the config that imported the missing config
- * @param {string} messageTemplate The text template to source error strings from.
- * @returns {Error} The error object to throw
- * @private
- */
-function configInvalidError(configName, importerName, messageTemplate) {
- return Object.assign(
- new Error(`Failed to load config "${configName}" to extend from.`),
- {
- messageTemplate,
- messageData: { configName, importerName }
- }
- );
-}
-
-/**
- * Loads a configuration file regardless of the source. Inspects the file path
- * to determine the correctly way to load the config file.
- * @param {string} filePath The path to the configuration.
- * @returns {ConfigData|null} The configuration information.
- * @private
- */
-function loadConfigFile(filePath) {
- switch (path.extname(filePath)) {
- case ".js":
- case ".cjs":
- return loadJSConfigFile(filePath);
-
- case ".json":
- if (path.basename(filePath) === "package.json") {
- return loadPackageJSONConfigFile(filePath);
- }
- return loadJSONConfigFile(filePath);
-
- case ".yaml":
- case ".yml":
- return loadYAMLConfigFile(filePath);
-
- default:
- return loadLegacyConfigFile(filePath);
- }
-}
-
-/**
- * Write debug log.
- * @param {string} request The requested module name.
- * @param {string} relativeTo The file path to resolve the request relative to.
- * @param {string} filePath The resolved file path.
- * @returns {void}
- */
-function writeDebugLogForLoading(request, relativeTo, filePath) {
- /* istanbul ignore next */
- if (debug.enabled) {
- let nameAndVersion = null;
-
- try {
- const packageJsonPath = ModuleResolver.resolve(
- `${request}/package.json`,
- relativeTo
- );
- const { version = "unknown" } = require(packageJsonPath);
-
- nameAndVersion = `${request}@${version}`;
- } catch (error) {
- debug("package.json was not found:", error.message);
- nameAndVersion = request;
- }
-
- debug("Loaded: %s (%s)", nameAndVersion, filePath);
- }
-}
-
-/**
- * Create a new context with default values.
- * @param {ConfigArrayFactoryInternalSlots} slots The internal slots.
- * @param {"config" | "ignore" | "implicit-processor" | undefined} providedType The type of the current configuration. Default is `"config"`.
- * @param {string | undefined} providedName The name of the current configuration. Default is the relative path from `cwd` to `filePath`.
- * @param {string | undefined} providedFilePath The path to the current configuration. Default is empty string.
- * @param {string | undefined} providedMatchBasePath The type of the current configuration. Default is the directory of `filePath` or `cwd`.
- * @returns {ConfigArrayFactoryLoadingContext} The created context.
- */
-function createContext(
- { cwd, resolvePluginsRelativeTo },
- providedType,
- providedName,
- providedFilePath,
- providedMatchBasePath
-) {
- const filePath = providedFilePath
- ? path.resolve(cwd, providedFilePath)
- : "";
- const matchBasePath =
- (providedMatchBasePath && path.resolve(cwd, providedMatchBasePath)) ||
- (filePath && path.dirname(filePath)) ||
- cwd;
- const name =
- providedName ||
- (filePath && path.relative(cwd, filePath)) ||
- "";
- const pluginBasePath =
- resolvePluginsRelativeTo ||
- (filePath && path.dirname(filePath)) ||
- cwd;
- const type = providedType || "config";
-
- return { filePath, matchBasePath, name, pluginBasePath, type };
-}
-
-/**
- * Normalize a given plugin.
- * - Ensure the object to have four properties: configs, environments, processors, and rules.
- * - Ensure the object to not have other properties.
- * @param {Plugin} plugin The plugin to normalize.
- * @returns {Plugin} The normalized plugin.
- */
-function normalizePlugin(plugin) {
-
- // first check the cache
- let normalizedPlugin = normalizedPlugins.get(plugin);
-
- if (normalizedPlugin) {
- return normalizedPlugin;
- }
-
- normalizedPlugin = {
- configs: plugin.configs || {},
- environments: plugin.environments || {},
- processors: plugin.processors || {},
- rules: plugin.rules || {}
- };
-
- // save the reference for later
- normalizedPlugins.set(plugin, normalizedPlugin);
-
- return normalizedPlugin;
-}
-
-//------------------------------------------------------------------------------
-// Public Interface
-//------------------------------------------------------------------------------
-
-/**
- * The factory of `ConfigArray` objects.
- */
-class ConfigArrayFactory {
-
- /**
- * Initialize this instance.
- * @param {ConfigArrayFactoryOptions} [options] The map for additional plugins.
- */
- constructor({
- additionalPluginPool = new Map(),
- cwd = process.cwd(),
- resolvePluginsRelativeTo,
- builtInRules,
- resolver = ModuleResolver,
- eslintAllPath,
- getEslintAllConfig,
- eslintRecommendedPath,
- getEslintRecommendedConfig
- } = {}) {
- internalSlotsMap.set(this, {
- additionalPluginPool,
- cwd,
- resolvePluginsRelativeTo:
- resolvePluginsRelativeTo &&
- path.resolve(cwd, resolvePluginsRelativeTo),
- builtInRules,
- resolver,
- eslintAllPath,
- getEslintAllConfig,
- eslintRecommendedPath,
- getEslintRecommendedConfig
- });
- }
-
- /**
- * Create `ConfigArray` instance from a config data.
- * @param {ConfigData|null} configData The config data to create.
- * @param {Object} [options] The options.
- * @param {string} [options.basePath] The base path to resolve relative paths in `overrides[].files`, `overrides[].excludedFiles`, and `ignorePatterns`.
- * @param {string} [options.filePath] The path to this config data.
- * @param {string} [options.name] The config name.
- * @returns {ConfigArray} Loaded config.
- */
- create(configData, { basePath, filePath, name } = {}) {
- if (!configData) {
- return new ConfigArray();
- }
-
- const slots = internalSlotsMap.get(this);
- const ctx = createContext(slots, "config", name, filePath, basePath);
- const elements = this._normalizeConfigData(configData, ctx);
-
- return new ConfigArray(...elements);
- }
-
- /**
- * Load a config file.
- * @param {string} filePath The path to a config file.
- * @param {Object} [options] The options.
- * @param {string} [options.basePath] The base path to resolve relative paths in `overrides[].files`, `overrides[].excludedFiles`, and `ignorePatterns`.
- * @param {string} [options.name] The config name.
- * @returns {ConfigArray} Loaded config.
- */
- loadFile(filePath, { basePath, name } = {}) {
- const slots = internalSlotsMap.get(this);
- const ctx = createContext(slots, "config", name, filePath, basePath);
-
- return new ConfigArray(...this._loadConfigData(ctx));
- }
-
- /**
- * Load the config file on a given directory if exists.
- * @param {string} directoryPath The path to a directory.
- * @param {Object} [options] The options.
- * @param {string} [options.basePath] The base path to resolve relative paths in `overrides[].files`, `overrides[].excludedFiles`, and `ignorePatterns`.
- * @param {string} [options.name] The config name.
- * @returns {ConfigArray} Loaded config. An empty `ConfigArray` if any config doesn't exist.
- */
- loadInDirectory(directoryPath, { basePath, name } = {}) {
- const slots = internalSlotsMap.get(this);
-
- for (const filename of configFilenames) {
- const ctx = createContext(
- slots,
- "config",
- name,
- path.join(directoryPath, filename),
- basePath
- );
-
- if (fs.existsSync(ctx.filePath) && fs.statSync(ctx.filePath).isFile()) {
- let configData;
-
- try {
- configData = loadConfigFile(ctx.filePath);
- } catch (error) {
- if (!error || error.code !== "ESLINT_CONFIG_FIELD_NOT_FOUND") {
- throw error;
- }
- }
-
- if (configData) {
- debug(`Config file found: ${ctx.filePath}`);
- return new ConfigArray(
- ...this._normalizeConfigData(configData, ctx)
- );
- }
- }
- }
-
- debug(`Config file not found on ${directoryPath}`);
- return new ConfigArray();
- }
-
- /**
- * Check if a config file on a given directory exists or not.
- * @param {string} directoryPath The path to a directory.
- * @returns {string | null} The path to the found config file. If not found then null.
- */
- static getPathToConfigFileInDirectory(directoryPath) {
- for (const filename of configFilenames) {
- const filePath = path.join(directoryPath, filename);
-
- if (fs.existsSync(filePath)) {
- if (filename === "package.json") {
- try {
- loadPackageJSONConfigFile(filePath);
- return filePath;
- } catch { /* ignore */ }
- } else {
- return filePath;
- }
- }
- }
- return null;
- }
-
- /**
- * Load `.eslintignore` file.
- * @param {string} filePath The path to a `.eslintignore` file to load.
- * @returns {ConfigArray} Loaded config. An empty `ConfigArray` if any config doesn't exist.
- */
- loadESLintIgnore(filePath) {
- const slots = internalSlotsMap.get(this);
- const ctx = createContext(
- slots,
- "ignore",
- void 0,
- filePath,
- slots.cwd
- );
- const ignorePatterns = loadESLintIgnoreFile(ctx.filePath);
-
- return new ConfigArray(
- ...this._normalizeESLintIgnoreData(ignorePatterns, ctx)
- );
- }
-
- /**
- * Load `.eslintignore` file in the current working directory.
- * @returns {ConfigArray} Loaded config. An empty `ConfigArray` if any config doesn't exist.
- */
- loadDefaultESLintIgnore() {
- const slots = internalSlotsMap.get(this);
- const eslintIgnorePath = path.resolve(slots.cwd, ".eslintignore");
- const packageJsonPath = path.resolve(slots.cwd, "package.json");
-
- if (fs.existsSync(eslintIgnorePath)) {
- return this.loadESLintIgnore(eslintIgnorePath);
- }
- if (fs.existsSync(packageJsonPath)) {
- const data = loadJSONConfigFile(packageJsonPath);
-
- if (Object.hasOwnProperty.call(data, "eslintIgnore")) {
- if (!Array.isArray(data.eslintIgnore)) {
- throw new Error("Package.json eslintIgnore property requires an array of paths");
- }
- const ctx = createContext(
- slots,
- "ignore",
- "eslintIgnore in package.json",
- packageJsonPath,
- slots.cwd
- );
-
- return new ConfigArray(
- ...this._normalizeESLintIgnoreData(data.eslintIgnore, ctx)
- );
- }
- }
-
- return new ConfigArray();
- }
-
- /**
- * Load a given config file.
- * @param {ConfigArrayFactoryLoadingContext} ctx The loading context.
- * @returns {IterableIterator} Loaded config.
- * @private
- */
- _loadConfigData(ctx) {
- return this._normalizeConfigData(loadConfigFile(ctx.filePath), ctx);
- }
-
- /**
- * Normalize a given `.eslintignore` data to config array elements.
- * @param {string[]} ignorePatterns The patterns to ignore files.
- * @param {ConfigArrayFactoryLoadingContext} ctx The loading context.
- * @returns {IterableIterator} The normalized config.
- * @private
- */
- *_normalizeESLintIgnoreData(ignorePatterns, ctx) {
- const elements = this._normalizeObjectConfigData(
- { ignorePatterns },
- ctx
- );
-
- // Set `ignorePattern.loose` flag for backward compatibility.
- for (const element of elements) {
- if (element.ignorePattern) {
- element.ignorePattern.loose = true;
- }
- yield element;
- }
- }
-
- /**
- * Normalize a given config to an array.
- * @param {ConfigData} configData The config data to normalize.
- * @param {ConfigArrayFactoryLoadingContext} ctx The loading context.
- * @returns {IterableIterator} The normalized config.
- * @private
- */
- _normalizeConfigData(configData, ctx) {
- const validator = new ConfigValidator();
-
- validator.validateConfigSchema(configData, ctx.name || ctx.filePath);
- return this._normalizeObjectConfigData(configData, ctx);
- }
-
- /**
- * Normalize a given config to an array.
- * @param {ConfigData|OverrideConfigData} configData The config data to normalize.
- * @param {ConfigArrayFactoryLoadingContext} ctx The loading context.
- * @returns {IterableIterator} The normalized config.
- * @private
- */
- *_normalizeObjectConfigData(configData, ctx) {
- const { files, excludedFiles, ...configBody } = configData;
- const criteria = OverrideTester.create(
- files,
- excludedFiles,
- ctx.matchBasePath
- );
- const elements = this._normalizeObjectConfigDataBody(configBody, ctx);
-
- // Apply the criteria to every element.
- for (const element of elements) {
-
- /*
- * Merge the criteria.
- * This is for the `overrides` entries that came from the
- * configurations of `overrides[].extends`.
- */
- element.criteria = OverrideTester.and(criteria, element.criteria);
-
- /*
- * Remove `root` property to ignore `root` settings which came from
- * `extends` in `overrides`.
- */
- if (element.criteria) {
- element.root = void 0;
- }
-
- yield element;
- }
- }
-
- /**
- * Normalize a given config to an array.
- * @param {ConfigData} configData The config data to normalize.
- * @param {ConfigArrayFactoryLoadingContext} ctx The loading context.
- * @returns {IterableIterator} The normalized config.
- * @private
- */
- *_normalizeObjectConfigDataBody(
- {
- env,
- extends: extend,
- globals,
- ignorePatterns,
- noInlineConfig,
- parser: parserName,
- parserOptions,
- plugins: pluginList,
- processor,
- reportUnusedDisableDirectives,
- root,
- rules,
- settings,
- overrides: overrideList = []
- },
- ctx
- ) {
- const extendList = Array.isArray(extend) ? extend : [extend];
- const ignorePattern = ignorePatterns && new IgnorePattern(
- Array.isArray(ignorePatterns) ? ignorePatterns : [ignorePatterns],
- ctx.matchBasePath
- );
-
- // Flatten `extends`.
- for (const extendName of extendList.filter(Boolean)) {
- yield* this._loadExtends(extendName, ctx);
- }
-
- // Load parser & plugins.
- const parser = parserName && this._loadParser(parserName, ctx);
- const plugins = pluginList && this._loadPlugins(pluginList, ctx);
-
- // Yield pseudo config data for file extension processors.
- if (plugins) {
- yield* this._takeFileExtensionProcessors(plugins, ctx);
- }
-
- // Yield the config data except `extends` and `overrides`.
- yield {
-
- // Debug information.
- type: ctx.type,
- name: ctx.name,
- filePath: ctx.filePath,
-
- // Config data.
- criteria: null,
- env,
- globals,
- ignorePattern,
- noInlineConfig,
- parser,
- parserOptions,
- plugins,
- processor,
- reportUnusedDisableDirectives,
- root,
- rules,
- settings
- };
-
- // Flatten `overries`.
- for (let i = 0; i < overrideList.length; ++i) {
- yield* this._normalizeObjectConfigData(
- overrideList[i],
- { ...ctx, name: `${ctx.name}#overrides[${i}]` }
- );
- }
- }
-
- /**
- * Load configs of an element in `extends`.
- * @param {string} extendName The name of a base config.
- * @param {ConfigArrayFactoryLoadingContext} ctx The loading context.
- * @returns {IterableIterator} The normalized config.
- * @private
- */
- _loadExtends(extendName, ctx) {
- debug("Loading {extends:%j} relative to %s", extendName, ctx.filePath);
- try {
- if (extendName.startsWith("eslint:")) {
- return this._loadExtendedBuiltInConfig(extendName, ctx);
- }
- if (extendName.startsWith("plugin:")) {
- return this._loadExtendedPluginConfig(extendName, ctx);
- }
- return this._loadExtendedShareableConfig(extendName, ctx);
- } catch (error) {
- error.message += `\nReferenced from: ${ctx.filePath || ctx.name}`;
- throw error;
- }
- }
-
- /**
- * Load configs of an element in `extends`.
- * @param {string} extendName The name of a base config.
- * @param {ConfigArrayFactoryLoadingContext} ctx The loading context.
- * @returns {IterableIterator} The normalized config.
- * @private
- */
- _loadExtendedBuiltInConfig(extendName, ctx) {
- const {
- eslintAllPath,
- getEslintAllConfig,
- eslintRecommendedPath,
- getEslintRecommendedConfig
- } = internalSlotsMap.get(this);
-
- if (extendName === "eslint:recommended") {
- const name = `${ctx.name} » ${extendName}`;
-
- if (getEslintRecommendedConfig) {
- if (typeof getEslintRecommendedConfig !== "function") {
- throw new Error(`getEslintRecommendedConfig must be a function instead of '${getEslintRecommendedConfig}'`);
- }
- return this._normalizeConfigData(getEslintRecommendedConfig(), { ...ctx, name, filePath: "" });
- }
- return this._loadConfigData({
- ...ctx,
- name,
- filePath: eslintRecommendedPath
- });
- }
- if (extendName === "eslint:all") {
- const name = `${ctx.name} » ${extendName}`;
-
- if (getEslintAllConfig) {
- if (typeof getEslintAllConfig !== "function") {
- throw new Error(`getEslintAllConfig must be a function instead of '${getEslintAllConfig}'`);
- }
- return this._normalizeConfigData(getEslintAllConfig(), { ...ctx, name, filePath: "" });
- }
- return this._loadConfigData({
- ...ctx,
- name,
- filePath: eslintAllPath
- });
- }
-
- throw configInvalidError(extendName, ctx.name, "extend-config-missing");
- }
-
- /**
- * Load configs of an element in `extends`.
- * @param {string} extendName The name of a base config.
- * @param {ConfigArrayFactoryLoadingContext} ctx The loading context.
- * @returns {IterableIterator} The normalized config.
- * @private
- */
- _loadExtendedPluginConfig(extendName, ctx) {
- const slashIndex = extendName.lastIndexOf("/");
-
- if (slashIndex === -1) {
- throw configInvalidError(extendName, ctx.filePath, "plugin-invalid");
- }
-
- const pluginName = extendName.slice("plugin:".length, slashIndex);
- const configName = extendName.slice(slashIndex + 1);
-
- if (isFilePath(pluginName)) {
- throw new Error("'extends' cannot use a file path for plugins.");
- }
-
- const plugin = this._loadPlugin(pluginName, ctx);
- const configData =
- plugin.definition &&
- plugin.definition.configs[configName];
-
- if (configData) {
- return this._normalizeConfigData(configData, {
- ...ctx,
- filePath: plugin.filePath || ctx.filePath,
- name: `${ctx.name} » plugin:${plugin.id}/${configName}`
- });
- }
-
- throw plugin.error || configInvalidError(extendName, ctx.filePath, "extend-config-missing");
- }
-
- /**
- * Load configs of an element in `extends`.
- * @param {string} extendName The name of a base config.
- * @param {ConfigArrayFactoryLoadingContext} ctx The loading context.
- * @returns {IterableIterator} The normalized config.
- * @private
- */
- _loadExtendedShareableConfig(extendName, ctx) {
- const { cwd, resolver } = internalSlotsMap.get(this);
- const relativeTo = ctx.filePath || path.join(cwd, "__placeholder__.js");
- let request;
-
- if (isFilePath(extendName)) {
- request = extendName;
- } else if (extendName.startsWith(".")) {
- request = `./${extendName}`; // For backward compatibility. A ton of tests depended on this behavior.
- } else {
- request = naming.normalizePackageName(
- extendName,
- "eslint-config"
- );
- }
-
- let filePath;
-
- try {
- filePath = resolver.resolve(request, relativeTo);
- } catch (error) {
- /* istanbul ignore else */
- if (error && error.code === "MODULE_NOT_FOUND") {
- throw configInvalidError(extendName, ctx.filePath, "extend-config-missing");
- }
- throw error;
- }
-
- writeDebugLogForLoading(request, relativeTo, filePath);
- return this._loadConfigData({
- ...ctx,
- filePath,
- name: `${ctx.name} » ${request}`
- });
- }
-
- /**
- * Load given plugins.
- * @param {string[]} names The plugin names to load.
- * @param {ConfigArrayFactoryLoadingContext} ctx The loading context.
- * @returns {Record} The loaded parser.
- * @private
- */
- _loadPlugins(names, ctx) {
- return names.reduce((map, name) => {
- if (isFilePath(name)) {
- throw new Error("Plugins array cannot includes file paths.");
- }
- const plugin = this._loadPlugin(name, ctx);
-
- map[plugin.id] = plugin;
-
- return map;
- }, {});
- }
-
- /**
- * Load a given parser.
- * @param {string} nameOrPath The package name or the path to a parser file.
- * @param {ConfigArrayFactoryLoadingContext} ctx The loading context.
- * @returns {DependentParser} The loaded parser.
- */
- _loadParser(nameOrPath, ctx) {
- debug("Loading parser %j from %s", nameOrPath, ctx.filePath);
-
- const { cwd, resolver } = internalSlotsMap.get(this);
- const relativeTo = ctx.filePath || path.join(cwd, "__placeholder__.js");
-
- try {
- const filePath = resolver.resolve(nameOrPath, relativeTo);
-
- writeDebugLogForLoading(nameOrPath, relativeTo, filePath);
-
- return new ConfigDependency({
- definition: require(filePath),
- filePath,
- id: nameOrPath,
- importerName: ctx.name,
- importerPath: ctx.filePath
- });
- } catch (error) {
-
- // If the parser name is "espree", load the espree of ESLint.
- if (nameOrPath === "espree") {
- debug("Fallback espree.");
- return new ConfigDependency({
- definition: require("espree"),
- filePath: require.resolve("espree"),
- id: nameOrPath,
- importerName: ctx.name,
- importerPath: ctx.filePath
- });
- }
-
- debug("Failed to load parser '%s' declared in '%s'.", nameOrPath, ctx.name);
- error.message = `Failed to load parser '${nameOrPath}' declared in '${ctx.name}': ${error.message}`;
-
- return new ConfigDependency({
- error,
- id: nameOrPath,
- importerName: ctx.name,
- importerPath: ctx.filePath
- });
- }
- }
-
- /**
- * Load a given plugin.
- * @param {string} name The plugin name to load.
- * @param {ConfigArrayFactoryLoadingContext} ctx The loading context.
- * @returns {DependentPlugin} The loaded plugin.
- * @private
- */
- _loadPlugin(name, ctx) {
- debug("Loading plugin %j from %s", name, ctx.filePath);
-
- const { additionalPluginPool, resolver } = internalSlotsMap.get(this);
- const request = naming.normalizePackageName(name, "eslint-plugin");
- const id = naming.getShorthandName(request, "eslint-plugin");
- const relativeTo = path.join(ctx.pluginBasePath, "__placeholder__.js");
-
- if (name.match(/\s+/u)) {
- const error = Object.assign(
- new Error(`Whitespace found in plugin name '${name}'`),
- {
- messageTemplate: "whitespace-found",
- messageData: { pluginName: request }
- }
- );
-
- return new ConfigDependency({
- error,
- id,
- importerName: ctx.name,
- importerPath: ctx.filePath
- });
- }
-
- // Check for additional pool.
- const plugin =
- additionalPluginPool.get(request) ||
- additionalPluginPool.get(id);
-
- if (plugin) {
- return new ConfigDependency({
- definition: normalizePlugin(plugin),
- original: plugin,
- filePath: "", // It's unknown where the plugin came from.
- id,
- importerName: ctx.name,
- importerPath: ctx.filePath
- });
- }
-
- let filePath;
- let error;
-
- try {
- filePath = resolver.resolve(request, relativeTo);
- } catch (resolveError) {
- error = resolveError;
- /* istanbul ignore else */
- if (error && error.code === "MODULE_NOT_FOUND") {
- error.messageTemplate = "plugin-missing";
- error.messageData = {
- pluginName: request,
- resolvePluginsRelativeTo: ctx.pluginBasePath,
- importerName: ctx.name
- };
- }
- }
-
- if (filePath) {
- try {
- writeDebugLogForLoading(request, relativeTo, filePath);
-
- const startTime = Date.now();
- const pluginDefinition = require(filePath);
-
- debug(`Plugin ${filePath} loaded in: ${Date.now() - startTime}ms`);
-
- return new ConfigDependency({
- definition: normalizePlugin(pluginDefinition),
- original: pluginDefinition,
- filePath,
- id,
- importerName: ctx.name,
- importerPath: ctx.filePath
- });
- } catch (loadError) {
- error = loadError;
- }
- }
-
- debug("Failed to load plugin '%s' declared in '%s'.", name, ctx.name);
- error.message = `Failed to load plugin '${name}' declared in '${ctx.name}': ${error.message}`;
- return new ConfigDependency({
- error,
- id,
- importerName: ctx.name,
- importerPath: ctx.filePath
- });
- }
-
- /**
- * Take file expression processors as config array elements.
- * @param {Record} plugins The plugin definitions.
- * @param {ConfigArrayFactoryLoadingContext} ctx The loading context.
- * @returns {IterableIterator} The config array elements of file expression processors.
- * @private
- */
- *_takeFileExtensionProcessors(plugins, ctx) {
- for (const pluginId of Object.keys(plugins)) {
- const processors =
- plugins[pluginId] &&
- plugins[pluginId].definition &&
- plugins[pluginId].definition.processors;
-
- if (!processors) {
- continue;
- }
-
- for (const processorId of Object.keys(processors)) {
- if (processorId.startsWith(".")) {
- yield* this._normalizeObjectConfigData(
- {
- files: [`*${processorId}`],
- processor: `${pluginId}/${processorId}`
- },
- {
- ...ctx,
- type: "implicit-processor",
- name: `${ctx.name}#processors["${pluginId}/${processorId}"]`
- }
- );
- }
- }
- }
- }
-}
-
-export { ConfigArrayFactory, createContext };
diff --git a/node_modules/@eslint/eslintrc/lib/config-array/config-array.js b/node_modules/@eslint/eslintrc/lib/config-array/config-array.js
deleted file mode 100644
index 133f5a2..0000000
--- a/node_modules/@eslint/eslintrc/lib/config-array/config-array.js
+++ /dev/null
@@ -1,523 +0,0 @@
-/**
- * @fileoverview `ConfigArray` class.
- *
- * `ConfigArray` class expresses the full of a configuration. It has the entry
- * config file, base config files that were extended, loaded parsers, and loaded
- * plugins.
- *
- * `ConfigArray` class provides three properties and two methods.
- *
- * - `pluginEnvironments`
- * - `pluginProcessors`
- * - `pluginRules`
- * The `Map` objects that contain the members of all plugins that this
- * config array contains. Those map objects don't have mutation methods.
- * Those keys are the member ID such as `pluginId/memberName`.
- * - `isRoot()`
- * If `true` then this configuration has `root:true` property.
- * - `extractConfig(filePath)`
- * Extract the final configuration for a given file. This means merging
- * every config array element which that `criteria` property matched. The
- * `filePath` argument must be an absolute path.
- *
- * `ConfigArrayFactory` provides the loading logic of config files.
- *
- * @author Toru Nagashima
- */
-
-//------------------------------------------------------------------------------
-// Requirements
-//------------------------------------------------------------------------------
-
-import { ExtractedConfig } from "./extracted-config.js";
-import { IgnorePattern } from "./ignore-pattern.js";
-
-//------------------------------------------------------------------------------
-// Helpers
-//------------------------------------------------------------------------------
-
-// Define types for VSCode IntelliSense.
-/** @typedef {import("../../shared/types").Environment} Environment */
-/** @typedef {import("../../shared/types").GlobalConf} GlobalConf */
-/** @typedef {import("../../shared/types").RuleConf} RuleConf */
-/** @typedef {import("../../shared/types").Rule} Rule */
-/** @typedef {import("../../shared/types").Plugin} Plugin */
-/** @typedef {import("../../shared/types").Processor} Processor */
-/** @typedef {import("./config-dependency").DependentParser} DependentParser */
-/** @typedef {import("./config-dependency").DependentPlugin} DependentPlugin */
-/** @typedef {import("./override-tester")["OverrideTester"]} OverrideTester */
-
-/**
- * @typedef {Object} ConfigArrayElement
- * @property {string} name The name of this config element.
- * @property {string} filePath The path to the source file of this config element.
- * @property {InstanceType|null} criteria The tester for the `files` and `excludedFiles` of this config element.
- * @property {Record|undefined} env The environment settings.
- * @property {Record|undefined} globals The global variable settings.
- * @property {IgnorePattern|undefined} ignorePattern The ignore patterns.
- * @property {boolean|undefined} noInlineConfig The flag that disables directive comments.
- * @property {DependentParser|undefined} parser The parser loader.
- * @property {Object|undefined} parserOptions The parser options.
- * @property {Record|undefined} plugins The plugin loaders.
- * @property {string|undefined} processor The processor name to refer plugin's processor.
- * @property {boolean|undefined} reportUnusedDisableDirectives The flag to report unused `eslint-disable` comments.
- * @property {boolean|undefined} root The flag to express root.
- * @property {Record|undefined} rules The rule settings
- * @property {Object|undefined} settings The shared settings.
- * @property {"config" | "ignore" | "implicit-processor"} type The element type.
- */
-
-/**
- * @typedef {Object} ConfigArrayInternalSlots
- * @property {Map} cache The cache to extract configs.
- * @property {ReadonlyMap|null} envMap The map from environment ID to environment definition.
- * @property {ReadonlyMap|null} processorMap The map from processor ID to environment definition.
- * @property {ReadonlyMap|null} ruleMap The map from rule ID to rule definition.
- */
-
-/** @type {WeakMap} */
-const internalSlotsMap = new class extends WeakMap {
- get(key) {
- let value = super.get(key);
-
- if (!value) {
- value = {
- cache: new Map(),
- envMap: null,
- processorMap: null,
- ruleMap: null
- };
- super.set(key, value);
- }
-
- return value;
- }
-}();
-
-/**
- * Get the indices which are matched to a given file.
- * @param {ConfigArrayElement[]} elements The elements.
- * @param {string} filePath The path to a target file.
- * @returns {number[]} The indices.
- */
-function getMatchedIndices(elements, filePath) {
- const indices = [];
-
- for (let i = elements.length - 1; i >= 0; --i) {
- const element = elements[i];
-
- if (!element.criteria || (filePath && element.criteria.test(filePath))) {
- indices.push(i);
- }
- }
-
- return indices;
-}
-
-/**
- * Check if a value is a non-null object.
- * @param {any} x The value to check.
- * @returns {boolean} `true` if the value is a non-null object.
- */
-function isNonNullObject(x) {
- return typeof x === "object" && x !== null;
-}
-
-/**
- * Merge two objects.
- *
- * Assign every property values of `y` to `x` if `x` doesn't have the property.
- * If `x`'s property value is an object, it does recursive.
- * @param {Object} target The destination to merge
- * @param {Object|undefined} source The source to merge.
- * @returns {void}
- */
-function mergeWithoutOverwrite(target, source) {
- if (!isNonNullObject(source)) {
- return;
- }
-
- for (const key of Object.keys(source)) {
- if (key === "__proto__") {
- continue;
- }
-
- if (isNonNullObject(target[key])) {
- mergeWithoutOverwrite(target[key], source[key]);
- } else if (target[key] === void 0) {
- if (isNonNullObject(source[key])) {
- target[key] = Array.isArray(source[key]) ? [] : {};
- mergeWithoutOverwrite(target[key], source[key]);
- } else if (source[key] !== void 0) {
- target[key] = source[key];
- }
- }
- }
-}
-
-/**
- * The error for plugin conflicts.
- */
-class PluginConflictError extends Error {
-
- /**
- * Initialize this error object.
- * @param {string} pluginId The plugin ID.
- * @param {{filePath:string, importerName:string}[]} plugins The resolved plugins.
- */
- constructor(pluginId, plugins) {
- super(`Plugin "${pluginId}" was conflicted between ${plugins.map(p => `"${p.importerName}"`).join(" and ")}.`);
- this.messageTemplate = "plugin-conflict";
- this.messageData = { pluginId, plugins };
- }
-}
-
-/**
- * Merge plugins.
- * `target`'s definition is prior to `source`'s.
- * @param {Record} target The destination to merge
- * @param {Record|undefined} source The source to merge.
- * @returns {void}
- */
-function mergePlugins(target, source) {
- if (!isNonNullObject(source)) {
- return;
- }
-
- for (const key of Object.keys(source)) {
- if (key === "__proto__") {
- continue;
- }
- const targetValue = target[key];
- const sourceValue = source[key];
-
- // Adopt the plugin which was found at first.
- if (targetValue === void 0) {
- if (sourceValue.error) {
- throw sourceValue.error;
- }
- target[key] = sourceValue;
- } else if (sourceValue.filePath !== targetValue.filePath) {
- throw new PluginConflictError(key, [
- {
- filePath: targetValue.filePath,
- importerName: targetValue.importerName
- },
- {
- filePath: sourceValue.filePath,
- importerName: sourceValue.importerName
- }
- ]);
- }
- }
-}
-
-/**
- * Merge rule configs.
- * `target`'s definition is prior to `source`'s.
- * @param {Record} target The destination to merge
- * @param {Record|undefined} source The source to merge.
- * @returns {void}
- */
-function mergeRuleConfigs(target, source) {
- if (!isNonNullObject(source)) {
- return;
- }
-
- for (const key of Object.keys(source)) {
- if (key === "__proto__") {
- continue;
- }
- const targetDef = target[key];
- const sourceDef = source[key];
-
- // Adopt the rule config which was found at first.
- if (targetDef === void 0) {
- if (Array.isArray(sourceDef)) {
- target[key] = [...sourceDef];
- } else {
- target[key] = [sourceDef];
- }
-
- /*
- * If the first found rule config is severity only and the current rule
- * config has options, merge the severity and the options.
- */
- } else if (
- targetDef.length === 1 &&
- Array.isArray(sourceDef) &&
- sourceDef.length >= 2
- ) {
- targetDef.push(...sourceDef.slice(1));
- }
- }
-}
-
-/**
- * Create the extracted config.
- * @param {ConfigArray} instance The config elements.
- * @param {number[]} indices The indices to use.
- * @returns {ExtractedConfig} The extracted config.
- */
-function createConfig(instance, indices) {
- const config = new ExtractedConfig();
- const ignorePatterns = [];
-
- // Merge elements.
- for (const index of indices) {
- const element = instance[index];
-
- // Adopt the parser which was found at first.
- if (!config.parser && element.parser) {
- if (element.parser.error) {
- throw element.parser.error;
- }
- config.parser = element.parser;
- }
-
- // Adopt the processor which was found at first.
- if (!config.processor && element.processor) {
- config.processor = element.processor;
- }
-
- // Adopt the noInlineConfig which was found at first.
- if (config.noInlineConfig === void 0 && element.noInlineConfig !== void 0) {
- config.noInlineConfig = element.noInlineConfig;
- config.configNameOfNoInlineConfig = element.name;
- }
-
- // Adopt the reportUnusedDisableDirectives which was found at first.
- if (config.reportUnusedDisableDirectives === void 0 && element.reportUnusedDisableDirectives !== void 0) {
- config.reportUnusedDisableDirectives = element.reportUnusedDisableDirectives;
- }
-
- // Collect ignorePatterns
- if (element.ignorePattern) {
- ignorePatterns.push(element.ignorePattern);
- }
-
- // Merge others.
- mergeWithoutOverwrite(config.env, element.env);
- mergeWithoutOverwrite(config.globals, element.globals);
- mergeWithoutOverwrite(config.parserOptions, element.parserOptions);
- mergeWithoutOverwrite(config.settings, element.settings);
- mergePlugins(config.plugins, element.plugins);
- mergeRuleConfigs(config.rules, element.rules);
- }
-
- // Create the predicate function for ignore patterns.
- if (ignorePatterns.length > 0) {
- config.ignores = IgnorePattern.createIgnore(ignorePatterns.reverse());
- }
-
- return config;
-}
-
-/**
- * Collect definitions.
- * @template T, U
- * @param {string} pluginId The plugin ID for prefix.
- * @param {Record} defs The definitions to collect.
- * @param {Map} map The map to output.
- * @param {function(T): U} [normalize] The normalize function for each value.
- * @returns {void}
- */
-function collect(pluginId, defs, map, normalize) {
- if (defs) {
- const prefix = pluginId && `${pluginId}/`;
-
- for (const [key, value] of Object.entries(defs)) {
- map.set(
- `${prefix}${key}`,
- normalize ? normalize(value) : value
- );
- }
- }
-}
-
-/**
- * Normalize a rule definition.
- * @param {Function|Rule} rule The rule definition to normalize.
- * @returns {Rule} The normalized rule definition.
- */
-function normalizePluginRule(rule) {
- return typeof rule === "function" ? { create: rule } : rule;
-}
-
-/**
- * Delete the mutation methods from a given map.
- * @param {Map} map The map object to delete.
- * @returns {void}
- */
-function deleteMutationMethods(map) {
- Object.defineProperties(map, {
- clear: { configurable: true, value: void 0 },
- delete: { configurable: true, value: void 0 },
- set: { configurable: true, value: void 0 }
- });
-}
-
-/**
- * Create `envMap`, `processorMap`, `ruleMap` with the plugins in the config array.
- * @param {ConfigArrayElement[]} elements The config elements.
- * @param {ConfigArrayInternalSlots} slots The internal slots.
- * @returns {void}
- */
-function initPluginMemberMaps(elements, slots) {
- const processed = new Set();
-
- slots.envMap = new Map();
- slots.processorMap = new Map();
- slots.ruleMap = new Map();
-
- for (const element of elements) {
- if (!element.plugins) {
- continue;
- }
-
- for (const [pluginId, value] of Object.entries(element.plugins)) {
- const plugin = value.definition;
-
- if (!plugin || processed.has(pluginId)) {
- continue;
- }
- processed.add(pluginId);
-
- collect(pluginId, plugin.environments, slots.envMap);
- collect(pluginId, plugin.processors, slots.processorMap);
- collect(pluginId, plugin.rules, slots.ruleMap, normalizePluginRule);
- }
- }
-
- deleteMutationMethods(slots.envMap);
- deleteMutationMethods(slots.processorMap);
- deleteMutationMethods(slots.ruleMap);
-}
-
-/**
- * Create `envMap`, `processorMap`, `ruleMap` with the plugins in the config array.
- * @param {ConfigArray} instance The config elements.
- * @returns {ConfigArrayInternalSlots} The extracted config.
- */
-function ensurePluginMemberMaps(instance) {
- const slots = internalSlotsMap.get(instance);
-
- if (!slots.ruleMap) {
- initPluginMemberMaps(instance, slots);
- }
-
- return slots;
-}
-
-//------------------------------------------------------------------------------
-// Public Interface
-//------------------------------------------------------------------------------
-
-/**
- * The Config Array.
- *
- * `ConfigArray` instance contains all settings, parsers, and plugins.
- * You need to call `ConfigArray#extractConfig(filePath)` method in order to
- * extract, merge and get only the config data which is related to an arbitrary
- * file.
- * @extends {Array}
- */
-class ConfigArray extends Array {
-
- /**
- * Get the plugin environments.
- * The returned map cannot be mutated.
- * @type {ReadonlyMap} The plugin environments.
- */
- get pluginEnvironments() {
- return ensurePluginMemberMaps(this).envMap;
- }
-
- /**
- * Get the plugin processors.
- * The returned map cannot be mutated.
- * @type {ReadonlyMap} The plugin processors.
- */
- get pluginProcessors() {
- return ensurePluginMemberMaps(this).processorMap;
- }
-
- /**
- * Get the plugin rules.
- * The returned map cannot be mutated.
- * @returns {ReadonlyMap} The plugin rules.
- */
- get pluginRules() {
- return ensurePluginMemberMaps(this).ruleMap;
- }
-
- /**
- * Check if this config has `root` flag.
- * @returns {boolean} `true` if this config array is root.
- */
- isRoot() {
- for (let i = this.length - 1; i >= 0; --i) {
- const root = this[i].root;
-
- if (typeof root === "boolean") {
- return root;
- }
- }
- return false;
- }
-
- /**
- * Extract the config data which is related to a given file.
- * @param {string} filePath The absolute path to the target file.
- * @returns {ExtractedConfig} The extracted config data.
- */
- extractConfig(filePath) {
- const { cache } = internalSlotsMap.get(this);
- const indices = getMatchedIndices(this, filePath);
- const cacheKey = indices.join(",");
-
- if (!cache.has(cacheKey)) {
- cache.set(cacheKey, createConfig(this, indices));
- }
-
- return cache.get(cacheKey);
- }
-
- /**
- * Check if a given path is an additional lint target.
- * @param {string} filePath The absolute path to the target file.
- * @returns {boolean} `true` if the file is an additional lint target.
- */
- isAdditionalTargetPath(filePath) {
- for (const { criteria, type } of this) {
- if (
- type === "config" &&
- criteria &&
- !criteria.endsWithWildcard &&
- criteria.test(filePath)
- ) {
- return true;
- }
- }
- return false;
- }
-}
-
-/**
- * Get the used extracted configs.
- * CLIEngine will use this method to collect used deprecated rules.
- * @param {ConfigArray} instance The config array object to get.
- * @returns {ExtractedConfig[]} The used extracted configs.
- * @private
- */
-function getUsedExtractedConfigs(instance) {
- const { cache } = internalSlotsMap.get(instance);
-
- return Array.from(cache.values());
-}
-
-
-export {
- ConfigArray,
- getUsedExtractedConfigs
-};
diff --git a/node_modules/@eslint/eslintrc/lib/config-array/config-dependency.js b/node_modules/@eslint/eslintrc/lib/config-array/config-dependency.js
deleted file mode 100644
index 080e640..0000000
--- a/node_modules/@eslint/eslintrc/lib/config-array/config-dependency.js
+++ /dev/null
@@ -1,124 +0,0 @@
-/**
- * @fileoverview `ConfigDependency` class.
- *
- * `ConfigDependency` class expresses a loaded parser or plugin.
- *
- * If the parser or plugin was loaded successfully, it has `definition` property
- * and `filePath` property. Otherwise, it has `error` property.
- *
- * When `JSON.stringify()` converted a `ConfigDependency` object to a JSON, it
- * omits `definition` property.
- *
- * `ConfigArrayFactory` creates `ConfigDependency` objects when it loads parsers
- * or plugins.
- *
- * @author Toru Nagashima
- */
-
-import util from "util";
-
-/**
- * The class is to store parsers or plugins.
- * This class hides the loaded object from `JSON.stringify()` and `console.log`.
- * @template T
- */
-class ConfigDependency {
-
- /**
- * Initialize this instance.
- * @param {Object} data The dependency data.
- * @param {T} [data.definition] The dependency if the loading succeeded.
- * @param {T} [data.original] The original, non-normalized dependency if the loading succeeded.
- * @param {Error} [data.error] The error object if the loading failed.
- * @param {string} [data.filePath] The actual path to the dependency if the loading succeeded.
- * @param {string} data.id The ID of this dependency.
- * @param {string} data.importerName The name of the config file which loads this dependency.
- * @param {string} data.importerPath The path to the config file which loads this dependency.
- */
- constructor({
- definition = null,
- original = null,
- error = null,
- filePath = null,
- id,
- importerName,
- importerPath
- }) {
-
- /**
- * The loaded dependency if the loading succeeded.
- * @type {T|null}
- */
- this.definition = definition;
-
- /**
- * The original dependency as loaded directly from disk if the loading succeeded.
- * @type {T|null}
- */
- this.original = original;
-
- /**
- * The error object if the loading failed.
- * @type {Error|null}
- */
- this.error = error;
-
- /**
- * The loaded dependency if the loading succeeded.
- * @type {string|null}
- */
- this.filePath = filePath;
-
- /**
- * The ID of this dependency.
- * @type {string}
- */
- this.id = id;
-
- /**
- * The name of the config file which loads this dependency.
- * @type {string}
- */
- this.importerName = importerName;
-
- /**
- * The path to the config file which loads this dependency.
- * @type {string}
- */
- this.importerPath = importerPath;
- }
-
- // eslint-disable-next-line jsdoc/require-description
- /**
- * @returns {Object} a JSON compatible object.
- */
- toJSON() {
- const obj = this[util.inspect.custom]();
-
- // Display `error.message` (`Error#message` is unenumerable).
- if (obj.error instanceof Error) {
- obj.error = { ...obj.error, message: obj.error.message };
- }
-
- return obj;
- }
-
- // eslint-disable-next-line jsdoc/require-description
- /**
- * @returns {Object} an object to display by `console.log()`.
- */
- [util.inspect.custom]() {
- const {
- definition: _ignore1, // eslint-disable-line no-unused-vars
- original: _ignore2, // eslint-disable-line no-unused-vars
- ...obj
- } = this;
-
- return obj;
- }
-}
-
-/** @typedef {ConfigDependency} DependentParser */
-/** @typedef {ConfigDependency} DependentPlugin */
-
-export { ConfigDependency };
diff --git a/node_modules/@eslint/eslintrc/lib/config-array/extracted-config.js b/node_modules/@eslint/eslintrc/lib/config-array/extracted-config.js
deleted file mode 100644
index e93b0b6..0000000
--- a/node_modules/@eslint/eslintrc/lib/config-array/extracted-config.js
+++ /dev/null
@@ -1,145 +0,0 @@
-/**
- * @fileoverview `ExtractedConfig` class.
- *
- * `ExtractedConfig` class expresses a final configuration for a specific file.
- *
- * It provides one method.
- *
- * - `toCompatibleObjectAsConfigFileContent()`
- * Convert this configuration to the compatible object as the content of
- * config files. It converts the loaded parser and plugins to strings.
- * `CLIEngine#getConfigForFile(filePath)` method uses this method.
- *
- * `ConfigArray#extractConfig(filePath)` creates a `ExtractedConfig` instance.
- *
- * @author Toru Nagashima
- */
-
-import { IgnorePattern } from "./ignore-pattern.js";
-
-// For VSCode intellisense
-/** @typedef {import("../../shared/types").ConfigData} ConfigData */
-/** @typedef {import("../../shared/types").GlobalConf} GlobalConf */
-/** @typedef {import("../../shared/types").SeverityConf} SeverityConf */
-/** @typedef {import("./config-dependency").DependentParser} DependentParser */
-/** @typedef {import("./config-dependency").DependentPlugin} DependentPlugin */
-
-/**
- * Check if `xs` starts with `ys`.
- * @template T
- * @param {T[]} xs The array to check.
- * @param {T[]} ys The array that may be the first part of `xs`.
- * @returns {boolean} `true` if `xs` starts with `ys`.
- */
-function startsWith(xs, ys) {
- return xs.length >= ys.length && ys.every((y, i) => y === xs[i]);
-}
-
-/**
- * The class for extracted config data.
- */
-class ExtractedConfig {
- constructor() {
-
- /**
- * The config name what `noInlineConfig` setting came from.
- * @type {string}
- */
- this.configNameOfNoInlineConfig = "";
-
- /**
- * Environments.
- * @type {Record}
- */
- this.env = {};
-
- /**
- * Global variables.
- * @type {Record}
- */
- this.globals = {};
-
- /**
- * The glob patterns that ignore to lint.
- * @type {(((filePath:string, dot?:boolean) => boolean) & { basePath:string; patterns:string[] }) | undefined}
- */
- this.ignores = void 0;
-
- /**
- * The flag that disables directive comments.
- * @type {boolean|undefined}
- */
- this.noInlineConfig = void 0;
-
- /**
- * Parser definition.
- * @type {DependentParser|null}
- */
- this.parser = null;
-
- /**
- * Options for the parser.
- * @type {Object}
- */
- this.parserOptions = {};
-
- /**
- * Plugin definitions.
- * @type {Record}
- */
- this.plugins = {};
-
- /**
- * Processor ID.
- * @type {string|null}
- */
- this.processor = null;
-
- /**
- * The flag that reports unused `eslint-disable` directive comments.
- * @type {boolean|undefined}
- */
- this.reportUnusedDisableDirectives = void 0;
-
- /**
- * Rule settings.
- * @type {Record}
- */
- this.rules = {};
-
- /**
- * Shared settings.
- * @type {Object}
- */
- this.settings = {};
- }
-
- /**
- * Convert this config to the compatible object as a config file content.
- * @returns {ConfigData} The converted object.
- */
- toCompatibleObjectAsConfigFileContent() {
- const {
- /* eslint-disable no-unused-vars */
- configNameOfNoInlineConfig: _ignore1,
- processor: _ignore2,
- /* eslint-enable no-unused-vars */
- ignores,
- ...config
- } = this;
-
- config.parser = config.parser && config.parser.filePath;
- config.plugins = Object.keys(config.plugins).filter(Boolean).reverse();
- config.ignorePatterns = ignores ? ignores.patterns : [];
-
- // Strip the default patterns from `ignorePatterns`.
- if (startsWith(config.ignorePatterns, IgnorePattern.DefaultPatterns)) {
- config.ignorePatterns =
- config.ignorePatterns.slice(IgnorePattern.DefaultPatterns.length);
- }
-
- return config;
- }
-}
-
-export { ExtractedConfig };
diff --git a/node_modules/@eslint/eslintrc/lib/config-array/ignore-pattern.js b/node_modules/@eslint/eslintrc/lib/config-array/ignore-pattern.js
deleted file mode 100644
index 3022ba9..0000000
--- a/node_modules/@eslint/eslintrc/lib/config-array/ignore-pattern.js
+++ /dev/null
@@ -1,238 +0,0 @@
-/**
- * @fileoverview `IgnorePattern` class.
- *
- * `IgnorePattern` class has the set of glob patterns and the base path.
- *
- * It provides two static methods.
- *
- * - `IgnorePattern.createDefaultIgnore(cwd)`
- * Create the default predicate function.
- * - `IgnorePattern.createIgnore(ignorePatterns)`
- * Create the predicate function from multiple `IgnorePattern` objects.
- *
- * It provides two properties and a method.
- *
- * - `patterns`
- * The glob patterns that ignore to lint.
- * - `basePath`
- * The base path of the glob patterns. If absolute paths existed in the
- * glob patterns, those are handled as relative paths to the base path.
- * - `getPatternsRelativeTo(basePath)`
- * Get `patterns` as modified for a given base path. It modifies the
- * absolute paths in the patterns as prepending the difference of two base
- * paths.
- *
- * `ConfigArrayFactory` creates `IgnorePattern` objects when it processes
- * `ignorePatterns` properties.
- *
- * @author Toru Nagashima
- */
-
-//------------------------------------------------------------------------------
-// Requirements
-//------------------------------------------------------------------------------
-
-import assert from "assert";
-import path from "path";
-import ignore from "ignore";
-import debugOrig from "debug";
-
-const debug = debugOrig("eslintrc:ignore-pattern");
-
-/** @typedef {ReturnType} Ignore */
-
-//------------------------------------------------------------------------------
-// Helpers
-//------------------------------------------------------------------------------
-
-/**
- * Get the path to the common ancestor directory of given paths.
- * @param {string[]} sourcePaths The paths to calculate the common ancestor.
- * @returns {string} The path to the common ancestor directory.
- */
-function getCommonAncestorPath(sourcePaths) {
- let result = sourcePaths[0];
-
- for (let i = 1; i < sourcePaths.length; ++i) {
- const a = result;
- const b = sourcePaths[i];
-
- // Set the shorter one (it's the common ancestor if one includes the other).
- result = a.length < b.length ? a : b;
-
- // Set the common ancestor.
- for (let j = 0, lastSepPos = 0; j < a.length && j < b.length; ++j) {
- if (a[j] !== b[j]) {
- result = a.slice(0, lastSepPos);
- break;
- }
- if (a[j] === path.sep) {
- lastSepPos = j;
- }
- }
- }
-
- let resolvedResult = result || path.sep;
-
- // if Windows common ancestor is root of drive must have trailing slash to be absolute.
- if (resolvedResult && resolvedResult.endsWith(":") && process.platform === "win32") {
- resolvedResult += path.sep;
- }
- return resolvedResult;
-}
-
-/**
- * Make relative path.
- * @param {string} from The source path to get relative path.
- * @param {string} to The destination path to get relative path.
- * @returns {string} The relative path.
- */
-function relative(from, to) {
- const relPath = path.relative(from, to);
-
- if (path.sep === "/") {
- return relPath;
- }
- return relPath.split(path.sep).join("/");
-}
-
-/**
- * Get the trailing slash if existed.
- * @param {string} filePath The path to check.
- * @returns {string} The trailing slash if existed.
- */
-function dirSuffix(filePath) {
- const isDir = (
- filePath.endsWith(path.sep) ||
- (process.platform === "win32" && filePath.endsWith("/"))
- );
-
- return isDir ? "/" : "";
-}
-
-const DefaultPatterns = Object.freeze(["/**/node_modules/*"]);
-const DotPatterns = Object.freeze([".*", "!.eslintrc.*", "!../"]);
-
-//------------------------------------------------------------------------------
-// Public
-//------------------------------------------------------------------------------
-
-class IgnorePattern {
-
- /**
- * The default patterns.
- * @type {string[]}
- */
- static get DefaultPatterns() {
- return DefaultPatterns;
- }
-
- /**
- * Create the default predicate function.
- * @param {string} cwd The current working directory.
- * @returns {((filePath:string, dot:boolean) => boolean) & {basePath:string; patterns:string[]}}
- * The preficate function.
- * The first argument is an absolute path that is checked.
- * The second argument is the flag to not ignore dotfiles.
- * If the predicate function returned `true`, it means the path should be ignored.
- */
- static createDefaultIgnore(cwd) {
- return this.createIgnore([new IgnorePattern(DefaultPatterns, cwd)]);
- }
-
- /**
- * Create the predicate function from multiple `IgnorePattern` objects.
- * @param {IgnorePattern[]} ignorePatterns The list of ignore patterns.
- * @returns {((filePath:string, dot?:boolean) => boolean) & {basePath:string; patterns:string[]}}
- * The preficate function.
- * The first argument is an absolute path that is checked.
- * The second argument is the flag to not ignore dotfiles.
- * If the predicate function returned `true`, it means the path should be ignored.
- */
- static createIgnore(ignorePatterns) {
- debug("Create with: %o", ignorePatterns);
-
- const basePath = getCommonAncestorPath(ignorePatterns.map(p => p.basePath));
- const patterns = [].concat(
- ...ignorePatterns.map(p => p.getPatternsRelativeTo(basePath))
- );
- const ig = ignore({ allowRelativePaths: true }).add([...DotPatterns, ...patterns]);
- const dotIg = ignore({ allowRelativePaths: true }).add(patterns);
-
- debug(" processed: %o", { basePath, patterns });
-
- return Object.assign(
- (filePath, dot = false) => {
- assert(path.isAbsolute(filePath), "'filePath' should be an absolute path.");
- const relPathRaw = relative(basePath, filePath);
- const relPath = relPathRaw && (relPathRaw + dirSuffix(filePath));
- const adoptedIg = dot ? dotIg : ig;
- const result = relPath !== "" && adoptedIg.ignores(relPath);
-
- debug("Check", { filePath, dot, relativePath: relPath, result });
- return result;
- },
- { basePath, patterns }
- );
- }
-
- /**
- * Initialize a new `IgnorePattern` instance.
- * @param {string[]} patterns The glob patterns that ignore to lint.
- * @param {string} basePath The base path of `patterns`.
- */
- constructor(patterns, basePath) {
- assert(path.isAbsolute(basePath), "'basePath' should be an absolute path.");
-
- /**
- * The glob patterns that ignore to lint.
- * @type {string[]}
- */
- this.patterns = patterns;
-
- /**
- * The base path of `patterns`.
- * @type {string}
- */
- this.basePath = basePath;
-
- /**
- * If `true` then patterns which don't start with `/` will match the paths to the outside of `basePath`. Defaults to `false`.
- *
- * It's set `true` for `.eslintignore`, `package.json`, and `--ignore-path` for backward compatibility.
- * It's `false` as-is for `ignorePatterns` property in config files.
- * @type {boolean}
- */
- this.loose = false;
- }
-
- /**
- * Get `patterns` as modified for a given base path. It modifies the
- * absolute paths in the patterns as prepending the difference of two base
- * paths.
- * @param {string} newBasePath The base path.
- * @returns {string[]} Modifired patterns.
- */
- getPatternsRelativeTo(newBasePath) {
- assert(path.isAbsolute(newBasePath), "'newBasePath' should be an absolute path.");
- const { basePath, loose, patterns } = this;
-
- if (newBasePath === basePath) {
- return patterns;
- }
- const prefix = `/${relative(newBasePath, basePath)}`;
-
- return patterns.map(pattern => {
- const negative = pattern.startsWith("!");
- const head = negative ? "!" : "";
- const body = negative ? pattern.slice(1) : pattern;
-
- if (body.startsWith("/") || body.startsWith("../")) {
- return `${head}${prefix}${body}`;
- }
- return loose ? pattern : `${head}${prefix}/**/${body}`;
- });
- }
-}
-
-export { IgnorePattern };
diff --git a/node_modules/@eslint/eslintrc/lib/config-array/index.js b/node_modules/@eslint/eslintrc/lib/config-array/index.js
deleted file mode 100644
index 647f02b..0000000
--- a/node_modules/@eslint/eslintrc/lib/config-array/index.js
+++ /dev/null
@@ -1,19 +0,0 @@
-/**
- * @fileoverview `ConfigArray` class.
- * @author Toru Nagashima
- */
-
-import { ConfigArray, getUsedExtractedConfigs } from "./config-array.js";
-import { ConfigDependency } from "./config-dependency.js";
-import { ExtractedConfig } from "./extracted-config.js";
-import { IgnorePattern } from "./ignore-pattern.js";
-import { OverrideTester } from "./override-tester.js";
-
-export {
- ConfigArray,
- ConfigDependency,
- ExtractedConfig,
- IgnorePattern,
- OverrideTester,
- getUsedExtractedConfigs
-};
diff --git a/node_modules/@eslint/eslintrc/lib/config-array/override-tester.js b/node_modules/@eslint/eslintrc/lib/config-array/override-tester.js
deleted file mode 100644
index 460aafc..0000000
--- a/node_modules/@eslint/eslintrc/lib/config-array/override-tester.js
+++ /dev/null
@@ -1,225 +0,0 @@
-/**
- * @fileoverview `OverrideTester` class.
- *
- * `OverrideTester` class handles `files` property and `excludedFiles` property
- * of `overrides` config.
- *
- * It provides one method.
- *
- * - `test(filePath)`
- * Test if a file path matches the pair of `files` property and
- * `excludedFiles` property. The `filePath` argument must be an absolute
- * path.
- *
- * `ConfigArrayFactory` creates `OverrideTester` objects when it processes
- * `overrides` properties.
- *
- * @author Toru Nagashima
- */
-
-import assert from "assert";
-import path from "path";
-import util from "util";
-import minimatch from "minimatch";
-
-const { Minimatch } = minimatch;
-
-const minimatchOpts = { dot: true, matchBase: true };
-
-/**
- * @typedef {Object} Pattern
- * @property {InstanceType[] | null} includes The positive matchers.
- * @property {InstanceType[] | null} excludes The negative matchers.
- */
-
-/**
- * Normalize a given pattern to an array.
- * @param {string|string[]|undefined} patterns A glob pattern or an array of glob patterns.
- * @returns {string[]|null} Normalized patterns.
- * @private
- */
-function normalizePatterns(patterns) {
- if (Array.isArray(patterns)) {
- return patterns.filter(Boolean);
- }
- if (typeof patterns === "string" && patterns) {
- return [patterns];
- }
- return [];
-}
-
-/**
- * Create the matchers of given patterns.
- * @param {string[]} patterns The patterns.
- * @returns {InstanceType[] | null} The matchers.
- */
-function toMatcher(patterns) {
- if (patterns.length === 0) {
- return null;
- }
- return patterns.map(pattern => {
- if (/^\.[/\\]/u.test(pattern)) {
- return new Minimatch(
- pattern.slice(2),
-
- // `./*.js` should not match with `subdir/foo.js`
- { ...minimatchOpts, matchBase: false }
- );
- }
- return new Minimatch(pattern, minimatchOpts);
- });
-}
-
-/**
- * Convert a given matcher to string.
- * @param {Pattern} matchers The matchers.
- * @returns {string} The string expression of the matcher.
- */
-function patternToJson({ includes, excludes }) {
- return {
- includes: includes && includes.map(m => m.pattern),
- excludes: excludes && excludes.map(m => m.pattern)
- };
-}
-
-/**
- * The class to test given paths are matched by the patterns.
- */
-class OverrideTester {
-
- /**
- * Create a tester with given criteria.
- * If there are no criteria, returns `null`.
- * @param {string|string[]} files The glob patterns for included files.
- * @param {string|string[]} excludedFiles The glob patterns for excluded files.
- * @param {string} basePath The path to the base directory to test paths.
- * @returns {OverrideTester|null} The created instance or `null`.
- */
- static create(files, excludedFiles, basePath) {
- const includePatterns = normalizePatterns(files);
- const excludePatterns = normalizePatterns(excludedFiles);
- let endsWithWildcard = false;
-
- if (includePatterns.length === 0) {
- return null;
- }
-
- // Rejects absolute paths or relative paths to parents.
- for (const pattern of includePatterns) {
- if (path.isAbsolute(pattern) || pattern.includes("..")) {
- throw new Error(`Invalid override pattern (expected relative path not containing '..'): ${pattern}`);
- }
- if (pattern.endsWith("*")) {
- endsWithWildcard = true;
- }
- }
- for (const pattern of excludePatterns) {
- if (path.isAbsolute(pattern) || pattern.includes("..")) {
- throw new Error(`Invalid override pattern (expected relative path not containing '..'): ${pattern}`);
- }
- }
-
- const includes = toMatcher(includePatterns);
- const excludes = toMatcher(excludePatterns);
-
- return new OverrideTester(
- [{ includes, excludes }],
- basePath,
- endsWithWildcard
- );
- }
-
- /**
- * Combine two testers by logical and.
- * If either of the testers was `null`, returns the other tester.
- * The `basePath` property of the two must be the same value.
- * @param {OverrideTester|null} a A tester.
- * @param {OverrideTester|null} b Another tester.
- * @returns {OverrideTester|null} Combined tester.
- */
- static and(a, b) {
- if (!b) {
- return a && new OverrideTester(
- a.patterns,
- a.basePath,
- a.endsWithWildcard
- );
- }
- if (!a) {
- return new OverrideTester(
- b.patterns,
- b.basePath,
- b.endsWithWildcard
- );
- }
-
- assert.strictEqual(a.basePath, b.basePath);
- return new OverrideTester(
- a.patterns.concat(b.patterns),
- a.basePath,
- a.endsWithWildcard || b.endsWithWildcard
- );
- }
-
- /**
- * Initialize this instance.
- * @param {Pattern[]} patterns The matchers.
- * @param {string} basePath The base path.
- * @param {boolean} endsWithWildcard If `true` then a pattern ends with `*`.
- */
- constructor(patterns, basePath, endsWithWildcard = false) {
-
- /** @type {Pattern[]} */
- this.patterns = patterns;
-
- /** @type {string} */
- this.basePath = basePath;
-
- /** @type {boolean} */
- this.endsWithWildcard = endsWithWildcard;
- }
-
- /**
- * Test if a given path is matched or not.
- * @param {string} filePath The absolute path to the target file.
- * @returns {boolean} `true` if the path was matched.
- */
- test(filePath) {
- if (typeof filePath !== "string" || !path.isAbsolute(filePath)) {
- throw new Error(`'filePath' should be an absolute path, but got ${filePath}.`);
- }
- const relativePath = path.relative(this.basePath, filePath);
-
- return this.patterns.every(({ includes, excludes }) => (
- (!includes || includes.some(m => m.match(relativePath))) &&
- (!excludes || !excludes.some(m => m.match(relativePath)))
- ));
- }
-
- // eslint-disable-next-line jsdoc/require-description
- /**
- * @returns {Object} a JSON compatible object.
- */
- toJSON() {
- if (this.patterns.length === 1) {
- return {
- ...patternToJson(this.patterns[0]),
- basePath: this.basePath
- };
- }
- return {
- AND: this.patterns.map(patternToJson),
- basePath: this.basePath
- };
- }
-
- // eslint-disable-next-line jsdoc/require-description
- /**
- * @returns {Object} an object to display by `console.log()`.
- */
- [util.inspect.custom]() {
- return this.toJSON();
- }
-}
-
-export { OverrideTester };
diff --git a/node_modules/@eslint/eslintrc/lib/flat-compat.js b/node_modules/@eslint/eslintrc/lib/flat-compat.js
deleted file mode 100644
index 6c307a9..0000000
--- a/node_modules/@eslint/eslintrc/lib/flat-compat.js
+++ /dev/null
@@ -1,318 +0,0 @@
-/**
- * @fileoverview Compatibility class for flat config.
- * @author Nicholas C. Zakas
- */
-
-//-----------------------------------------------------------------------------
-// Requirements
-//-----------------------------------------------------------------------------
-
-import createDebug from "debug";
-import path from "path";
-
-import environments from "../conf/environments.js";
-import { ConfigArrayFactory } from "./config-array-factory.js";
-
-//-----------------------------------------------------------------------------
-// Helpers
-//-----------------------------------------------------------------------------
-
-/** @typedef {import("../../shared/types").Environment} Environment */
-/** @typedef {import("../../shared/types").Processor} Processor */
-
-const debug = createDebug("eslintrc:flat-compat");
-const cafactory = Symbol("cafactory");
-
-/**
- * Translates an ESLintRC-style config object into a flag-config-style config
- * object.
- * @param {Object} eslintrcConfig An ESLintRC-style config object.
- * @param {Object} options Options to help translate the config.
- * @param {string} options.resolveConfigRelativeTo To the directory to resolve
- * configs from.
- * @param {string} options.resolvePluginsRelativeTo The directory to resolve
- * plugins from.
- * @param {ReadOnlyMap} options.pluginEnvironments A map of plugin environment
- * names to objects.
- * @param {ReadOnlyMap} options.pluginProcessors A map of plugin processor
- * names to objects.
- * @returns {Object} A flag-config-style config object.
- */
-function translateESLintRC(eslintrcConfig, {
- resolveConfigRelativeTo,
- resolvePluginsRelativeTo,
- pluginEnvironments,
- pluginProcessors
-}) {
-
- const flatConfig = {};
- const configs = [];
- const languageOptions = {};
- const linterOptions = {};
- const keysToCopy = ["settings", "rules", "processor"];
- const languageOptionsKeysToCopy = ["globals", "parser", "parserOptions"];
- const linterOptionsKeysToCopy = ["noInlineConfig", "reportUnusedDisableDirectives"];
-
- // copy over simple translations
- for (const key of keysToCopy) {
- if (key in eslintrcConfig && typeof eslintrcConfig[key] !== "undefined") {
- flatConfig[key] = eslintrcConfig[key];
- }
- }
-
- // copy over languageOptions
- for (const key of languageOptionsKeysToCopy) {
- if (key in eslintrcConfig && typeof eslintrcConfig[key] !== "undefined") {
-
- // create the languageOptions key in the flat config
- flatConfig.languageOptions = languageOptions;
-
- if (key === "parser") {
- debug(`Resolving parser '${languageOptions[key]}' relative to ${resolveConfigRelativeTo}`);
-
- if (eslintrcConfig[key].error) {
- throw eslintrcConfig[key].error;
- }
-
- languageOptions[key] = eslintrcConfig[key].definition;
- continue;
- }
-
- // clone any object values that are in the eslintrc config
- if (eslintrcConfig[key] && typeof eslintrcConfig[key] === "object") {
- languageOptions[key] = {
- ...eslintrcConfig[key]
- };
- } else {
- languageOptions[key] = eslintrcConfig[key];
- }
- }
- }
-
- // copy over linterOptions
- for (const key of linterOptionsKeysToCopy) {
- if (key in eslintrcConfig && typeof eslintrcConfig[key] !== "undefined") {
- flatConfig.linterOptions = linterOptions;
- linterOptions[key] = eslintrcConfig[key];
- }
- }
-
- // move ecmaVersion a level up
- if (languageOptions.parserOptions) {
-
- if ("ecmaVersion" in languageOptions.parserOptions) {
- languageOptions.ecmaVersion = languageOptions.parserOptions.ecmaVersion;
- delete languageOptions.parserOptions.ecmaVersion;
- }
-
- if ("sourceType" in languageOptions.parserOptions) {
- languageOptions.sourceType = languageOptions.parserOptions.sourceType;
- delete languageOptions.parserOptions.sourceType;
- }
-
- // check to see if we even need parserOptions anymore and remove it if not
- if (Object.keys(languageOptions.parserOptions).length === 0) {
- delete languageOptions.parserOptions;
- }
- }
-
- // overrides
- if (eslintrcConfig.criteria) {
- flatConfig.files = [absoluteFilePath => eslintrcConfig.criteria.test(absoluteFilePath)];
- }
-
- // translate plugins
- if (eslintrcConfig.plugins && typeof eslintrcConfig.plugins === "object") {
- debug(`Translating plugins: ${eslintrcConfig.plugins}`);
-
- flatConfig.plugins = {};
-
- for (const pluginName of Object.keys(eslintrcConfig.plugins)) {
-
- debug(`Translating plugin: ${pluginName}`);
- debug(`Resolving plugin '${pluginName} relative to ${resolvePluginsRelativeTo}`);
-
- const { original: plugin, error } = eslintrcConfig.plugins[pluginName];
-
- if (error) {
- throw error;
- }
-
- flatConfig.plugins[pluginName] = plugin;
-
- // create a config for any processors
- if (plugin.processors) {
- for (const processorName of Object.keys(plugin.processors)) {
- if (processorName.startsWith(".")) {
- debug(`Assigning processor: ${pluginName}/${processorName}`);
-
- configs.unshift({
- files: [`**/*${processorName}`],
- processor: pluginProcessors.get(`${pluginName}/${processorName}`)
- });
- }
-
- }
- }
- }
- }
-
- // translate env - must come after plugins
- if (eslintrcConfig.env && typeof eslintrcConfig.env === "object") {
- for (const envName of Object.keys(eslintrcConfig.env)) {
-
- // only add environments that are true
- if (eslintrcConfig.env[envName]) {
- debug(`Translating environment: ${envName}`);
-
- if (environments.has(envName)) {
-
- // built-in environments should be defined first
- configs.unshift(...translateESLintRC({
- criteria: eslintrcConfig.criteria,
- ...environments.get(envName)
- }, {
- resolveConfigRelativeTo,
- resolvePluginsRelativeTo
- }));
- } else if (pluginEnvironments.has(envName)) {
-
- // if the environment comes from a plugin, it should come after the plugin config
- configs.push(...translateESLintRC({
- criteria: eslintrcConfig.criteria,
- ...pluginEnvironments.get(envName)
- }, {
- resolveConfigRelativeTo,
- resolvePluginsRelativeTo
- }));
- }
- }
- }
- }
-
- // only add if there are actually keys in the config
- if (Object.keys(flatConfig).length > 0) {
- configs.push(flatConfig);
- }
-
- return configs;
-}
-
-
-//-----------------------------------------------------------------------------
-// Exports
-//-----------------------------------------------------------------------------
-
-/**
- * A compatibility class for working with configs.
- */
-class FlatCompat {
-
- constructor({
- baseDirectory = process.cwd(),
- resolvePluginsRelativeTo = baseDirectory,
- recommendedConfig,
- allConfig
- } = {}) {
- this.baseDirectory = baseDirectory;
- this.resolvePluginsRelativeTo = resolvePluginsRelativeTo;
- this[cafactory] = new ConfigArrayFactory({
- cwd: baseDirectory,
- resolvePluginsRelativeTo,
- getEslintAllConfig: () => {
-
- if (!allConfig) {
- throw new TypeError("Missing parameter 'allConfig' in FlatCompat constructor.");
- }
-
- return allConfig;
- },
- getEslintRecommendedConfig: () => {
-
- if (!recommendedConfig) {
- throw new TypeError("Missing parameter 'recommendedConfig' in FlatCompat constructor.");
- }
-
- return recommendedConfig;
- }
- });
- }
-
- /**
- * Translates an ESLintRC-style config into a flag-config-style config.
- * @param {Object} eslintrcConfig The ESLintRC-style config object.
- * @returns {Object} A flag-config-style config object.
- */
- config(eslintrcConfig) {
- const eslintrcArray = this[cafactory].create(eslintrcConfig, {
- basePath: this.baseDirectory
- });
-
- const flatArray = [];
- let hasIgnorePatterns = false;
-
- eslintrcArray.forEach(configData => {
- if (configData.type === "config") {
- hasIgnorePatterns = hasIgnorePatterns || configData.ignorePattern;
- flatArray.push(...translateESLintRC(configData, {
- resolveConfigRelativeTo: path.join(this.baseDirectory, "__placeholder.js"),
- resolvePluginsRelativeTo: path.join(this.resolvePluginsRelativeTo, "__placeholder.js"),
- pluginEnvironments: eslintrcArray.pluginEnvironments,
- pluginProcessors: eslintrcArray.pluginProcessors
- }));
- }
- });
-
- // combine ignorePatterns to emulate ESLintRC behavior better
- if (hasIgnorePatterns) {
- flatArray.unshift({
- ignores: [filePath => {
-
- // Compute the final config for this file.
- // This filters config array elements by `files`/`excludedFiles` then merges the elements.
- const finalConfig = eslintrcArray.extractConfig(filePath);
-
- // Test the `ignorePattern` properties of the final config.
- return Boolean(finalConfig.ignores) && finalConfig.ignores(filePath);
- }]
- });
- }
-
- return flatArray;
- }
-
- /**
- * Translates the `env` section of an ESLintRC-style config.
- * @param {Object} envConfig The `env` section of an ESLintRC config.
- * @returns {Object[]} An array of flag-config objects representing the environments.
- */
- env(envConfig) {
- return this.config({
- env: envConfig
- });
- }
-
- /**
- * Translates the `extends` section of an ESLintRC-style config.
- * @param {...string} configsToExtend The names of the configs to load.
- * @returns {Object[]} An array of flag-config objects representing the config.
- */
- extends(...configsToExtend) {
- return this.config({
- extends: configsToExtend
- });
- }
-
- /**
- * Translates the `plugins` section of an ESLintRC-style config.
- * @param {...string} plugins The names of the plugins to load.
- * @returns {Object[]} An array of flag-config objects representing the plugins.
- */
- plugins(...plugins) {
- return this.config({
- plugins
- });
- }
-}
-
-export { FlatCompat };
diff --git a/node_modules/@eslint/eslintrc/lib/index-universal.js b/node_modules/@eslint/eslintrc/lib/index-universal.js
deleted file mode 100644
index 6f6b302..0000000
--- a/node_modules/@eslint/eslintrc/lib/index-universal.js
+++ /dev/null
@@ -1,29 +0,0 @@
-/**
- * @fileoverview Package exports for @eslint/eslintrc
- * @author Nicholas C. Zakas
- */
-//------------------------------------------------------------------------------
-// Requirements
-//------------------------------------------------------------------------------
-
-import * as ConfigOps from "./shared/config-ops.js";
-import ConfigValidator from "./shared/config-validator.js";
-import * as naming from "./shared/naming.js";
-import environments from "../conf/environments.js";
-
-//-----------------------------------------------------------------------------
-// Exports
-//-----------------------------------------------------------------------------
-
-const Legacy = {
- environments,
-
- // shared
- ConfigOps,
- ConfigValidator,
- naming
-};
-
-export {
- Legacy
-};
diff --git a/node_modules/@eslint/eslintrc/lib/index.js b/node_modules/@eslint/eslintrc/lib/index.js
deleted file mode 100644
index 9e3d13f..0000000
--- a/node_modules/@eslint/eslintrc/lib/index.js
+++ /dev/null
@@ -1,56 +0,0 @@
-/**
- * @fileoverview Package exports for @eslint/eslintrc
- * @author Nicholas C. Zakas
- */
-//------------------------------------------------------------------------------
-// Requirements
-//------------------------------------------------------------------------------
-
-import {
- ConfigArrayFactory,
- createContext as createConfigArrayFactoryContext
-} from "./config-array-factory.js";
-
-import { CascadingConfigArrayFactory } from "./cascading-config-array-factory.js";
-import * as ModuleResolver from "./shared/relative-module-resolver.js";
-import { ConfigArray, getUsedExtractedConfigs } from "./config-array/index.js";
-import { ConfigDependency } from "./config-array/config-dependency.js";
-import { ExtractedConfig } from "./config-array/extracted-config.js";
-import { IgnorePattern } from "./config-array/ignore-pattern.js";
-import { OverrideTester } from "./config-array/override-tester.js";
-import * as ConfigOps from "./shared/config-ops.js";
-import ConfigValidator from "./shared/config-validator.js";
-import * as naming from "./shared/naming.js";
-import { FlatCompat } from "./flat-compat.js";
-import environments from "../conf/environments.js";
-
-//-----------------------------------------------------------------------------
-// Exports
-//-----------------------------------------------------------------------------
-
-const Legacy = {
- ConfigArray,
- createConfigArrayFactoryContext,
- CascadingConfigArrayFactory,
- ConfigArrayFactory,
- ConfigDependency,
- ExtractedConfig,
- IgnorePattern,
- OverrideTester,
- getUsedExtractedConfigs,
- environments,
-
- // shared
- ConfigOps,
- ConfigValidator,
- ModuleResolver,
- naming
-};
-
-export {
-
- Legacy,
-
- FlatCompat
-
-};
diff --git a/node_modules/@eslint/eslintrc/lib/shared/ajv.js b/node_modules/@eslint/eslintrc/lib/shared/ajv.js
deleted file mode 100644
index b79ad36..0000000
--- a/node_modules/@eslint/eslintrc/lib/shared/ajv.js
+++ /dev/null
@@ -1,191 +0,0 @@
-/**
- * @fileoverview The instance of Ajv validator.
- * @author Evgeny Poberezkin
- */
-
-//------------------------------------------------------------------------------
-// Requirements
-//------------------------------------------------------------------------------
-
-import Ajv from "ajv";
-
-//-----------------------------------------------------------------------------
-// Helpers
-//-----------------------------------------------------------------------------
-
-/*
- * Copied from ajv/lib/refs/json-schema-draft-04.json
- * The MIT License (MIT)
- * Copyright (c) 2015-2017 Evgeny Poberezkin
- */
-const metaSchema = {
- id: "http://json-schema.org/draft-04/schema#",
- $schema: "http://json-schema.org/draft-04/schema#",
- description: "Core schema meta-schema",
- definitions: {
- schemaArray: {
- type: "array",
- minItems: 1,
- items: { $ref: "#" }
- },
- positiveInteger: {
- type: "integer",
- minimum: 0
- },
- positiveIntegerDefault0: {
- allOf: [{ $ref: "#/definitions/positiveInteger" }, { default: 0 }]
- },
- simpleTypes: {
- enum: ["array", "boolean", "integer", "null", "number", "object", "string"]
- },
- stringArray: {
- type: "array",
- items: { type: "string" },
- minItems: 1,
- uniqueItems: true
- }
- },
- type: "object",
- properties: {
- id: {
- type: "string"
- },
- $schema: {
- type: "string"
- },
- title: {
- type: "string"
- },
- description: {
- type: "string"
- },
- default: { },
- multipleOf: {
- type: "number",
- minimum: 0,
- exclusiveMinimum: true
- },
- maximum: {
- type: "number"
- },
- exclusiveMaximum: {
- type: "boolean",
- default: false
- },
- minimum: {
- type: "number"
- },
- exclusiveMinimum: {
- type: "boolean",
- default: false
- },
- maxLength: { $ref: "#/definitions/positiveInteger" },
- minLength: { $ref: "#/definitions/positiveIntegerDefault0" },
- pattern: {
- type: "string",
- format: "regex"
- },
- additionalItems: {
- anyOf: [
- { type: "boolean" },
- { $ref: "#" }
- ],
- default: { }
- },
- items: {
- anyOf: [
- { $ref: "#" },
- { $ref: "#/definitions/schemaArray" }
- ],
- default: { }
- },
- maxItems: { $ref: "#/definitions/positiveInteger" },
- minItems: { $ref: "#/definitions/positiveIntegerDefault0" },
- uniqueItems: {
- type: "boolean",
- default: false
- },
- maxProperties: { $ref: "#/definitions/positiveInteger" },
- minProperties: { $ref: "#/definitions/positiveIntegerDefault0" },
- required: { $ref: "#/definitions/stringArray" },
- additionalProperties: {
- anyOf: [
- { type: "boolean" },
- { $ref: "#" }
- ],
- default: { }
- },
- definitions: {
- type: "object",
- additionalProperties: { $ref: "#" },
- default: { }
- },
- properties: {
- type: "object",
- additionalProperties: { $ref: "#" },
- default: { }
- },
- patternProperties: {
- type: "object",
- additionalProperties: { $ref: "#" },
- default: { }
- },
- dependencies: {
- type: "object",
- additionalProperties: {
- anyOf: [
- { $ref: "#" },
- { $ref: "#/definitions/stringArray" }
- ]
- }
- },
- enum: {
- type: "array",
- minItems: 1,
- uniqueItems: true
- },
- type: {
- anyOf: [
- { $ref: "#/definitions/simpleTypes" },
- {
- type: "array",
- items: { $ref: "#/definitions/simpleTypes" },
- minItems: 1,
- uniqueItems: true
- }
- ]
- },
- format: { type: "string" },
- allOf: { $ref: "#/definitions/schemaArray" },
- anyOf: { $ref: "#/definitions/schemaArray" },
- oneOf: { $ref: "#/definitions/schemaArray" },
- not: { $ref: "#" }
- },
- dependencies: {
- exclusiveMaximum: ["maximum"],
- exclusiveMinimum: ["minimum"]
- },
- default: { }
-};
-
-//------------------------------------------------------------------------------
-// Public Interface
-//------------------------------------------------------------------------------
-
-export default (additionalOptions = {}) => {
- const ajv = new Ajv({
- meta: false,
- useDefaults: true,
- validateSchema: false,
- missingRefs: "ignore",
- verbose: true,
- schemaId: "auto",
- ...additionalOptions
- });
-
- ajv.addMetaSchema(metaSchema);
- // eslint-disable-next-line no-underscore-dangle
- ajv._opts.defaultMeta = metaSchema.id;
-
- return ajv;
-};
diff --git a/node_modules/@eslint/eslintrc/lib/shared/config-ops.js b/node_modules/@eslint/eslintrc/lib/shared/config-ops.js
deleted file mode 100644
index d203be0..0000000
--- a/node_modules/@eslint/eslintrc/lib/shared/config-ops.js
+++ /dev/null
@@ -1,135 +0,0 @@
-/**
- * @fileoverview Config file operations. This file must be usable in the browser,
- * so no Node-specific code can be here.
- * @author Nicholas C. Zakas
- */
-
-//------------------------------------------------------------------------------
-// Private
-//------------------------------------------------------------------------------
-
-const RULE_SEVERITY_STRINGS = ["off", "warn", "error"],
- RULE_SEVERITY = RULE_SEVERITY_STRINGS.reduce((map, value, index) => {
- map[value] = index;
- return map;
- }, {}),
- VALID_SEVERITIES = [0, 1, 2, "off", "warn", "error"];
-
-//------------------------------------------------------------------------------
-// Public Interface
-//------------------------------------------------------------------------------
-
-/**
- * Normalizes the severity value of a rule's configuration to a number
- * @param {(number|string|[number, ...*]|[string, ...*])} ruleConfig A rule's configuration value, generally
- * received from the user. A valid config value is either 0, 1, 2, the string "off" (treated the same as 0),
- * the string "warn" (treated the same as 1), the string "error" (treated the same as 2), or an array
- * whose first element is one of the above values. Strings are matched case-insensitively.
- * @returns {(0|1|2)} The numeric severity value if the config value was valid, otherwise 0.
- */
-function getRuleSeverity(ruleConfig) {
- const severityValue = Array.isArray(ruleConfig) ? ruleConfig[0] : ruleConfig;
-
- if (severityValue === 0 || severityValue === 1 || severityValue === 2) {
- return severityValue;
- }
-
- if (typeof severityValue === "string") {
- return RULE_SEVERITY[severityValue.toLowerCase()] || 0;
- }
-
- return 0;
-}
-
-/**
- * Converts old-style severity settings (0, 1, 2) into new-style
- * severity settings (off, warn, error) for all rules. Assumption is that severity
- * values have already been validated as correct.
- * @param {Object} config The config object to normalize.
- * @returns {void}
- */
-function normalizeToStrings(config) {
-
- if (config.rules) {
- Object.keys(config.rules).forEach(ruleId => {
- const ruleConfig = config.rules[ruleId];
-
- if (typeof ruleConfig === "number") {
- config.rules[ruleId] = RULE_SEVERITY_STRINGS[ruleConfig] || RULE_SEVERITY_STRINGS[0];
- } else if (Array.isArray(ruleConfig) && typeof ruleConfig[0] === "number") {
- ruleConfig[0] = RULE_SEVERITY_STRINGS[ruleConfig[0]] || RULE_SEVERITY_STRINGS[0];
- }
- });
- }
-}
-
-/**
- * Determines if the severity for the given rule configuration represents an error.
- * @param {int|string|Array} ruleConfig The configuration for an individual rule.
- * @returns {boolean} True if the rule represents an error, false if not.
- */
-function isErrorSeverity(ruleConfig) {
- return getRuleSeverity(ruleConfig) === 2;
-}
-
-/**
- * Checks whether a given config has valid severity or not.
- * @param {number|string|Array} ruleConfig The configuration for an individual rule.
- * @returns {boolean} `true` if the configuration has valid severity.
- */
-function isValidSeverity(ruleConfig) {
- let severity = Array.isArray(ruleConfig) ? ruleConfig[0] : ruleConfig;
-
- if (typeof severity === "string") {
- severity = severity.toLowerCase();
- }
- return VALID_SEVERITIES.indexOf(severity) !== -1;
-}
-
-/**
- * Checks whether every rule of a given config has valid severity or not.
- * @param {Object} config The configuration for rules.
- * @returns {boolean} `true` if the configuration has valid severity.
- */
-function isEverySeverityValid(config) {
- return Object.keys(config).every(ruleId => isValidSeverity(config[ruleId]));
-}
-
-/**
- * Normalizes a value for a global in a config
- * @param {(boolean|string|null)} configuredValue The value given for a global in configuration or in
- * a global directive comment
- * @returns {("readable"|"writeable"|"off")} The value normalized as a string
- * @throws Error if global value is invalid
- */
-function normalizeConfigGlobal(configuredValue) {
- switch (configuredValue) {
- case "off":
- return "off";
-
- case true:
- case "true":
- case "writeable":
- case "writable":
- return "writable";
-
- case null:
- case false:
- case "false":
- case "readable":
- case "readonly":
- return "readonly";
-
- default:
- throw new Error(`'${configuredValue}' is not a valid configuration for a global (use 'readonly', 'writable', or 'off')`);
- }
-}
-
-export {
- getRuleSeverity,
- normalizeToStrings,
- isErrorSeverity,
- isValidSeverity,
- isEverySeverityValid,
- normalizeConfigGlobal
-};
diff --git a/node_modules/@eslint/eslintrc/lib/shared/config-validator.js b/node_modules/@eslint/eslintrc/lib/shared/config-validator.js
deleted file mode 100644
index 32174a5..0000000
--- a/node_modules/@eslint/eslintrc/lib/shared/config-validator.js
+++ /dev/null
@@ -1,325 +0,0 @@
-/**
- * @fileoverview Validates configs.
- * @author Brandon Mills
- */
-
-/* eslint class-methods-use-this: "off" */
-
-//------------------------------------------------------------------------------
-// Requirements
-//------------------------------------------------------------------------------
-
-import util from "util";
-import * as ConfigOps from "./config-ops.js";
-import { emitDeprecationWarning } from "./deprecation-warnings.js";
-import ajvOrig from "./ajv.js";
-import configSchema from "../../conf/config-schema.js";
-import BuiltInEnvironments from "../../conf/environments.js";
-
-const ajv = ajvOrig();
-
-const ruleValidators = new WeakMap();
-const noop = Function.prototype;
-
-//------------------------------------------------------------------------------
-// Private
-//------------------------------------------------------------------------------
-let validateSchema;
-const severityMap = {
- error: 2,
- warn: 1,
- off: 0
-};
-
-const validated = new WeakSet();
-
-//-----------------------------------------------------------------------------
-// Exports
-//-----------------------------------------------------------------------------
-
-export default class ConfigValidator {
- constructor({ builtInRules = new Map() } = {}) {
- this.builtInRules = builtInRules;
- }
-
- /**
- * Gets a complete options schema for a rule.
- * @param {{create: Function, schema: (Array|null)}} rule A new-style rule object
- * @returns {Object} JSON Schema for the rule's options.
- */
- getRuleOptionsSchema(rule) {
- if (!rule) {
- return null;
- }
-
- const schema = rule.schema || rule.meta && rule.meta.schema;
-
- // Given a tuple of schemas, insert warning level at the beginning
- if (Array.isArray(schema)) {
- if (schema.length) {
- return {
- type: "array",
- items: schema,
- minItems: 0,
- maxItems: schema.length
- };
- }
- return {
- type: "array",
- minItems: 0,
- maxItems: 0
- };
-
- }
-
- // Given a full schema, leave it alone
- return schema || null;
- }
-
- /**
- * Validates a rule's severity and returns the severity value. Throws an error if the severity is invalid.
- * @param {options} options The given options for the rule.
- * @returns {number|string} The rule's severity value
- */
- validateRuleSeverity(options) {
- const severity = Array.isArray(options) ? options[0] : options;
- const normSeverity = typeof severity === "string" ? severityMap[severity.toLowerCase()] : severity;
-
- if (normSeverity === 0 || normSeverity === 1 || normSeverity === 2) {
- return normSeverity;
- }
-
- throw new Error(`\tSeverity should be one of the following: 0 = off, 1 = warn, 2 = error (you passed '${util.inspect(severity).replace(/'/gu, "\"").replace(/\n/gu, "")}').\n`);
-
- }
-
- /**
- * Validates the non-severity options passed to a rule, based on its schema.
- * @param {{create: Function}} rule The rule to validate
- * @param {Array} localOptions The options for the rule, excluding severity
- * @returns {void}
- */
- validateRuleSchema(rule, localOptions) {
- if (!ruleValidators.has(rule)) {
- const schema = this.getRuleOptionsSchema(rule);
-
- if (schema) {
- ruleValidators.set(rule, ajv.compile(schema));
- }
- }
-
- const validateRule = ruleValidators.get(rule);
-
- if (validateRule) {
- validateRule(localOptions);
- if (validateRule.errors) {
- throw new Error(validateRule.errors.map(
- error => `\tValue ${JSON.stringify(error.data)} ${error.message}.\n`
- ).join(""));
- }
- }
- }
-
- /**
- * Validates a rule's options against its schema.
- * @param {{create: Function}|null} rule The rule that the config is being validated for
- * @param {string} ruleId The rule's unique name.
- * @param {Array|number} options The given options for the rule.
- * @param {string|null} source The name of the configuration source to report in any errors. If null or undefined,
- * no source is prepended to the message.
- * @returns {void}
- */
- validateRuleOptions(rule, ruleId, options, source = null) {
- try {
- const severity = this.validateRuleSeverity(options);
-
- if (severity !== 0) {
- this.validateRuleSchema(rule, Array.isArray(options) ? options.slice(1) : []);
- }
- } catch (err) {
- const enhancedMessage = `Configuration for rule "${ruleId}" is invalid:\n${err.message}`;
-
- if (typeof source === "string") {
- throw new Error(`${source}:\n\t${enhancedMessage}`);
- } else {
- throw new Error(enhancedMessage);
- }
- }
- }
-
- /**
- * Validates an environment object
- * @param {Object} environment The environment config object to validate.
- * @param {string} source The name of the configuration source to report in any errors.
- * @param {function(envId:string): Object} [getAdditionalEnv] A map from strings to loaded environments.
- * @returns {void}
- */
- validateEnvironment(
- environment,
- source,
- getAdditionalEnv = noop
- ) {
-
- // not having an environment is ok
- if (!environment) {
- return;
- }
-
- Object.keys(environment).forEach(id => {
- const env = getAdditionalEnv(id) || BuiltInEnvironments.get(id) || null;
-
- if (!env) {
- const message = `${source}:\n\tEnvironment key "${id}" is unknown\n`;
-
- throw new Error(message);
- }
- });
- }
-
- /**
- * Validates a rules config object
- * @param {Object} rulesConfig The rules config object to validate.
- * @param {string} source The name of the configuration source to report in any errors.
- * @param {function(ruleId:string): Object} getAdditionalRule A map from strings to loaded rules
- * @returns {void}
- */
- validateRules(
- rulesConfig,
- source,
- getAdditionalRule = noop
- ) {
- if (!rulesConfig) {
- return;
- }
-
- Object.keys(rulesConfig).forEach(id => {
- const rule = getAdditionalRule(id) || this.builtInRules.get(id) || null;
-
- this.validateRuleOptions(rule, id, rulesConfig[id], source);
- });
- }
-
- /**
- * Validates a `globals` section of a config file
- * @param {Object} globalsConfig The `globals` section
- * @param {string|null} source The name of the configuration source to report in the event of an error.
- * @returns {void}
- */
- validateGlobals(globalsConfig, source = null) {
- if (!globalsConfig) {
- return;
- }
-
- Object.entries(globalsConfig)
- .forEach(([configuredGlobal, configuredValue]) => {
- try {
- ConfigOps.normalizeConfigGlobal(configuredValue);
- } catch (err) {
- throw new Error(`ESLint configuration of global '${configuredGlobal}' in ${source} is invalid:\n${err.message}`);
- }
- });
- }
-
- /**
- * Validate `processor` configuration.
- * @param {string|undefined} processorName The processor name.
- * @param {string} source The name of config file.
- * @param {function(id:string): Processor} getProcessor The getter of defined processors.
- * @returns {void}
- */
- validateProcessor(processorName, source, getProcessor) {
- if (processorName && !getProcessor(processorName)) {
- throw new Error(`ESLint configuration of processor in '${source}' is invalid: '${processorName}' was not found.`);
- }
- }
-
- /**
- * Formats an array of schema validation errors.
- * @param {Array} errors An array of error messages to format.
- * @returns {string} Formatted error message
- */
- formatErrors(errors) {
- return errors.map(error => {
- if (error.keyword === "additionalProperties") {
- const formattedPropertyPath = error.dataPath.length ? `${error.dataPath.slice(1)}.${error.params.additionalProperty}` : error.params.additionalProperty;
-
- return `Unexpected top-level property "${formattedPropertyPath}"`;
- }
- if (error.keyword === "type") {
- const formattedField = error.dataPath.slice(1);
- const formattedExpectedType = Array.isArray(error.schema) ? error.schema.join("/") : error.schema;
- const formattedValue = JSON.stringify(error.data);
-
- return `Property "${formattedField}" is the wrong type (expected ${formattedExpectedType} but got \`${formattedValue}\`)`;
- }
-
- const field = error.dataPath[0] === "." ? error.dataPath.slice(1) : error.dataPath;
-
- return `"${field}" ${error.message}. Value: ${JSON.stringify(error.data)}`;
- }).map(message => `\t- ${message}.\n`).join("");
- }
-
- /**
- * Validates the top level properties of the config object.
- * @param {Object} config The config object to validate.
- * @param {string} source The name of the configuration source to report in any errors.
- * @returns {void}
- */
- validateConfigSchema(config, source = null) {
- validateSchema = validateSchema || ajv.compile(configSchema);
-
- if (!validateSchema(config)) {
- throw new Error(`ESLint configuration in ${source} is invalid:\n${this.formatErrors(validateSchema.errors)}`);
- }
-
- if (Object.hasOwnProperty.call(config, "ecmaFeatures")) {
- emitDeprecationWarning(source, "ESLINT_LEGACY_ECMAFEATURES");
- }
- }
-
- /**
- * Validates an entire config object.
- * @param {Object} config The config object to validate.
- * @param {string} source The name of the configuration source to report in any errors.
- * @param {function(ruleId:string): Object} [getAdditionalRule] A map from strings to loaded rules.
- * @param {function(envId:string): Object} [getAdditionalEnv] A map from strings to loaded envs.
- * @returns {void}
- */
- validate(config, source, getAdditionalRule, getAdditionalEnv) {
- this.validateConfigSchema(config, source);
- this.validateRules(config.rules, source, getAdditionalRule);
- this.validateEnvironment(config.env, source, getAdditionalEnv);
- this.validateGlobals(config.globals, source);
-
- for (const override of config.overrides || []) {
- this.validateRules(override.rules, source, getAdditionalRule);
- this.validateEnvironment(override.env, source, getAdditionalEnv);
- this.validateGlobals(config.globals, source);
- }
- }
-
- /**
- * Validate config array object.
- * @param {ConfigArray} configArray The config array to validate.
- * @returns {void}
- */
- validateConfigArray(configArray) {
- const getPluginEnv = Map.prototype.get.bind(configArray.pluginEnvironments);
- const getPluginProcessor = Map.prototype.get.bind(configArray.pluginProcessors);
- const getPluginRule = Map.prototype.get.bind(configArray.pluginRules);
-
- // Validate.
- for (const element of configArray) {
- if (validated.has(element)) {
- continue;
- }
- validated.add(element);
-
- this.validateEnvironment(element.env, element.name, getPluginEnv);
- this.validateGlobals(element.globals, element.name);
- this.validateProcessor(element.processor, element.name, getPluginProcessor);
- this.validateRules(element.rules, element.name, getPluginRule);
- }
- }
-
-}
diff --git a/node_modules/@eslint/eslintrc/lib/shared/deprecation-warnings.js b/node_modules/@eslint/eslintrc/lib/shared/deprecation-warnings.js
deleted file mode 100644
index 91907b1..0000000
--- a/node_modules/@eslint/eslintrc/lib/shared/deprecation-warnings.js
+++ /dev/null
@@ -1,63 +0,0 @@
-/**
- * @fileoverview Provide the function that emits deprecation warnings.
- * @author Toru Nagashima
- */
-
-//------------------------------------------------------------------------------
-// Requirements
-//------------------------------------------------------------------------------
-
-import path from "path";
-
-//------------------------------------------------------------------------------
-// Private
-//------------------------------------------------------------------------------
-
-// Defitions for deprecation warnings.
-const deprecationWarningMessages = {
- ESLINT_LEGACY_ECMAFEATURES:
- "The 'ecmaFeatures' config file property is deprecated and has no effect.",
- ESLINT_PERSONAL_CONFIG_LOAD:
- "'~/.eslintrc.*' config files have been deprecated. " +
- "Please use a config file per project or the '--config' option.",
- ESLINT_PERSONAL_CONFIG_SUPPRESS:
- "'~/.eslintrc.*' config files have been deprecated. " +
- "Please remove it or add 'root:true' to the config files in your " +
- "projects in order to avoid loading '~/.eslintrc.*' accidentally."
-};
-
-const sourceFileErrorCache = new Set();
-
-/**
- * Emits a deprecation warning containing a given filepath. A new deprecation warning is emitted
- * for each unique file path, but repeated invocations with the same file path have no effect.
- * No warnings are emitted if the `--no-deprecation` or `--no-warnings` Node runtime flags are active.
- * @param {string} source The name of the configuration source to report the warning for.
- * @param {string} errorCode The warning message to show.
- * @returns {void}
- */
-function emitDeprecationWarning(source, errorCode) {
- const cacheKey = JSON.stringify({ source, errorCode });
-
- if (sourceFileErrorCache.has(cacheKey)) {
- return;
- }
- sourceFileErrorCache.add(cacheKey);
-
- const rel = path.relative(process.cwd(), source);
- const message = deprecationWarningMessages[errorCode];
-
- process.emitWarning(
- `${message} (found in "${rel}")`,
- "DeprecationWarning",
- errorCode
- );
-}
-
-//------------------------------------------------------------------------------
-// Public Interface
-//------------------------------------------------------------------------------
-
-export {
- emitDeprecationWarning
-};
diff --git a/node_modules/@eslint/eslintrc/lib/shared/naming.js b/node_modules/@eslint/eslintrc/lib/shared/naming.js
deleted file mode 100644
index 93df5fc..0000000
--- a/node_modules/@eslint/eslintrc/lib/shared/naming.js
+++ /dev/null
@@ -1,96 +0,0 @@
-/**
- * @fileoverview Common helpers for naming of plugins, formatters and configs
- */
-
-const NAMESPACE_REGEX = /^@.*\//iu;
-
-/**
- * Brings package name to correct format based on prefix
- * @param {string} name The name of the package.
- * @param {string} prefix Can be either "eslint-plugin", "eslint-config" or "eslint-formatter"
- * @returns {string} Normalized name of the package
- * @private
- */
-function normalizePackageName(name, prefix) {
- let normalizedName = name;
-
- /**
- * On Windows, name can come in with Windows slashes instead of Unix slashes.
- * Normalize to Unix first to avoid errors later on.
- * https://github.com/eslint/eslint/issues/5644
- */
- if (normalizedName.includes("\\")) {
- normalizedName = normalizedName.replace(/\\/gu, "/");
- }
-
- if (normalizedName.charAt(0) === "@") {
-
- /**
- * it's a scoped package
- * package name is the prefix, or just a username
- */
- const scopedPackageShortcutRegex = new RegExp(`^(@[^/]+)(?:/(?:${prefix})?)?$`, "u"),
- scopedPackageNameRegex = new RegExp(`^${prefix}(-|$)`, "u");
-
- if (scopedPackageShortcutRegex.test(normalizedName)) {
- normalizedName = normalizedName.replace(scopedPackageShortcutRegex, `$1/${prefix}`);
- } else if (!scopedPackageNameRegex.test(normalizedName.split("/")[1])) {
-
- /**
- * for scoped packages, insert the prefix after the first / unless
- * the path is already @scope/eslint or @scope/eslint-xxx-yyy
- */
- normalizedName = normalizedName.replace(/^@([^/]+)\/(.*)$/u, `@$1/${prefix}-$2`);
- }
- } else if (!normalizedName.startsWith(`${prefix}-`)) {
- normalizedName = `${prefix}-${normalizedName}`;
- }
-
- return normalizedName;
-}
-
-/**
- * Removes the prefix from a fullname.
- * @param {string} fullname The term which may have the prefix.
- * @param {string} prefix The prefix to remove.
- * @returns {string} The term without prefix.
- */
-function getShorthandName(fullname, prefix) {
- if (fullname[0] === "@") {
- let matchResult = new RegExp(`^(@[^/]+)/${prefix}$`, "u").exec(fullname);
-
- if (matchResult) {
- return matchResult[1];
- }
-
- matchResult = new RegExp(`^(@[^/]+)/${prefix}-(.+)$`, "u").exec(fullname);
- if (matchResult) {
- return `${matchResult[1]}/${matchResult[2]}`;
- }
- } else if (fullname.startsWith(`${prefix}-`)) {
- return fullname.slice(prefix.length + 1);
- }
-
- return fullname;
-}
-
-/**
- * Gets the scope (namespace) of a term.
- * @param {string} term The term which may have the namespace.
- * @returns {string} The namespace of the term if it has one.
- */
-function getNamespaceFromTerm(term) {
- const match = term.match(NAMESPACE_REGEX);
-
- return match ? match[0] : "";
-}
-
-//------------------------------------------------------------------------------
-// Public Interface
-//------------------------------------------------------------------------------
-
-export {
- normalizePackageName,
- getShorthandName,
- getNamespaceFromTerm
-};
diff --git a/node_modules/@eslint/eslintrc/lib/shared/relative-module-resolver.js b/node_modules/@eslint/eslintrc/lib/shared/relative-module-resolver.js
deleted file mode 100644
index 1df0ca8..0000000
--- a/node_modules/@eslint/eslintrc/lib/shared/relative-module-resolver.js
+++ /dev/null
@@ -1,42 +0,0 @@
-/**
- * Utility for resolving a module relative to another module
- * @author Teddy Katz
- */
-
-import Module from "module";
-
-/*
- * `Module.createRequire` is added in v12.2.0. It supports URL as well.
- * We only support the case where the argument is a filepath, not a URL.
- */
-const createRequire = Module.createRequire;
-
-/**
- * Resolves a Node module relative to another module
- * @param {string} moduleName The name of a Node module, or a path to a Node module.
- * @param {string} relativeToPath An absolute path indicating the module that `moduleName` should be resolved relative to. This must be
- * a file rather than a directory, but the file need not actually exist.
- * @returns {string} The absolute path that would result from calling `require.resolve(moduleName)` in a file located at `relativeToPath`
- */
-function resolve(moduleName, relativeToPath) {
- try {
- return createRequire(relativeToPath).resolve(moduleName);
- } catch (error) {
-
- // This `if` block is for older Node.js than 12.0.0. We can remove this block in the future.
- if (
- typeof error === "object" &&
- error !== null &&
- error.code === "MODULE_NOT_FOUND" &&
- !error.requireStack &&
- error.message.includes(moduleName)
- ) {
- error.message += `\nRequire stack:\n- ${relativeToPath}`;
- }
- throw error;
- }
-}
-
-export {
- resolve
-};
diff --git a/node_modules/@eslint/eslintrc/lib/shared/types.js b/node_modules/@eslint/eslintrc/lib/shared/types.js
deleted file mode 100644
index a32c35e..0000000
--- a/node_modules/@eslint/eslintrc/lib/shared/types.js
+++ /dev/null
@@ -1,149 +0,0 @@
-/**
- * @fileoverview Define common types for input completion.
- * @author Toru Nagashima
- */
-
-/** @type {any} */
-export default {};
-
-/** @typedef {boolean | "off" | "readable" | "readonly" | "writable" | "writeable"} GlobalConf */
-/** @typedef {0 | 1 | 2 | "off" | "warn" | "error"} SeverityConf */
-/** @typedef {SeverityConf | [SeverityConf, ...any[]]} RuleConf */
-
-/**
- * @typedef {Object} EcmaFeatures
- * @property {boolean} [globalReturn] Enabling `return` statements at the top-level.
- * @property {boolean} [jsx] Enabling JSX syntax.
- * @property {boolean} [impliedStrict] Enabling strict mode always.
- */
-
-/**
- * @typedef {Object} ParserOptions
- * @property {EcmaFeatures} [ecmaFeatures] The optional features.
- * @property {3|5|6|7|8|9|10|11|12|2015|2016|2017|2018|2019|2020|2021} [ecmaVersion] The ECMAScript version (or revision number).
- * @property {"script"|"module"} [sourceType] The source code type.
- */
-
-/**
- * @typedef {Object} ConfigData
- * @property {Record} [env] The environment settings.
- * @property {string | string[]} [extends] The path to other config files or the package name of shareable configs.
- * @property {Record} [globals] The global variable settings.
- * @property {string | string[]} [ignorePatterns] The glob patterns that ignore to lint.
- * @property {boolean} [noInlineConfig] The flag that disables directive comments.
- * @property {OverrideConfigData[]} [overrides] The override settings per kind of files.
- * @property {string} [parser] The path to a parser or the package name of a parser.
- * @property {ParserOptions} [parserOptions] The parser options.
- * @property {string[]} [plugins] The plugin specifiers.
- * @property {string} [processor] The processor specifier.
- * @property {boolean} [reportUnusedDisableDirectives] The flag to report unused `eslint-disable` comments.
- * @property {boolean} [root] The root flag.
- * @property {Record} [rules] The rule settings.
- * @property {Object} [settings] The shared settings.
- */
-
-/**
- * @typedef {Object} OverrideConfigData
- * @property {Record} [env] The environment settings.
- * @property {string | string[]} [excludedFiles] The glob pattarns for excluded files.
- * @property {string | string[]} [extends] The path to other config files or the package name of shareable configs.
- * @property {string | string[]} files The glob patterns for target files.
- * @property {Record} [globals] The global variable settings.
- * @property {boolean} [noInlineConfig] The flag that disables directive comments.
- * @property {OverrideConfigData[]} [overrides] The override settings per kind of files.
- * @property {string} [parser] The path to a parser or the package name of a parser.
- * @property {ParserOptions} [parserOptions] The parser options.
- * @property {string[]} [plugins] The plugin specifiers.
- * @property {string} [processor] The processor specifier.
- * @property {boolean} [reportUnusedDisableDirectives] The flag to report unused `eslint-disable` comments.
- * @property {Record} [rules] The rule settings.
- * @property {Object} [settings] The shared settings.
- */
-
-/**
- * @typedef {Object} ParseResult
- * @property {Object} ast The AST.
- * @property {ScopeManager} [scopeManager] The scope manager of the AST.
- * @property {Record} [services] The services that the parser provides.
- * @property {Record} [visitorKeys] The visitor keys of the AST.
- */
-
-/**
- * @typedef {Object} Parser
- * @property {(text:string, options:ParserOptions) => Object} parse The definition of global variables.
- * @property {(text:string, options:ParserOptions) => ParseResult} [parseForESLint] The parser options that will be enabled under this environment.
- */
-
-/**
- * @typedef {Object} Environment
- * @property {Record} [globals] The definition of global variables.
- * @property {ParserOptions} [parserOptions] The parser options that will be enabled under this environment.
- */
-
-/**
- * @typedef {Object} LintMessage
- * @property {number} column The 1-based column number.
- * @property {number} [endColumn] The 1-based column number of the end location.
- * @property {number} [endLine] The 1-based line number of the end location.
- * @property {boolean} fatal If `true` then this is a fatal error.
- * @property {{range:[number,number], text:string}} [fix] Information for autofix.
- * @property {number} line The 1-based line number.
- * @property {string} message The error message.
- * @property {string|null} ruleId The ID of the rule which makes this message.
- * @property {0|1|2} severity The severity of this message.
- * @property {Array<{desc?: string, messageId?: string, fix: {range: [number, number], text: string}}>} [suggestions] Information for suggestions.
- */
-
-/**
- * @typedef {Object} SuggestionResult
- * @property {string} desc A short description.
- * @property {string} [messageId] Id referencing a message for the description.
- * @property {{ text: string, range: number[] }} fix fix result info
- */
-
-/**
- * @typedef {Object} Processor
- * @property {(text:string, filename:string) => Array} [preprocess] The function to extract code blocks.
- * @property {(messagesList:LintMessage[][], filename:string) => LintMessage[]} [postprocess] The function to merge messages.
- * @property {boolean} [supportsAutofix] If `true` then it means the processor supports autofix.
- */
-
-/**
- * @typedef {Object} RuleMetaDocs
- * @property {string} category The category of the rule.
- * @property {string} description The description of the rule.
- * @property {boolean} recommended If `true` then the rule is included in `eslint:recommended` preset.
- * @property {string} url The URL of the rule documentation.
- */
-
-/**
- * @typedef {Object} RuleMeta
- * @property {boolean} [deprecated] If `true` then the rule has been deprecated.
- * @property {RuleMetaDocs} docs The document information of the rule.
- * @property {"code"|"whitespace"} [fixable] The autofix type.
- * @property {Record} [messages] The messages the rule reports.
- * @property {string[]} [replacedBy] The IDs of the alternative rules.
- * @property {Array|Object} schema The option schema of the rule.
- * @property {"problem"|"suggestion"|"layout"} type The rule type.
- */
-
-/**
- * @typedef {Object} Rule
- * @property {Function} create The factory of the rule.
- * @property {RuleMeta} meta The meta data of the rule.
- */
-
-/**
- * @typedef {Object} Plugin
- * @property {Record} [configs] The definition of plugin configs.
- * @property {Record} [environments] The definition of plugin environments.
- * @property {Record} [processors] The definition of plugin processors.
- * @property {Record} [rules] The definition of plugin rules.
- */
-
-/**
- * Information of deprecated rules.
- * @typedef {Object} DeprecatedRuleInfo
- * @property {string} ruleId The rule ID.
- * @property {string[]} replacedBy The rule IDs that replace this deprecated rule.
- */
diff --git a/node_modules/@eslint/eslintrc/package.json b/node_modules/@eslint/eslintrc/package.json
deleted file mode 100644
index aa43e75..0000000
--- a/node_modules/@eslint/eslintrc/package.json
+++ /dev/null
@@ -1,82 +0,0 @@
-{
- "name": "@eslint/eslintrc",
- "version": "2.1.4",
- "description": "The legacy ESLintRC config file format for ESLint",
- "type": "module",
- "main": "./dist/eslintrc.cjs",
- "exports": {
- ".": {
- "import": "./lib/index.js",
- "require": "./dist/eslintrc.cjs"
- },
- "./package.json": "./package.json",
- "./universal": {
- "import": "./lib/index-universal.js",
- "require": "./dist/eslintrc-universal.cjs"
- }
- },
- "files": [
- "lib",
- "conf",
- "LICENSE",
- "dist",
- "universal.js"
- ],
- "publishConfig": {
- "access": "public"
- },
- "scripts": {
- "build": "rollup -c",
- "lint": "eslint . --report-unused-disable-directives",
- "lint:fix": "npm run lint -- --fix",
- "prepare": "npm run build",
- "release:generate:latest": "eslint-generate-release",
- "release:generate:alpha": "eslint-generate-prerelease alpha",
- "release:generate:beta": "eslint-generate-prerelease beta",
- "release:generate:rc": "eslint-generate-prerelease rc",
- "release:publish": "eslint-publish-release",
- "test": "mocha -R progress -c 'tests/lib/*.cjs' && c8 mocha -R progress -c 'tests/lib/**/*.js'"
- },
- "repository": "eslint/eslintrc",
- "funding": "https://opencollective.com/eslint",
- "keywords": [
- "ESLint",
- "ESLintRC",
- "Configuration"
- ],
- "author": "Nicholas C. Zakas",
- "license": "MIT",
- "bugs": {
- "url": "https://github.com/eslint/eslintrc/issues"
- },
- "homepage": "https://github.com/eslint/eslintrc#readme",
- "devDependencies": {
- "c8": "^7.7.3",
- "chai": "^4.3.4",
- "eslint": "^7.31.0",
- "eslint-config-eslint": "^7.0.0",
- "eslint-plugin-jsdoc": "^35.4.1",
- "eslint-plugin-node": "^11.1.0",
- "eslint-release": "^3.2.0",
- "fs-teardown": "^0.1.3",
- "mocha": "^9.0.3",
- "rollup": "^2.70.1",
- "shelljs": "^0.8.4",
- "sinon": "^11.1.2",
- "temp-dir": "^2.0.0"
- },
- "dependencies": {
- "ajv": "^6.12.4",
- "debug": "^4.3.2",
- "espree": "^9.6.0",
- "globals": "^13.19.0",
- "ignore": "^5.2.0",
- "import-fresh": "^3.2.1",
- "js-yaml": "^4.1.0",
- "minimatch": "^3.1.2",
- "strip-json-comments": "^3.1.1"
- },
- "engines": {
- "node": "^12.22.0 || ^14.17.0 || >=16.0.0"
- }
-}
diff --git a/node_modules/@eslint/eslintrc/universal.js b/node_modules/@eslint/eslintrc/universal.js
deleted file mode 100644
index 4e1846e..0000000
--- a/node_modules/@eslint/eslintrc/universal.js
+++ /dev/null
@@ -1,9 +0,0 @@
-// Jest (and probably some other runtimes with custom implementations of
-// `require`) doesn't support `exports` in `package.json`, so this file is here
-// to help them load this module. Note that it is also `.js` and not `.cjs` for
-// the same reason - `cjs` files requires to be loaded with an extension, but
-// since Jest doesn't respect `module` outside of ESM mode it still works in
-// this case (and the `require` in _this_ file does specify the extension).
-
-// eslint-disable-next-line no-undef
-module.exports = require("./dist/eslintrc-universal.cjs");
diff --git a/node_modules/@eslint/js/README.md b/node_modules/@eslint/js/README.md
index a8121c3..eae3d22 100644
--- a/node_modules/@eslint/js/README.md
+++ b/node_modules/@eslint/js/README.md
@@ -1,20 +1,54 @@
[](https://www.npmjs.com/package/@eslint/js)
+[](https://www.npmjs.com/package/@eslint/js)
+[](https://github.com/eslint/eslint/actions)
+
+[](https://opencollective.com/eslint)
+[](https://opencollective.com/eslint)
# ESLint JavaScript Plugin
-[Website](https://eslint.org) | [Configure ESLint](https://eslint.org/docs/latest/use/configure) | [Rules](https://eslint.org/docs/rules/) | [Contributing](https://eslint.org/docs/latest/contribute) | [Twitter](https://twitter.com/geteslint) | [Chatroom](https://eslint.org/chat)
+[Website](https://eslint.org) |
+[Configure ESLint](https://eslint.org/docs/latest/use/configure) |
+[Rules](https://eslint.org/docs/rules/) |
+[Contribute to ESLint](https://eslint.org/docs/latest/contribute) |
+[Report Bugs](https://eslint.org/docs/latest/contribute/report-bugs) |
+[Code of Conduct](https://eslint.org/conduct) |
+[X](https://x.com/geteslint) |
+[Discord](https://eslint.org/chat) |
+[Mastodon](https://fosstodon.org/@eslint) |
+[Bluesky](https://bsky.app/profile/eslint.org)
The beginnings of separating out JavaScript-specific functionality from ESLint.
Right now, this plugin contains two configurations:
-* `recommended` - enables the rules recommended by the ESLint team (the replacement for `"eslint:recommended"`)
-* `all` - enables all ESLint rules (the replacement for `"eslint:all"`)
+- `recommended` - enables the rules recommended by the ESLint team (the replacement for `"eslint:recommended"`)
+- `all` - enables all ESLint rules (the replacement for `"eslint:all"`)
## Installation
+You can install ESLint using npm or other package managers:
+
+```shell
+npm install eslint -D
+# or
+yarn add eslint -D
+# or
+pnpm install eslint -D
+# or
+bun add eslint -D
+```
+
+Then install this plugin:
+
```shell
npm install @eslint/js -D
+# or
+yarn add @eslint/js -D
+# or
+pnpm install @eslint/js -D
+# or
+bun add @eslint/js -D
```
## Usage
@@ -22,34 +56,46 @@ npm install @eslint/js -D
Use in your `eslint.config.js` file anytime you want to extend one of the configs:
```js
+import { defineConfig } from "eslint/config";
import js from "@eslint/js";
-export default [
-
- // apply recommended rules to JS files
- {
- files: ["**/*.js"],
- rules: js.configs.recommended.rules
- },
-
- // apply recommended rules to JS files with an override
- {
- files: ["**/*.js"],
- rules: {
- ...js.configs.recommended.rules,
- "no-unused-vars": "warn"
- }
- },
-
- // apply all rules to JS files
- {
- files: ["**/*.js"],
- rules: {
- ...js.configs.all.rules,
- "no-unused-vars": "warn"
- }
- }
-]
+export default defineConfig([
+ // apply recommended rules to JS files
+ {
+ name: "your-project/recommended-rules",
+ files: ["**/*.js"],
+ plugins: {
+ js,
+ },
+ extends: ["js/recommended"],
+ },
+
+ // apply recommended rules to JS files with an override
+ {
+ name: "your-project/recommended-rules-with-override",
+ files: ["**/*.js"],
+ plugins: {
+ js,
+ },
+ extends: ["js/recommended"],
+ rules: {
+ "no-unused-vars": "warn",
+ },
+ },
+
+ // apply all rules to JS files
+ {
+ name: "your-project/all-rules",
+ files: ["**/*.js"],
+ plugins: {
+ js,
+ },
+ extends: ["js/all"],
+ rules: {
+ "no-unused-vars": "warn",
+ },
+ },
+]);
```
## License
diff --git a/node_modules/@eslint/js/package.json b/node_modules/@eslint/js/package.json
index e9ec6a2..3a86691 100644
--- a/node_modules/@eslint/js/package.json
+++ b/node_modules/@eslint/js/package.json
@@ -1,13 +1,18 @@
{
"name": "@eslint/js",
- "version": "8.57.1",
+ "version": "10.0.1",
"description": "ESLint JavaScript language implementation",
+ "funding": "https://eslint.org/donate",
"main": "./src/index.js",
- "scripts": {},
+ "types": "./types/index.d.ts",
+ "scripts": {
+ "test:types": "tsc -p tests/types/tsconfig.json"
+ },
"files": [
"LICENSE",
"README.md",
- "src"
+ "src",
+ "types"
],
"publishConfig": {
"access": "public"
@@ -25,7 +30,15 @@
"eslint"
],
"license": "MIT",
+ "peerDependencies": {
+ "eslint": "^10.0.0"
+ },
+ "peerDependenciesMeta": {
+ "eslint": {
+ "optional": true
+ }
+ },
"engines": {
- "node": "^12.22.0 || ^14.17.0 || >=16.0.0"
+ "node": "^20.19.0 || ^22.13.0 || >=24"
}
}
diff --git a/node_modules/@eslint/js/src/configs/eslint-all.js b/node_modules/@eslint/js/src/configs/eslint-all.js
index f2f7a66..43ee2ae 100644
--- a/node_modules/@eslint/js/src/configs/eslint-all.js
+++ b/node_modules/@eslint/js/src/configs/eslint-all.js
@@ -4,10 +4,9 @@
*/
"use strict";
-/* eslint quote-props: off -- autogenerated so don't lint */
-
module.exports = Object.freeze({
- "rules": {
+ name: "@eslint/js/all",
+ rules: Object.freeze({
"accessor-pairs": "error",
"array-callback-return": "error",
"arrow-body-style": "error",
@@ -36,7 +35,6 @@ module.exports = Object.freeze({
"id-length": "error",
"id-match": "error",
"init-declarations": "error",
- "line-comment-position": "error",
"logical-assignment-operators": "error",
"max-classes-per-file": "error",
"max-depth": "error",
@@ -45,7 +43,6 @@ module.exports = Object.freeze({
"max-nested-callbacks": "error",
"max-params": "error",
"max-statements": "error",
- "multiline-comment-style": "error",
"new-cap": "error",
"no-alert": "error",
"no-array-constructor": "error",
@@ -114,7 +111,6 @@ module.exports = Object.freeze({
"no-new": "error",
"no-new-func": "error",
"no-new-native-nonconstructor": "error",
- "no-new-symbol": "error",
"no-new-wrappers": "error",
"no-nonoctal-decimal-escape": "error",
"no-obj-calls": "error",
@@ -146,6 +142,7 @@ module.exports = Object.freeze({
"no-ternary": "error",
"no-this-before-super": "error",
"no-throw-literal": "error",
+ "no-unassigned-vars": "error",
"no-undef": "error",
"no-undef-init": "error",
"no-undefined": "error",
@@ -163,6 +160,7 @@ module.exports = Object.freeze({
"no-unused-private-class-members": "error",
"no-unused-vars": "error",
"no-use-before-define": "error",
+ "no-useless-assignment": "error",
"no-useless-backreference": "error",
"no-useless-call": "error",
"no-useless-catch": "error",
@@ -192,6 +190,7 @@ module.exports = Object.freeze({
"prefer-rest-params": "error",
"prefer-spread": "error",
"prefer-template": "error",
+ "preserve-caught-error": "error",
"radix": "error",
"require-atomic-updates": "error",
"require-await": "error",
@@ -207,5 +206,5 @@ module.exports = Object.freeze({
"valid-typeof": "error",
"vars-on-top": "error",
"yoda": "error"
- }
+ })
});
diff --git a/node_modules/@eslint/js/src/configs/eslint-recommended.js b/node_modules/@eslint/js/src/configs/eslint-recommended.js
index 248c613..fb27b4f 100644
--- a/node_modules/@eslint/js/src/configs/eslint-recommended.js
+++ b/node_modules/@eslint/js/src/configs/eslint-recommended.js
@@ -1,15 +1,11 @@
-/**
- * @fileoverview Configuration applied when a user configuration extends from
- * eslint:recommended.
- * @author Nicholas C. Zakas
+/*
+ * WARNING: This file is autogenerated using the tools/update-eslint-recommended.js
+ * script. Do not edit manually.
*/
-
"use strict";
-/* eslint sort-keys: ["error", "asc"] -- Long, so make more readable */
-
-/** @type {import("../lib/shared/types").ConfigData} */
module.exports = Object.freeze({
+ name: "@eslint/js/recommended",
rules: Object.freeze({
"constructor-super": "error",
"for-direction": "error",
@@ -20,6 +16,7 @@ module.exports = Object.freeze({
"no-compare-neg-zero": "error",
"no-cond-assign": "error",
"no-const-assign": "error",
+ "no-constant-binary-expression": "error",
"no-constant-condition": "error",
"no-control-regex": "error",
"no-debugger": "error",
@@ -32,20 +29,18 @@ module.exports = Object.freeze({
"no-empty": "error",
"no-empty-character-class": "error",
"no-empty-pattern": "error",
+ "no-empty-static-block": "error",
"no-ex-assign": "error",
"no-extra-boolean-cast": "error",
- "no-extra-semi": "error",
"no-fallthrough": "error",
"no-func-assign": "error",
"no-global-assign": "error",
"no-import-assign": "error",
- "no-inner-declarations": "error",
"no-invalid-regexp": "error",
"no-irregular-whitespace": "error",
"no-loss-of-precision": "error",
"no-misleading-character-class": "error",
- "no-mixed-spaces-and-tabs": "error",
- "no-new-symbol": "error",
+ "no-new-native-nonconstructor": "error",
"no-nonoctal-decimal-escape": "error",
"no-obj-calls": "error",
"no-octal": "error",
@@ -57,6 +52,7 @@ module.exports = Object.freeze({
"no-shadow-restricted-names": "error",
"no-sparse-arrays": "error",
"no-this-before-super": "error",
+ "no-unassigned-vars": "error",
"no-undef": "error",
"no-unexpected-multiline": "error",
"no-unreachable": "error",
@@ -64,13 +60,16 @@ module.exports = Object.freeze({
"no-unsafe-negation": "error",
"no-unsafe-optional-chaining": "error",
"no-unused-labels": "error",
+ "no-unused-private-class-members": "error",
"no-unused-vars": "error",
+ "no-useless-assignment": "error",
"no-useless-backreference": "error",
"no-useless-catch": "error",
"no-useless-escape": "error",
"no-with": "error",
+ "preserve-caught-error": "error",
"require-yield": "error",
"use-isnan": "error",
"valid-typeof": "error"
- })
+ }),
});
diff --git a/node_modules/@eslint/js/src/index.js b/node_modules/@eslint/js/src/index.js
index 0d4be48..ff6a21d 100644
--- a/node_modules/@eslint/js/src/index.js
+++ b/node_modules/@eslint/js/src/index.js
@@ -5,13 +5,19 @@
"use strict";
+const { name, version } = require("../package.json");
+
//------------------------------------------------------------------------------
// Public Interface
//------------------------------------------------------------------------------
module.exports = {
- configs: {
- all: require("./configs/eslint-all"),
- recommended: require("./configs/eslint-recommended")
- }
+ meta: {
+ name,
+ version,
+ },
+ configs: {
+ all: require("./configs/eslint-all"),
+ recommended: require("./configs/eslint-recommended"),
+ },
};
diff --git a/node_modules/@humanwhocodes/config-array/LICENSE b/node_modules/@humanwhocodes/config-array/LICENSE
deleted file mode 100644
index 261eeb9..0000000
--- a/node_modules/@humanwhocodes/config-array/LICENSE
+++ /dev/null
@@ -1,201 +0,0 @@
- Apache License
- Version 2.0, January 2004
- http://www.apache.org/licenses/
-
- TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
-
- 1. Definitions.
-
- "License" shall mean the terms and conditions for use, reproduction,
- and distribution as defined by Sections 1 through 9 of this document.
-
- "Licensor" shall mean the copyright owner or entity authorized by
- the copyright owner that is granting the License.
-
- "Legal Entity" shall mean the union of the acting entity and all
- other entities that control, are controlled by, or are under common
- control with that entity. For the purposes of this definition,
- "control" means (i) the power, direct or indirect, to cause the
- direction or management of such entity, whether by contract or
- otherwise, or (ii) ownership of fifty percent (50%) or more of the
- outstanding shares, or (iii) beneficial ownership of such entity.
-
- "You" (or "Your") shall mean an individual or Legal Entity
- exercising permissions granted by this License.
-
- "Source" form shall mean the preferred form for making modifications,
- including but not limited to software source code, documentation
- source, and configuration files.
-
- "Object" form shall mean any form resulting from mechanical
- transformation or translation of a Source form, including but
- not limited to compiled object code, generated documentation,
- and conversions to other media types.
-
- "Work" shall mean the work of authorship, whether in Source or
- Object form, made available under the License, as indicated by a
- copyright notice that is included in or attached to the work
- (an example is provided in the Appendix below).
-
- "Derivative Works" shall mean any work, whether in Source or Object
- form, that is based on (or derived from) the Work and for which the
- editorial revisions, annotations, elaborations, or other modifications
- represent, as a whole, an original work of authorship. For the purposes
- of this License, Derivative Works shall not include works that remain
- separable from, or merely link (or bind by name) to the interfaces of,
- the Work and Derivative Works thereof.
-
- "Contribution" shall mean any work of authorship, including
- the original version of the Work and any modifications or additions
- to that Work or Derivative Works thereof, that is intentionally
- submitted to Licensor for inclusion in the Work by the copyright owner
- or by an individual or Legal Entity authorized to submit on behalf of
- the copyright owner. For the purposes of this definition, "submitted"
- means any form of electronic, verbal, or written communication sent
- to the Licensor or its representatives, including but not limited to
- communication on electronic mailing lists, source code control systems,
- and issue tracking systems that are managed by, or on behalf of, the
- Licensor for the purpose of discussing and improving the Work, but
- excluding communication that is conspicuously marked or otherwise
- designated in writing by the copyright owner as "Not a Contribution."
-
- "Contributor" shall mean Licensor and any individual or Legal Entity
- on behalf of whom a Contribution has been received by Licensor and
- subsequently incorporated within the Work.
-
- 2. Grant of Copyright License. Subject to the terms and conditions of
- this License, each Contributor hereby grants to You a perpetual,
- worldwide, non-exclusive, no-charge, royalty-free, irrevocable
- copyright license to reproduce, prepare Derivative Works of,
- publicly display, publicly perform, sublicense, and distribute the
- Work and such Derivative Works in Source or Object form.
-
- 3. Grant of Patent License. Subject to the terms and conditions of
- this License, each Contributor hereby grants to You a perpetual,
- worldwide, non-exclusive, no-charge, royalty-free, irrevocable
- (except as stated in this section) patent license to make, have made,
- use, offer to sell, sell, import, and otherwise transfer the Work,
- where such license applies only to those patent claims licensable
- by such Contributor that are necessarily infringed by their
- Contribution(s) alone or by combination of their Contribution(s)
- with the Work to which such Contribution(s) was submitted. If You
- institute patent litigation against any entity (including a
- cross-claim or counterclaim in a lawsuit) alleging that the Work
- or a Contribution incorporated within the Work constitutes direct
- or contributory patent infringement, then any patent licenses
- granted to You under this License for that Work shall terminate
- as of the date such litigation is filed.
-
- 4. Redistribution. You may reproduce and distribute copies of the
- Work or Derivative Works thereof in any medium, with or without
- modifications, and in Source or Object form, provided that You
- meet the following conditions:
-
- (a) You must give any other recipients of the Work or
- Derivative Works a copy of this License; and
-
- (b) You must cause any modified files to carry prominent notices
- stating that You changed the files; and
-
- (c) You must retain, in the Source form of any Derivative Works
- that You distribute, all copyright, patent, trademark, and
- attribution notices from the Source form of the Work,
- excluding those notices that do not pertain to any part of
- the Derivative Works; and
-
- (d) If the Work includes a "NOTICE" text file as part of its
- distribution, then any Derivative Works that You distribute must
- include a readable copy of the attribution notices contained
- within such NOTICE file, excluding those notices that do not
- pertain to any part of the Derivative Works, in at least one
- of the following places: within a NOTICE text file distributed
- as part of the Derivative Works; within the Source form or
- documentation, if provided along with the Derivative Works; or,
- within a display generated by the Derivative Works, if and
- wherever such third-party notices normally appear. The contents
- of the NOTICE file are for informational purposes only and
- do not modify the License. You may add Your own attribution
- notices within Derivative Works that You distribute, alongside
- or as an addendum to the NOTICE text from the Work, provided
- that such additional attribution notices cannot be construed
- as modifying the License.
-
- You may add Your own copyright statement to Your modifications and
- may provide additional or different license terms and conditions
- for use, reproduction, or distribution of Your modifications, or
- for any such Derivative Works as a whole, provided Your use,
- reproduction, and distribution of the Work otherwise complies with
- the conditions stated in this License.
-
- 5. Submission of Contributions. Unless You explicitly state otherwise,
- any Contribution intentionally submitted for inclusion in the Work
- by You to the Licensor shall be under the terms and conditions of
- this License, without any additional terms or conditions.
- Notwithstanding the above, nothing herein shall supersede or modify
- the terms of any separate license agreement you may have executed
- with Licensor regarding such Contributions.
-
- 6. Trademarks. This License does not grant permission to use the trade
- names, trademarks, service marks, or product names of the Licensor,
- except as required for reasonable and customary use in describing the
- origin of the Work and reproducing the content of the NOTICE file.
-
- 7. Disclaimer of Warranty. Unless required by applicable law or
- agreed to in writing, Licensor provides the Work (and each
- Contributor provides its Contributions) on an "AS IS" BASIS,
- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
- implied, including, without limitation, any warranties or conditions
- of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
- PARTICULAR PURPOSE. You are solely responsible for determining the
- appropriateness of using or redistributing the Work and assume any
- risks associated with Your exercise of permissions under this License.
-
- 8. Limitation of Liability. In no event and under no legal theory,
- whether in tort (including negligence), contract, or otherwise,
- unless required by applicable law (such as deliberate and grossly
- negligent acts) or agreed to in writing, shall any Contributor be
- liable to You for damages, including any direct, indirect, special,
- incidental, or consequential damages of any character arising as a
- result of this License or out of the use or inability to use the
- Work (including but not limited to damages for loss of goodwill,
- work stoppage, computer failure or malfunction, or any and all
- other commercial damages or losses), even if such Contributor
- has been advised of the possibility of such damages.
-
- 9. Accepting Warranty or Additional Liability. While redistributing
- the Work or Derivative Works thereof, You may choose to offer,
- and charge a fee for, acceptance of support, warranty, indemnity,
- or other liability obligations and/or rights consistent with this
- License. However, in accepting such obligations, You may act only
- on Your own behalf and on Your sole responsibility, not on behalf
- of any other Contributor, and only if You agree to indemnify,
- defend, and hold each Contributor harmless for any liability
- incurred by, or claims asserted against, such Contributor by reason
- of your accepting any such warranty or additional liability.
-
- END OF TERMS AND CONDITIONS
-
- APPENDIX: How to apply the Apache License to your work.
-
- To apply the Apache License to your work, attach the following
- boilerplate notice, with the fields enclosed by brackets "[]"
- replaced with your own identifying information. (Don't include
- the brackets!) The text should be enclosed in the appropriate
- comment syntax for the file format. We also recommend that a
- file or class name and description of purpose be included on the
- same "printed page" as the copyright notice for easier
- identification within third-party archives.
-
- Copyright [yyyy] [name of copyright owner]
-
- Licensed under the Apache License, Version 2.0 (the "License");
- you may not use this file except in compliance with the License.
- You may obtain a copy of the License at
-
- http://www.apache.org/licenses/LICENSE-2.0
-
- Unless required by applicable law or agreed to in writing, software
- distributed under the License is distributed on an "AS IS" BASIS,
- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- See the License for the specific language governing permissions and
- limitations under the License.
diff --git a/node_modules/@humanwhocodes/config-array/README.md b/node_modules/@humanwhocodes/config-array/README.md
deleted file mode 100644
index d64784c..0000000
--- a/node_modules/@humanwhocodes/config-array/README.md
+++ /dev/null
@@ -1,342 +0,0 @@
-# Config Array
-
-by [Nicholas C. Zakas](https://humanwhocodes.com)
-
-If you find this useful, please consider supporting my work with a [donation](https://humanwhocodes.com/donate).
-
-## Description
-
-A config array is a way of managing configurations that are based on glob pattern matching of filenames. Each config array contains the information needed to determine the correct configuration for any file based on the filename.
-
-## Background
-
-In 2019, I submitted an [ESLint RFC](https://github.com/eslint/rfcs/pull/9) proposing a new way of configuring ESLint. The goal was to streamline what had become an increasingly complicated configuration process. Over several iterations, this proposal was eventually born.
-
-The basic idea is that all configuration, including overrides, can be represented by a single array where each item in the array is a config object. Config objects appearing later in the array override config objects appearing earlier in the array. You can calculate a config for a given file by traversing all config objects in the array to find the ones that match the filename. Matching is done by specifying glob patterns in `files` and `ignores` properties on each config object. Here's an example:
-
-```js
-export default [
-
- // match all JSON files
- {
- name: "JSON Handler",
- files: ["**/*.json"],
- handler: jsonHandler
- },
-
- // match only package.json
- {
- name: "package.json Handler",
- files: ["package.json"],
- handler: packageJsonHandler
- }
-];
-```
-
-In this example, there are two config objects: the first matches all JSON files in all directories and the second matches just `package.json` in the base path directory (all the globs are evaluated as relative to a base path that can be specified). When you retrieve a configuration for `foo.json`, only the first config object matches so `handler` is equal to `jsonHandler`; when you retrieve a configuration for `package.json`, `handler` is equal to `packageJsonHandler` (because both config objects match, the second one wins).
-
-## Installation
-
-You can install the package using npm or Yarn:
-
-```bash
-npm install @humanwhocodes/config-array --save
-
-# or
-
-yarn add @humanwhocodes/config-array
-```
-
-## Usage
-
-First, import the `ConfigArray` constructor:
-
-```js
-import { ConfigArray } from "@humanwhocodes/config-array";
-
-// or using CommonJS
-
-const { ConfigArray } = require("@humanwhocodes/config-array");
-```
-
-When you create a new instance of `ConfigArray`, you must pass in two arguments: an array of configs and an options object. The array of configs is most likely read in from a configuration file, so here's a typical example:
-
-```js
-const configFilename = path.resolve(process.cwd(), "my.config.js");
-const { default: rawConfigs } = await import(configFilename);
-const configs = new ConfigArray(rawConfigs, {
-
- // the path to match filenames from
- basePath: process.cwd(),
-
- // additional items in each config
- schema: mySchema
-});
-```
-
-This example reads in an object or array from `my.config.js` and passes it into the `ConfigArray` constructor as the first argument. The second argument is an object specifying the `basePath` (the directory in which `my.config.js` is found) and a `schema` to define the additional properties of a config object beyond `files`, `ignores`, and `name`.
-
-### Specifying a Schema
-
-The `schema` option is required for you to use additional properties in config objects. The schema is an object that follows the format of an [`ObjectSchema`](https://npmjs.com/package/@humanwhocodes/object-schema). The schema specifies both validation and merge rules that the `ConfigArray` instance needs to combine configs when there are multiple matches. Here's an example:
-
-```js
-const configFilename = path.resolve(process.cwd(), "my.config.js");
-const { default: rawConfigs } = await import(configFilename);
-
-const mySchema = {
-
- // define the handler key in configs
- handler: {
- required: true,
- merge(a, b) {
- if (!b) return a;
- if (!a) return b;
- },
- validate(value) {
- if (typeof value !== "function") {
- throw new TypeError("Function expected.");
- }
- }
- }
-};
-
-const configs = new ConfigArray(rawConfigs, {
-
- // the path to match filenames from
- basePath: process.cwd(),
-
- // additional item schemas in each config
- schema: mySchema,
-
- // additional config types supported (default: [])
- extraConfigTypes: ["array", "function"];
-});
-```
-
-### Config Arrays
-
-Config arrays can be multidimensional, so it's possible for a config array to contain another config array when `extraConfigTypes` contains `"array"`, such as:
-
-```js
-export default [
-
- // JS config
- {
- files: ["**/*.js"],
- handler: jsHandler
- },
-
- // JSON configs
- [
-
- // match all JSON files
- {
- name: "JSON Handler",
- files: ["**/*.json"],
- handler: jsonHandler
- },
-
- // match only package.json
- {
- name: "package.json Handler",
- files: ["package.json"],
- handler: packageJsonHandler
- }
- ],
-
- // filename must match function
- {
- files: [ filePath => filePath.endsWith(".md") ],
- handler: markdownHandler
- },
-
- // filename must match all patterns in subarray
- {
- files: [ ["*.test.*", "*.js"] ],
- handler: jsTestHandler
- },
-
- // filename must not match patterns beginning with !
- {
- name: "Non-JS files",
- files: ["!*.js"],
- settings: {
- js: false
- }
- }
-];
-```
-
-In this example, the array contains both config objects and a config array. When a config array is normalized (see details below), it is flattened so only config objects remain. However, the order of evaluation remains the same.
-
-If the `files` array contains a function, then that function is called with the absolute path of the file and is expected to return `true` if there is a match and `false` if not. (The `ignores` array can also contain functions.)
-
-If the `files` array contains an item that is an array of strings and functions, then all patterns must match in order for the config to match. In the preceding examples, both `*.test.*` and `*.js` must match in order for the config object to be used.
-
-If a pattern in the files array begins with `!` then it excludes that pattern. In the preceding example, any filename that doesn't end with `.js` will automatically get a `settings.js` property set to `false`.
-
-You can also specify an `ignores` key that will force files matching those patterns to not be included. If the `ignores` key is in a config object without any other keys, then those ignores will always be applied; otherwise those ignores act as exclusions. Here's an example:
-
-```js
-export default [
-
- // Always ignored
- {
- ignores: ["**/.git/**", "**/node_modules/**"]
- },
-
- // .eslintrc.js file is ignored only when .js file matches
- {
- files: ["**/*.js"],
- ignores: [".eslintrc.js"]
- handler: jsHandler
- }
-];
-```
-
-You can use negated patterns in `ignores` to exclude a file that was already ignored, such as:
-
-```js
-export default [
-
- // Ignore all JSON files except tsconfig.json
- {
- files: ["**/*"],
- ignores: ["**/*.json", "!tsconfig.json"]
- },
-
-];
-```
-
-### Config Functions
-
-Config arrays can also include config functions when `extraConfigTypes` contains `"function"`. A config function accepts a single parameter, `context` (defined by you), and must return either a config object or a config array (it cannot return another function). Config functions allow end users to execute code in the creation of appropriate config objects. Here's an example:
-
-```js
-export default [
-
- // JS config
- {
- files: ["**/*.js"],
- handler: jsHandler
- },
-
- // JSON configs
- function (context) {
- return [
-
- // match all JSON files
- {
- name: context.name + " JSON Handler",
- files: ["**/*.json"],
- handler: jsonHandler
- },
-
- // match only package.json
- {
- name: context.name + " package.json Handler",
- files: ["package.json"],
- handler: packageJsonHandler
- }
- ];
- }
-];
-```
-
-When a config array is normalized, each function is executed and replaced in the config array with the return value.
-
-**Note:** Config functions can also be async.
-
-### Normalizing Config Arrays
-
-Once a config array has been created and loaded with all of the raw config data, it must be normalized before it can be used. The normalization process goes through and flattens the config array as well as executing all config functions to get their final values.
-
-To normalize a config array, call the `normalize()` method and pass in a context object:
-
-```js
-await configs.normalize({
- name: "MyApp"
-});
-```
-
-The `normalize()` method returns a promise, so be sure to use the `await` operator. The config array instance is normalized in-place, so you don't need to create a new variable.
-
-If you want to disallow async config functions, you can call `normalizeSync()` instead. This method is completely synchronous and does not require using the `await` operator as it does not return a promise:
-
-```js
-await configs.normalizeSync({
- name: "MyApp"
-});
-```
-
-**Important:** Once a `ConfigArray` is normalized, it cannot be changed further. You can, however, create a new `ConfigArray` and pass in the normalized instance to create an unnormalized copy.
-
-### Getting Config for a File
-
-To get the config for a file, use the `getConfig()` method on a normalized config array and pass in the filename to get a config for:
-
-```js
-// pass in absolute filename
-const fileConfig = configs.getConfig(path.resolve(process.cwd(), "package.json"));
-```
-
-The config array always returns an object, even if there are no configs matching the given filename. You can then inspect the returned config object to determine how to proceed.
-
-A few things to keep in mind:
-
-* You must pass in the absolute filename to get a config for.
-* The returned config object never has `files`, `ignores`, or `name` properties; the only properties on the object will be the other configuration options specified.
-* The config array caches configs, so subsequent calls to `getConfig()` with the same filename will return in a fast lookup rather than another calculation.
-* A config will only be generated if the filename matches an entry in a `files` key. A config will not be generated without matching a `files` key (configs without a `files` key are only applied when another config with a `files` key is applied; configs without `files` are never applied on their own). Any config with a `files` key entry ending with `/**` or `/*` will only be applied if another entry in the same `files` key matches or another config matches.
-
-## Determining Ignored Paths
-
-You can determine if a file is ignored by using the `isFileIgnored()` method and passing in the absolute path of any file, as in this example:
-
-```js
-const ignored = configs.isFileIgnored('/foo/bar/baz.txt');
-```
-
-A file is considered ignored if any of the following is true:
-
-* **It's parent directory is ignored.** For example, if `foo` is in `ignores`, then `foo/a.js` is considered ignored.
-* **It has an ancestor directory that is ignored.** For example, if `foo` is in `ignores`, then `foo/baz/a.js` is considered ignored.
-* **It matches an ignored file pattern.** For example, if `**/a.js` is in `ignores`, then `foo/a.js` and `foo/baz/a.js` are considered ignored.
-* **If it matches an entry in `files` and also in `ignores`.** For example, if `**/*.js` is in `files` and `**/a.js` is in `ignores`, then `foo/a.js` and `foo/baz/a.js` are considered ignored.
-* **The file is outside the `basePath`.** If the `basePath` is `/usr/me`, then `/foo/a.js` is considered ignored.
-
-For directories, use the `isDirectoryIgnored()` method and pass in the absolute path of any directory, as in this example:
-
-```js
-const ignored = configs.isDirectoryIgnored('/foo/bar/');
-```
-
-A directory is considered ignored if any of the following is true:
-
-* **It's parent directory is ignored.** For example, if `foo` is in `ignores`, then `foo/baz` is considered ignored.
-* **It has an ancestor directory that is ignored.** For example, if `foo` is in `ignores`, then `foo/bar/baz/a.js` is considered ignored.
-* **It matches and ignored file pattern.** For example, if `**/a.js` is in `ignores`, then `foo/a.js` and `foo/baz/a.js` are considered ignored.
-* **If it matches an entry in `files` and also in `ignores`.** For example, if `**/*.js` is in `files` and `**/a.js` is in `ignores`, then `foo/a.js` and `foo/baz/a.js` are considered ignored.
-* **The file is outside the `basePath`.** If the `basePath` is `/usr/me`, then `/foo/a.js` is considered ignored.
-
-**Important:** A pattern such as `foo/**` means that `foo` and `foo/` are *not* ignored whereas `foo/bar` is ignored. If you want to ignore `foo` and all of its subdirectories, use the pattern `foo` or `foo/` in `ignores`.
-
-## Caching Mechanisms
-
-Each `ConfigArray` aggressively caches configuration objects to avoid unnecessary work. This caching occurs in two ways:
-
-1. **File-based Caching.** For each filename that is passed into a method, the resulting config is cached against that filename so you're always guaranteed to get the same object returned from `getConfig()` whenever you pass the same filename in.
-2. **Index-based Caching.** Whenever a config is calculated, the config elements that were used to create the config are also cached. So if a given filename matches elements 1, 5, and 7, the resulting config is cached with a key of `1,5,7`. That way, if another file is passed that matches the same config elements, the result is already known and doesn't have to be recalculated. That means two files that match all the same elements will return the same config from `getConfig()`.
-
-## Acknowledgements
-
-The design of this project was influenced by feedback on the ESLint RFC, and incorporates ideas from:
-
-* Teddy Katz (@not-an-aardvark)
-* Toru Nagashima (@mysticatea)
-* Kai Cataldo (@kaicataldo)
-
-## License
-
-Apache 2.0
diff --git a/node_modules/@humanwhocodes/config-array/api.js b/node_modules/@humanwhocodes/config-array/api.js
deleted file mode 100644
index 88c9619..0000000
--- a/node_modules/@humanwhocodes/config-array/api.js
+++ /dev/null
@@ -1,1128 +0,0 @@
-'use strict';
-
-var path = require('path');
-var minimatch = require('minimatch');
-var createDebug = require('debug');
-var objectSchema = require('@humanwhocodes/object-schema');
-
-/**
- * @fileoverview ConfigSchema
- * @author Nicholas C. Zakas
- */
-
-//------------------------------------------------------------------------------
-// Helpers
-//------------------------------------------------------------------------------
-
-const NOOP_STRATEGY = {
- required: false,
- merge() {
- return undefined;
- },
- validate() { }
-};
-
-//------------------------------------------------------------------------------
-// Exports
-//------------------------------------------------------------------------------
-
-/**
- * The base schema that every ConfigArray uses.
- * @type Object
- */
-const baseSchema = Object.freeze({
- name: {
- required: false,
- merge() {
- return undefined;
- },
- validate(value) {
- if (typeof value !== 'string') {
- throw new TypeError('Property must be a string.');
- }
- }
- },
- files: NOOP_STRATEGY,
- ignores: NOOP_STRATEGY
-});
-
-/**
- * @fileoverview ConfigSchema
- * @author Nicholas C. Zakas
- */
-
-//------------------------------------------------------------------------------
-// Helpers
-//------------------------------------------------------------------------------
-
-/**
- * Asserts that a given value is an array.
- * @param {*} value The value to check.
- * @returns {void}
- * @throws {TypeError} When the value is not an array.
- */
-function assertIsArray(value) {
- if (!Array.isArray(value)) {
- throw new TypeError('Expected value to be an array.');
- }
-}
-
-/**
- * Asserts that a given value is an array containing only strings and functions.
- * @param {*} value The value to check.
- * @returns {void}
- * @throws {TypeError} When the value is not an array of strings and functions.
- */
-function assertIsArrayOfStringsAndFunctions(value, name) {
- assertIsArray(value);
-
- if (value.some(item => typeof item !== 'string' && typeof item !== 'function')) {
- throw new TypeError('Expected array to only contain strings and functions.');
- }
-}
-
-/**
- * Asserts that a given value is a non-empty array.
- * @param {*} value The value to check.
- * @returns {void}
- * @throws {TypeError} When the value is not an array or an empty array.
- */
-function assertIsNonEmptyArray(value) {
- if (!Array.isArray(value) || value.length === 0) {
- throw new TypeError('Expected value to be a non-empty array.');
- }
-}
-
-//------------------------------------------------------------------------------
-// Exports
-//------------------------------------------------------------------------------
-
-/**
- * The schema for `files` and `ignores` that every ConfigArray uses.
- * @type Object
- */
-const filesAndIgnoresSchema = Object.freeze({
- files: {
- required: false,
- merge() {
- return undefined;
- },
- validate(value) {
-
- // first check if it's an array
- assertIsNonEmptyArray(value);
-
- // then check each member
- value.forEach(item => {
- if (Array.isArray(item)) {
- assertIsArrayOfStringsAndFunctions(item);
- } else if (typeof item !== 'string' && typeof item !== 'function') {
- throw new TypeError('Items must be a string, a function, or an array of strings and functions.');
- }
- });
-
- }
- },
- ignores: {
- required: false,
- merge() {
- return undefined;
- },
- validate: assertIsArrayOfStringsAndFunctions
- }
-});
-
-/**
- * @fileoverview ConfigArray
- * @author Nicholas C. Zakas
- */
-
-
-//------------------------------------------------------------------------------
-// Helpers
-//------------------------------------------------------------------------------
-
-const Minimatch = minimatch.Minimatch;
-const minimatchCache = new Map();
-const negatedMinimatchCache = new Map();
-const debug = createDebug('@hwc/config-array');
-
-const MINIMATCH_OPTIONS = {
- // matchBase: true,
- dot: true
-};
-
-const CONFIG_TYPES = new Set(['array', 'function']);
-
-/**
- * Fields that are considered metadata and not part of the config object.
- */
-const META_FIELDS = new Set(['name']);
-
-const FILES_AND_IGNORES_SCHEMA = new objectSchema.ObjectSchema(filesAndIgnoresSchema);
-
-/**
- * Wrapper error for config validation errors that adds a name to the front of the
- * error message.
- */
-class ConfigError extends Error {
-
- /**
- * Creates a new instance.
- * @param {string} name The config object name causing the error.
- * @param {number} index The index of the config object in the array.
- * @param {Error} source The source error.
- */
- constructor(name, index, { cause, message }) {
-
-
- const finalMessage = message || cause.message;
-
- super(`Config ${name}: ${finalMessage}`, { cause });
-
- // copy over custom properties that aren't represented
- if (cause) {
- for (const key of Object.keys(cause)) {
- if (!(key in this)) {
- this[key] = cause[key];
- }
- }
- }
-
- /**
- * The name of the error.
- * @type {string}
- * @readonly
- */
- this.name = 'ConfigError';
-
- /**
- * The index of the config object in the array.
- * @type {number}
- * @readonly
- */
- this.index = index;
- }
-}
-
-/**
- * Gets the name of a config object.
- * @param {object} config The config object to get the name of.
- * @returns {string} The name of the config object.
- */
-function getConfigName(config) {
- if (config && typeof config.name === 'string' && config.name) {
- return `"${config.name}"`;
- }
-
- return '(unnamed)';
-}
-
-/**
- * Rethrows a config error with additional information about the config object.
- * @param {object} config The config object to get the name of.
- * @param {number} index The index of the config object in the array.
- * @param {Error} error The error to rethrow.
- * @throws {ConfigError} When the error is rethrown for a config.
- */
-function rethrowConfigError(config, index, error) {
- const configName = getConfigName(config);
- throw new ConfigError(configName, index, error);
-}
-
-/**
- * Shorthand for checking if a value is a string.
- * @param {any} value The value to check.
- * @returns {boolean} True if a string, false if not.
- */
-function isString(value) {
- return typeof value === 'string';
-}
-
-/**
- * Creates a function that asserts that the config is valid
- * during normalization. This checks that the config is not nullish
- * and that files and ignores keys of a config object are valid as per base schema.
- * @param {Object} config The config object to check.
- * @param {number} index The index of the config object in the array.
- * @returns {void}
- * @throws {ConfigError} If the files and ignores keys of a config object are not valid.
- */
-function assertValidBaseConfig(config, index) {
-
- if (config === null) {
- throw new ConfigError(getConfigName(config), index, { message: 'Unexpected null config.' });
- }
-
- if (config === undefined) {
- throw new ConfigError(getConfigName(config), index, { message: 'Unexpected undefined config.' });
- }
-
- if (typeof config !== 'object') {
- throw new ConfigError(getConfigName(config), index, { message: 'Unexpected non-object config.' });
- }
-
- const validateConfig = { };
-
- if ('files' in config) {
- validateConfig.files = config.files;
- }
-
- if ('ignores' in config) {
- validateConfig.ignores = config.ignores;
- }
-
- try {
- FILES_AND_IGNORES_SCHEMA.validate(validateConfig);
- } catch (validationError) {
- rethrowConfigError(config, index, { cause: validationError });
- }
-}
-
-/**
- * Wrapper around minimatch that caches minimatch patterns for
- * faster matching speed over multiple file path evaluations.
- * @param {string} filepath The file path to match.
- * @param {string} pattern The glob pattern to match against.
- * @param {object} options The minimatch options to use.
- * @returns
- */
-function doMatch(filepath, pattern, options = {}) {
-
- let cache = minimatchCache;
-
- if (options.flipNegate) {
- cache = negatedMinimatchCache;
- }
-
- let matcher = cache.get(pattern);
-
- if (!matcher) {
- matcher = new Minimatch(pattern, Object.assign({}, MINIMATCH_OPTIONS, options));
- cache.set(pattern, matcher);
- }
-
- return matcher.match(filepath);
-}
-
-/**
- * Normalizes a `ConfigArray` by flattening it and executing any functions
- * that are found inside.
- * @param {Array} items The items in a `ConfigArray`.
- * @param {Object} context The context object to pass into any function
- * found.
- * @param {Array} extraConfigTypes The config types to check.
- * @returns {Promise} A flattened array containing only config objects.
- * @throws {TypeError} When a config function returns a function.
- */
-async function normalize(items, context, extraConfigTypes) {
-
- const allowFunctions = extraConfigTypes.includes('function');
- const allowArrays = extraConfigTypes.includes('array');
-
- async function* flatTraverse(array) {
- for (let item of array) {
- if (typeof item === 'function') {
- if (!allowFunctions) {
- throw new TypeError('Unexpected function.');
- }
-
- item = item(context);
- if (item.then) {
- item = await item;
- }
- }
-
- if (Array.isArray(item)) {
- if (!allowArrays) {
- throw new TypeError('Unexpected array.');
- }
- yield* flatTraverse(item);
- } else if (typeof item === 'function') {
- throw new TypeError('A config function can only return an object or array.');
- } else {
- yield item;
- }
- }
- }
-
- /*
- * Async iterables cannot be used with the spread operator, so we need to manually
- * create the array to return.
- */
- const asyncIterable = await flatTraverse(items);
- const configs = [];
-
- for await (const config of asyncIterable) {
- configs.push(config);
- }
-
- return configs;
-}
-
-/**
- * Normalizes a `ConfigArray` by flattening it and executing any functions
- * that are found inside.
- * @param {Array} items The items in a `ConfigArray`.
- * @param {Object} context The context object to pass into any function
- * found.
- * @param {Array} extraConfigTypes The config types to check.
- * @returns {Array} A flattened array containing only config objects.
- * @throws {TypeError} When a config function returns a function.
- */
-function normalizeSync(items, context, extraConfigTypes) {
-
- const allowFunctions = extraConfigTypes.includes('function');
- const allowArrays = extraConfigTypes.includes('array');
-
- function* flatTraverse(array) {
- for (let item of array) {
- if (typeof item === 'function') {
-
- if (!allowFunctions) {
- throw new TypeError('Unexpected function.');
- }
-
- item = item(context);
- if (item.then) {
- throw new TypeError('Async config functions are not supported.');
- }
- }
-
- if (Array.isArray(item)) {
-
- if (!allowArrays) {
- throw new TypeError('Unexpected array.');
- }
-
- yield* flatTraverse(item);
- } else if (typeof item === 'function') {
- throw new TypeError('A config function can only return an object or array.');
- } else {
- yield item;
- }
- }
- }
-
- return [...flatTraverse(items)];
-}
-
-/**
- * Determines if a given file path should be ignored based on the given
- * matcher.
- * @param {Array boolean>} ignores The ignore patterns to check.
- * @param {string} filePath The absolute path of the file to check.
- * @param {string} relativeFilePath The relative path of the file to check.
- * @returns {boolean} True if the path should be ignored and false if not.
- */
-function shouldIgnorePath(ignores, filePath, relativeFilePath) {
-
- // all files outside of the basePath are ignored
- if (relativeFilePath.startsWith('..')) {
- return true;
- }
-
- return ignores.reduce((ignored, matcher) => {
-
- if (!ignored) {
-
- if (typeof matcher === 'function') {
- return matcher(filePath);
- }
-
- // don't check negated patterns because we're not ignored yet
- if (!matcher.startsWith('!')) {
- return doMatch(relativeFilePath, matcher);
- }
-
- // otherwise we're still not ignored
- return false;
-
- }
-
- // only need to check negated patterns because we're ignored
- if (typeof matcher === 'string' && matcher.startsWith('!')) {
- return !doMatch(relativeFilePath, matcher, {
- flipNegate: true
- });
- }
-
- return ignored;
-
- }, false);
-
-}
-
-/**
- * Determines if a given file path is matched by a config based on
- * `ignores` only.
- * @param {string} filePath The absolute file path to check.
- * @param {string} basePath The base path for the config.
- * @param {Object} config The config object to check.
- * @returns {boolean} True if the file path is matched by the config,
- * false if not.
- */
-function pathMatchesIgnores(filePath, basePath, config) {
-
- /*
- * For both files and ignores, functions are passed the absolute
- * file path while strings are compared against the relative
- * file path.
- */
- const relativeFilePath = path.relative(basePath, filePath);
-
- return Object.keys(config).filter(key => !META_FIELDS.has(key)).length > 1 &&
- !shouldIgnorePath(config.ignores, filePath, relativeFilePath);
-}
-
-
-/**
- * Determines if a given file path is matched by a config. If the config
- * has no `files` field, then it matches; otherwise, if a `files` field
- * is present then we match the globs in `files` and exclude any globs in
- * `ignores`.
- * @param {string} filePath The absolute file path to check.
- * @param {string} basePath The base path for the config.
- * @param {Object} config The config object to check.
- * @returns {boolean} True if the file path is matched by the config,
- * false if not.
- */
-function pathMatches(filePath, basePath, config) {
-
- /*
- * For both files and ignores, functions are passed the absolute
- * file path while strings are compared against the relative
- * file path.
- */
- const relativeFilePath = path.relative(basePath, filePath);
-
- // match both strings and functions
- const match = pattern => {
-
- if (isString(pattern)) {
- return doMatch(relativeFilePath, pattern);
- }
-
- if (typeof pattern === 'function') {
- return pattern(filePath);
- }
-
- throw new TypeError(`Unexpected matcher type ${pattern}.`);
- };
-
- // check for all matches to config.files
- let filePathMatchesPattern = config.files.some(pattern => {
- if (Array.isArray(pattern)) {
- return pattern.every(match);
- }
-
- return match(pattern);
- });
-
- /*
- * If the file path matches the config.files patterns, then check to see
- * if there are any files to ignore.
- */
- if (filePathMatchesPattern && config.ignores) {
- filePathMatchesPattern = !shouldIgnorePath(config.ignores, filePath, relativeFilePath);
- }
-
- return filePathMatchesPattern;
-}
-
-/**
- * Ensures that a ConfigArray has been normalized.
- * @param {ConfigArray} configArray The ConfigArray to check.
- * @returns {void}
- * @throws {Error} When the `ConfigArray` is not normalized.
- */
-function assertNormalized(configArray) {
- // TODO: Throw more verbose error
- if (!configArray.isNormalized()) {
- throw new Error('ConfigArray must be normalized to perform this operation.');
- }
-}
-
-/**
- * Ensures that config types are valid.
- * @param {Array} extraConfigTypes The config types to check.
- * @returns {void}
- * @throws {Error} When the config types array is invalid.
- */
-function assertExtraConfigTypes(extraConfigTypes) {
- if (extraConfigTypes.length > 2) {
- throw new TypeError('configTypes must be an array with at most two items.');
- }
-
- for (const configType of extraConfigTypes) {
- if (!CONFIG_TYPES.has(configType)) {
- throw new TypeError(`Unexpected config type "${configType}" found. Expected one of: "object", "array", "function".`);
- }
- }
-}
-
-//------------------------------------------------------------------------------
-// Public Interface
-//------------------------------------------------------------------------------
-
-const ConfigArraySymbol = {
- isNormalized: Symbol('isNormalized'),
- configCache: Symbol('configCache'),
- schema: Symbol('schema'),
- finalizeConfig: Symbol('finalizeConfig'),
- preprocessConfig: Symbol('preprocessConfig')
-};
-
-// used to store calculate data for faster lookup
-const dataCache = new WeakMap();
-
-/**
- * Represents an array of config objects and provides method for working with
- * those config objects.
- */
-class ConfigArray extends Array {
-
- /**
- * Creates a new instance of ConfigArray.
- * @param {Iterable|Function|Object} configs An iterable yielding config
- * objects, or a config function, or a config object.
- * @param {string} [options.basePath=""] The path of the config file
- * @param {boolean} [options.normalized=false] Flag indicating if the
- * configs have already been normalized.
- * @param {Object} [options.schema] The additional schema
- * definitions to use for the ConfigArray schema.
- * @param {Array} [options.configTypes] List of config types supported.
- */
- constructor(configs, {
- basePath = '',
- normalized = false,
- schema: customSchema,
- extraConfigTypes = []
- } = {}
- ) {
- super();
-
- /**
- * Tracks if the array has been normalized.
- * @property isNormalized
- * @type {boolean}
- * @private
- */
- this[ConfigArraySymbol.isNormalized] = normalized;
-
- /**
- * The schema used for validating and merging configs.
- * @property schema
- * @type ObjectSchema
- * @private
- */
- this[ConfigArraySymbol.schema] = new objectSchema.ObjectSchema(
- Object.assign({}, customSchema, baseSchema)
- );
-
- /**
- * The path of the config file that this array was loaded from.
- * This is used to calculate filename matches.
- * @property basePath
- * @type {string}
- */
- this.basePath = basePath;
-
- assertExtraConfigTypes(extraConfigTypes);
-
- /**
- * The supported config types.
- * @property configTypes
- * @type {Array}
- */
- this.extraConfigTypes = Object.freeze([...extraConfigTypes]);
-
- /**
- * A cache to store calculated configs for faster repeat lookup.
- * @property configCache
- * @type {Map}
- * @private
- */
- this[ConfigArraySymbol.configCache] = new Map();
-
- // init cache
- dataCache.set(this, {
- explicitMatches: new Map(),
- directoryMatches: new Map(),
- files: undefined,
- ignores: undefined
- });
-
- // load the configs into this array
- if (Array.isArray(configs)) {
- this.push(...configs);
- } else {
- this.push(configs);
- }
-
- }
-
- /**
- * Prevent normal array methods from creating a new `ConfigArray` instance.
- * This is to ensure that methods such as `slice()` won't try to create a
- * new instance of `ConfigArray` behind the scenes as doing so may throw
- * an error due to the different constructor signature.
- * @returns {Function} The `Array` constructor.
- */
- static get [Symbol.species]() {
- return Array;
- }
-
- /**
- * Returns the `files` globs from every config object in the array.
- * This can be used to determine which files will be matched by a
- * config array or to use as a glob pattern when no patterns are provided
- * for a command line interface.
- * @returns {Array} An array of matchers.
- */
- get files() {
-
- assertNormalized(this);
-
- // if this data has been cached, retrieve it
- const cache = dataCache.get(this);
-
- if (cache.files) {
- return cache.files;
- }
-
- // otherwise calculate it
-
- const result = [];
-
- for (const config of this) {
- if (config.files) {
- config.files.forEach(filePattern => {
- result.push(filePattern);
- });
- }
- }
-
- // store result
- cache.files = result;
- dataCache.set(this, cache);
-
- return result;
- }
-
- /**
- * Returns ignore matchers that should always be ignored regardless of
- * the matching `files` fields in any configs. This is necessary to mimic
- * the behavior of things like .gitignore and .eslintignore, allowing a
- * globbing operation to be faster.
- * @returns {string[]} An array of string patterns and functions to be ignored.
- */
- get ignores() {
-
- assertNormalized(this);
-
- // if this data has been cached, retrieve it
- const cache = dataCache.get(this);
-
- if (cache.ignores) {
- return cache.ignores;
- }
-
- // otherwise calculate it
-
- const result = [];
-
- for (const config of this) {
-
- /*
- * We only count ignores if there are no other keys in the object.
- * In this case, it acts list a globally ignored pattern. If there
- * are additional keys, then ignores act like exclusions.
- */
- if (config.ignores && Object.keys(config).filter(key => !META_FIELDS.has(key)).length === 1) {
- result.push(...config.ignores);
- }
- }
-
- // store result
- cache.ignores = result;
- dataCache.set(this, cache);
-
- return result;
- }
-
- /**
- * Indicates if the config array has been normalized.
- * @returns {boolean} True if the config array is normalized, false if not.
- */
- isNormalized() {
- return this[ConfigArraySymbol.isNormalized];
- }
-
- /**
- * Normalizes a config array by flattening embedded arrays and executing
- * config functions.
- * @param {ConfigContext} context The context object for config functions.
- * @returns {Promise} The current ConfigArray instance.
- */
- async normalize(context = {}) {
-
- if (!this.isNormalized()) {
- const normalizedConfigs = await normalize(this, context, this.extraConfigTypes);
- this.length = 0;
- this.push(...normalizedConfigs.map(this[ConfigArraySymbol.preprocessConfig].bind(this)));
- this.forEach(assertValidBaseConfig);
- this[ConfigArraySymbol.isNormalized] = true;
-
- // prevent further changes
- Object.freeze(this);
- }
-
- return this;
- }
-
- /**
- * Normalizes a config array by flattening embedded arrays and executing
- * config functions.
- * @param {ConfigContext} context The context object for config functions.
- * @returns {ConfigArray} The current ConfigArray instance.
- */
- normalizeSync(context = {}) {
-
- if (!this.isNormalized()) {
- const normalizedConfigs = normalizeSync(this, context, this.extraConfigTypes);
- this.length = 0;
- this.push(...normalizedConfigs.map(this[ConfigArraySymbol.preprocessConfig].bind(this)));
- this.forEach(assertValidBaseConfig);
- this[ConfigArraySymbol.isNormalized] = true;
-
- // prevent further changes
- Object.freeze(this);
- }
-
- return this;
- }
-
- /**
- * Finalizes the state of a config before being cached and returned by
- * `getConfig()`. Does nothing by default but is provided to be
- * overridden by subclasses as necessary.
- * @param {Object} config The config to finalize.
- * @returns {Object} The finalized config.
- */
- [ConfigArraySymbol.finalizeConfig](config) {
- return config;
- }
-
- /**
- * Preprocesses a config during the normalization process. This is the
- * method to override if you want to convert an array item before it is
- * validated for the first time. For example, if you want to replace a
- * string with an object, this is the method to override.
- * @param {Object} config The config to preprocess.
- * @returns {Object} The config to use in place of the argument.
- */
- [ConfigArraySymbol.preprocessConfig](config) {
- return config;
- }
-
- /**
- * Determines if a given file path explicitly matches a `files` entry
- * and also doesn't match an `ignores` entry. Configs that don't have
- * a `files` property are not considered an explicit match.
- * @param {string} filePath The complete path of a file to check.
- * @returns {boolean} True if the file path matches a `files` entry
- * or false if not.
- */
- isExplicitMatch(filePath) {
-
- assertNormalized(this);
-
- const cache = dataCache.get(this);
-
- // first check the cache to avoid duplicate work
- let result = cache.explicitMatches.get(filePath);
-
- if (typeof result == 'boolean') {
- return result;
- }
-
- // TODO: Maybe move elsewhere? Maybe combine with getConfig() logic?
- const relativeFilePath = path.relative(this.basePath, filePath);
-
- if (shouldIgnorePath(this.ignores, filePath, relativeFilePath)) {
- debug(`Ignoring ${filePath}`);
-
- // cache and return result
- cache.explicitMatches.set(filePath, false);
- return false;
- }
-
- // filePath isn't automatically ignored, so try to find a match
-
- for (const config of this) {
-
- if (!config.files) {
- continue;
- }
-
- if (pathMatches(filePath, this.basePath, config)) {
- debug(`Matching config found for ${filePath}`);
- cache.explicitMatches.set(filePath, true);
- return true;
- }
- }
-
- return false;
- }
-
- /**
- * Returns the config object for a given file path.
- * @param {string} filePath The complete path of a file to get a config for.
- * @returns {Object} The config object for this file.
- */
- getConfig(filePath) {
-
- assertNormalized(this);
-
- const cache = this[ConfigArraySymbol.configCache];
-
- // first check the cache for a filename match to avoid duplicate work
- if (cache.has(filePath)) {
- return cache.get(filePath);
- }
-
- let finalConfig;
-
- // next check to see if the file should be ignored
-
- // check if this should be ignored due to its directory
- if (this.isDirectoryIgnored(path.dirname(filePath))) {
- debug(`Ignoring ${filePath} based on directory pattern`);
-
- // cache and return result - finalConfig is undefined at this point
- cache.set(filePath, finalConfig);
- return finalConfig;
- }
-
- // TODO: Maybe move elsewhere?
- const relativeFilePath = path.relative(this.basePath, filePath);
-
- if (shouldIgnorePath(this.ignores, filePath, relativeFilePath)) {
- debug(`Ignoring ${filePath} based on file pattern`);
-
- // cache and return result - finalConfig is undefined at this point
- cache.set(filePath, finalConfig);
- return finalConfig;
- }
-
- // filePath isn't automatically ignored, so try to construct config
-
- const matchingConfigIndices = [];
- let matchFound = false;
- const universalPattern = /\/\*{1,2}$/;
-
- this.forEach((config, index) => {
-
- if (!config.files) {
-
- if (!config.ignores) {
- debug(`Anonymous universal config found for ${filePath}`);
- matchingConfigIndices.push(index);
- return;
- }
-
- if (pathMatchesIgnores(filePath, this.basePath, config)) {
- debug(`Matching config found for ${filePath} (based on ignores: ${config.ignores})`);
- matchingConfigIndices.push(index);
- return;
- }
-
- debug(`Skipped config found for ${filePath} (based on ignores: ${config.ignores})`);
- return;
- }
-
- /*
- * If a config has a files pattern ending in /** or /*, and the
- * filePath only matches those patterns, then the config is only
- * applied if there is another config where the filePath matches
- * a file with a specific extensions such as *.js.
- */
-
- const universalFiles = config.files.filter(
- pattern => universalPattern.test(pattern)
- );
-
- // universal patterns were found so we need to check the config twice
- if (universalFiles.length) {
-
- debug('Universal files patterns found. Checking carefully.');
-
- const nonUniversalFiles = config.files.filter(
- pattern => !universalPattern.test(pattern)
- );
-
- // check that the config matches without the non-universal files first
- if (
- nonUniversalFiles.length &&
- pathMatches(
- filePath, this.basePath,
- { files: nonUniversalFiles, ignores: config.ignores }
- )
- ) {
- debug(`Matching config found for ${filePath}`);
- matchingConfigIndices.push(index);
- matchFound = true;
- return;
- }
-
- // if there wasn't a match then check if it matches with universal files
- if (
- universalFiles.length &&
- pathMatches(
- filePath, this.basePath,
- { files: universalFiles, ignores: config.ignores }
- )
- ) {
- debug(`Matching config found for ${filePath}`);
- matchingConfigIndices.push(index);
- return;
- }
-
- // if we make here, then there was no match
- return;
- }
-
- // the normal case
- if (pathMatches(filePath, this.basePath, config)) {
- debug(`Matching config found for ${filePath}`);
- matchingConfigIndices.push(index);
- matchFound = true;
- return;
- }
-
- });
-
- // if matching both files and ignores, there will be no config to create
- if (!matchFound) {
- debug(`No matching configs found for ${filePath}`);
-
- // cache and return result - finalConfig is undefined at this point
- cache.set(filePath, finalConfig);
- return finalConfig;
- }
-
- // check to see if there is a config cached by indices
- finalConfig = cache.get(matchingConfigIndices.toString());
-
- if (finalConfig) {
-
- // also store for filename for faster lookup next time
- cache.set(filePath, finalConfig);
-
- return finalConfig;
- }
-
- // otherwise construct the config
-
- finalConfig = matchingConfigIndices.reduce((result, index) => {
- try {
- return this[ConfigArraySymbol.schema].merge(result, this[index]);
- } catch (validationError) {
- rethrowConfigError(this[index], index, { cause: validationError});
- }
- }, {}, this);
-
- finalConfig = this[ConfigArraySymbol.finalizeConfig](finalConfig);
-
- cache.set(filePath, finalConfig);
- cache.set(matchingConfigIndices.toString(), finalConfig);
-
- return finalConfig;
- }
-
- /**
- * Determines if the given filepath is ignored based on the configs.
- * @param {string} filePath The complete path of a file to check.
- * @returns {boolean} True if the path is ignored, false if not.
- * @deprecated Use `isFileIgnored` instead.
- */
- isIgnored(filePath) {
- return this.isFileIgnored(filePath);
- }
-
- /**
- * Determines if the given filepath is ignored based on the configs.
- * @param {string} filePath The complete path of a file to check.
- * @returns {boolean} True if the path is ignored, false if not.
- */
- isFileIgnored(filePath) {
- return this.getConfig(filePath) === undefined;
- }
-
- /**
- * Determines if the given directory is ignored based on the configs.
- * This checks only default `ignores` that don't have `files` in the
- * same config. A pattern such as `/foo` be considered to ignore the directory
- * while a pattern such as `/foo/**` is not considered to ignore the
- * directory because it is matching files.
- * @param {string} directoryPath The complete path of a directory to check.
- * @returns {boolean} True if the directory is ignored, false if not. Will
- * return true for any directory that is not inside of `basePath`.
- * @throws {Error} When the `ConfigArray` is not normalized.
- */
- isDirectoryIgnored(directoryPath) {
-
- assertNormalized(this);
-
- const relativeDirectoryPath = path.relative(this.basePath, directoryPath)
- .replace(/\\/g, '/');
-
- if (relativeDirectoryPath.startsWith('..')) {
- return true;
- }
-
- // first check the cache
- const cache = dataCache.get(this).directoryMatches;
-
- if (cache.has(relativeDirectoryPath)) {
- return cache.get(relativeDirectoryPath);
- }
-
- const directoryParts = relativeDirectoryPath.split('/');
- let relativeDirectoryToCheck = '';
- let result = false;
-
- /*
- * In order to get the correct gitignore-style ignores, where an
- * ignored parent directory cannot have any descendants unignored,
- * we need to check every directory starting at the parent all
- * the way down to the actual requested directory.
- *
- * We aggressively cache all of this info to make sure we don't
- * have to recalculate everything for every call.
- */
- do {
-
- relativeDirectoryToCheck += directoryParts.shift() + '/';
-
- result = shouldIgnorePath(
- this.ignores,
- path.join(this.basePath, relativeDirectoryToCheck),
- relativeDirectoryToCheck
- );
-
- cache.set(relativeDirectoryToCheck, result);
-
- } while (!result && directoryParts.length);
-
- // also cache the result for the requested path
- cache.set(relativeDirectoryPath, result);
-
- return result;
- }
-
-}
-
-exports.ConfigArray = ConfigArray;
-exports.ConfigArraySymbol = ConfigArraySymbol;
diff --git a/node_modules/@humanwhocodes/config-array/package.json b/node_modules/@humanwhocodes/config-array/package.json
deleted file mode 100644
index 4215d65..0000000
--- a/node_modules/@humanwhocodes/config-array/package.json
+++ /dev/null
@@ -1,63 +0,0 @@
-{
- "name": "@humanwhocodes/config-array",
- "version": "0.13.0",
- "description": "Glob-based configuration matching.",
- "author": "Nicholas C. Zakas",
- "main": "api.js",
- "files": [
- "api.js",
- "LICENSE",
- "README.md"
- ],
- "repository": {
- "type": "git",
- "url": "git+https://github.com/humanwhocodes/config-array.git"
- },
- "bugs": {
- "url": "https://github.com/humanwhocodes/config-array/issues"
- },
- "homepage": "https://github.com/humanwhocodes/config-array#readme",
- "scripts": {
- "build": "rollup -c",
- "format": "nitpik",
- "lint": "eslint *.config.js src/*.js tests/*.js",
- "lint:fix": "eslint --fix *.config.js src/*.js tests/*.js",
- "prepublish": "npm run build",
- "test:coverage": "nyc --include src/*.js npm run test",
- "test": "mocha -r esm tests/ --recursive"
- },
- "gitHooks": {
- "pre-commit": "lint-staged"
- },
- "lint-staged": {
- "*.js": [
- "eslint --fix --ignore-pattern '!.eslintrc.js'"
- ]
- },
- "keywords": [
- "configuration",
- "configarray",
- "config file"
- ],
- "license": "Apache-2.0",
- "engines": {
- "node": ">=10.10.0"
- },
- "dependencies": {
- "@humanwhocodes/object-schema": "^2.0.3",
- "debug": "^4.3.1",
- "minimatch": "^3.0.5"
- },
- "devDependencies": {
- "@nitpik/javascript": "0.4.0",
- "@nitpik/node": "0.0.5",
- "chai": "4.3.10",
- "eslint": "8.52.0",
- "esm": "3.2.25",
- "lint-staged": "15.0.2",
- "mocha": "6.2.3",
- "nyc": "15.1.0",
- "rollup": "3.28.1",
- "yorkie": "2.0.0"
- }
-}
diff --git a/node_modules/@humanwhocodes/object-schema/CHANGELOG.md b/node_modules/@humanwhocodes/object-schema/CHANGELOG.md
deleted file mode 100644
index 3b0b6a3..0000000
--- a/node_modules/@humanwhocodes/object-schema/CHANGELOG.md
+++ /dev/null
@@ -1,40 +0,0 @@
-# Changelog
-
-## [2.0.3](https://github.com/humanwhocodes/object-schema/compare/v2.0.2...v2.0.3) (2024-04-01)
-
-
-### Bug Fixes
-
-* Ensure test files are not including in package ([6eeb32c](https://github.com/humanwhocodes/object-schema/commit/6eeb32cc76a3e37d76b2990bd603d72061c816e0)), closes [#19](https://github.com/humanwhocodes/object-schema/issues/19)
-
-## [2.0.2](https://github.com/humanwhocodes/object-schema/compare/v2.0.1...v2.0.2) (2024-01-10)
-
-
-### Bug Fixes
-
-* WrapperError should be an actual error ([2523f01](https://github.com/humanwhocodes/object-schema/commit/2523f014168167e5a40bb63e0cc03231b2c0f1bf))
-
-## [2.0.1](https://github.com/humanwhocodes/object-schema/compare/v2.0.0...v2.0.1) (2023-10-20)
-
-
-### Bug Fixes
-
-* Custom properties should be available on thrown errors ([6ca80b0](https://github.com/humanwhocodes/object-schema/commit/6ca80b001a4ffb678b9b5544fc53322117374376))
-
-## [2.0.0](https://github.com/humanwhocodes/object-schema/compare/v1.2.1...v2.0.0) (2023-10-18)
-
-
-### ⚠ BREAKING CHANGES
-
-* Throw custom errors instead of generics.
-
-### Features
-
-* Throw custom errors instead of generics. ([c6c01d7](https://github.com/humanwhocodes/object-schema/commit/c6c01d71eb354bf7b1fb3e883c40f7bd9b61647c))
-
-### [1.2.1](https://www.github.com/humanwhocodes/object-schema/compare/v1.2.0...v1.2.1) (2021-11-02)
-
-
-### Bug Fixes
-
-* Never return original object from individual config ([5463c5c](https://www.github.com/humanwhocodes/object-schema/commit/5463c5c6d2cb35a7b7948dffc37c899a41d1775f))
diff --git a/node_modules/@humanwhocodes/object-schema/LICENSE b/node_modules/@humanwhocodes/object-schema/LICENSE
deleted file mode 100644
index a5e3ae4..0000000
--- a/node_modules/@humanwhocodes/object-schema/LICENSE
+++ /dev/null
@@ -1,29 +0,0 @@
-BSD 3-Clause License
-
-Copyright (c) 2019, Human Who Codes
-All rights reserved.
-
-Redistribution and use in source and binary forms, with or without
-modification, are permitted provided that the following conditions are met:
-
-* Redistributions of source code must retain the above copyright notice, this
- list of conditions and the following disclaimer.
-
-* Redistributions in binary form must reproduce the above copyright notice,
- this list of conditions and the following disclaimer in the documentation
- and/or other materials provided with the distribution.
-
-* Neither the name of the copyright holder nor the names of its
- contributors may be used to endorse or promote products derived from
- this software without specific prior written permission.
-
-THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
-AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
-IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
-DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
-FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
-DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
-SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
-CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
-OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
-OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
diff --git a/node_modules/@humanwhocodes/object-schema/README.md b/node_modules/@humanwhocodes/object-schema/README.md
deleted file mode 100644
index 2163797..0000000
--- a/node_modules/@humanwhocodes/object-schema/README.md
+++ /dev/null
@@ -1,234 +0,0 @@
-# JavaScript ObjectSchema Package
-
-by [Nicholas C. Zakas](https://humanwhocodes.com)
-
-If you find this useful, please consider supporting my work with a [donation](https://humanwhocodes.com/donate).
-
-## Overview
-
-A JavaScript object merge/validation utility where you can define a different merge and validation strategy for each key. This is helpful when you need to validate complex data structures and then merge them in a way that is more complex than `Object.assign()`.
-
-## Installation
-
-You can install using either npm:
-
-```
-npm install @humanwhocodes/object-schema
-```
-
-Or Yarn:
-
-```
-yarn add @humanwhocodes/object-schema
-```
-
-## Usage
-
-Use CommonJS to get access to the `ObjectSchema` constructor:
-
-```js
-const { ObjectSchema } = require("@humanwhocodes/object-schema");
-
-const schema = new ObjectSchema({
-
- // define a definition for the "downloads" key
- downloads: {
- required: true,
- merge(value1, value2) {
- return value1 + value2;
- },
- validate(value) {
- if (typeof value !== "number") {
- throw new Error("Expected downloads to be a number.");
- }
- }
- },
-
- // define a strategy for the "versions" key
- version: {
- required: true,
- merge(value1, value2) {
- return value1.concat(value2);
- },
- validate(value) {
- if (!Array.isArray(value)) {
- throw new Error("Expected versions to be an array.");
- }
- }
- }
-});
-
-const record1 = {
- downloads: 25,
- versions: [
- "v1.0.0",
- "v1.1.0",
- "v1.2.0"
- ]
-};
-
-const record2 = {
- downloads: 125,
- versions: [
- "v2.0.0",
- "v2.1.0",
- "v3.0.0"
- ]
-};
-
-// make sure the records are valid
-schema.validate(record1);
-schema.validate(record2);
-
-// merge together (schema.merge() accepts any number of objects)
-const result = schema.merge(record1, record2);
-
-// result looks like this:
-
-const result = {
- downloads: 75,
- versions: [
- "v1.0.0",
- "v1.1.0",
- "v1.2.0",
- "v2.0.0",
- "v2.1.0",
- "v3.0.0"
- ]
-};
-```
-
-## Tips and Tricks
-
-### Named merge strategies
-
-Instead of specifying a `merge()` method, you can specify one of the following strings to use a default merge strategy:
-
-* `"assign"` - use `Object.assign()` to merge the two values into one object.
-* `"overwrite"` - the second value always replaces the first.
-* `"replace"` - the second value replaces the first if the second is not `undefined`.
-
-For example:
-
-```js
-const schema = new ObjectSchema({
- name: {
- merge: "replace",
- validate() {}
- }
-});
-```
-
-### Named validation strategies
-
-Instead of specifying a `validate()` method, you can specify one of the following strings to use a default validation strategy:
-
-* `"array"` - value must be an array.
-* `"boolean"` - value must be a boolean.
-* `"number"` - value must be a number.
-* `"object"` - value must be an object.
-* `"object?"` - value must be an object or null.
-* `"string"` - value must be a string.
-* `"string!"` - value must be a non-empty string.
-
-For example:
-
-```js
-const schema = new ObjectSchema({
- name: {
- merge: "replace",
- validate: "string"
- }
-});
-```
-
-### Subschemas
-
-If you are defining a key that is, itself, an object, you can simplify the process by using a subschema. Instead of defining `merge()` and `validate()`, assign a `schema` key that contains a schema definition, like this:
-
-```js
-const schema = new ObjectSchema({
- name: {
- schema: {
- first: {
- merge: "replace",
- validate: "string"
- },
- last: {
- merge: "replace",
- validate: "string"
- }
- }
- }
-});
-
-schema.validate({
- name: {
- first: "n",
- last: "z"
- }
-});
-```
-
-### Remove Keys During Merge
-
-If the merge strategy for a key returns `undefined`, then the key will not appear in the final object. For example:
-
-```js
-const schema = new ObjectSchema({
- date: {
- merge() {
- return undefined;
- },
- validate(value) {
- Date.parse(value); // throws an error when invalid
- }
- }
-});
-
-const object1 = { date: "5/5/2005" };
-const object2 = { date: "6/6/2006" };
-
-const result = schema.merge(object1, object2);
-
-console.log("date" in result); // false
-```
-
-### Requiring Another Key Be Present
-
-If you'd like the presence of one key to require the presence of another key, you can use the `requires` property to specify an array of other properties that any key requires. For example:
-
-```js
-const schema = new ObjectSchema();
-
-const schema = new ObjectSchema({
- date: {
- merge() {
- return undefined;
- },
- validate(value) {
- Date.parse(value); // throws an error when invalid
- }
- },
- time: {
- requires: ["date"],
- merge(first, second) {
- return second;
- },
- validate(value) {
- // ...
- }
- }
-});
-
-// throws error: Key "time" requires keys "date"
-schema.validate({
- time: "13:45"
-});
-```
-
-In this example, even though `date` is an optional key, it is required to be present whenever `time` is present.
-
-## License
-
-BSD 3-Clause
diff --git a/node_modules/@humanwhocodes/object-schema/package.json b/node_modules/@humanwhocodes/object-schema/package.json
deleted file mode 100644
index 0098b44..0000000
--- a/node_modules/@humanwhocodes/object-schema/package.json
+++ /dev/null
@@ -1,38 +0,0 @@
-{
- "name": "@humanwhocodes/object-schema",
- "version": "2.0.3",
- "description": "An object schema merger/validator",
- "main": "src/index.js",
- "files": [
- "src",
- "LICENSE",
- "README.md"
- ],
- "directories": {
- "test": "tests"
- },
- "scripts": {
- "test": "mocha tests/"
- },
- "repository": {
- "type": "git",
- "url": "git+https://github.com/humanwhocodes/object-schema.git"
- },
- "keywords": [
- "object",
- "validation",
- "schema",
- "merge"
- ],
- "author": "Nicholas C. Zakas",
- "license": "BSD-3-Clause",
- "bugs": {
- "url": "https://github.com/humanwhocodes/object-schema/issues"
- },
- "homepage": "https://github.com/humanwhocodes/object-schema#readme",
- "devDependencies": {
- "chai": "^4.2.0",
- "eslint": "^5.13.0",
- "mocha": "^5.2.0"
- }
-}
diff --git a/node_modules/@humanwhocodes/object-schema/src/index.js b/node_modules/@humanwhocodes/object-schema/src/index.js
deleted file mode 100644
index b2bc4fb..0000000
--- a/node_modules/@humanwhocodes/object-schema/src/index.js
+++ /dev/null
@@ -1,7 +0,0 @@
-/**
- * @filedescription Object Schema Package
- */
-
-exports.ObjectSchema = require("./object-schema").ObjectSchema;
-exports.MergeStrategy = require("./merge-strategy").MergeStrategy;
-exports.ValidationStrategy = require("./validation-strategy").ValidationStrategy;
diff --git a/node_modules/@humanwhocodes/object-schema/src/merge-strategy.js b/node_modules/@humanwhocodes/object-schema/src/merge-strategy.js
deleted file mode 100644
index 8217449..0000000
--- a/node_modules/@humanwhocodes/object-schema/src/merge-strategy.js
+++ /dev/null
@@ -1,53 +0,0 @@
-/**
- * @filedescription Merge Strategy
- */
-
-"use strict";
-
-//-----------------------------------------------------------------------------
-// Class
-//-----------------------------------------------------------------------------
-
-/**
- * Container class for several different merge strategies.
- */
-class MergeStrategy {
-
- /**
- * Merges two keys by overwriting the first with the second.
- * @param {*} value1 The value from the first object key.
- * @param {*} value2 The value from the second object key.
- * @returns {*} The second value.
- */
- static overwrite(value1, value2) {
- return value2;
- }
-
- /**
- * Merges two keys by replacing the first with the second only if the
- * second is defined.
- * @param {*} value1 The value from the first object key.
- * @param {*} value2 The value from the second object key.
- * @returns {*} The second value if it is defined.
- */
- static replace(value1, value2) {
- if (typeof value2 !== "undefined") {
- return value2;
- }
-
- return value1;
- }
-
- /**
- * Merges two properties by assigning properties from the second to the first.
- * @param {*} value1 The value from the first object key.
- * @param {*} value2 The value from the second object key.
- * @returns {*} A new object containing properties from both value1 and
- * value2.
- */
- static assign(value1, value2) {
- return Object.assign({}, value1, value2);
- }
-}
-
-exports.MergeStrategy = MergeStrategy;
diff --git a/node_modules/@humanwhocodes/object-schema/src/object-schema.js b/node_modules/@humanwhocodes/object-schema/src/object-schema.js
deleted file mode 100644
index 62d198e..0000000
--- a/node_modules/@humanwhocodes/object-schema/src/object-schema.js
+++ /dev/null
@@ -1,301 +0,0 @@
-/**
- * @filedescription Object Schema
- */
-
-"use strict";
-
-//-----------------------------------------------------------------------------
-// Requirements
-//-----------------------------------------------------------------------------
-
-const { MergeStrategy } = require("./merge-strategy");
-const { ValidationStrategy } = require("./validation-strategy");
-
-//-----------------------------------------------------------------------------
-// Private
-//-----------------------------------------------------------------------------
-
-const strategies = Symbol("strategies");
-const requiredKeys = Symbol("requiredKeys");
-
-/**
- * Validates a schema strategy.
- * @param {string} name The name of the key this strategy is for.
- * @param {Object} strategy The strategy for the object key.
- * @param {boolean} [strategy.required=true] Whether the key is required.
- * @param {string[]} [strategy.requires] Other keys that are required when
- * this key is present.
- * @param {Function} strategy.merge A method to call when merging two objects
- * with the same key.
- * @param {Function} strategy.validate A method to call when validating an
- * object with the key.
- * @returns {void}
- * @throws {Error} When the strategy is missing a name.
- * @throws {Error} When the strategy is missing a merge() method.
- * @throws {Error} When the strategy is missing a validate() method.
- */
-function validateDefinition(name, strategy) {
-
- let hasSchema = false;
- if (strategy.schema) {
- if (typeof strategy.schema === "object") {
- hasSchema = true;
- } else {
- throw new TypeError("Schema must be an object.");
- }
- }
-
- if (typeof strategy.merge === "string") {
- if (!(strategy.merge in MergeStrategy)) {
- throw new TypeError(`Definition for key "${name}" missing valid merge strategy.`);
- }
- } else if (!hasSchema && typeof strategy.merge !== "function") {
- throw new TypeError(`Definition for key "${name}" must have a merge property.`);
- }
-
- if (typeof strategy.validate === "string") {
- if (!(strategy.validate in ValidationStrategy)) {
- throw new TypeError(`Definition for key "${name}" missing valid validation strategy.`);
- }
- } else if (!hasSchema && typeof strategy.validate !== "function") {
- throw new TypeError(`Definition for key "${name}" must have a validate() method.`);
- }
-}
-
-//-----------------------------------------------------------------------------
-// Errors
-//-----------------------------------------------------------------------------
-
-/**
- * Error when an unexpected key is found.
- */
-class UnexpectedKeyError extends Error {
-
- /**
- * Creates a new instance.
- * @param {string} key The key that was unexpected.
- */
- constructor(key) {
- super(`Unexpected key "${key}" found.`);
- }
-}
-
-/**
- * Error when a required key is missing.
- */
-class MissingKeyError extends Error {
-
- /**
- * Creates a new instance.
- * @param {string} key The key that was missing.
- */
- constructor(key) {
- super(`Missing required key "${key}".`);
- }
-}
-
-/**
- * Error when a key requires other keys that are missing.
- */
-class MissingDependentKeysError extends Error {
-
- /**
- * Creates a new instance.
- * @param {string} key The key that was unexpected.
- * @param {Array} requiredKeys The keys that are required.
- */
- constructor(key, requiredKeys) {
- super(`Key "${key}" requires keys "${requiredKeys.join("\", \"")}".`);
- }
-}
-
-/**
- * Wrapper error for errors occuring during a merge or validate operation.
- */
-class WrapperError extends Error {
-
- /**
- * Creates a new instance.
- * @param {string} key The object key causing the error.
- * @param {Error} source The source error.
- */
- constructor(key, source) {
- super(`Key "${key}": ${source.message}`, { cause: source });
-
- // copy over custom properties that aren't represented
- for (const key of Object.keys(source)) {
- if (!(key in this)) {
- this[key] = source[key];
- }
- }
- }
-}
-
-//-----------------------------------------------------------------------------
-// Main
-//-----------------------------------------------------------------------------
-
-/**
- * Represents an object validation/merging schema.
- */
-class ObjectSchema {
-
- /**
- * Creates a new instance.
- */
- constructor(definitions) {
-
- if (!definitions) {
- throw new Error("Schema definitions missing.");
- }
-
- /**
- * Track all strategies in the schema by key.
- * @type {Map}
- * @property strategies
- */
- this[strategies] = new Map();
-
- /**
- * Separately track any keys that are required for faster validation.
- * @type {Map}
- * @property requiredKeys
- */
- this[requiredKeys] = new Map();
-
- // add in all strategies
- for (const key of Object.keys(definitions)) {
- validateDefinition(key, definitions[key]);
-
- // normalize merge and validate methods if subschema is present
- if (typeof definitions[key].schema === "object") {
- const schema = new ObjectSchema(definitions[key].schema);
- definitions[key] = {
- ...definitions[key],
- merge(first = {}, second = {}) {
- return schema.merge(first, second);
- },
- validate(value) {
- ValidationStrategy.object(value);
- schema.validate(value);
- }
- };
- }
-
- // normalize the merge method in case there's a string
- if (typeof definitions[key].merge === "string") {
- definitions[key] = {
- ...definitions[key],
- merge: MergeStrategy[definitions[key].merge]
- };
- };
-
- // normalize the validate method in case there's a string
- if (typeof definitions[key].validate === "string") {
- definitions[key] = {
- ...definitions[key],
- validate: ValidationStrategy[definitions[key].validate]
- };
- };
-
- this[strategies].set(key, definitions[key]);
-
- if (definitions[key].required) {
- this[requiredKeys].set(key, definitions[key]);
- }
- }
- }
-
- /**
- * Determines if a strategy has been registered for the given object key.
- * @param {string} key The object key to find a strategy for.
- * @returns {boolean} True if the key has a strategy registered, false if not.
- */
- hasKey(key) {
- return this[strategies].has(key);
- }
-
- /**
- * Merges objects together to create a new object comprised of the keys
- * of the all objects. Keys are merged based on the each key's merge
- * strategy.
- * @param {...Object} objects The objects to merge.
- * @returns {Object} A new object with a mix of all objects' keys.
- * @throws {Error} If any object is invalid.
- */
- merge(...objects) {
-
- // double check arguments
- if (objects.length < 2) {
- throw new TypeError("merge() requires at least two arguments.");
- }
-
- if (objects.some(object => (object == null || typeof object !== "object"))) {
- throw new TypeError("All arguments must be objects.");
- }
-
- return objects.reduce((result, object) => {
-
- this.validate(object);
-
- for (const [key, strategy] of this[strategies]) {
- try {
- if (key in result || key in object) {
- const value = strategy.merge.call(this, result[key], object[key]);
- if (value !== undefined) {
- result[key] = value;
- }
- }
- } catch (ex) {
- throw new WrapperError(key, ex);
- }
- }
- return result;
- }, {});
- }
-
- /**
- * Validates an object's keys based on the validate strategy for each key.
- * @param {Object} object The object to validate.
- * @returns {void}
- * @throws {Error} When the object is invalid.
- */
- validate(object) {
-
- // check existing keys first
- for (const key of Object.keys(object)) {
-
- // check to see if the key is defined
- if (!this.hasKey(key)) {
- throw new UnexpectedKeyError(key);
- }
-
- // validate existing keys
- const strategy = this[strategies].get(key);
-
- // first check to see if any other keys are required
- if (Array.isArray(strategy.requires)) {
- if (!strategy.requires.every(otherKey => otherKey in object)) {
- throw new MissingDependentKeysError(key, strategy.requires);
- }
- }
-
- // now apply remaining validation strategy
- try {
- strategy.validate.call(strategy, object[key]);
- } catch (ex) {
- throw new WrapperError(key, ex);
- }
- }
-
- // ensure required keys aren't missing
- for (const [key] of this[requiredKeys]) {
- if (!(key in object)) {
- throw new MissingKeyError(key);
- }
- }
-
- }
-}
-
-exports.ObjectSchema = ObjectSchema;
diff --git a/node_modules/@humanwhocodes/object-schema/src/validation-strategy.js b/node_modules/@humanwhocodes/object-schema/src/validation-strategy.js
deleted file mode 100644
index ecf918b..0000000
--- a/node_modules/@humanwhocodes/object-schema/src/validation-strategy.js
+++ /dev/null
@@ -1,102 +0,0 @@
-/**
- * @filedescription Validation Strategy
- */
-
-"use strict";
-
-//-----------------------------------------------------------------------------
-// Class
-//-----------------------------------------------------------------------------
-
-/**
- * Container class for several different validation strategies.
- */
-class ValidationStrategy {
-
- /**
- * Validates that a value is an array.
- * @param {*} value The value to validate.
- * @returns {void}
- * @throws {TypeError} If the value is invalid.
- */
- static array(value) {
- if (!Array.isArray(value)) {
- throw new TypeError("Expected an array.");
- }
- }
-
- /**
- * Validates that a value is a boolean.
- * @param {*} value The value to validate.
- * @returns {void}
- * @throws {TypeError} If the value is invalid.
- */
- static boolean(value) {
- if (typeof value !== "boolean") {
- throw new TypeError("Expected a Boolean.");
- }
- }
-
- /**
- * Validates that a value is a number.
- * @param {*} value The value to validate.
- * @returns {void}
- * @throws {TypeError} If the value is invalid.
- */
- static number(value) {
- if (typeof value !== "number") {
- throw new TypeError("Expected a number.");
- }
- }
-
- /**
- * Validates that a value is a object.
- * @param {*} value The value to validate.
- * @returns {void}
- * @throws {TypeError} If the value is invalid.
- */
- static object(value) {
- if (!value || typeof value !== "object") {
- throw new TypeError("Expected an object.");
- }
- }
-
- /**
- * Validates that a value is a object or null.
- * @param {*} value The value to validate.
- * @returns {void}
- * @throws {TypeError} If the value is invalid.
- */
- static "object?"(value) {
- if (typeof value !== "object") {
- throw new TypeError("Expected an object or null.");
- }
- }
-
- /**
- * Validates that a value is a string.
- * @param {*} value The value to validate.
- * @returns {void}
- * @throws {TypeError} If the value is invalid.
- */
- static string(value) {
- if (typeof value !== "string") {
- throw new TypeError("Expected a string.");
- }
- }
-
- /**
- * Validates that a value is a non-empty string.
- * @param {*} value The value to validate.
- * @returns {void}
- * @throws {TypeError} If the value is invalid.
- */
- static "string!"(value) {
- if (typeof value !== "string" || value.length === 0) {
- throw new TypeError("Expected a non-empty string.");
- }
- }
-
-}
-
-exports.ValidationStrategy = ValidationStrategy;
diff --git a/node_modules/@nodelib/fs.scandir/LICENSE b/node_modules/@nodelib/fs.scandir/LICENSE
deleted file mode 100644
index 65a9994..0000000
--- a/node_modules/@nodelib/fs.scandir/LICENSE
+++ /dev/null
@@ -1,21 +0,0 @@
-The MIT License (MIT)
-
-Copyright (c) Denis Malinochkin
-
-Permission is hereby granted, free of charge, to any person obtaining a copy
-of this software and associated documentation files (the "Software"), to deal
-in the Software without restriction, including without limitation the rights
-to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
-copies of the Software, and to permit persons to whom the Software is
-furnished to do so, subject to the following conditions:
-
-The above copyright notice and this permission notice shall be included in all
-copies or substantial portions of the Software.
-
-THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
-IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
-FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
-AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
-LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
-OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
-SOFTWARE.
diff --git a/node_modules/@nodelib/fs.scandir/README.md b/node_modules/@nodelib/fs.scandir/README.md
deleted file mode 100644
index e0b218b..0000000
--- a/node_modules/@nodelib/fs.scandir/README.md
+++ /dev/null
@@ -1,171 +0,0 @@
-# @nodelib/fs.scandir
-
-> List files and directories inside the specified directory.
-
-## :bulb: Highlights
-
-The package is aimed at obtaining information about entries in the directory.
-
-* :moneybag: Returns useful information: `name`, `path`, `dirent` and `stats` (optional).
-* :gear: On Node.js 10.10+ uses the mechanism without additional calls to determine the entry type. See [`old` and `modern` mode](#old-and-modern-mode).
-* :link: Can safely work with broken symbolic links.
-
-## Install
-
-```console
-npm install @nodelib/fs.scandir
-```
-
-## Usage
-
-```ts
-import * as fsScandir from '@nodelib/fs.scandir';
-
-fsScandir.scandir('path', (error, stats) => { /* … */ });
-```
-
-## API
-
-### .scandir(path, [optionsOrSettings], callback)
-
-Returns an array of plain objects ([`Entry`](#entry)) with information about entry for provided path with standard callback-style.
-
-```ts
-fsScandir.scandir('path', (error, entries) => { /* … */ });
-fsScandir.scandir('path', {}, (error, entries) => { /* … */ });
-fsScandir.scandir('path', new fsScandir.Settings(), (error, entries) => { /* … */ });
-```
-
-### .scandirSync(path, [optionsOrSettings])
-
-Returns an array of plain objects ([`Entry`](#entry)) with information about entry for provided path.
-
-```ts
-const entries = fsScandir.scandirSync('path');
-const entries = fsScandir.scandirSync('path', {});
-const entries = fsScandir.scandirSync(('path', new fsScandir.Settings());
-```
-
-#### path
-
-* Required: `true`
-* Type: `string | Buffer | URL`
-
-A path to a file. If a URL is provided, it must use the `file:` protocol.
-
-#### optionsOrSettings
-
-* Required: `false`
-* Type: `Options | Settings`
-* Default: An instance of `Settings` class
-
-An [`Options`](#options) object or an instance of [`Settings`](#settingsoptions) class.
-
-> :book: When you pass a plain object, an instance of the `Settings` class will be created automatically. If you plan to call the method frequently, use a pre-created instance of the `Settings` class.
-
-### Settings([options])
-
-A class of full settings of the package.
-
-```ts
-const settings = new fsScandir.Settings({ followSymbolicLinks: false });
-
-const entries = fsScandir.scandirSync('path', settings);
-```
-
-## Entry
-
-* `name` — The name of the entry (`unknown.txt`).
-* `path` — The path of the entry relative to call directory (`root/unknown.txt`).
-* `dirent` — An instance of [`fs.Dirent`](./src/types/index.ts) class. On Node.js below 10.10 will be emulated by [`DirentFromStats`](./src/utils/fs.ts) class.
-* `stats` (optional) — An instance of `fs.Stats` class.
-
-For example, the `scandir` call for `tools` directory with one directory inside:
-
-```ts
-{
- dirent: Dirent { name: 'typedoc', /* … */ },
- name: 'typedoc',
- path: 'tools/typedoc'
-}
-```
-
-## Options
-
-### stats
-
-* Type: `boolean`
-* Default: `false`
-
-Adds an instance of `fs.Stats` class to the [`Entry`](#entry).
-
-> :book: Always use `fs.readdir` without the `withFileTypes` option. ??TODO??
-
-### followSymbolicLinks
-
-* Type: `boolean`
-* Default: `false`
-
-Follow symbolic links or not. Call `fs.stat` on symbolic link if `true`.
-
-### `throwErrorOnBrokenSymbolicLink`
-
-* Type: `boolean`
-* Default: `true`
-
-Throw an error when symbolic link is broken if `true` or safely use `lstat` call if `false`.
-
-### `pathSegmentSeparator`
-
-* Type: `string`
-* Default: `path.sep`
-
-By default, this package uses the correct path separator for your OS (`\` on Windows, `/` on Unix-like systems). But you can set this option to any separator character(s) that you want to use instead.
-
-### `fs`
-
-* Type: [`FileSystemAdapter`](./src/adapters/fs.ts)
-* Default: A default FS methods
-
-By default, the built-in Node.js module (`fs`) is used to work with the file system. You can replace any method with your own.
-
-```ts
-interface FileSystemAdapter {
- lstat?: typeof fs.lstat;
- stat?: typeof fs.stat;
- lstatSync?: typeof fs.lstatSync;
- statSync?: typeof fs.statSync;
- readdir?: typeof fs.readdir;
- readdirSync?: typeof fs.readdirSync;
-}
-
-const settings = new fsScandir.Settings({
- fs: { lstat: fakeLstat }
-});
-```
-
-## `old` and `modern` mode
-
-This package has two modes that are used depending on the environment and parameters of use.
-
-### old
-
-* Node.js below `10.10` or when the `stats` option is enabled
-
-When working in the old mode, the directory is read first (`fs.readdir`), then the type of entries is determined (`fs.lstat` and/or `fs.stat` for symbolic links).
-
-### modern
-
-* Node.js 10.10+ and the `stats` option is disabled
-
-In the modern mode, reading the directory (`fs.readdir` with the `withFileTypes` option) is combined with obtaining information about its entries. An additional call for symbolic links (`fs.stat`) is still present.
-
-This mode makes fewer calls to the file system. It's faster.
-
-## Changelog
-
-See the [Releases section of our GitHub project](https://github.com/nodelib/nodelib/releases) for changelog for each release version.
-
-## License
-
-This software is released under the terms of the MIT license.
diff --git a/node_modules/@nodelib/fs.scandir/out/adapters/fs.d.ts b/node_modules/@nodelib/fs.scandir/out/adapters/fs.d.ts
deleted file mode 100644
index 827f1db..0000000
--- a/node_modules/@nodelib/fs.scandir/out/adapters/fs.d.ts
+++ /dev/null
@@ -1,20 +0,0 @@
-import type * as fsStat from '@nodelib/fs.stat';
-import type { Dirent, ErrnoException } from '../types';
-export interface ReaddirAsynchronousMethod {
- (filepath: string, options: {
- withFileTypes: true;
- }, callback: (error: ErrnoException | null, files: Dirent[]) => void): void;
- (filepath: string, callback: (error: ErrnoException | null, files: string[]) => void): void;
-}
-export interface ReaddirSynchronousMethod {
- (filepath: string, options: {
- withFileTypes: true;
- }): Dirent[];
- (filepath: string): string[];
-}
-export declare type FileSystemAdapter = fsStat.FileSystemAdapter & {
- readdir: ReaddirAsynchronousMethod;
- readdirSync: ReaddirSynchronousMethod;
-};
-export declare const FILE_SYSTEM_ADAPTER: FileSystemAdapter;
-export declare function createFileSystemAdapter(fsMethods?: Partial): FileSystemAdapter;
diff --git a/node_modules/@nodelib/fs.scandir/out/adapters/fs.js b/node_modules/@nodelib/fs.scandir/out/adapters/fs.js
deleted file mode 100644
index f0fe022..0000000
--- a/node_modules/@nodelib/fs.scandir/out/adapters/fs.js
+++ /dev/null
@@ -1,19 +0,0 @@
-"use strict";
-Object.defineProperty(exports, "__esModule", { value: true });
-exports.createFileSystemAdapter = exports.FILE_SYSTEM_ADAPTER = void 0;
-const fs = require("fs");
-exports.FILE_SYSTEM_ADAPTER = {
- lstat: fs.lstat,
- stat: fs.stat,
- lstatSync: fs.lstatSync,
- statSync: fs.statSync,
- readdir: fs.readdir,
- readdirSync: fs.readdirSync
-};
-function createFileSystemAdapter(fsMethods) {
- if (fsMethods === undefined) {
- return exports.FILE_SYSTEM_ADAPTER;
- }
- return Object.assign(Object.assign({}, exports.FILE_SYSTEM_ADAPTER), fsMethods);
-}
-exports.createFileSystemAdapter = createFileSystemAdapter;
diff --git a/node_modules/@nodelib/fs.scandir/out/constants.d.ts b/node_modules/@nodelib/fs.scandir/out/constants.d.ts
deleted file mode 100644
index 33f1749..0000000
--- a/node_modules/@nodelib/fs.scandir/out/constants.d.ts
+++ /dev/null
@@ -1,4 +0,0 @@
-/**
- * IS `true` for Node.js 10.10 and greater.
- */
-export declare const IS_SUPPORT_READDIR_WITH_FILE_TYPES: boolean;
diff --git a/node_modules/@nodelib/fs.scandir/out/constants.js b/node_modules/@nodelib/fs.scandir/out/constants.js
deleted file mode 100644
index 7e3d441..0000000
--- a/node_modules/@nodelib/fs.scandir/out/constants.js
+++ /dev/null
@@ -1,17 +0,0 @@
-"use strict";
-Object.defineProperty(exports, "__esModule", { value: true });
-exports.IS_SUPPORT_READDIR_WITH_FILE_TYPES = void 0;
-const NODE_PROCESS_VERSION_PARTS = process.versions.node.split('.');
-if (NODE_PROCESS_VERSION_PARTS[0] === undefined || NODE_PROCESS_VERSION_PARTS[1] === undefined) {
- throw new Error(`Unexpected behavior. The 'process.versions.node' variable has invalid value: ${process.versions.node}`);
-}
-const MAJOR_VERSION = Number.parseInt(NODE_PROCESS_VERSION_PARTS[0], 10);
-const MINOR_VERSION = Number.parseInt(NODE_PROCESS_VERSION_PARTS[1], 10);
-const SUPPORTED_MAJOR_VERSION = 10;
-const SUPPORTED_MINOR_VERSION = 10;
-const IS_MATCHED_BY_MAJOR = MAJOR_VERSION > SUPPORTED_MAJOR_VERSION;
-const IS_MATCHED_BY_MAJOR_AND_MINOR = MAJOR_VERSION === SUPPORTED_MAJOR_VERSION && MINOR_VERSION >= SUPPORTED_MINOR_VERSION;
-/**
- * IS `true` for Node.js 10.10 and greater.
- */
-exports.IS_SUPPORT_READDIR_WITH_FILE_TYPES = IS_MATCHED_BY_MAJOR || IS_MATCHED_BY_MAJOR_AND_MINOR;
diff --git a/node_modules/@nodelib/fs.scandir/out/index.d.ts b/node_modules/@nodelib/fs.scandir/out/index.d.ts
deleted file mode 100644
index b9da83e..0000000
--- a/node_modules/@nodelib/fs.scandir/out/index.d.ts
+++ /dev/null
@@ -1,12 +0,0 @@
-import type { FileSystemAdapter, ReaddirAsynchronousMethod, ReaddirSynchronousMethod } from './adapters/fs';
-import * as async from './providers/async';
-import Settings, { Options } from './settings';
-import type { Dirent, Entry } from './types';
-declare type AsyncCallback = async.AsyncCallback;
-declare function scandir(path: string, callback: AsyncCallback): void;
-declare function scandir(path: string, optionsOrSettings: Options | Settings, callback: AsyncCallback): void;
-declare namespace scandir {
- function __promisify__(path: string, optionsOrSettings?: Options | Settings): Promise;
-}
-declare function scandirSync(path: string, optionsOrSettings?: Options | Settings): Entry[];
-export { scandir, scandirSync, Settings, AsyncCallback, Dirent, Entry, FileSystemAdapter, ReaddirAsynchronousMethod, ReaddirSynchronousMethod, Options };
diff --git a/node_modules/@nodelib/fs.scandir/out/index.js b/node_modules/@nodelib/fs.scandir/out/index.js
deleted file mode 100644
index 99c70d3..0000000
--- a/node_modules/@nodelib/fs.scandir/out/index.js
+++ /dev/null
@@ -1,26 +0,0 @@
-"use strict";
-Object.defineProperty(exports, "__esModule", { value: true });
-exports.Settings = exports.scandirSync = exports.scandir = void 0;
-const async = require("./providers/async");
-const sync = require("./providers/sync");
-const settings_1 = require("./settings");
-exports.Settings = settings_1.default;
-function scandir(path, optionsOrSettingsOrCallback, callback) {
- if (typeof optionsOrSettingsOrCallback === 'function') {
- async.read(path, getSettings(), optionsOrSettingsOrCallback);
- return;
- }
- async.read(path, getSettings(optionsOrSettingsOrCallback), callback);
-}
-exports.scandir = scandir;
-function scandirSync(path, optionsOrSettings) {
- const settings = getSettings(optionsOrSettings);
- return sync.read(path, settings);
-}
-exports.scandirSync = scandirSync;
-function getSettings(settingsOrOptions = {}) {
- if (settingsOrOptions instanceof settings_1.default) {
- return settingsOrOptions;
- }
- return new settings_1.default(settingsOrOptions);
-}
diff --git a/node_modules/@nodelib/fs.scandir/out/providers/async.d.ts b/node_modules/@nodelib/fs.scandir/out/providers/async.d.ts
deleted file mode 100644
index 5829676..0000000
--- a/node_modules/@nodelib/fs.scandir/out/providers/async.d.ts
+++ /dev/null
@@ -1,7 +0,0 @@
-///
-import type Settings from '../settings';
-import type { Entry } from '../types';
-export declare type AsyncCallback = (error: NodeJS.ErrnoException, entries: Entry[]) => void;
-export declare function read(directory: string, settings: Settings, callback: AsyncCallback): void;
-export declare function readdirWithFileTypes(directory: string, settings: Settings, callback: AsyncCallback): void;
-export declare function readdir(directory: string, settings: Settings, callback: AsyncCallback): void;
diff --git a/node_modules/@nodelib/fs.scandir/out/providers/async.js b/node_modules/@nodelib/fs.scandir/out/providers/async.js
deleted file mode 100644
index e8e2f0a..0000000
--- a/node_modules/@nodelib/fs.scandir/out/providers/async.js
+++ /dev/null
@@ -1,104 +0,0 @@
-"use strict";
-Object.defineProperty(exports, "__esModule", { value: true });
-exports.readdir = exports.readdirWithFileTypes = exports.read = void 0;
-const fsStat = require("@nodelib/fs.stat");
-const rpl = require("run-parallel");
-const constants_1 = require("../constants");
-const utils = require("../utils");
-const common = require("./common");
-function read(directory, settings, callback) {
- if (!settings.stats && constants_1.IS_SUPPORT_READDIR_WITH_FILE_TYPES) {
- readdirWithFileTypes(directory, settings, callback);
- return;
- }
- readdir(directory, settings, callback);
-}
-exports.read = read;
-function readdirWithFileTypes(directory, settings, callback) {
- settings.fs.readdir(directory, { withFileTypes: true }, (readdirError, dirents) => {
- if (readdirError !== null) {
- callFailureCallback(callback, readdirError);
- return;
- }
- const entries = dirents.map((dirent) => ({
- dirent,
- name: dirent.name,
- path: common.joinPathSegments(directory, dirent.name, settings.pathSegmentSeparator)
- }));
- if (!settings.followSymbolicLinks) {
- callSuccessCallback(callback, entries);
- return;
- }
- const tasks = entries.map((entry) => makeRplTaskEntry(entry, settings));
- rpl(tasks, (rplError, rplEntries) => {
- if (rplError !== null) {
- callFailureCallback(callback, rplError);
- return;
- }
- callSuccessCallback(callback, rplEntries);
- });
- });
-}
-exports.readdirWithFileTypes = readdirWithFileTypes;
-function makeRplTaskEntry(entry, settings) {
- return (done) => {
- if (!entry.dirent.isSymbolicLink()) {
- done(null, entry);
- return;
- }
- settings.fs.stat(entry.path, (statError, stats) => {
- if (statError !== null) {
- if (settings.throwErrorOnBrokenSymbolicLink) {
- done(statError);
- return;
- }
- done(null, entry);
- return;
- }
- entry.dirent = utils.fs.createDirentFromStats(entry.name, stats);
- done(null, entry);
- });
- };
-}
-function readdir(directory, settings, callback) {
- settings.fs.readdir(directory, (readdirError, names) => {
- if (readdirError !== null) {
- callFailureCallback(callback, readdirError);
- return;
- }
- const tasks = names.map((name) => {
- const path = common.joinPathSegments(directory, name, settings.pathSegmentSeparator);
- return (done) => {
- fsStat.stat(path, settings.fsStatSettings, (error, stats) => {
- if (error !== null) {
- done(error);
- return;
- }
- const entry = {
- name,
- path,
- dirent: utils.fs.createDirentFromStats(name, stats)
- };
- if (settings.stats) {
- entry.stats = stats;
- }
- done(null, entry);
- });
- };
- });
- rpl(tasks, (rplError, entries) => {
- if (rplError !== null) {
- callFailureCallback(callback, rplError);
- return;
- }
- callSuccessCallback(callback, entries);
- });
- });
-}
-exports.readdir = readdir;
-function callFailureCallback(callback, error) {
- callback(error);
-}
-function callSuccessCallback(callback, result) {
- callback(null, result);
-}
diff --git a/node_modules/@nodelib/fs.scandir/out/providers/common.d.ts b/node_modules/@nodelib/fs.scandir/out/providers/common.d.ts
deleted file mode 100644
index 2b4d08b..0000000
--- a/node_modules/@nodelib/fs.scandir/out/providers/common.d.ts
+++ /dev/null
@@ -1 +0,0 @@
-export declare function joinPathSegments(a: string, b: string, separator: string): string;
diff --git a/node_modules/@nodelib/fs.scandir/out/providers/common.js b/node_modules/@nodelib/fs.scandir/out/providers/common.js
deleted file mode 100644
index 8724cb5..0000000
--- a/node_modules/@nodelib/fs.scandir/out/providers/common.js
+++ /dev/null
@@ -1,13 +0,0 @@
-"use strict";
-Object.defineProperty(exports, "__esModule", { value: true });
-exports.joinPathSegments = void 0;
-function joinPathSegments(a, b, separator) {
- /**
- * The correct handling of cases when the first segment is a root (`/`, `C:/`) or UNC path (`//?/C:/`).
- */
- if (a.endsWith(separator)) {
- return a + b;
- }
- return a + separator + b;
-}
-exports.joinPathSegments = joinPathSegments;
diff --git a/node_modules/@nodelib/fs.scandir/out/providers/sync.d.ts b/node_modules/@nodelib/fs.scandir/out/providers/sync.d.ts
deleted file mode 100644
index e05c8f0..0000000
--- a/node_modules/@nodelib/fs.scandir/out/providers/sync.d.ts
+++ /dev/null
@@ -1,5 +0,0 @@
-import type Settings from '../settings';
-import type { Entry } from '../types';
-export declare function read(directory: string, settings: Settings): Entry[];
-export declare function readdirWithFileTypes(directory: string, settings: Settings): Entry[];
-export declare function readdir(directory: string, settings: Settings): Entry[];
diff --git a/node_modules/@nodelib/fs.scandir/out/providers/sync.js b/node_modules/@nodelib/fs.scandir/out/providers/sync.js
deleted file mode 100644
index 146db34..0000000
--- a/node_modules/@nodelib/fs.scandir/out/providers/sync.js
+++ /dev/null
@@ -1,54 +0,0 @@
-"use strict";
-Object.defineProperty(exports, "__esModule", { value: true });
-exports.readdir = exports.readdirWithFileTypes = exports.read = void 0;
-const fsStat = require("@nodelib/fs.stat");
-const constants_1 = require("../constants");
-const utils = require("../utils");
-const common = require("./common");
-function read(directory, settings) {
- if (!settings.stats && constants_1.IS_SUPPORT_READDIR_WITH_FILE_TYPES) {
- return readdirWithFileTypes(directory, settings);
- }
- return readdir(directory, settings);
-}
-exports.read = read;
-function readdirWithFileTypes(directory, settings) {
- const dirents = settings.fs.readdirSync(directory, { withFileTypes: true });
- return dirents.map((dirent) => {
- const entry = {
- dirent,
- name: dirent.name,
- path: common.joinPathSegments(directory, dirent.name, settings.pathSegmentSeparator)
- };
- if (entry.dirent.isSymbolicLink() && settings.followSymbolicLinks) {
- try {
- const stats = settings.fs.statSync(entry.path);
- entry.dirent = utils.fs.createDirentFromStats(entry.name, stats);
- }
- catch (error) {
- if (settings.throwErrorOnBrokenSymbolicLink) {
- throw error;
- }
- }
- }
- return entry;
- });
-}
-exports.readdirWithFileTypes = readdirWithFileTypes;
-function readdir(directory, settings) {
- const names = settings.fs.readdirSync(directory);
- return names.map((name) => {
- const entryPath = common.joinPathSegments(directory, name, settings.pathSegmentSeparator);
- const stats = fsStat.statSync(entryPath, settings.fsStatSettings);
- const entry = {
- name,
- path: entryPath,
- dirent: utils.fs.createDirentFromStats(name, stats)
- };
- if (settings.stats) {
- entry.stats = stats;
- }
- return entry;
- });
-}
-exports.readdir = readdir;
diff --git a/node_modules/@nodelib/fs.scandir/out/settings.d.ts b/node_modules/@nodelib/fs.scandir/out/settings.d.ts
deleted file mode 100644
index a0db115..0000000
--- a/node_modules/@nodelib/fs.scandir/out/settings.d.ts
+++ /dev/null
@@ -1,20 +0,0 @@
-import * as fsStat from '@nodelib/fs.stat';
-import * as fs from './adapters/fs';
-export interface Options {
- followSymbolicLinks?: boolean;
- fs?: Partial;
- pathSegmentSeparator?: string;
- stats?: boolean;
- throwErrorOnBrokenSymbolicLink?: boolean;
-}
-export default class Settings {
- private readonly _options;
- readonly followSymbolicLinks: boolean;
- readonly fs: fs.FileSystemAdapter;
- readonly pathSegmentSeparator: string;
- readonly stats: boolean;
- readonly throwErrorOnBrokenSymbolicLink: boolean;
- readonly fsStatSettings: fsStat.Settings;
- constructor(_options?: Options);
- private _getValue;
-}
diff --git a/node_modules/@nodelib/fs.scandir/out/settings.js b/node_modules/@nodelib/fs.scandir/out/settings.js
deleted file mode 100644
index 15a3e8c..0000000
--- a/node_modules/@nodelib/fs.scandir/out/settings.js
+++ /dev/null
@@ -1,24 +0,0 @@
-"use strict";
-Object.defineProperty(exports, "__esModule", { value: true });
-const path = require("path");
-const fsStat = require("@nodelib/fs.stat");
-const fs = require("./adapters/fs");
-class Settings {
- constructor(_options = {}) {
- this._options = _options;
- this.followSymbolicLinks = this._getValue(this._options.followSymbolicLinks, false);
- this.fs = fs.createFileSystemAdapter(this._options.fs);
- this.pathSegmentSeparator = this._getValue(this._options.pathSegmentSeparator, path.sep);
- this.stats = this._getValue(this._options.stats, false);
- this.throwErrorOnBrokenSymbolicLink = this._getValue(this._options.throwErrorOnBrokenSymbolicLink, true);
- this.fsStatSettings = new fsStat.Settings({
- followSymbolicLink: this.followSymbolicLinks,
- fs: this.fs,
- throwErrorOnBrokenSymbolicLink: this.throwErrorOnBrokenSymbolicLink
- });
- }
- _getValue(option, value) {
- return option !== null && option !== void 0 ? option : value;
- }
-}
-exports.default = Settings;
diff --git a/node_modules/@nodelib/fs.scandir/out/types/index.d.ts b/node_modules/@nodelib/fs.scandir/out/types/index.d.ts
deleted file mode 100644
index f326c5e..0000000
--- a/node_modules/@nodelib/fs.scandir/out/types/index.d.ts
+++ /dev/null
@@ -1,20 +0,0 @@
-///
-import type * as fs from 'fs';
-export interface Entry {
- dirent: Dirent;
- name: string;
- path: string;
- stats?: Stats;
-}
-export declare type Stats = fs.Stats;
-export declare type ErrnoException = NodeJS.ErrnoException;
-export interface Dirent {
- isBlockDevice: () => boolean;
- isCharacterDevice: () => boolean;
- isDirectory: () => boolean;
- isFIFO: () => boolean;
- isFile: () => boolean;
- isSocket: () => boolean;
- isSymbolicLink: () => boolean;
- name: string;
-}
diff --git a/node_modules/@nodelib/fs.scandir/out/types/index.js b/node_modules/@nodelib/fs.scandir/out/types/index.js
deleted file mode 100644
index c8ad2e5..0000000
--- a/node_modules/@nodelib/fs.scandir/out/types/index.js
+++ /dev/null
@@ -1,2 +0,0 @@
-"use strict";
-Object.defineProperty(exports, "__esModule", { value: true });
diff --git a/node_modules/@nodelib/fs.scandir/out/utils/fs.d.ts b/node_modules/@nodelib/fs.scandir/out/utils/fs.d.ts
deleted file mode 100644
index bb863f1..0000000
--- a/node_modules/@nodelib/fs.scandir/out/utils/fs.d.ts
+++ /dev/null
@@ -1,2 +0,0 @@
-import type { Dirent, Stats } from '../types';
-export declare function createDirentFromStats(name: string, stats: Stats): Dirent;
diff --git a/node_modules/@nodelib/fs.scandir/out/utils/fs.js b/node_modules/@nodelib/fs.scandir/out/utils/fs.js
deleted file mode 100644
index ace7c74..0000000
--- a/node_modules/@nodelib/fs.scandir/out/utils/fs.js
+++ /dev/null
@@ -1,19 +0,0 @@
-"use strict";
-Object.defineProperty(exports, "__esModule", { value: true });
-exports.createDirentFromStats = void 0;
-class DirentFromStats {
- constructor(name, stats) {
- this.name = name;
- this.isBlockDevice = stats.isBlockDevice.bind(stats);
- this.isCharacterDevice = stats.isCharacterDevice.bind(stats);
- this.isDirectory = stats.isDirectory.bind(stats);
- this.isFIFO = stats.isFIFO.bind(stats);
- this.isFile = stats.isFile.bind(stats);
- this.isSocket = stats.isSocket.bind(stats);
- this.isSymbolicLink = stats.isSymbolicLink.bind(stats);
- }
-}
-function createDirentFromStats(name, stats) {
- return new DirentFromStats(name, stats);
-}
-exports.createDirentFromStats = createDirentFromStats;
diff --git a/node_modules/@nodelib/fs.scandir/out/utils/index.d.ts b/node_modules/@nodelib/fs.scandir/out/utils/index.d.ts
deleted file mode 100644
index 1b41954..0000000
--- a/node_modules/@nodelib/fs.scandir/out/utils/index.d.ts
+++ /dev/null
@@ -1,2 +0,0 @@
-import * as fs from './fs';
-export { fs };
diff --git a/node_modules/@nodelib/fs.scandir/out/utils/index.js b/node_modules/@nodelib/fs.scandir/out/utils/index.js
deleted file mode 100644
index f5de129..0000000
--- a/node_modules/@nodelib/fs.scandir/out/utils/index.js
+++ /dev/null
@@ -1,5 +0,0 @@
-"use strict";
-Object.defineProperty(exports, "__esModule", { value: true });
-exports.fs = void 0;
-const fs = require("./fs");
-exports.fs = fs;
diff --git a/node_modules/@nodelib/fs.scandir/package.json b/node_modules/@nodelib/fs.scandir/package.json
deleted file mode 100644
index d3a8924..0000000
--- a/node_modules/@nodelib/fs.scandir/package.json
+++ /dev/null
@@ -1,44 +0,0 @@
-{
- "name": "@nodelib/fs.scandir",
- "version": "2.1.5",
- "description": "List files and directories inside the specified directory",
- "license": "MIT",
- "repository": "https://github.com/nodelib/nodelib/tree/master/packages/fs/fs.scandir",
- "keywords": [
- "NodeLib",
- "fs",
- "FileSystem",
- "file system",
- "scandir",
- "readdir",
- "dirent"
- ],
- "engines": {
- "node": ">= 8"
- },
- "files": [
- "out/**",
- "!out/**/*.map",
- "!out/**/*.spec.*"
- ],
- "main": "out/index.js",
- "typings": "out/index.d.ts",
- "scripts": {
- "clean": "rimraf {tsconfig.tsbuildinfo,out}",
- "lint": "eslint \"src/**/*.ts\" --cache",
- "compile": "tsc -b .",
- "compile:watch": "tsc -p . --watch --sourceMap",
- "test": "mocha \"out/**/*.spec.js\" -s 0",
- "build": "npm run clean && npm run compile && npm run lint && npm test",
- "watch": "npm run clean && npm run compile:watch"
- },
- "dependencies": {
- "@nodelib/fs.stat": "2.0.5",
- "run-parallel": "^1.1.9"
- },
- "devDependencies": {
- "@nodelib/fs.macchiato": "1.0.4",
- "@types/run-parallel": "^1.1.0"
- },
- "gitHead": "d6a7960d5281d3dd5f8e2efba49bb552d090f562"
-}
diff --git a/node_modules/@nodelib/fs.stat/LICENSE b/node_modules/@nodelib/fs.stat/LICENSE
deleted file mode 100644
index 65a9994..0000000
--- a/node_modules/@nodelib/fs.stat/LICENSE
+++ /dev/null
@@ -1,21 +0,0 @@
-The MIT License (MIT)
-
-Copyright (c) Denis Malinochkin
-
-Permission is hereby granted, free of charge, to any person obtaining a copy
-of this software and associated documentation files (the "Software"), to deal
-in the Software without restriction, including without limitation the rights
-to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
-copies of the Software, and to permit persons to whom the Software is
-furnished to do so, subject to the following conditions:
-
-The above copyright notice and this permission notice shall be included in all
-copies or substantial portions of the Software.
-
-THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
-IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
-FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
-AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
-LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
-OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
-SOFTWARE.
diff --git a/node_modules/@nodelib/fs.stat/README.md b/node_modules/@nodelib/fs.stat/README.md
deleted file mode 100644
index 686f047..0000000
--- a/node_modules/@nodelib/fs.stat/README.md
+++ /dev/null
@@ -1,126 +0,0 @@
-# @nodelib/fs.stat
-
-> Get the status of a file with some features.
-
-## :bulb: Highlights
-
-Wrapper around standard method `fs.lstat` and `fs.stat` with some features.
-
-* :beginner: Normally follows symbolic link.
-* :gear: Can safely work with broken symbolic link.
-
-## Install
-
-```console
-npm install @nodelib/fs.stat
-```
-
-## Usage
-
-```ts
-import * as fsStat from '@nodelib/fs.stat';
-
-fsStat.stat('path', (error, stats) => { /* … */ });
-```
-
-## API
-
-### .stat(path, [optionsOrSettings], callback)
-
-Returns an instance of `fs.Stats` class for provided path with standard callback-style.
-
-```ts
-fsStat.stat('path', (error, stats) => { /* … */ });
-fsStat.stat('path', {}, (error, stats) => { /* … */ });
-fsStat.stat('path', new fsStat.Settings(), (error, stats) => { /* … */ });
-```
-
-### .statSync(path, [optionsOrSettings])
-
-Returns an instance of `fs.Stats` class for provided path.
-
-```ts
-const stats = fsStat.stat('path');
-const stats = fsStat.stat('path', {});
-const stats = fsStat.stat('path', new fsStat.Settings());
-```
-
-#### path
-
-* Required: `true`
-* Type: `string | Buffer | URL`
-
-A path to a file. If a URL is provided, it must use the `file:` protocol.
-
-#### optionsOrSettings
-
-* Required: `false`
-* Type: `Options | Settings`
-* Default: An instance of `Settings` class
-
-An [`Options`](#options) object or an instance of [`Settings`](#settings) class.
-
-> :book: When you pass a plain object, an instance of the `Settings` class will be created automatically. If you plan to call the method frequently, use a pre-created instance of the `Settings` class.
-
-### Settings([options])
-
-A class of full settings of the package.
-
-```ts
-const settings = new fsStat.Settings({ followSymbolicLink: false });
-
-const stats = fsStat.stat('path', settings);
-```
-
-## Options
-
-### `followSymbolicLink`
-
-* Type: `boolean`
-* Default: `true`
-
-Follow symbolic link or not. Call `fs.stat` on symbolic link if `true`.
-
-### `markSymbolicLink`
-
-* Type: `boolean`
-* Default: `false`
-
-Mark symbolic link by setting the return value of `isSymbolicLink` function to always `true` (even after `fs.stat`).
-
-> :book: Can be used if you want to know what is hidden behind a symbolic link, but still continue to know that it is a symbolic link.
-
-### `throwErrorOnBrokenSymbolicLink`
-
-* Type: `boolean`
-* Default: `true`
-
-Throw an error when symbolic link is broken if `true` or safely return `lstat` call if `false`.
-
-### `fs`
-
-* Type: [`FileSystemAdapter`](./src/adapters/fs.ts)
-* Default: A default FS methods
-
-By default, the built-in Node.js module (`fs`) is used to work with the file system. You can replace any method with your own.
-
-```ts
-interface FileSystemAdapter {
- lstat?: typeof fs.lstat;
- stat?: typeof fs.stat;
- lstatSync?: typeof fs.lstatSync;
- statSync?: typeof fs.statSync;
-}
-
-const settings = new fsStat.Settings({
- fs: { lstat: fakeLstat }
-});
-```
-
-## Changelog
-
-See the [Releases section of our GitHub project](https://github.com/nodelib/nodelib/releases) for changelog for each release version.
-
-## License
-
-This software is released under the terms of the MIT license.
diff --git a/node_modules/@nodelib/fs.stat/out/adapters/fs.d.ts b/node_modules/@nodelib/fs.stat/out/adapters/fs.d.ts
deleted file mode 100644
index 3af759c..0000000
--- a/node_modules/@nodelib/fs.stat/out/adapters/fs.d.ts
+++ /dev/null
@@ -1,13 +0,0 @@
-///
-import * as fs from 'fs';
-import type { ErrnoException } from '../types';
-export declare type StatAsynchronousMethod = (path: string, callback: (error: ErrnoException | null, stats: fs.Stats) => void) => void;
-export declare type StatSynchronousMethod = (path: string) => fs.Stats;
-export interface FileSystemAdapter {
- lstat: StatAsynchronousMethod;
- stat: StatAsynchronousMethod;
- lstatSync: StatSynchronousMethod;
- statSync: StatSynchronousMethod;
-}
-export declare const FILE_SYSTEM_ADAPTER: FileSystemAdapter;
-export declare function createFileSystemAdapter(fsMethods?: Partial): FileSystemAdapter;
diff --git a/node_modules/@nodelib/fs.stat/out/adapters/fs.js b/node_modules/@nodelib/fs.stat/out/adapters/fs.js
deleted file mode 100644
index 8dc08c8..0000000
--- a/node_modules/@nodelib/fs.stat/out/adapters/fs.js
+++ /dev/null
@@ -1,17 +0,0 @@
-"use strict";
-Object.defineProperty(exports, "__esModule", { value: true });
-exports.createFileSystemAdapter = exports.FILE_SYSTEM_ADAPTER = void 0;
-const fs = require("fs");
-exports.FILE_SYSTEM_ADAPTER = {
- lstat: fs.lstat,
- stat: fs.stat,
- lstatSync: fs.lstatSync,
- statSync: fs.statSync
-};
-function createFileSystemAdapter(fsMethods) {
- if (fsMethods === undefined) {
- return exports.FILE_SYSTEM_ADAPTER;
- }
- return Object.assign(Object.assign({}, exports.FILE_SYSTEM_ADAPTER), fsMethods);
-}
-exports.createFileSystemAdapter = createFileSystemAdapter;
diff --git a/node_modules/@nodelib/fs.stat/out/index.d.ts b/node_modules/@nodelib/fs.stat/out/index.d.ts
deleted file mode 100644
index f95db99..0000000
--- a/node_modules/@nodelib/fs.stat/out/index.d.ts
+++ /dev/null
@@ -1,12 +0,0 @@
-import type { FileSystemAdapter, StatAsynchronousMethod, StatSynchronousMethod } from './adapters/fs';
-import * as async from './providers/async';
-import Settings, { Options } from './settings';
-import type { Stats } from './types';
-declare type AsyncCallback = async.AsyncCallback;
-declare function stat(path: string, callback: AsyncCallback): void;
-declare function stat(path: string, optionsOrSettings: Options | Settings, callback: AsyncCallback): void;
-declare namespace stat {
- function __promisify__(path: string, optionsOrSettings?: Options | Settings): Promise