update vscode
This commit is contained in:
19
vscodeEvalExtension/node_modules/eslint/LICENSE
generated
vendored
Normal file
19
vscodeEvalExtension/node_modules/eslint/LICENSE
generated
vendored
Normal file
@@ -0,0 +1,19 @@
|
||||
Copyright OpenJS Foundation and other contributors, <www.openjsf.org>
|
||||
|
||||
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.
|
||||
304
vscodeEvalExtension/node_modules/eslint/README.md
generated
vendored
Normal file
304
vscodeEvalExtension/node_modules/eslint/README.md
generated
vendored
Normal file
@@ -0,0 +1,304 @@
|
||||
[](https://www.npmjs.com/package/eslint)
|
||||
[](https://www.npmjs.com/package/eslint)
|
||||
[](https://github.com/eslint/eslint/actions)
|
||||
[](https://app.fossa.io/projects/git%2Bhttps%3A%2F%2Fgithub.com%2Feslint%2Feslint?ref=badge_shield)
|
||||
<br />
|
||||
[](https://opencollective.com/eslint)
|
||||
[](https://opencollective.com/eslint)
|
||||
[](https://twitter.com/intent/user?screen_name=geteslint)
|
||||
|
||||
# ESLint
|
||||
|
||||
[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) |
|
||||
[Twitter](https://twitter.com/geteslint) |
|
||||
[Discord](https://eslint.org/chat) |
|
||||
[Mastodon](https://fosstodon.org/@eslint)
|
||||
|
||||
ESLint is a tool for identifying and reporting on patterns found in ECMAScript/JavaScript code. In many ways, it is similar to JSLint and JSHint with a few exceptions:
|
||||
|
||||
* ESLint uses [Espree](https://github.com/eslint/espree) for JavaScript parsing.
|
||||
* ESLint uses an AST to evaluate patterns in code.
|
||||
* ESLint is completely pluggable, every single rule is a plugin and you can add more at runtime.
|
||||
|
||||
## Table of Contents
|
||||
|
||||
1. [Installation and Usage](#installation-and-usage)
|
||||
2. [Configuration](#configuration)
|
||||
3. [Code of Conduct](#code-of-conduct)
|
||||
4. [Filing Issues](#filing-issues)
|
||||
5. [Frequently Asked Questions](#frequently-asked-questions)
|
||||
6. [Releases](#releases)
|
||||
7. [Security Policy](#security-policy)
|
||||
8. [Semantic Versioning Policy](#semantic-versioning-policy)
|
||||
9. [Stylistic Rule Updates](#stylistic-rule-updates)
|
||||
10. [License](#license)
|
||||
11. [Team](#team)
|
||||
12. [Sponsors](#sponsors)
|
||||
13. [Technology Sponsors](#technology-sponsors)
|
||||
|
||||
## Installation and Usage
|
||||
|
||||
Prerequisites: [Node.js](https://nodejs.org/) (`^12.22.0`, `^14.17.0`, or `>=16.0.0`) built with SSL support. (If you are using an official Node.js distribution, SSL is always built in.)
|
||||
|
||||
You can install and configure ESLint using this command:
|
||||
|
||||
```shell
|
||||
npm init @eslint/config
|
||||
```
|
||||
|
||||
After that, you can run ESLint on any file or directory like this:
|
||||
|
||||
```shell
|
||||
./node_modules/.bin/eslint yourfile.js
|
||||
```
|
||||
|
||||
## Configuration
|
||||
|
||||
After running `npm init @eslint/config`, you'll have an `.eslintrc` file in your directory. In it, you'll see some rules configured like this:
|
||||
|
||||
```json
|
||||
{
|
||||
"rules": {
|
||||
"semi": ["error", "always"],
|
||||
"quotes": ["error", "double"]
|
||||
}
|
||||
}
|
||||
```
|
||||
|
||||
The names `"semi"` and `"quotes"` are the names of [rules](https://eslint.org/docs/rules) in ESLint. The first value is the error level of the rule and can be one of these values:
|
||||
|
||||
* `"off"` or `0` - turn the rule off
|
||||
* `"warn"` or `1` - turn the rule on as a warning (doesn't affect exit code)
|
||||
* `"error"` or `2` - turn the rule on as an error (exit code will be 1)
|
||||
|
||||
The three error levels allow you fine-grained control over how ESLint applies rules (for more configuration options and details, see the [configuration docs](https://eslint.org/docs/latest/use/configure)).
|
||||
|
||||
## Code of Conduct
|
||||
|
||||
ESLint adheres to the [JS Foundation Code of Conduct](https://eslint.org/conduct).
|
||||
|
||||
## Filing Issues
|
||||
|
||||
Before filing an issue, please be sure to read the guidelines for what you're reporting:
|
||||
|
||||
* [Bug Report](https://eslint.org/docs/latest/contribute/report-bugs)
|
||||
* [Propose a New Rule](https://eslint.org/docs/latest/contribute/propose-new-rule)
|
||||
* [Proposing a Rule Change](https://eslint.org/docs/latest/contribute/propose-rule-change)
|
||||
* [Request a Change](https://eslint.org/docs/latest/contribute/request-change)
|
||||
|
||||
## Frequently Asked Questions
|
||||
|
||||
### I'm using JSCS, should I migrate to ESLint?
|
||||
|
||||
Yes. [JSCS has reached end of life](https://eslint.org/blog/2016/07/jscs-end-of-life) and is no longer supported.
|
||||
|
||||
We have prepared a [migration guide](https://eslint.org/docs/latest/use/migrating-from-jscs) to help you convert your JSCS settings to an ESLint configuration.
|
||||
|
||||
We are now at or near 100% compatibility with JSCS. If you try ESLint and believe we are not yet compatible with a JSCS rule/configuration, please create an issue (mentioning that it is a JSCS compatibility issue) and we will evaluate it as per our normal process.
|
||||
|
||||
### Does Prettier replace ESLint?
|
||||
|
||||
No, ESLint and Prettier have diffent jobs: ESLint is a linter (looking for problematic patterns) and Prettier is a code formatter. Using both tools is common, refer to [Prettier's documentation](https://prettier.io/docs/en/install#eslint-and-other-linters) to learn how to configure them to work well with each other.
|
||||
|
||||
### Why can't ESLint find my plugins?
|
||||
|
||||
* Make sure your plugins (and ESLint) are both in your project's `package.json` as devDependencies (or dependencies, if your project uses ESLint at runtime).
|
||||
* Make sure you have run `npm install` and all your dependencies are installed.
|
||||
* Make sure your plugins' peerDependencies have been installed as well. You can use `npm view eslint-plugin-myplugin peerDependencies` to see what peer dependencies `eslint-plugin-myplugin` has.
|
||||
|
||||
### Does ESLint support JSX?
|
||||
|
||||
Yes, ESLint natively supports parsing JSX syntax (this must be enabled in [configuration](https://eslint.org/docs/latest/use/configure)). Please note that supporting JSX syntax *is not* the same as supporting React. React applies specific semantics to JSX syntax that ESLint doesn't recognize. We recommend using [eslint-plugin-react](https://www.npmjs.com/package/eslint-plugin-react) if you are using React and want React semantics.
|
||||
|
||||
### What ECMAScript versions does ESLint support?
|
||||
|
||||
ESLint has full support for ECMAScript 3, 5 (default), 2015, 2016, 2017, 2018, 2019, 2020, 2021, 2022, and 2023. You can set your desired ECMAScript syntax (and other settings, like global variables or your target environments) through [configuration](https://eslint.org/docs/latest/use/configure).
|
||||
|
||||
### What about experimental features?
|
||||
|
||||
ESLint's parser only officially supports the latest final ECMAScript standard. We will make changes to core rules in order to avoid crashes on stage 3 ECMAScript syntax proposals (as long as they are implemented using the correct experimental ESTree syntax). We may make changes to core rules to better work with language extensions (such as JSX, Flow, and TypeScript) on a case-by-case basis.
|
||||
|
||||
In other cases (including if rules need to warn on more or fewer cases due to new syntax, rather than just not crashing), we recommend you use other parsers and/or rule plugins. If you are using Babel, you can use [@babel/eslint-parser](https://www.npmjs.com/package/@babel/eslint-parser) and [@babel/eslint-plugin](https://www.npmjs.com/package/@babel/eslint-plugin) to use any option available in Babel.
|
||||
|
||||
Once a language feature has been adopted into the ECMAScript standard (stage 4 according to the [TC39 process](https://tc39.github.io/process-document/)), we will accept issues and pull requests related to the new feature, subject to our [contributing guidelines](https://eslint.org/docs/latest/contribute). Until then, please use the appropriate parser and plugin(s) for your experimental feature.
|
||||
|
||||
### Where to ask for help?
|
||||
|
||||
Open a [discussion](https://github.com/eslint/eslint/discussions) or stop by our [Discord server](https://eslint.org/chat).
|
||||
|
||||
### Why doesn't ESLint lock dependency versions?
|
||||
|
||||
Lock files like `package-lock.json` are helpful for deployed applications. They ensure that dependencies are consistent between environments and across deployments.
|
||||
|
||||
Packages like `eslint` that get published to the npm registry do not include lock files. `npm install eslint` as a user will respect version constraints in ESLint's `package.json`. ESLint and its dependencies will be included in the user's lock file if one exists, but ESLint's own lock file would not be used.
|
||||
|
||||
We intentionally don't lock dependency versions so that we have the latest compatible dependency versions in development and CI that our users get when installing ESLint in a project.
|
||||
|
||||
The Twilio blog has a [deeper dive](https://www.twilio.com/blog/lockfiles-nodejs) to learn more.
|
||||
|
||||
## Releases
|
||||
|
||||
We have scheduled releases every two weeks on Friday or Saturday. You can follow a [release issue](https://github.com/eslint/eslint/issues?q=is%3Aopen+is%3Aissue+label%3Arelease) for updates about the scheduling of any particular release.
|
||||
|
||||
## Security Policy
|
||||
|
||||
ESLint takes security seriously. We work hard to ensure that ESLint is safe for everyone and that security issues are addressed quickly and responsibly. Read the full [security policy](https://github.com/eslint/.github/blob/master/SECURITY.md).
|
||||
|
||||
## Semantic Versioning Policy
|
||||
|
||||
ESLint follows [semantic versioning](https://semver.org). However, due to the nature of ESLint as a code quality tool, it's not always clear when a minor or major version bump occurs. To help clarify this for everyone, we've defined the following semantic versioning policy for ESLint:
|
||||
|
||||
* Patch release (intended to not break your lint build)
|
||||
* A bug fix in a rule that results in ESLint reporting fewer linting errors.
|
||||
* A bug fix to the CLI or core (including formatters).
|
||||
* Improvements to documentation.
|
||||
* Non-user-facing changes such as refactoring code, adding, deleting, or modifying tests, and increasing test coverage.
|
||||
* Re-releasing after a failed release (i.e., publishing a release that doesn't work for anyone).
|
||||
* Minor release (might break your lint build)
|
||||
* A bug fix in a rule that results in ESLint reporting more linting errors.
|
||||
* A new rule is created.
|
||||
* A new option to an existing rule that does not result in ESLint reporting more linting errors by default.
|
||||
* A new addition to an existing rule to support a newly-added language feature (within the last 12 months) that will result in ESLint reporting more linting errors by default.
|
||||
* An existing rule is deprecated.
|
||||
* A new CLI capability is created.
|
||||
* New capabilities to the public API are added (new classes, new methods, new arguments to existing methods, etc.).
|
||||
* A new formatter is created.
|
||||
* `eslint:recommended` is updated and will result in strictly fewer linting errors (e.g., rule removals).
|
||||
* Major release (likely to break your lint build)
|
||||
* `eslint:recommended` is updated and may result in new linting errors (e.g., rule additions, most rule option updates).
|
||||
* A new option to an existing rule that results in ESLint reporting more linting errors by default.
|
||||
* An existing formatter is removed.
|
||||
* Part of the public API is removed or changed in an incompatible way. The public API includes:
|
||||
* Rule schemas
|
||||
* Configuration schema
|
||||
* Command-line options
|
||||
* Node.js API
|
||||
* Rule, formatter, parser, plugin APIs
|
||||
|
||||
According to our policy, any minor update may report more linting errors than the previous release (ex: from a bug fix). As such, we recommend using the tilde (`~`) in `package.json` e.g. `"eslint": "~3.1.0"` to guarantee the results of your builds.
|
||||
|
||||
## Stylistic Rule Updates
|
||||
|
||||
Stylistic rules are frozen according to [our policy](https://eslint.org/blog/2020/05/changes-to-rules-policies) on how we evaluate new rules and rule changes.
|
||||
This means:
|
||||
|
||||
* **Bug fixes**: We will still fix bugs in stylistic rules.
|
||||
* **New ECMAScript features**: We will also make sure stylistic rules are compatible with new ECMAScript features.
|
||||
* **New options**: We will **not** add any new options to stylistic rules unless an option is the only way to fix a bug or support a newly-added ECMAScript feature.
|
||||
|
||||
## License
|
||||
|
||||
[](https://app.fossa.io/projects/git%2Bhttps%3A%2F%2Fgithub.com%2Feslint%2Feslint?ref=badge_large)
|
||||
|
||||
## Team
|
||||
|
||||
These folks keep the project moving and are resources for help.
|
||||
|
||||
<!-- NOTE: This section is autogenerated. Do not manually edit.-->
|
||||
|
||||
<!--teamstart-->
|
||||
|
||||
### Technical Steering Committee (TSC)
|
||||
|
||||
The people who manage releases, review feature requests, and meet regularly to ensure ESLint is properly maintained.
|
||||
|
||||
<table><tbody><tr><td align="center" valign="top" width="11%">
|
||||
<a href="https://github.com/nzakas">
|
||||
<img src="https://github.com/nzakas.png?s=75" width="75" height="75" alt="Nicholas C. Zakas's Avatar"><br />
|
||||
Nicholas C. Zakas
|
||||
</a>
|
||||
</td><td align="center" valign="top" width="11%">
|
||||
<a href="https://github.com/mdjermanovic">
|
||||
<img src="https://github.com/mdjermanovic.png?s=75" width="75" height="75" alt="Milos Djermanovic's Avatar"><br />
|
||||
Milos Djermanovic
|
||||
</a>
|
||||
</td></tr></tbody></table>
|
||||
|
||||
### Reviewers
|
||||
|
||||
The people who review and implement new features.
|
||||
|
||||
<table><tbody><tr><td align="center" valign="top" width="11%">
|
||||
<a href="https://github.com/aladdin-add">
|
||||
<img src="https://github.com/aladdin-add.png?s=75" width="75" height="75" alt="唯然's Avatar"><br />
|
||||
唯然
|
||||
</a>
|
||||
</td><td align="center" valign="top" width="11%">
|
||||
<a href="https://github.com/snitin315">
|
||||
<img src="https://github.com/snitin315.png?s=75" width="75" height="75" alt="Nitin Kumar's Avatar"><br />
|
||||
Nitin Kumar
|
||||
</a>
|
||||
</td></tr></tbody></table>
|
||||
|
||||
### Committers
|
||||
|
||||
The people who review and fix bugs and help triage issues.
|
||||
|
||||
<table><tbody><tr><td align="center" valign="top" width="11%">
|
||||
<a href="https://github.com/bmish">
|
||||
<img src="https://github.com/bmish.png?s=75" width="75" height="75" alt="Bryan Mishkin's Avatar"><br />
|
||||
Bryan Mishkin
|
||||
</a>
|
||||
</td><td align="center" valign="top" width="11%">
|
||||
<a href="https://github.com/fasttime">
|
||||
<img src="https://github.com/fasttime.png?s=75" width="75" height="75" alt="Francesco Trotta's Avatar"><br />
|
||||
Francesco Trotta
|
||||
</a>
|
||||
</td><td align="center" valign="top" width="11%">
|
||||
<a href="https://github.com/ota-meshi">
|
||||
<img src="https://github.com/ota-meshi.png?s=75" width="75" height="75" alt="Yosuke Ota's Avatar"><br />
|
||||
Yosuke Ota
|
||||
</a>
|
||||
</td><td align="center" valign="top" width="11%">
|
||||
<a href="https://github.com/Tanujkanti4441">
|
||||
<img src="https://github.com/Tanujkanti4441.png?s=75" width="75" height="75" alt="Tanuj Kanti's Avatar"><br />
|
||||
Tanuj Kanti
|
||||
</a>
|
||||
</td></tr></tbody></table>
|
||||
|
||||
### Website Team
|
||||
|
||||
Team members who focus specifically on eslint.org
|
||||
|
||||
<table><tbody><tr><td align="center" valign="top" width="11%">
|
||||
<a href="https://github.com/amareshsm">
|
||||
<img src="https://github.com/amareshsm.png?s=75" width="75" height="75" alt="Amaresh S M's Avatar"><br />
|
||||
Amaresh S M
|
||||
</a>
|
||||
</td><td align="center" valign="top" width="11%">
|
||||
<a href="https://github.com/harish-sethuraman">
|
||||
<img src="https://github.com/harish-sethuraman.png?s=75" width="75" height="75" alt="Strek's Avatar"><br />
|
||||
Strek
|
||||
</a>
|
||||
</td><td align="center" valign="top" width="11%">
|
||||
<a href="https://github.com/kecrily">
|
||||
<img src="https://github.com/kecrily.png?s=75" width="75" height="75" alt="Percy Ma's Avatar"><br />
|
||||
Percy Ma
|
||||
</a>
|
||||
</td></tr></tbody></table>
|
||||
|
||||
<!--teamend-->
|
||||
|
||||
## Sponsors
|
||||
|
||||
The following companies, organizations, and individuals support ESLint's ongoing maintenance and development. [Become a Sponsor](https://opencollective.com/eslint) to get your logo on our README and website.
|
||||
|
||||
<!-- NOTE: This section is autogenerated. Do not manually edit.-->
|
||||
<!--sponsorsstart-->
|
||||
<h3>Platinum Sponsors</h3>
|
||||
<p><a href="#"><img src="https://images.opencollective.com/2021-frameworks-fund/logo.png" alt="Chrome Frameworks Fund" height="undefined"></a> <a href="https://automattic.com"><img src="https://images.opencollective.com/automattic/d0ef3e1/logo.png" alt="Automattic" height="undefined"></a></p><h3>Gold Sponsors</h3>
|
||||
<p><a href="https://engineering.salesforce.com"><img src="https://images.opencollective.com/salesforce/ca8f997/logo.png" alt="Salesforce" height="96"></a> <a href="https://www.airbnb.com/"><img src="https://images.opencollective.com/airbnb/d327d66/logo.png" alt="Airbnb" height="96"></a></p><h3>Silver Sponsors</h3>
|
||||
<p><a href="https://liftoff.io/"><img src="https://images.opencollective.com/liftoff/5c4fa84/logo.png" alt="Liftoff" height="64"></a> <a href="https://americanexpress.io"><img src="https://avatars.githubusercontent.com/u/3853301?v=4" alt="American Express" height="64"></a> <a href="https://www.workleap.com"><img src="https://avatars.githubusercontent.com/u/53535748?u=d1e55d7661d724bf2281c1bfd33cb8f99fe2465f&v=4" alt="Workleap" height="64"></a></p><h3>Bronze Sponsors</h3>
|
||||
<p><a href="https://themeisle.com"><img src="https://images.opencollective.com/themeisle/d5592fe/logo.png" alt="ThemeIsle" height="32"></a> <a href="https://www.crosswordsolver.org/anagram-solver/"><img src="https://images.opencollective.com/anagram-solver/2666271/logo.png" alt="Anagram Solver" height="32"></a> <a href="https://icons8.com/"><img src="https://images.opencollective.com/icons8/7fa1641/logo.png" alt="Icons8" height="32"></a> <a href="https://discord.com"><img src="https://images.opencollective.com/discordapp/f9645d9/logo.png" alt="Discord" height="32"></a> <a href="https://transloadit.com/"><img src="https://avatars.githubusercontent.com/u/125754?v=4" alt="Transloadit" height="32"></a> <a href="https://www.ignitionapp.com"><img src="https://avatars.githubusercontent.com/u/5753491?v=4" alt="Ignition" height="32"></a> <a href="https://nx.dev"><img src="https://avatars.githubusercontent.com/u/23692104?v=4" alt="Nx" height="32"></a> <a href="https://herocoders.com"><img src="https://avatars.githubusercontent.com/u/37549774?v=4" alt="HeroCoders" height="32"></a></p>
|
||||
<!--sponsorsend-->
|
||||
|
||||
## Technology Sponsors
|
||||
|
||||
* Site search ([eslint.org](https://eslint.org)) is sponsored by [Algolia](https://www.algolia.com)
|
||||
* Hosting for ([eslint.org](https://eslint.org)) is sponsored by [Netlify](https://www.netlify.com)
|
||||
* Password management is sponsored by [1Password](https://www.1password.com)
|
||||
173
vscodeEvalExtension/node_modules/eslint/bin/eslint.js
generated
vendored
Executable file
173
vscodeEvalExtension/node_modules/eslint/bin/eslint.js
generated
vendored
Executable file
@@ -0,0 +1,173 @@
|
||||
#!/usr/bin/env node
|
||||
|
||||
/**
|
||||
* @fileoverview Main CLI that is run via the eslint command.
|
||||
* @author Nicholas C. Zakas
|
||||
*/
|
||||
|
||||
/* eslint no-console:off -- CLI */
|
||||
|
||||
"use strict";
|
||||
|
||||
// must do this initialization *before* other requires in order to work
|
||||
if (process.argv.includes("--debug")) {
|
||||
require("debug").enable("eslint:*,-eslint:code-path,eslintrc:*");
|
||||
}
|
||||
|
||||
//------------------------------------------------------------------------------
|
||||
// Helpers
|
||||
//------------------------------------------------------------------------------
|
||||
|
||||
/**
|
||||
* Read data from stdin til the end.
|
||||
*
|
||||
* Note: See
|
||||
* - https://github.com/nodejs/node/blob/master/doc/api/process.md#processstdin
|
||||
* - https://github.com/nodejs/node/blob/master/doc/api/process.md#a-note-on-process-io
|
||||
* - https://lists.gnu.org/archive/html/bug-gnu-emacs/2016-01/msg00419.html
|
||||
* - https://github.com/nodejs/node/issues/7439 (historical)
|
||||
*
|
||||
* On Windows using `fs.readFileSync(STDIN_FILE_DESCRIPTOR, "utf8")` seems
|
||||
* to read 4096 bytes before blocking and never drains to read further data.
|
||||
*
|
||||
* The investigation on the Emacs thread indicates:
|
||||
*
|
||||
* > Emacs on MS-Windows uses pipes to communicate with subprocesses; a
|
||||
* > pipe on Windows has a 4K buffer. So as soon as Emacs writes more than
|
||||
* > 4096 bytes to the pipe, the pipe becomes full, and Emacs then waits for
|
||||
* > the subprocess to read its end of the pipe, at which time Emacs will
|
||||
* > write the rest of the stuff.
|
||||
* @returns {Promise<string>} The read text.
|
||||
*/
|
||||
function readStdin() {
|
||||
return new Promise((resolve, reject) => {
|
||||
let content = "";
|
||||
let chunk = "";
|
||||
|
||||
process.stdin
|
||||
.setEncoding("utf8")
|
||||
.on("readable", () => {
|
||||
while ((chunk = process.stdin.read()) !== null) {
|
||||
content += chunk;
|
||||
}
|
||||
})
|
||||
.on("end", () => resolve(content))
|
||||
.on("error", reject);
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* Get the error message of a given value.
|
||||
* @param {any} error The value to get.
|
||||
* @returns {string} The error message.
|
||||
*/
|
||||
function getErrorMessage(error) {
|
||||
|
||||
// Lazy loading because this is used only if an error happened.
|
||||
const util = require("util");
|
||||
|
||||
// Foolproof -- third-party module might throw non-object.
|
||||
if (typeof error !== "object" || error === null) {
|
||||
return String(error);
|
||||
}
|
||||
|
||||
// Use templates if `error.messageTemplate` is present.
|
||||
if (typeof error.messageTemplate === "string") {
|
||||
try {
|
||||
const template = require(`../messages/${error.messageTemplate}.js`);
|
||||
|
||||
return template(error.messageData || {});
|
||||
} catch {
|
||||
|
||||
// Ignore template error then fallback to use `error.stack`.
|
||||
}
|
||||
}
|
||||
|
||||
// Use the stacktrace if it's an error object.
|
||||
if (typeof error.stack === "string") {
|
||||
return error.stack;
|
||||
}
|
||||
|
||||
// Otherwise, dump the object.
|
||||
return util.format("%o", error);
|
||||
}
|
||||
|
||||
/**
|
||||
* Tracks error messages that are shown to the user so we only ever show the
|
||||
* same message once.
|
||||
* @type {Set<string>}
|
||||
*/
|
||||
const displayedErrors = new Set();
|
||||
|
||||
/**
|
||||
* Tracks whether an unexpected error was caught
|
||||
* @type {boolean}
|
||||
*/
|
||||
let hadFatalError = false;
|
||||
|
||||
/**
|
||||
* Catch and report unexpected error.
|
||||
* @param {any} error The thrown error object.
|
||||
* @returns {void}
|
||||
*/
|
||||
function onFatalError(error) {
|
||||
process.exitCode = 2;
|
||||
hadFatalError = true;
|
||||
|
||||
const { version } = require("../package.json");
|
||||
const message = `
|
||||
Oops! Something went wrong! :(
|
||||
|
||||
ESLint: ${version}
|
||||
|
||||
${getErrorMessage(error)}`;
|
||||
|
||||
if (!displayedErrors.has(message)) {
|
||||
console.error(message);
|
||||
displayedErrors.add(message);
|
||||
}
|
||||
}
|
||||
|
||||
//------------------------------------------------------------------------------
|
||||
// Execution
|
||||
//------------------------------------------------------------------------------
|
||||
|
||||
(async function main() {
|
||||
process.on("uncaughtException", onFatalError);
|
||||
process.on("unhandledRejection", onFatalError);
|
||||
|
||||
// Call the config initializer if `--init` is present.
|
||||
if (process.argv.includes("--init")) {
|
||||
|
||||
// `eslint --init` has been moved to `@eslint/create-config`
|
||||
console.warn("You can also run this command directly using 'npm init @eslint/config'.");
|
||||
|
||||
const spawn = require("cross-spawn");
|
||||
|
||||
spawn.sync("npm", ["init", "@eslint/config"], { encoding: "utf8", stdio: "inherit" });
|
||||
return;
|
||||
}
|
||||
|
||||
// Otherwise, call the CLI.
|
||||
const exitCode = await require("../lib/cli").execute(
|
||||
process.argv,
|
||||
process.argv.includes("--stdin") ? await readStdin() : null,
|
||||
true
|
||||
);
|
||||
|
||||
/*
|
||||
* If an uncaught exception or unhandled rejection was detected in the meantime,
|
||||
* keep the fatal exit code 2 that is already assigned to `process.exitCode`.
|
||||
* Without this condition, exit code 2 (unsuccessful execution) could be overwritten with
|
||||
* 1 (successful execution, lint problems found) or even 0 (successful execution, no lint problems found).
|
||||
* This ensures that unexpected errors that seemingly don't affect the success
|
||||
* of the execution will still cause a non-zero exit code, as it's a common
|
||||
* practice and the default behavior of Node.js to exit with non-zero
|
||||
* in case of an uncaught exception or unhandled rejection.
|
||||
*
|
||||
* Otherwise, assign the exit code returned from CLI.
|
||||
*/
|
||||
if (!hadFatalError) {
|
||||
process.exitCode = exitCode;
|
||||
}
|
||||
}()).catch(onFatalError);
|
||||
93
vscodeEvalExtension/node_modules/eslint/conf/config-schema.js
generated
vendored
Normal file
93
vscodeEvalExtension/node_modules/eslint/conf/config-schema.js
generated
vendored
Normal file
@@ -0,0 +1,93 @@
|
||||
/*
|
||||
* STOP!!! DO NOT MODIFY.
|
||||
*
|
||||
* This file is part of the ongoing work to move the eslintrc-style config
|
||||
* system into the @eslint/eslintrc package. This file needs to remain
|
||||
* unchanged in order for this work to proceed.
|
||||
*
|
||||
* If you think you need to change this file, please contact @nzakas first.
|
||||
*
|
||||
* Thanks in advance for your cooperation.
|
||||
*/
|
||||
|
||||
/**
|
||||
* @fileoverview Defines a schema for configs.
|
||||
* @author Sylvan Mably
|
||||
*/
|
||||
|
||||
"use strict";
|
||||
|
||||
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"
|
||||
};
|
||||
|
||||
module.exports = configSchema;
|
||||
32
vscodeEvalExtension/node_modules/eslint/conf/default-cli-options.js
generated
vendored
Normal file
32
vscodeEvalExtension/node_modules/eslint/conf/default-cli-options.js
generated
vendored
Normal file
@@ -0,0 +1,32 @@
|
||||
/**
|
||||
* @fileoverview Default CLIEngineOptions.
|
||||
* @author Ian VanSchooten
|
||||
*/
|
||||
|
||||
"use strict";
|
||||
|
||||
module.exports = {
|
||||
configFile: null,
|
||||
baseConfig: false,
|
||||
rulePaths: [],
|
||||
useEslintrc: true,
|
||||
envs: [],
|
||||
globals: [],
|
||||
extensions: null,
|
||||
ignore: true,
|
||||
ignorePath: void 0,
|
||||
cache: false,
|
||||
|
||||
/*
|
||||
* in order to honor the cacheFile option if specified
|
||||
* this option should not have a default value otherwise
|
||||
* it will always be used
|
||||
*/
|
||||
cacheLocation: "",
|
||||
cacheFile: ".eslintcache",
|
||||
cacheStrategy: "metadata",
|
||||
fix: false,
|
||||
allowInlineConfig: true,
|
||||
reportUnusedDisableDirectives: void 0,
|
||||
globInputPaths: true
|
||||
};
|
||||
154
vscodeEvalExtension/node_modules/eslint/conf/globals.js
generated
vendored
Normal file
154
vscodeEvalExtension/node_modules/eslint/conf/globals.js
generated
vendored
Normal file
@@ -0,0 +1,154 @@
|
||||
/**
|
||||
* @fileoverview Globals for ecmaVersion/sourceType
|
||||
* @author Nicholas C. Zakas
|
||||
*/
|
||||
|
||||
"use strict";
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
// Globals
|
||||
//-----------------------------------------------------------------------------
|
||||
|
||||
const commonjs = {
|
||||
exports: true,
|
||||
global: false,
|
||||
module: false,
|
||||
require: false
|
||||
};
|
||||
|
||||
const es3 = {
|
||||
Array: false,
|
||||
Boolean: false,
|
||||
constructor: false,
|
||||
Date: false,
|
||||
decodeURI: false,
|
||||
decodeURIComponent: false,
|
||||
encodeURI: false,
|
||||
encodeURIComponent: false,
|
||||
Error: false,
|
||||
escape: false,
|
||||
eval: false,
|
||||
EvalError: false,
|
||||
Function: false,
|
||||
hasOwnProperty: false,
|
||||
Infinity: false,
|
||||
isFinite: false,
|
||||
isNaN: false,
|
||||
isPrototypeOf: false,
|
||||
Math: false,
|
||||
NaN: false,
|
||||
Number: false,
|
||||
Object: false,
|
||||
parseFloat: false,
|
||||
parseInt: false,
|
||||
propertyIsEnumerable: false,
|
||||
RangeError: false,
|
||||
ReferenceError: false,
|
||||
RegExp: false,
|
||||
String: false,
|
||||
SyntaxError: false,
|
||||
toLocaleString: false,
|
||||
toString: false,
|
||||
TypeError: false,
|
||||
undefined: false,
|
||||
unescape: false,
|
||||
URIError: false,
|
||||
valueOf: false
|
||||
};
|
||||
|
||||
const es5 = {
|
||||
...es3,
|
||||
JSON: false
|
||||
};
|
||||
|
||||
const es2015 = {
|
||||
...es5,
|
||||
ArrayBuffer: false,
|
||||
DataView: false,
|
||||
Float32Array: false,
|
||||
Float64Array: false,
|
||||
Int16Array: false,
|
||||
Int32Array: false,
|
||||
Int8Array: false,
|
||||
Map: false,
|
||||
Promise: false,
|
||||
Proxy: false,
|
||||
Reflect: false,
|
||||
Set: false,
|
||||
Symbol: false,
|
||||
Uint16Array: false,
|
||||
Uint32Array: false,
|
||||
Uint8Array: false,
|
||||
Uint8ClampedArray: false,
|
||||
WeakMap: false,
|
||||
WeakSet: false
|
||||
};
|
||||
|
||||
// no new globals in ES2016
|
||||
const es2016 = {
|
||||
...es2015
|
||||
};
|
||||
|
||||
const es2017 = {
|
||||
...es2016,
|
||||
Atomics: false,
|
||||
SharedArrayBuffer: false
|
||||
};
|
||||
|
||||
// no new globals in ES2018
|
||||
const es2018 = {
|
||||
...es2017
|
||||
};
|
||||
|
||||
// no new globals in ES2019
|
||||
const es2019 = {
|
||||
...es2018
|
||||
};
|
||||
|
||||
const es2020 = {
|
||||
...es2019,
|
||||
BigInt: false,
|
||||
BigInt64Array: false,
|
||||
BigUint64Array: false,
|
||||
globalThis: false
|
||||
};
|
||||
|
||||
const es2021 = {
|
||||
...es2020,
|
||||
AggregateError: false,
|
||||
FinalizationRegistry: false,
|
||||
WeakRef: false
|
||||
};
|
||||
|
||||
const es2022 = {
|
||||
...es2021
|
||||
};
|
||||
|
||||
const es2023 = {
|
||||
...es2022
|
||||
};
|
||||
|
||||
const es2024 = {
|
||||
...es2023
|
||||
};
|
||||
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
// Exports
|
||||
//-----------------------------------------------------------------------------
|
||||
|
||||
module.exports = {
|
||||
commonjs,
|
||||
es3,
|
||||
es5,
|
||||
es2015,
|
||||
es2016,
|
||||
es2017,
|
||||
es2018,
|
||||
es2019,
|
||||
es2020,
|
||||
es2021,
|
||||
es2022,
|
||||
es2023,
|
||||
es2024
|
||||
};
|
||||
22
vscodeEvalExtension/node_modules/eslint/conf/replacements.json
generated
vendored
Normal file
22
vscodeEvalExtension/node_modules/eslint/conf/replacements.json
generated
vendored
Normal file
@@ -0,0 +1,22 @@
|
||||
{
|
||||
"rules": {
|
||||
"generator-star": ["generator-star-spacing"],
|
||||
"global-strict": ["strict"],
|
||||
"no-arrow-condition": ["no-confusing-arrow", "no-constant-condition"],
|
||||
"no-comma-dangle": ["comma-dangle"],
|
||||
"no-empty-class": ["no-empty-character-class"],
|
||||
"no-empty-label": ["no-labels"],
|
||||
"no-extra-strict": ["strict"],
|
||||
"no-reserved-keys": ["quote-props"],
|
||||
"no-space-before-semi": ["semi-spacing"],
|
||||
"no-wrap-func": ["no-extra-parens"],
|
||||
"space-after-function-name": ["space-before-function-paren"],
|
||||
"space-after-keywords": ["keyword-spacing"],
|
||||
"space-before-function-parentheses": ["space-before-function-paren"],
|
||||
"space-before-keywords": ["keyword-spacing"],
|
||||
"space-in-brackets": ["object-curly-spacing", "array-bracket-spacing", "computed-property-spacing"],
|
||||
"space-return-throw-case": ["keyword-spacing"],
|
||||
"space-unary-word-ops": ["space-unary-ops"],
|
||||
"spaced-line-comment": ["spaced-comment"]
|
||||
}
|
||||
}
|
||||
28
vscodeEvalExtension/node_modules/eslint/conf/rule-type-list.json
generated
vendored
Normal file
28
vscodeEvalExtension/node_modules/eslint/conf/rule-type-list.json
generated
vendored
Normal file
@@ -0,0 +1,28 @@
|
||||
{
|
||||
"types": {
|
||||
"problem": [],
|
||||
"suggestion": [],
|
||||
"layout": []
|
||||
},
|
||||
"deprecated": [],
|
||||
"removed": [
|
||||
{ "removed": "generator-star", "replacedBy": ["generator-star-spacing"] },
|
||||
{ "removed": "global-strict", "replacedBy": ["strict"] },
|
||||
{ "removed": "no-arrow-condition", "replacedBy": ["no-confusing-arrow", "no-constant-condition"] },
|
||||
{ "removed": "no-comma-dangle", "replacedBy": ["comma-dangle"] },
|
||||
{ "removed": "no-empty-class", "replacedBy": ["no-empty-character-class"] },
|
||||
{ "removed": "no-empty-label", "replacedBy": ["no-labels"] },
|
||||
{ "removed": "no-extra-strict", "replacedBy": ["strict"] },
|
||||
{ "removed": "no-reserved-keys", "replacedBy": ["quote-props"] },
|
||||
{ "removed": "no-space-before-semi", "replacedBy": ["semi-spacing"] },
|
||||
{ "removed": "no-wrap-func", "replacedBy": ["no-extra-parens"] },
|
||||
{ "removed": "space-after-function-name", "replacedBy": ["space-before-function-paren"] },
|
||||
{ "removed": "space-after-keywords", "replacedBy": ["keyword-spacing"] },
|
||||
{ "removed": "space-before-function-parentheses", "replacedBy": ["space-before-function-paren"] },
|
||||
{ "removed": "space-before-keywords", "replacedBy": ["keyword-spacing"] },
|
||||
{ "removed": "space-in-brackets", "replacedBy": ["object-curly-spacing", "array-bracket-spacing"] },
|
||||
{ "removed": "space-return-throw-case", "replacedBy": ["keyword-spacing"] },
|
||||
{ "removed": "space-unary-word-ops", "replacedBy": ["space-unary-ops"] },
|
||||
{ "removed": "spaced-line-comment", "replacedBy": ["spaced-comment"] }
|
||||
]
|
||||
}
|
||||
16
vscodeEvalExtension/node_modules/eslint/messages/all-files-ignored.js
generated
vendored
Normal file
16
vscodeEvalExtension/node_modules/eslint/messages/all-files-ignored.js
generated
vendored
Normal file
@@ -0,0 +1,16 @@
|
||||
"use strict";
|
||||
|
||||
module.exports = function(it) {
|
||||
const { pattern } = it;
|
||||
|
||||
return `
|
||||
You are linting "${pattern}", but all of the files matching the glob pattern "${pattern}" are ignored.
|
||||
|
||||
If you don't want to lint these files, remove the pattern "${pattern}" from the list of arguments passed to ESLint.
|
||||
|
||||
If you do want to lint these files, try the following solutions:
|
||||
|
||||
* Check your .eslintignore file, or the eslintIgnore property in package.json, to ensure that the files are not configured to be ignored.
|
||||
* Explicitly list the files from this glob that you'd like to lint on the command-line, rather than providing a glob as an argument.
|
||||
`.trimStart();
|
||||
};
|
||||
98
vscodeEvalExtension/node_modules/eslint/messages/eslintrc-incompat.js
generated
vendored
Normal file
98
vscodeEvalExtension/node_modules/eslint/messages/eslintrc-incompat.js
generated
vendored
Normal file
@@ -0,0 +1,98 @@
|
||||
"use strict";
|
||||
|
||||
/* eslint consistent-return: 0 -- no default case */
|
||||
|
||||
const messages = {
|
||||
|
||||
env: `
|
||||
A config object is using the "env" key, which is not supported in flat config system.
|
||||
|
||||
Flat config uses "languageOptions.globals" to define global variables for your files.
|
||||
|
||||
Please see the following page for information on how to convert your config object into the correct format:
|
||||
https://eslint.org/docs/latest/use/configure/migration-guide#configuring-language-options
|
||||
`,
|
||||
|
||||
extends: `
|
||||
A config object is using the "extends" key, which is not supported in flat config system.
|
||||
|
||||
Instead of "extends", you can include config objects that you'd like to extend from directly in the flat config array.
|
||||
|
||||
Please see the following page for more information:
|
||||
https://eslint.org/docs/latest/use/configure/migration-guide#predefined-and-shareable-configs
|
||||
`,
|
||||
|
||||
globals: `
|
||||
A config object is using the "globals" key, which is not supported in flat config system.
|
||||
|
||||
Flat config uses "languageOptions.globals" to define global variables for your files.
|
||||
|
||||
Please see the following page for information on how to convert your config object into the correct format:
|
||||
https://eslint.org/docs/latest/use/configure/migration-guide#configuring-language-options
|
||||
`,
|
||||
|
||||
ignorePatterns: `
|
||||
A config object is using the "ignorePatterns" key, which is not supported in flat config system.
|
||||
|
||||
Flat config uses "ignores" to specify files to ignore.
|
||||
|
||||
Please see the following page for information on how to convert your config object into the correct format:
|
||||
https://eslint.org/docs/latest/use/configure/migration-guide#ignoring-files
|
||||
`,
|
||||
|
||||
noInlineConfig: `
|
||||
A config object is using the "noInlineConfig" key, which is not supported in flat config system.
|
||||
|
||||
Flat config uses "linterOptions.noInlineConfig" to specify files to ignore.
|
||||
|
||||
Please see the following page for information on how to convert your config object into the correct format:
|
||||
https://eslint.org/docs/latest/use/configure/migration-guide#linter-options
|
||||
`,
|
||||
|
||||
overrides: `
|
||||
A config object is using the "overrides" key, which is not supported in flat config system.
|
||||
|
||||
Flat config is an array that acts like the eslintrc "overrides" array.
|
||||
|
||||
Please see the following page for information on how to convert your config object into the correct format:
|
||||
https://eslint.org/docs/latest/use/configure/migration-guide#glob-based-configs
|
||||
`,
|
||||
|
||||
parser: `
|
||||
A config object is using the "parser" key, which is not supported in flat config system.
|
||||
|
||||
Flat config uses "languageOptions.parser" to override the default parser.
|
||||
|
||||
Please see the following page for information on how to convert your config object into the correct format:
|
||||
https://eslint.org/docs/latest/use/configure/migration-guide#custom-parsers
|
||||
`,
|
||||
|
||||
parserOptions: `
|
||||
A config object is using the "parserOptions" key, which is not supported in flat config system.
|
||||
|
||||
Flat config uses "languageOptions.parserOptions" to specify parser options.
|
||||
|
||||
Please see the following page for information on how to convert your config object into the correct format:
|
||||
https://eslint.org/docs/latest/use/configure/migration-guide#configuring-language-options
|
||||
`,
|
||||
|
||||
reportUnusedDisableDirectives: `
|
||||
A config object is using the "reportUnusedDisableDirectives" key, which is not supported in flat config system.
|
||||
|
||||
Flat config uses "linterOptions.reportUnusedDisableDirectives" to specify files to ignore.
|
||||
|
||||
Please see the following page for information on how to convert your config object into the correct format:
|
||||
https://eslint.org/docs/latest/use/configure/migration-guide#linter-options
|
||||
`,
|
||||
|
||||
root: `
|
||||
A config object is using the "root" key, which is not supported in flat config system.
|
||||
|
||||
Flat configs always act as if they are the root config file, so this key can be safely removed.
|
||||
`
|
||||
};
|
||||
|
||||
module.exports = function({ key }) {
|
||||
|
||||
return messages[key].trim();
|
||||
};
|
||||
24
vscodeEvalExtension/node_modules/eslint/messages/eslintrc-plugins.js
generated
vendored
Normal file
24
vscodeEvalExtension/node_modules/eslint/messages/eslintrc-plugins.js
generated
vendored
Normal file
@@ -0,0 +1,24 @@
|
||||
"use strict";
|
||||
|
||||
module.exports = function({ plugins }) {
|
||||
|
||||
const isArrayOfStrings = typeof plugins[0] === "string";
|
||||
|
||||
return `
|
||||
A config object has a "plugins" key defined as an array${isArrayOfStrings ? " of strings" : ""}.
|
||||
|
||||
Flat config requires "plugins" to be an object in this form:
|
||||
|
||||
{
|
||||
plugins: {
|
||||
${isArrayOfStrings && plugins[0] ? plugins[0] : "namespace"}: pluginObject
|
||||
}
|
||||
}
|
||||
|
||||
Please see the following page for information on how to convert your config object into the correct format:
|
||||
https://eslint.org/docs/latest/use/configure/migration-guide#importing-plugins-and-custom-parsers
|
||||
|
||||
If you're using a shareable config that you cannot rewrite in flat config format, then use the compatibility utility:
|
||||
https://eslint.org/docs/latest/use/configure/migration-guide#using-eslintrc-configs-in-flat-config
|
||||
`;
|
||||
};
|
||||
13
vscodeEvalExtension/node_modules/eslint/messages/extend-config-missing.js
generated
vendored
Normal file
13
vscodeEvalExtension/node_modules/eslint/messages/extend-config-missing.js
generated
vendored
Normal file
@@ -0,0 +1,13 @@
|
||||
"use strict";
|
||||
|
||||
module.exports = function(it) {
|
||||
const { configName, importerName } = it;
|
||||
|
||||
return `
|
||||
ESLint couldn't find the config "${configName}" to extend from. Please check that the name of the config is correct.
|
||||
|
||||
The config "${configName}" was referenced from the config file in "${importerName}".
|
||||
|
||||
If you still have problems, please stop by https://eslint.org/chat/help to chat with the team.
|
||||
`.trimStart();
|
||||
};
|
||||
11
vscodeEvalExtension/node_modules/eslint/messages/failed-to-read-json.js
generated
vendored
Normal file
11
vscodeEvalExtension/node_modules/eslint/messages/failed-to-read-json.js
generated
vendored
Normal file
@@ -0,0 +1,11 @@
|
||||
"use strict";
|
||||
|
||||
module.exports = function(it) {
|
||||
const { path, message } = it;
|
||||
|
||||
return `
|
||||
Failed to read JSON file at ${path}:
|
||||
|
||||
${message}
|
||||
`.trimStart();
|
||||
};
|
||||
10
vscodeEvalExtension/node_modules/eslint/messages/file-not-found.js
generated
vendored
Normal file
10
vscodeEvalExtension/node_modules/eslint/messages/file-not-found.js
generated
vendored
Normal file
@@ -0,0 +1,10 @@
|
||||
"use strict";
|
||||
|
||||
module.exports = function(it) {
|
||||
const { pattern, globDisabled } = it;
|
||||
|
||||
return `
|
||||
No files matching the pattern "${pattern}"${globDisabled ? " (with disabling globs)" : ""} were found.
|
||||
Please check for typing mistakes in the pattern.
|
||||
`.trimStart();
|
||||
};
|
||||
17
vscodeEvalExtension/node_modules/eslint/messages/invalid-rule-options.js
generated
vendored
Normal file
17
vscodeEvalExtension/node_modules/eslint/messages/invalid-rule-options.js
generated
vendored
Normal file
@@ -0,0 +1,17 @@
|
||||
"use strict";
|
||||
|
||||
const { stringifyValueForError } = require("./shared");
|
||||
|
||||
module.exports = function({ ruleId, value }) {
|
||||
return `
|
||||
Configuration for rule "${ruleId}" is invalid. Each rule must have a severity ("off", 0, "warn", 1, "error", or 2) and may be followed by additional options for the rule.
|
||||
|
||||
You passed '${stringifyValueForError(value, 4)}', which doesn't contain a valid severity.
|
||||
|
||||
If you're attempting to configure rule options, perhaps you meant:
|
||||
|
||||
"${ruleId}": ["error", ${stringifyValueForError(value, 8)}]
|
||||
|
||||
See https://eslint.org/docs/latest/use/configure/rules#using-configuration-files for configuring rules.
|
||||
`.trimStart();
|
||||
};
|
||||
13
vscodeEvalExtension/node_modules/eslint/messages/invalid-rule-severity.js
generated
vendored
Normal file
13
vscodeEvalExtension/node_modules/eslint/messages/invalid-rule-severity.js
generated
vendored
Normal file
@@ -0,0 +1,13 @@
|
||||
"use strict";
|
||||
|
||||
const { stringifyValueForError } = require("./shared");
|
||||
|
||||
module.exports = function({ ruleId, value }) {
|
||||
return `
|
||||
Configuration for rule "${ruleId}" is invalid. Expected severity of "off", 0, "warn", 1, "error", or 2.
|
||||
|
||||
You passed '${stringifyValueForError(value, 4)}'.
|
||||
|
||||
See https://eslint.org/docs/latest/use/configure/rules#using-configuration-files for configuring rules.
|
||||
`.trimStart();
|
||||
};
|
||||
15
vscodeEvalExtension/node_modules/eslint/messages/no-config-found.js
generated
vendored
Normal file
15
vscodeEvalExtension/node_modules/eslint/messages/no-config-found.js
generated
vendored
Normal file
@@ -0,0 +1,15 @@
|
||||
"use strict";
|
||||
|
||||
module.exports = function(it) {
|
||||
const { directoryPath } = it;
|
||||
|
||||
return `
|
||||
ESLint couldn't find a configuration file. To set up a configuration file for this project, please run:
|
||||
|
||||
npm init @eslint/config
|
||||
|
||||
ESLint looked for configuration files in ${directoryPath} and its ancestors. If it found none, it then looked in your home directory.
|
||||
|
||||
If you think you already have a configuration file or if you need more help, please stop by the ESLint Discord server: https://eslint.org/chat
|
||||
`.trimStart();
|
||||
};
|
||||
22
vscodeEvalExtension/node_modules/eslint/messages/plugin-conflict.js
generated
vendored
Normal file
22
vscodeEvalExtension/node_modules/eslint/messages/plugin-conflict.js
generated
vendored
Normal file
@@ -0,0 +1,22 @@
|
||||
"use strict";
|
||||
|
||||
module.exports = function(it) {
|
||||
const { pluginId, plugins } = it;
|
||||
|
||||
let result = `ESLint couldn't determine the plugin "${pluginId}" uniquely.
|
||||
`;
|
||||
|
||||
for (const { filePath, importerName } of plugins) {
|
||||
result += `
|
||||
- ${filePath} (loaded in "${importerName}")`;
|
||||
}
|
||||
|
||||
result += `
|
||||
|
||||
Please remove the "plugins" setting from either config or remove either plugin installation.
|
||||
|
||||
If you still can't figure out the problem, please stop by https://eslint.org/chat/help to chat with the team.
|
||||
`;
|
||||
|
||||
return result;
|
||||
};
|
||||
16
vscodeEvalExtension/node_modules/eslint/messages/plugin-invalid.js
generated
vendored
Normal file
16
vscodeEvalExtension/node_modules/eslint/messages/plugin-invalid.js
generated
vendored
Normal file
@@ -0,0 +1,16 @@
|
||||
"use strict";
|
||||
|
||||
module.exports = function(it) {
|
||||
const { configName, importerName } = it;
|
||||
|
||||
return `
|
||||
"${configName}" is invalid syntax for a config specifier.
|
||||
|
||||
* If your intention is to extend from a configuration exported from the plugin, add the configuration name after a slash: e.g. "${configName}/myConfig".
|
||||
* If this is the name of a shareable config instead of a plugin, remove the "plugin:" prefix: i.e. "${configName.slice("plugin:".length)}".
|
||||
|
||||
"${configName}" was referenced from the config file in "${importerName}".
|
||||
|
||||
If you still can't figure out the problem, please stop by https://eslint.org/chat/help to chat with the team.
|
||||
`.trimStart();
|
||||
};
|
||||
19
vscodeEvalExtension/node_modules/eslint/messages/plugin-missing.js
generated
vendored
Normal file
19
vscodeEvalExtension/node_modules/eslint/messages/plugin-missing.js
generated
vendored
Normal file
@@ -0,0 +1,19 @@
|
||||
"use strict";
|
||||
|
||||
module.exports = function(it) {
|
||||
const { pluginName, resolvePluginsRelativeTo, importerName } = it;
|
||||
|
||||
return `
|
||||
ESLint couldn't find the plugin "${pluginName}".
|
||||
|
||||
(The package "${pluginName}" was not found when loaded as a Node module from the directory "${resolvePluginsRelativeTo}".)
|
||||
|
||||
It's likely that the plugin isn't installed correctly. Try reinstalling by running the following:
|
||||
|
||||
npm install ${pluginName}@latest --save-dev
|
||||
|
||||
The plugin "${pluginName}" was referenced from the config file in "${importerName}".
|
||||
|
||||
If you still can't figure out the problem, please stop by https://eslint.org/chat/help to chat with the team.
|
||||
`.trimStart();
|
||||
};
|
||||
8
vscodeEvalExtension/node_modules/eslint/messages/print-config-with-directory-path.js
generated
vendored
Normal file
8
vscodeEvalExtension/node_modules/eslint/messages/print-config-with-directory-path.js
generated
vendored
Normal file
@@ -0,0 +1,8 @@
|
||||
"use strict";
|
||||
|
||||
module.exports = function() {
|
||||
return `
|
||||
The '--print-config' CLI option requires a path to a source code file rather than a directory.
|
||||
See also: https://eslint.org/docs/latest/use/command-line-interface#--print-config
|
||||
`.trimStart();
|
||||
};
|
||||
18
vscodeEvalExtension/node_modules/eslint/messages/shared.js
generated
vendored
Normal file
18
vscodeEvalExtension/node_modules/eslint/messages/shared.js
generated
vendored
Normal file
@@ -0,0 +1,18 @@
|
||||
/**
|
||||
* @fileoverview Shared utilities for error messages.
|
||||
* @author Josh Goldberg
|
||||
*/
|
||||
|
||||
"use strict";
|
||||
|
||||
/**
|
||||
* Converts a value to a string that may be printed in errors.
|
||||
* @param {any} value The invalid value.
|
||||
* @param {number} indentation How many spaces to indent
|
||||
* @returns {string} The value, stringified.
|
||||
*/
|
||||
function stringifyValueForError(value, indentation) {
|
||||
return value ? JSON.stringify(value, null, 4).replace(/\n/gu, `\n${" ".repeat(indentation)}`) : `${value}`;
|
||||
}
|
||||
|
||||
module.exports = { stringifyValueForError };
|
||||
11
vscodeEvalExtension/node_modules/eslint/messages/whitespace-found.js
generated
vendored
Normal file
11
vscodeEvalExtension/node_modules/eslint/messages/whitespace-found.js
generated
vendored
Normal file
@@ -0,0 +1,11 @@
|
||||
"use strict";
|
||||
|
||||
module.exports = function(it) {
|
||||
const { pluginName } = it;
|
||||
|
||||
return `
|
||||
ESLint couldn't find the plugin "${pluginName}". because there is whitespace in the name. Please check your configuration and remove all whitespace from the plugin name.
|
||||
|
||||
If you still can't figure out the problem, please stop by https://eslint.org/chat/help to chat with the team.
|
||||
`.trimStart();
|
||||
};
|
||||
21
vscodeEvalExtension/node_modules/eslint/node_modules/brace-expansion/LICENSE
generated
vendored
Normal file
21
vscodeEvalExtension/node_modules/eslint/node_modules/brace-expansion/LICENSE
generated
vendored
Normal file
@@ -0,0 +1,21 @@
|
||||
MIT License
|
||||
|
||||
Copyright (c) 2013 Julian Gruber <julian@juliangruber.com>
|
||||
|
||||
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.
|
||||
129
vscodeEvalExtension/node_modules/eslint/node_modules/brace-expansion/README.md
generated
vendored
Normal file
129
vscodeEvalExtension/node_modules/eslint/node_modules/brace-expansion/README.md
generated
vendored
Normal file
@@ -0,0 +1,129 @@
|
||||
# brace-expansion
|
||||
|
||||
[Brace expansion](https://www.gnu.org/software/bash/manual/html_node/Brace-Expansion.html),
|
||||
as known from sh/bash, in JavaScript.
|
||||
|
||||
[](http://travis-ci.org/juliangruber/brace-expansion)
|
||||
[](https://www.npmjs.org/package/brace-expansion)
|
||||
[](https://greenkeeper.io/)
|
||||
|
||||
[](https://ci.testling.com/juliangruber/brace-expansion)
|
||||
|
||||
## Example
|
||||
|
||||
```js
|
||||
var expand = require('brace-expansion');
|
||||
|
||||
expand('file-{a,b,c}.jpg')
|
||||
// => ['file-a.jpg', 'file-b.jpg', 'file-c.jpg']
|
||||
|
||||
expand('-v{,,}')
|
||||
// => ['-v', '-v', '-v']
|
||||
|
||||
expand('file{0..2}.jpg')
|
||||
// => ['file0.jpg', 'file1.jpg', 'file2.jpg']
|
||||
|
||||
expand('file-{a..c}.jpg')
|
||||
// => ['file-a.jpg', 'file-b.jpg', 'file-c.jpg']
|
||||
|
||||
expand('file{2..0}.jpg')
|
||||
// => ['file2.jpg', 'file1.jpg', 'file0.jpg']
|
||||
|
||||
expand('file{0..4..2}.jpg')
|
||||
// => ['file0.jpg', 'file2.jpg', 'file4.jpg']
|
||||
|
||||
expand('file-{a..e..2}.jpg')
|
||||
// => ['file-a.jpg', 'file-c.jpg', 'file-e.jpg']
|
||||
|
||||
expand('file{00..10..5}.jpg')
|
||||
// => ['file00.jpg', 'file05.jpg', 'file10.jpg']
|
||||
|
||||
expand('{{A..C},{a..c}}')
|
||||
// => ['A', 'B', 'C', 'a', 'b', 'c']
|
||||
|
||||
expand('ppp{,config,oe{,conf}}')
|
||||
// => ['ppp', 'pppconfig', 'pppoe', 'pppoeconf']
|
||||
```
|
||||
|
||||
## API
|
||||
|
||||
```js
|
||||
var expand = require('brace-expansion');
|
||||
```
|
||||
|
||||
### var expanded = expand(str)
|
||||
|
||||
Return an array of all possible and valid expansions of `str`. If none are
|
||||
found, `[str]` is returned.
|
||||
|
||||
Valid expansions are:
|
||||
|
||||
```js
|
||||
/^(.*,)+(.+)?$/
|
||||
// {a,b,...}
|
||||
```
|
||||
|
||||
A comma separated list of options, like `{a,b}` or `{a,{b,c}}` or `{,a,}`.
|
||||
|
||||
```js
|
||||
/^-?\d+\.\.-?\d+(\.\.-?\d+)?$/
|
||||
// {x..y[..incr]}
|
||||
```
|
||||
|
||||
A numeric sequence from `x` to `y` inclusive, with optional increment.
|
||||
If `x` or `y` start with a leading `0`, all the numbers will be padded
|
||||
to have equal length. Negative numbers and backwards iteration work too.
|
||||
|
||||
```js
|
||||
/^-?\d+\.\.-?\d+(\.\.-?\d+)?$/
|
||||
// {x..y[..incr]}
|
||||
```
|
||||
|
||||
An alphabetic sequence from `x` to `y` inclusive, with optional increment.
|
||||
`x` and `y` must be exactly one character, and if given, `incr` must be a
|
||||
number.
|
||||
|
||||
For compatibility reasons, the string `${` is not eligible for brace expansion.
|
||||
|
||||
## Installation
|
||||
|
||||
With [npm](https://npmjs.org) do:
|
||||
|
||||
```bash
|
||||
npm install brace-expansion
|
||||
```
|
||||
|
||||
## Contributors
|
||||
|
||||
- [Julian Gruber](https://github.com/juliangruber)
|
||||
- [Isaac Z. Schlueter](https://github.com/isaacs)
|
||||
|
||||
## Sponsors
|
||||
|
||||
This module is proudly supported by my [Sponsors](https://github.com/juliangruber/sponsors)!
|
||||
|
||||
Do you want to support modules like this to improve their quality, stability and weigh in on new features? Then please consider donating to my [Patreon](https://www.patreon.com/juliangruber). Not sure how much of my modules you're using? Try [feross/thanks](https://github.com/feross/thanks)!
|
||||
|
||||
## License
|
||||
|
||||
(MIT)
|
||||
|
||||
Copyright (c) 2013 Julian Gruber <julian@juliangruber.com>
|
||||
|
||||
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.
|
||||
201
vscodeEvalExtension/node_modules/eslint/node_modules/brace-expansion/index.js
generated
vendored
Normal file
201
vscodeEvalExtension/node_modules/eslint/node_modules/brace-expansion/index.js
generated
vendored
Normal file
@@ -0,0 +1,201 @@
|
||||
var concatMap = require('concat-map');
|
||||
var balanced = require('balanced-match');
|
||||
|
||||
module.exports = expandTop;
|
||||
|
||||
var escSlash = '\0SLASH'+Math.random()+'\0';
|
||||
var escOpen = '\0OPEN'+Math.random()+'\0';
|
||||
var escClose = '\0CLOSE'+Math.random()+'\0';
|
||||
var escComma = '\0COMMA'+Math.random()+'\0';
|
||||
var escPeriod = '\0PERIOD'+Math.random()+'\0';
|
||||
|
||||
function numeric(str) {
|
||||
return parseInt(str, 10) == str
|
||||
? parseInt(str, 10)
|
||||
: str.charCodeAt(0);
|
||||
}
|
||||
|
||||
function escapeBraces(str) {
|
||||
return str.split('\\\\').join(escSlash)
|
||||
.split('\\{').join(escOpen)
|
||||
.split('\\}').join(escClose)
|
||||
.split('\\,').join(escComma)
|
||||
.split('\\.').join(escPeriod);
|
||||
}
|
||||
|
||||
function unescapeBraces(str) {
|
||||
return str.split(escSlash).join('\\')
|
||||
.split(escOpen).join('{')
|
||||
.split(escClose).join('}')
|
||||
.split(escComma).join(',')
|
||||
.split(escPeriod).join('.');
|
||||
}
|
||||
|
||||
|
||||
// Basically just str.split(","), but handling cases
|
||||
// where we have nested braced sections, which should be
|
||||
// treated as individual members, like {a,{b,c},d}
|
||||
function parseCommaParts(str) {
|
||||
if (!str)
|
||||
return [''];
|
||||
|
||||
var parts = [];
|
||||
var m = balanced('{', '}', str);
|
||||
|
||||
if (!m)
|
||||
return str.split(',');
|
||||
|
||||
var pre = m.pre;
|
||||
var body = m.body;
|
||||
var post = m.post;
|
||||
var p = pre.split(',');
|
||||
|
||||
p[p.length-1] += '{' + body + '}';
|
||||
var postParts = parseCommaParts(post);
|
||||
if (post.length) {
|
||||
p[p.length-1] += postParts.shift();
|
||||
p.push.apply(p, postParts);
|
||||
}
|
||||
|
||||
parts.push.apply(parts, p);
|
||||
|
||||
return parts;
|
||||
}
|
||||
|
||||
function expandTop(str) {
|
||||
if (!str)
|
||||
return [];
|
||||
|
||||
// I don't know why Bash 4.3 does this, but it does.
|
||||
// Anything starting with {} will have the first two bytes preserved
|
||||
// but *only* at the top level, so {},a}b will not expand to anything,
|
||||
// but a{},b}c will be expanded to [a}c,abc].
|
||||
// One could argue that this is a bug in Bash, but since the goal of
|
||||
// this module is to match Bash's rules, we escape a leading {}
|
||||
if (str.substr(0, 2) === '{}') {
|
||||
str = '\\{\\}' + str.substr(2);
|
||||
}
|
||||
|
||||
return expand(escapeBraces(str), true).map(unescapeBraces);
|
||||
}
|
||||
|
||||
function identity(e) {
|
||||
return e;
|
||||
}
|
||||
|
||||
function embrace(str) {
|
||||
return '{' + str + '}';
|
||||
}
|
||||
function isPadded(el) {
|
||||
return /^-?0\d/.test(el);
|
||||
}
|
||||
|
||||
function lte(i, y) {
|
||||
return i <= y;
|
||||
}
|
||||
function gte(i, y) {
|
||||
return i >= y;
|
||||
}
|
||||
|
||||
function expand(str, isTop) {
|
||||
var expansions = [];
|
||||
|
||||
var m = balanced('{', '}', str);
|
||||
if (!m || /\$$/.test(m.pre)) return [str];
|
||||
|
||||
var isNumericSequence = /^-?\d+\.\.-?\d+(?:\.\.-?\d+)?$/.test(m.body);
|
||||
var isAlphaSequence = /^[a-zA-Z]\.\.[a-zA-Z](?:\.\.-?\d+)?$/.test(m.body);
|
||||
var isSequence = isNumericSequence || isAlphaSequence;
|
||||
var isOptions = m.body.indexOf(',') >= 0;
|
||||
if (!isSequence && !isOptions) {
|
||||
// {a},b}
|
||||
if (m.post.match(/,.*\}/)) {
|
||||
str = m.pre + '{' + m.body + escClose + m.post;
|
||||
return expand(str);
|
||||
}
|
||||
return [str];
|
||||
}
|
||||
|
||||
var n;
|
||||
if (isSequence) {
|
||||
n = m.body.split(/\.\./);
|
||||
} else {
|
||||
n = parseCommaParts(m.body);
|
||||
if (n.length === 1) {
|
||||
// x{{a,b}}y ==> x{a}y x{b}y
|
||||
n = expand(n[0], false).map(embrace);
|
||||
if (n.length === 1) {
|
||||
var post = m.post.length
|
||||
? expand(m.post, false)
|
||||
: [''];
|
||||
return post.map(function(p) {
|
||||
return m.pre + n[0] + p;
|
||||
});
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// at this point, n is the parts, and we know it's not a comma set
|
||||
// with a single entry.
|
||||
|
||||
// no need to expand pre, since it is guaranteed to be free of brace-sets
|
||||
var pre = m.pre;
|
||||
var post = m.post.length
|
||||
? expand(m.post, false)
|
||||
: [''];
|
||||
|
||||
var N;
|
||||
|
||||
if (isSequence) {
|
||||
var x = numeric(n[0]);
|
||||
var y = numeric(n[1]);
|
||||
var width = Math.max(n[0].length, n[1].length)
|
||||
var incr = n.length == 3
|
||||
? Math.abs(numeric(n[2]))
|
||||
: 1;
|
||||
var test = lte;
|
||||
var reverse = y < x;
|
||||
if (reverse) {
|
||||
incr *= -1;
|
||||
test = gte;
|
||||
}
|
||||
var pad = n.some(isPadded);
|
||||
|
||||
N = [];
|
||||
|
||||
for (var i = x; test(i, y); i += incr) {
|
||||
var c;
|
||||
if (isAlphaSequence) {
|
||||
c = String.fromCharCode(i);
|
||||
if (c === '\\')
|
||||
c = '';
|
||||
} else {
|
||||
c = String(i);
|
||||
if (pad) {
|
||||
var need = width - c.length;
|
||||
if (need > 0) {
|
||||
var z = new Array(need + 1).join('0');
|
||||
if (i < 0)
|
||||
c = '-' + z + c.slice(1);
|
||||
else
|
||||
c = z + c;
|
||||
}
|
||||
}
|
||||
}
|
||||
N.push(c);
|
||||
}
|
||||
} else {
|
||||
N = concatMap(n, function(el) { return expand(el, false) });
|
||||
}
|
||||
|
||||
for (var j = 0; j < N.length; j++) {
|
||||
for (var k = 0; k < post.length; k++) {
|
||||
var expansion = pre + N[j] + post[k];
|
||||
if (!isTop || isSequence || expansion)
|
||||
expansions.push(expansion);
|
||||
}
|
||||
}
|
||||
|
||||
return expansions;
|
||||
}
|
||||
|
||||
47
vscodeEvalExtension/node_modules/eslint/node_modules/brace-expansion/package.json
generated
vendored
Normal file
47
vscodeEvalExtension/node_modules/eslint/node_modules/brace-expansion/package.json
generated
vendored
Normal file
@@ -0,0 +1,47 @@
|
||||
{
|
||||
"name": "brace-expansion",
|
||||
"description": "Brace expansion as known from sh/bash",
|
||||
"version": "1.1.11",
|
||||
"repository": {
|
||||
"type": "git",
|
||||
"url": "git://github.com/juliangruber/brace-expansion.git"
|
||||
},
|
||||
"homepage": "https://github.com/juliangruber/brace-expansion",
|
||||
"main": "index.js",
|
||||
"scripts": {
|
||||
"test": "tape test/*.js",
|
||||
"gentest": "bash test/generate.sh",
|
||||
"bench": "matcha test/perf/bench.js"
|
||||
},
|
||||
"dependencies": {
|
||||
"balanced-match": "^1.0.0",
|
||||
"concat-map": "0.0.1"
|
||||
},
|
||||
"devDependencies": {
|
||||
"matcha": "^0.7.0",
|
||||
"tape": "^4.6.0"
|
||||
},
|
||||
"keywords": [],
|
||||
"author": {
|
||||
"name": "Julian Gruber",
|
||||
"email": "mail@juliangruber.com",
|
||||
"url": "http://juliangruber.com"
|
||||
},
|
||||
"license": "MIT",
|
||||
"testling": {
|
||||
"files": "test/*.js",
|
||||
"browsers": [
|
||||
"ie/8..latest",
|
||||
"firefox/20..latest",
|
||||
"firefox/nightly",
|
||||
"chrome/25..latest",
|
||||
"chrome/canary",
|
||||
"opera/12..latest",
|
||||
"opera/next",
|
||||
"safari/5.1..latest",
|
||||
"ipad/6.0..latest",
|
||||
"iphone/6.0..latest",
|
||||
"android-browser/4.2..latest"
|
||||
]
|
||||
}
|
||||
}
|
||||
15
vscodeEvalExtension/node_modules/eslint/node_modules/glob-parent/LICENSE
generated
vendored
Normal file
15
vscodeEvalExtension/node_modules/eslint/node_modules/glob-parent/LICENSE
generated
vendored
Normal file
@@ -0,0 +1,15 @@
|
||||
The ISC License
|
||||
|
||||
Copyright (c) 2015, 2019 Elan Shanker, 2021 Blaine Bublitz <blaine.bublitz@gmail.com>, Eric Schoffstall <yo@contra.io> and other contributors
|
||||
|
||||
Permission to use, copy, modify, and/or distribute this software for any
|
||||
purpose with or without fee is hereby granted, provided that the above
|
||||
copyright notice and this permission notice appear in all copies.
|
||||
|
||||
THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
|
||||
WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
|
||||
MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
|
||||
ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
|
||||
WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
|
||||
ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR
|
||||
IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
|
||||
134
vscodeEvalExtension/node_modules/eslint/node_modules/glob-parent/README.md
generated
vendored
Normal file
134
vscodeEvalExtension/node_modules/eslint/node_modules/glob-parent/README.md
generated
vendored
Normal file
@@ -0,0 +1,134 @@
|
||||
<p align="center">
|
||||
<a href="https://gulpjs.com">
|
||||
<img height="257" width="114" src="https://raw.githubusercontent.com/gulpjs/artwork/master/gulp-2x.png">
|
||||
</a>
|
||||
</p>
|
||||
|
||||
# glob-parent
|
||||
|
||||
[![NPM version][npm-image]][npm-url] [![Downloads][downloads-image]][npm-url] [![Build Status][ci-image]][ci-url] [![Coveralls Status][coveralls-image]][coveralls-url]
|
||||
|
||||
Extract the non-magic parent path from a glob string.
|
||||
|
||||
## Usage
|
||||
|
||||
```js
|
||||
var globParent = require('glob-parent');
|
||||
|
||||
globParent('path/to/*.js'); // 'path/to'
|
||||
globParent('/root/path/to/*.js'); // '/root/path/to'
|
||||
globParent('/*.js'); // '/'
|
||||
globParent('*.js'); // '.'
|
||||
globParent('**/*.js'); // '.'
|
||||
globParent('path/{to,from}'); // 'path'
|
||||
globParent('path/!(to|from)'); // 'path'
|
||||
globParent('path/?(to|from)'); // 'path'
|
||||
globParent('path/+(to|from)'); // 'path'
|
||||
globParent('path/*(to|from)'); // 'path'
|
||||
globParent('path/@(to|from)'); // 'path'
|
||||
globParent('path/**/*'); // 'path'
|
||||
|
||||
// if provided a non-glob path, returns the nearest dir
|
||||
globParent('path/foo/bar.js'); // 'path/foo'
|
||||
globParent('path/foo/'); // 'path/foo'
|
||||
globParent('path/foo'); // 'path' (see issue #3 for details)
|
||||
```
|
||||
|
||||
## API
|
||||
|
||||
### `globParent(maybeGlobString, [options])`
|
||||
|
||||
Takes a string and returns the part of the path before the glob begins. Be aware of Escaping rules and Limitations below.
|
||||
|
||||
#### options
|
||||
|
||||
```js
|
||||
{
|
||||
// Disables the automatic conversion of slashes for Windows
|
||||
flipBackslashes: true;
|
||||
}
|
||||
```
|
||||
|
||||
## Escaping
|
||||
|
||||
The following characters have special significance in glob patterns and must be escaped if you want them to be treated as regular path characters:
|
||||
|
||||
- `?` (question mark) unless used as a path segment alone
|
||||
- `*` (asterisk)
|
||||
- `|` (pipe)
|
||||
- `(` (opening parenthesis)
|
||||
- `)` (closing parenthesis)
|
||||
- `{` (opening curly brace)
|
||||
- `}` (closing curly brace)
|
||||
- `[` (opening bracket)
|
||||
- `]` (closing bracket)
|
||||
|
||||
**Example**
|
||||
|
||||
```js
|
||||
globParent('foo/[bar]/'); // 'foo'
|
||||
globParent('foo/\\[bar]/'); // 'foo/[bar]'
|
||||
```
|
||||
|
||||
## Limitations
|
||||
|
||||
### Braces & Brackets
|
||||
|
||||
This library attempts a quick and imperfect method of determining which path
|
||||
parts have glob magic without fully parsing/lexing the pattern. There are some
|
||||
advanced use cases that can trip it up, such as nested braces where the outer
|
||||
pair is escaped and the inner one contains a path separator. If you find
|
||||
yourself in the unlikely circumstance of being affected by this or need to
|
||||
ensure higher-fidelity glob handling in your library, it is recommended that you
|
||||
pre-process your input with [expand-braces] and/or [expand-brackets].
|
||||
|
||||
### Windows
|
||||
|
||||
Backslashes are not valid path separators for globs. If a path with backslashes
|
||||
is provided anyway, for simple cases, glob-parent will replace the path
|
||||
separator for you and return the non-glob parent path (now with
|
||||
forward-slashes, which are still valid as Windows path separators).
|
||||
|
||||
This cannot be used in conjunction with escape characters.
|
||||
|
||||
```js
|
||||
// BAD
|
||||
globParent('C:\\Program Files \\(x86\\)\\*.ext'); // 'C:/Program Files /(x86/)'
|
||||
|
||||
// GOOD
|
||||
globParent('C:/Program Files\\(x86\\)/*.ext'); // 'C:/Program Files (x86)'
|
||||
```
|
||||
|
||||
If you are using escape characters for a pattern without path parts (i.e.
|
||||
relative to `cwd`), prefix with `./` to avoid confusing glob-parent.
|
||||
|
||||
```js
|
||||
// BAD
|
||||
globParent('foo \\[bar]'); // 'foo '
|
||||
globParent('foo \\[bar]*'); // 'foo '
|
||||
|
||||
// GOOD
|
||||
globParent('./foo \\[bar]'); // 'foo [bar]'
|
||||
globParent('./foo \\[bar]*'); // '.'
|
||||
```
|
||||
|
||||
## License
|
||||
|
||||
ISC
|
||||
|
||||
<!-- prettier-ignore-start -->
|
||||
[downloads-image]: https://img.shields.io/npm/dm/glob-parent.svg?style=flat-square
|
||||
[npm-url]: https://www.npmjs.com/package/glob-parent
|
||||
[npm-image]: https://img.shields.io/npm/v/glob-parent.svg?style=flat-square
|
||||
|
||||
[ci-url]: https://github.com/gulpjs/glob-parent/actions?query=workflow:dev
|
||||
[ci-image]: https://img.shields.io/github/workflow/status/gulpjs/glob-parent/dev?style=flat-square
|
||||
|
||||
[coveralls-url]: https://coveralls.io/r/gulpjs/glob-parent
|
||||
[coveralls-image]: https://img.shields.io/coveralls/gulpjs/glob-parent/master.svg?style=flat-square
|
||||
<!-- prettier-ignore-end -->
|
||||
|
||||
<!-- prettier-ignore-start -->
|
||||
[expand-braces]: https://github.com/jonschlinkert/expand-braces
|
||||
[expand-brackets]: https://github.com/jonschlinkert/expand-brackets
|
||||
<!-- prettier-ignore-end -->
|
||||
75
vscodeEvalExtension/node_modules/eslint/node_modules/glob-parent/index.js
generated
vendored
Normal file
75
vscodeEvalExtension/node_modules/eslint/node_modules/glob-parent/index.js
generated
vendored
Normal file
@@ -0,0 +1,75 @@
|
||||
'use strict';
|
||||
|
||||
var isGlob = require('is-glob');
|
||||
var pathPosixDirname = require('path').posix.dirname;
|
||||
var isWin32 = require('os').platform() === 'win32';
|
||||
|
||||
var slash = '/';
|
||||
var backslash = /\\/g;
|
||||
var escaped = /\\([!*?|[\](){}])/g;
|
||||
|
||||
/**
|
||||
* @param {string} str
|
||||
* @param {Object} opts
|
||||
* @param {boolean} [opts.flipBackslashes=true]
|
||||
*/
|
||||
module.exports = function globParent(str, opts) {
|
||||
var options = Object.assign({ flipBackslashes: true }, opts);
|
||||
|
||||
// flip windows path separators
|
||||
if (options.flipBackslashes && isWin32 && str.indexOf(slash) < 0) {
|
||||
str = str.replace(backslash, slash);
|
||||
}
|
||||
|
||||
// special case for strings ending in enclosure containing path separator
|
||||
if (isEnclosure(str)) {
|
||||
str += slash;
|
||||
}
|
||||
|
||||
// preserves full path in case of trailing path separator
|
||||
str += 'a';
|
||||
|
||||
// remove path parts that are globby
|
||||
do {
|
||||
str = pathPosixDirname(str);
|
||||
} while (isGlobby(str));
|
||||
|
||||
// remove escape chars and return result
|
||||
return str.replace(escaped, '$1');
|
||||
};
|
||||
|
||||
function isEnclosure(str) {
|
||||
var lastChar = str.slice(-1);
|
||||
|
||||
var enclosureStart;
|
||||
switch (lastChar) {
|
||||
case '}':
|
||||
enclosureStart = '{';
|
||||
break;
|
||||
case ']':
|
||||
enclosureStart = '[';
|
||||
break;
|
||||
default:
|
||||
return false;
|
||||
}
|
||||
|
||||
var foundIndex = str.indexOf(enclosureStart);
|
||||
if (foundIndex < 0) {
|
||||
return false;
|
||||
}
|
||||
|
||||
return str.slice(foundIndex + 1, -1).includes(slash);
|
||||
}
|
||||
|
||||
function isGlobby(str) {
|
||||
if (/\([^()]+$/.test(str)) {
|
||||
return true;
|
||||
}
|
||||
if (str[0] === '{' || str[0] === '[') {
|
||||
return true;
|
||||
}
|
||||
if (/[^\\][{[]/.test(str)) {
|
||||
return true;
|
||||
}
|
||||
return isGlob(str);
|
||||
}
|
||||
54
vscodeEvalExtension/node_modules/eslint/node_modules/glob-parent/package.json
generated
vendored
Normal file
54
vscodeEvalExtension/node_modules/eslint/node_modules/glob-parent/package.json
generated
vendored
Normal file
@@ -0,0 +1,54 @@
|
||||
{
|
||||
"name": "glob-parent",
|
||||
"version": "6.0.2",
|
||||
"description": "Extract the non-magic parent path from a glob string.",
|
||||
"author": "Gulp Team <team@gulpjs.com> (https://gulpjs.com/)",
|
||||
"contributors": [
|
||||
"Elan Shanker (https://github.com/es128)",
|
||||
"Blaine Bublitz <blaine.bublitz@gmail.com>"
|
||||
],
|
||||
"repository": "gulpjs/glob-parent",
|
||||
"license": "ISC",
|
||||
"engines": {
|
||||
"node": ">=10.13.0"
|
||||
},
|
||||
"main": "index.js",
|
||||
"files": [
|
||||
"LICENSE",
|
||||
"index.js"
|
||||
],
|
||||
"scripts": {
|
||||
"lint": "eslint .",
|
||||
"pretest": "npm run lint",
|
||||
"test": "nyc mocha --async-only"
|
||||
},
|
||||
"dependencies": {
|
||||
"is-glob": "^4.0.3"
|
||||
},
|
||||
"devDependencies": {
|
||||
"eslint": "^7.0.0",
|
||||
"eslint-config-gulp": "^5.0.0",
|
||||
"expect": "^26.0.1",
|
||||
"mocha": "^7.1.2",
|
||||
"nyc": "^15.0.1"
|
||||
},
|
||||
"nyc": {
|
||||
"reporter": [
|
||||
"lcov",
|
||||
"text-summary"
|
||||
]
|
||||
},
|
||||
"prettier": {
|
||||
"singleQuote": true
|
||||
},
|
||||
"keywords": [
|
||||
"glob",
|
||||
"parent",
|
||||
"strip",
|
||||
"path",
|
||||
"dirname",
|
||||
"directory",
|
||||
"base",
|
||||
"wildcard"
|
||||
]
|
||||
}
|
||||
15
vscodeEvalExtension/node_modules/eslint/node_modules/minimatch/LICENSE
generated
vendored
Normal file
15
vscodeEvalExtension/node_modules/eslint/node_modules/minimatch/LICENSE
generated
vendored
Normal file
@@ -0,0 +1,15 @@
|
||||
The ISC License
|
||||
|
||||
Copyright (c) Isaac Z. Schlueter and Contributors
|
||||
|
||||
Permission to use, copy, modify, and/or distribute this software for any
|
||||
purpose with or without fee is hereby granted, provided that the above
|
||||
copyright notice and this permission notice appear in all copies.
|
||||
|
||||
THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
|
||||
WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
|
||||
MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
|
||||
ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
|
||||
WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
|
||||
ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR
|
||||
IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
|
||||
230
vscodeEvalExtension/node_modules/eslint/node_modules/minimatch/README.md
generated
vendored
Normal file
230
vscodeEvalExtension/node_modules/eslint/node_modules/minimatch/README.md
generated
vendored
Normal file
@@ -0,0 +1,230 @@
|
||||
# minimatch
|
||||
|
||||
A minimal matching utility.
|
||||
|
||||
[](http://travis-ci.org/isaacs/minimatch)
|
||||
|
||||
|
||||
This is the matching library used internally by npm.
|
||||
|
||||
It works by converting glob expressions into JavaScript `RegExp`
|
||||
objects.
|
||||
|
||||
## Usage
|
||||
|
||||
```javascript
|
||||
var minimatch = require("minimatch")
|
||||
|
||||
minimatch("bar.foo", "*.foo") // true!
|
||||
minimatch("bar.foo", "*.bar") // false!
|
||||
minimatch("bar.foo", "*.+(bar|foo)", { debug: true }) // true, and noisy!
|
||||
```
|
||||
|
||||
## Features
|
||||
|
||||
Supports these glob features:
|
||||
|
||||
* Brace Expansion
|
||||
* Extended glob matching
|
||||
* "Globstar" `**` matching
|
||||
|
||||
See:
|
||||
|
||||
* `man sh`
|
||||
* `man bash`
|
||||
* `man 3 fnmatch`
|
||||
* `man 5 gitignore`
|
||||
|
||||
## Minimatch Class
|
||||
|
||||
Create a minimatch object by instantiating the `minimatch.Minimatch` class.
|
||||
|
||||
```javascript
|
||||
var Minimatch = require("minimatch").Minimatch
|
||||
var mm = new Minimatch(pattern, options)
|
||||
```
|
||||
|
||||
### Properties
|
||||
|
||||
* `pattern` The original pattern the minimatch object represents.
|
||||
* `options` The options supplied to the constructor.
|
||||
* `set` A 2-dimensional array of regexp or string expressions.
|
||||
Each row in the
|
||||
array corresponds to a brace-expanded pattern. Each item in the row
|
||||
corresponds to a single path-part. For example, the pattern
|
||||
`{a,b/c}/d` would expand to a set of patterns like:
|
||||
|
||||
[ [ a, d ]
|
||||
, [ b, c, d ] ]
|
||||
|
||||
If a portion of the pattern doesn't have any "magic" in it
|
||||
(that is, it's something like `"foo"` rather than `fo*o?`), then it
|
||||
will be left as a string rather than converted to a regular
|
||||
expression.
|
||||
|
||||
* `regexp` Created by the `makeRe` method. A single regular expression
|
||||
expressing the entire pattern. This is useful in cases where you wish
|
||||
to use the pattern somewhat like `fnmatch(3)` with `FNM_PATH` enabled.
|
||||
* `negate` True if the pattern is negated.
|
||||
* `comment` True if the pattern is a comment.
|
||||
* `empty` True if the pattern is `""`.
|
||||
|
||||
### Methods
|
||||
|
||||
* `makeRe` Generate the `regexp` member if necessary, and return it.
|
||||
Will return `false` if the pattern is invalid.
|
||||
* `match(fname)` Return true if the filename matches the pattern, or
|
||||
false otherwise.
|
||||
* `matchOne(fileArray, patternArray, partial)` Take a `/`-split
|
||||
filename, and match it against a single row in the `regExpSet`. This
|
||||
method is mainly for internal use, but is exposed so that it can be
|
||||
used by a glob-walker that needs to avoid excessive filesystem calls.
|
||||
|
||||
All other methods are internal, and will be called as necessary.
|
||||
|
||||
### minimatch(path, pattern, options)
|
||||
|
||||
Main export. Tests a path against the pattern using the options.
|
||||
|
||||
```javascript
|
||||
var isJS = minimatch(file, "*.js", { matchBase: true })
|
||||
```
|
||||
|
||||
### minimatch.filter(pattern, options)
|
||||
|
||||
Returns a function that tests its
|
||||
supplied argument, suitable for use with `Array.filter`. Example:
|
||||
|
||||
```javascript
|
||||
var javascripts = fileList.filter(minimatch.filter("*.js", {matchBase: true}))
|
||||
```
|
||||
|
||||
### minimatch.match(list, pattern, options)
|
||||
|
||||
Match against the list of
|
||||
files, in the style of fnmatch or glob. If nothing is matched, and
|
||||
options.nonull is set, then return a list containing the pattern itself.
|
||||
|
||||
```javascript
|
||||
var javascripts = minimatch.match(fileList, "*.js", {matchBase: true}))
|
||||
```
|
||||
|
||||
### minimatch.makeRe(pattern, options)
|
||||
|
||||
Make a regular expression object from the pattern.
|
||||
|
||||
## Options
|
||||
|
||||
All options are `false` by default.
|
||||
|
||||
### debug
|
||||
|
||||
Dump a ton of stuff to stderr.
|
||||
|
||||
### nobrace
|
||||
|
||||
Do not expand `{a,b}` and `{1..3}` brace sets.
|
||||
|
||||
### noglobstar
|
||||
|
||||
Disable `**` matching against multiple folder names.
|
||||
|
||||
### dot
|
||||
|
||||
Allow patterns to match filenames starting with a period, even if
|
||||
the pattern does not explicitly have a period in that spot.
|
||||
|
||||
Note that by default, `a/**/b` will **not** match `a/.d/b`, unless `dot`
|
||||
is set.
|
||||
|
||||
### noext
|
||||
|
||||
Disable "extglob" style patterns like `+(a|b)`.
|
||||
|
||||
### nocase
|
||||
|
||||
Perform a case-insensitive match.
|
||||
|
||||
### nonull
|
||||
|
||||
When a match is not found by `minimatch.match`, return a list containing
|
||||
the pattern itself if this option is set. When not set, an empty list
|
||||
is returned if there are no matches.
|
||||
|
||||
### matchBase
|
||||
|
||||
If set, then patterns without slashes will be matched
|
||||
against the basename of the path if it contains slashes. For example,
|
||||
`a?b` would match the path `/xyz/123/acb`, but not `/xyz/acb/123`.
|
||||
|
||||
### nocomment
|
||||
|
||||
Suppress the behavior of treating `#` at the start of a pattern as a
|
||||
comment.
|
||||
|
||||
### nonegate
|
||||
|
||||
Suppress the behavior of treating a leading `!` character as negation.
|
||||
|
||||
### flipNegate
|
||||
|
||||
Returns from negate expressions the same as if they were not negated.
|
||||
(Ie, true on a hit, false on a miss.)
|
||||
|
||||
### partial
|
||||
|
||||
Compare a partial path to a pattern. As long as the parts of the path that
|
||||
are present are not contradicted by the pattern, it will be treated as a
|
||||
match. This is useful in applications where you're walking through a
|
||||
folder structure, and don't yet have the full path, but want to ensure that
|
||||
you do not walk down paths that can never be a match.
|
||||
|
||||
For example,
|
||||
|
||||
```js
|
||||
minimatch('/a/b', '/a/*/c/d', { partial: true }) // true, might be /a/b/c/d
|
||||
minimatch('/a/b', '/**/d', { partial: true }) // true, might be /a/b/.../d
|
||||
minimatch('/x/y/z', '/a/**/z', { partial: true }) // false, because x !== a
|
||||
```
|
||||
|
||||
### allowWindowsEscape
|
||||
|
||||
Windows path separator `\` is by default converted to `/`, which
|
||||
prohibits the usage of `\` as a escape character. This flag skips that
|
||||
behavior and allows using the escape character.
|
||||
|
||||
## Comparisons to other fnmatch/glob implementations
|
||||
|
||||
While strict compliance with the existing standards is a worthwhile
|
||||
goal, some discrepancies exist between minimatch and other
|
||||
implementations, and are intentional.
|
||||
|
||||
If the pattern starts with a `!` character, then it is negated. Set the
|
||||
`nonegate` flag to suppress this behavior, and treat leading `!`
|
||||
characters normally. This is perhaps relevant if you wish to start the
|
||||
pattern with a negative extglob pattern like `!(a|B)`. Multiple `!`
|
||||
characters at the start of a pattern will negate the pattern multiple
|
||||
times.
|
||||
|
||||
If a pattern starts with `#`, then it is treated as a comment, and
|
||||
will not match anything. Use `\#` to match a literal `#` at the
|
||||
start of a line, or set the `nocomment` flag to suppress this behavior.
|
||||
|
||||
The double-star character `**` is supported by default, unless the
|
||||
`noglobstar` flag is set. This is supported in the manner of bsdglob
|
||||
and bash 4.1, where `**` only has special significance if it is the only
|
||||
thing in a path part. That is, `a/**/b` will match `a/x/y/b`, but
|
||||
`a/**b` will not.
|
||||
|
||||
If an escaped pattern has no matches, and the `nonull` flag is set,
|
||||
then minimatch.match returns the pattern as-provided, rather than
|
||||
interpreting the character escapes. For example,
|
||||
`minimatch.match([], "\\*a\\?")` will return `"\\*a\\?"` rather than
|
||||
`"*a?"`. This is akin to setting the `nullglob` option in bash, except
|
||||
that it does not resolve escaped pattern characters.
|
||||
|
||||
If brace expansion is not disabled, then it is performed before any
|
||||
other interpretation of the glob pattern. Thus, a pattern like
|
||||
`+(a|{b),c)}`, which would not be valid in bash or zsh, is expanded
|
||||
**first** into the set of `+(a|b)` and `+(a|c)`, and those patterns are
|
||||
checked for validity. Since those two are valid, matching proceeds.
|
||||
947
vscodeEvalExtension/node_modules/eslint/node_modules/minimatch/minimatch.js
generated
vendored
Normal file
947
vscodeEvalExtension/node_modules/eslint/node_modules/minimatch/minimatch.js
generated
vendored
Normal file
@@ -0,0 +1,947 @@
|
||||
module.exports = minimatch
|
||||
minimatch.Minimatch = Minimatch
|
||||
|
||||
var path = (function () { try { return require('path') } catch (e) {}}()) || {
|
||||
sep: '/'
|
||||
}
|
||||
minimatch.sep = path.sep
|
||||
|
||||
var GLOBSTAR = minimatch.GLOBSTAR = Minimatch.GLOBSTAR = {}
|
||||
var expand = require('brace-expansion')
|
||||
|
||||
var plTypes = {
|
||||
'!': { open: '(?:(?!(?:', close: '))[^/]*?)'},
|
||||
'?': { open: '(?:', close: ')?' },
|
||||
'+': { open: '(?:', close: ')+' },
|
||||
'*': { open: '(?:', close: ')*' },
|
||||
'@': { open: '(?:', close: ')' }
|
||||
}
|
||||
|
||||
// any single thing other than /
|
||||
// don't need to escape / when using new RegExp()
|
||||
var qmark = '[^/]'
|
||||
|
||||
// * => any number of characters
|
||||
var star = qmark + '*?'
|
||||
|
||||
// ** when dots are allowed. Anything goes, except .. and .
|
||||
// not (^ or / followed by one or two dots followed by $ or /),
|
||||
// followed by anything, any number of times.
|
||||
var twoStarDot = '(?:(?!(?:\\\/|^)(?:\\.{1,2})($|\\\/)).)*?'
|
||||
|
||||
// not a ^ or / followed by a dot,
|
||||
// followed by anything, any number of times.
|
||||
var twoStarNoDot = '(?:(?!(?:\\\/|^)\\.).)*?'
|
||||
|
||||
// characters that need to be escaped in RegExp.
|
||||
var reSpecials = charSet('().*{}+?[]^$\\!')
|
||||
|
||||
// "abc" -> { a:true, b:true, c:true }
|
||||
function charSet (s) {
|
||||
return s.split('').reduce(function (set, c) {
|
||||
set[c] = true
|
||||
return set
|
||||
}, {})
|
||||
}
|
||||
|
||||
// normalizes slashes.
|
||||
var slashSplit = /\/+/
|
||||
|
||||
minimatch.filter = filter
|
||||
function filter (pattern, options) {
|
||||
options = options || {}
|
||||
return function (p, i, list) {
|
||||
return minimatch(p, pattern, options)
|
||||
}
|
||||
}
|
||||
|
||||
function ext (a, b) {
|
||||
b = b || {}
|
||||
var t = {}
|
||||
Object.keys(a).forEach(function (k) {
|
||||
t[k] = a[k]
|
||||
})
|
||||
Object.keys(b).forEach(function (k) {
|
||||
t[k] = b[k]
|
||||
})
|
||||
return t
|
||||
}
|
||||
|
||||
minimatch.defaults = function (def) {
|
||||
if (!def || typeof def !== 'object' || !Object.keys(def).length) {
|
||||
return minimatch
|
||||
}
|
||||
|
||||
var orig = minimatch
|
||||
|
||||
var m = function minimatch (p, pattern, options) {
|
||||
return orig(p, pattern, ext(def, options))
|
||||
}
|
||||
|
||||
m.Minimatch = function Minimatch (pattern, options) {
|
||||
return new orig.Minimatch(pattern, ext(def, options))
|
||||
}
|
||||
m.Minimatch.defaults = function defaults (options) {
|
||||
return orig.defaults(ext(def, options)).Minimatch
|
||||
}
|
||||
|
||||
m.filter = function filter (pattern, options) {
|
||||
return orig.filter(pattern, ext(def, options))
|
||||
}
|
||||
|
||||
m.defaults = function defaults (options) {
|
||||
return orig.defaults(ext(def, options))
|
||||
}
|
||||
|
||||
m.makeRe = function makeRe (pattern, options) {
|
||||
return orig.makeRe(pattern, ext(def, options))
|
||||
}
|
||||
|
||||
m.braceExpand = function braceExpand (pattern, options) {
|
||||
return orig.braceExpand(pattern, ext(def, options))
|
||||
}
|
||||
|
||||
m.match = function (list, pattern, options) {
|
||||
return orig.match(list, pattern, ext(def, options))
|
||||
}
|
||||
|
||||
return m
|
||||
}
|
||||
|
||||
Minimatch.defaults = function (def) {
|
||||
return minimatch.defaults(def).Minimatch
|
||||
}
|
||||
|
||||
function minimatch (p, pattern, options) {
|
||||
assertValidPattern(pattern)
|
||||
|
||||
if (!options) options = {}
|
||||
|
||||
// shortcut: comments match nothing.
|
||||
if (!options.nocomment && pattern.charAt(0) === '#') {
|
||||
return false
|
||||
}
|
||||
|
||||
return new Minimatch(pattern, options).match(p)
|
||||
}
|
||||
|
||||
function Minimatch (pattern, options) {
|
||||
if (!(this instanceof Minimatch)) {
|
||||
return new Minimatch(pattern, options)
|
||||
}
|
||||
|
||||
assertValidPattern(pattern)
|
||||
|
||||
if (!options) options = {}
|
||||
|
||||
pattern = pattern.trim()
|
||||
|
||||
// windows support: need to use /, not \
|
||||
if (!options.allowWindowsEscape && path.sep !== '/') {
|
||||
pattern = pattern.split(path.sep).join('/')
|
||||
}
|
||||
|
||||
this.options = options
|
||||
this.set = []
|
||||
this.pattern = pattern
|
||||
this.regexp = null
|
||||
this.negate = false
|
||||
this.comment = false
|
||||
this.empty = false
|
||||
this.partial = !!options.partial
|
||||
|
||||
// make the set of regexps etc.
|
||||
this.make()
|
||||
}
|
||||
|
||||
Minimatch.prototype.debug = function () {}
|
||||
|
||||
Minimatch.prototype.make = make
|
||||
function make () {
|
||||
var pattern = this.pattern
|
||||
var options = this.options
|
||||
|
||||
// empty patterns and comments match nothing.
|
||||
if (!options.nocomment && pattern.charAt(0) === '#') {
|
||||
this.comment = true
|
||||
return
|
||||
}
|
||||
if (!pattern) {
|
||||
this.empty = true
|
||||
return
|
||||
}
|
||||
|
||||
// step 1: figure out negation, etc.
|
||||
this.parseNegate()
|
||||
|
||||
// step 2: expand braces
|
||||
var set = this.globSet = this.braceExpand()
|
||||
|
||||
if (options.debug) this.debug = function debug() { console.error.apply(console, arguments) }
|
||||
|
||||
this.debug(this.pattern, set)
|
||||
|
||||
// step 3: now we have a set, so turn each one into a series of path-portion
|
||||
// matching patterns.
|
||||
// These will be regexps, except in the case of "**", which is
|
||||
// set to the GLOBSTAR object for globstar behavior,
|
||||
// and will not contain any / characters
|
||||
set = this.globParts = set.map(function (s) {
|
||||
return s.split(slashSplit)
|
||||
})
|
||||
|
||||
this.debug(this.pattern, set)
|
||||
|
||||
// glob --> regexps
|
||||
set = set.map(function (s, si, set) {
|
||||
return s.map(this.parse, this)
|
||||
}, this)
|
||||
|
||||
this.debug(this.pattern, set)
|
||||
|
||||
// filter out everything that didn't compile properly.
|
||||
set = set.filter(function (s) {
|
||||
return s.indexOf(false) === -1
|
||||
})
|
||||
|
||||
this.debug(this.pattern, set)
|
||||
|
||||
this.set = set
|
||||
}
|
||||
|
||||
Minimatch.prototype.parseNegate = parseNegate
|
||||
function parseNegate () {
|
||||
var pattern = this.pattern
|
||||
var negate = false
|
||||
var options = this.options
|
||||
var negateOffset = 0
|
||||
|
||||
if (options.nonegate) return
|
||||
|
||||
for (var i = 0, l = pattern.length
|
||||
; i < l && pattern.charAt(i) === '!'
|
||||
; i++) {
|
||||
negate = !negate
|
||||
negateOffset++
|
||||
}
|
||||
|
||||
if (negateOffset) this.pattern = pattern.substr(negateOffset)
|
||||
this.negate = negate
|
||||
}
|
||||
|
||||
// Brace expansion:
|
||||
// a{b,c}d -> abd acd
|
||||
// a{b,}c -> abc ac
|
||||
// a{0..3}d -> a0d a1d a2d a3d
|
||||
// a{b,c{d,e}f}g -> abg acdfg acefg
|
||||
// a{b,c}d{e,f}g -> abdeg acdeg abdeg abdfg
|
||||
//
|
||||
// Invalid sets are not expanded.
|
||||
// a{2..}b -> a{2..}b
|
||||
// a{b}c -> a{b}c
|
||||
minimatch.braceExpand = function (pattern, options) {
|
||||
return braceExpand(pattern, options)
|
||||
}
|
||||
|
||||
Minimatch.prototype.braceExpand = braceExpand
|
||||
|
||||
function braceExpand (pattern, options) {
|
||||
if (!options) {
|
||||
if (this instanceof Minimatch) {
|
||||
options = this.options
|
||||
} else {
|
||||
options = {}
|
||||
}
|
||||
}
|
||||
|
||||
pattern = typeof pattern === 'undefined'
|
||||
? this.pattern : pattern
|
||||
|
||||
assertValidPattern(pattern)
|
||||
|
||||
// Thanks to Yeting Li <https://github.com/yetingli> for
|
||||
// improving this regexp to avoid a ReDOS vulnerability.
|
||||
if (options.nobrace || !/\{(?:(?!\{).)*\}/.test(pattern)) {
|
||||
// shortcut. no need to expand.
|
||||
return [pattern]
|
||||
}
|
||||
|
||||
return expand(pattern)
|
||||
}
|
||||
|
||||
var MAX_PATTERN_LENGTH = 1024 * 64
|
||||
var assertValidPattern = function (pattern) {
|
||||
if (typeof pattern !== 'string') {
|
||||
throw new TypeError('invalid pattern')
|
||||
}
|
||||
|
||||
if (pattern.length > MAX_PATTERN_LENGTH) {
|
||||
throw new TypeError('pattern is too long')
|
||||
}
|
||||
}
|
||||
|
||||
// parse a component of the expanded set.
|
||||
// At this point, no pattern may contain "/" in it
|
||||
// so we're going to return a 2d array, where each entry is the full
|
||||
// pattern, split on '/', and then turned into a regular expression.
|
||||
// A regexp is made at the end which joins each array with an
|
||||
// escaped /, and another full one which joins each regexp with |.
|
||||
//
|
||||
// Following the lead of Bash 4.1, note that "**" only has special meaning
|
||||
// when it is the *only* thing in a path portion. Otherwise, any series
|
||||
// of * is equivalent to a single *. Globstar behavior is enabled by
|
||||
// default, and can be disabled by setting options.noglobstar.
|
||||
Minimatch.prototype.parse = parse
|
||||
var SUBPARSE = {}
|
||||
function parse (pattern, isSub) {
|
||||
assertValidPattern(pattern)
|
||||
|
||||
var options = this.options
|
||||
|
||||
// shortcuts
|
||||
if (pattern === '**') {
|
||||
if (!options.noglobstar)
|
||||
return GLOBSTAR
|
||||
else
|
||||
pattern = '*'
|
||||
}
|
||||
if (pattern === '') return ''
|
||||
|
||||
var re = ''
|
||||
var hasMagic = !!options.nocase
|
||||
var escaping = false
|
||||
// ? => one single character
|
||||
var patternListStack = []
|
||||
var negativeLists = []
|
||||
var stateChar
|
||||
var inClass = false
|
||||
var reClassStart = -1
|
||||
var classStart = -1
|
||||
// . and .. never match anything that doesn't start with .,
|
||||
// even when options.dot is set.
|
||||
var patternStart = pattern.charAt(0) === '.' ? '' // anything
|
||||
// not (start or / followed by . or .. followed by / or end)
|
||||
: options.dot ? '(?!(?:^|\\\/)\\.{1,2}(?:$|\\\/))'
|
||||
: '(?!\\.)'
|
||||
var self = this
|
||||
|
||||
function clearStateChar () {
|
||||
if (stateChar) {
|
||||
// we had some state-tracking character
|
||||
// that wasn't consumed by this pass.
|
||||
switch (stateChar) {
|
||||
case '*':
|
||||
re += star
|
||||
hasMagic = true
|
||||
break
|
||||
case '?':
|
||||
re += qmark
|
||||
hasMagic = true
|
||||
break
|
||||
default:
|
||||
re += '\\' + stateChar
|
||||
break
|
||||
}
|
||||
self.debug('clearStateChar %j %j', stateChar, re)
|
||||
stateChar = false
|
||||
}
|
||||
}
|
||||
|
||||
for (var i = 0, len = pattern.length, c
|
||||
; (i < len) && (c = pattern.charAt(i))
|
||||
; i++) {
|
||||
this.debug('%s\t%s %s %j', pattern, i, re, c)
|
||||
|
||||
// skip over any that are escaped.
|
||||
if (escaping && reSpecials[c]) {
|
||||
re += '\\' + c
|
||||
escaping = false
|
||||
continue
|
||||
}
|
||||
|
||||
switch (c) {
|
||||
/* istanbul ignore next */
|
||||
case '/': {
|
||||
// completely not allowed, even escaped.
|
||||
// Should already be path-split by now.
|
||||
return false
|
||||
}
|
||||
|
||||
case '\\':
|
||||
clearStateChar()
|
||||
escaping = true
|
||||
continue
|
||||
|
||||
// the various stateChar values
|
||||
// for the "extglob" stuff.
|
||||
case '?':
|
||||
case '*':
|
||||
case '+':
|
||||
case '@':
|
||||
case '!':
|
||||
this.debug('%s\t%s %s %j <-- stateChar', pattern, i, re, c)
|
||||
|
||||
// all of those are literals inside a class, except that
|
||||
// the glob [!a] means [^a] in regexp
|
||||
if (inClass) {
|
||||
this.debug(' in class')
|
||||
if (c === '!' && i === classStart + 1) c = '^'
|
||||
re += c
|
||||
continue
|
||||
}
|
||||
|
||||
// if we already have a stateChar, then it means
|
||||
// that there was something like ** or +? in there.
|
||||
// Handle the stateChar, then proceed with this one.
|
||||
self.debug('call clearStateChar %j', stateChar)
|
||||
clearStateChar()
|
||||
stateChar = c
|
||||
// if extglob is disabled, then +(asdf|foo) isn't a thing.
|
||||
// just clear the statechar *now*, rather than even diving into
|
||||
// the patternList stuff.
|
||||
if (options.noext) clearStateChar()
|
||||
continue
|
||||
|
||||
case '(':
|
||||
if (inClass) {
|
||||
re += '('
|
||||
continue
|
||||
}
|
||||
|
||||
if (!stateChar) {
|
||||
re += '\\('
|
||||
continue
|
||||
}
|
||||
|
||||
patternListStack.push({
|
||||
type: stateChar,
|
||||
start: i - 1,
|
||||
reStart: re.length,
|
||||
open: plTypes[stateChar].open,
|
||||
close: plTypes[stateChar].close
|
||||
})
|
||||
// negation is (?:(?!js)[^/]*)
|
||||
re += stateChar === '!' ? '(?:(?!(?:' : '(?:'
|
||||
this.debug('plType %j %j', stateChar, re)
|
||||
stateChar = false
|
||||
continue
|
||||
|
||||
case ')':
|
||||
if (inClass || !patternListStack.length) {
|
||||
re += '\\)'
|
||||
continue
|
||||
}
|
||||
|
||||
clearStateChar()
|
||||
hasMagic = true
|
||||
var pl = patternListStack.pop()
|
||||
// negation is (?:(?!js)[^/]*)
|
||||
// The others are (?:<pattern>)<type>
|
||||
re += pl.close
|
||||
if (pl.type === '!') {
|
||||
negativeLists.push(pl)
|
||||
}
|
||||
pl.reEnd = re.length
|
||||
continue
|
||||
|
||||
case '|':
|
||||
if (inClass || !patternListStack.length || escaping) {
|
||||
re += '\\|'
|
||||
escaping = false
|
||||
continue
|
||||
}
|
||||
|
||||
clearStateChar()
|
||||
re += '|'
|
||||
continue
|
||||
|
||||
// these are mostly the same in regexp and glob
|
||||
case '[':
|
||||
// swallow any state-tracking char before the [
|
||||
clearStateChar()
|
||||
|
||||
if (inClass) {
|
||||
re += '\\' + c
|
||||
continue
|
||||
}
|
||||
|
||||
inClass = true
|
||||
classStart = i
|
||||
reClassStart = re.length
|
||||
re += c
|
||||
continue
|
||||
|
||||
case ']':
|
||||
// a right bracket shall lose its special
|
||||
// meaning and represent itself in
|
||||
// a bracket expression if it occurs
|
||||
// first in the list. -- POSIX.2 2.8.3.2
|
||||
if (i === classStart + 1 || !inClass) {
|
||||
re += '\\' + c
|
||||
escaping = false
|
||||
continue
|
||||
}
|
||||
|
||||
// handle the case where we left a class open.
|
||||
// "[z-a]" is valid, equivalent to "\[z-a\]"
|
||||
// split where the last [ was, make sure we don't have
|
||||
// an invalid re. if so, re-walk the contents of the
|
||||
// would-be class to re-translate any characters that
|
||||
// were passed through as-is
|
||||
// TODO: It would probably be faster to determine this
|
||||
// without a try/catch and a new RegExp, but it's tricky
|
||||
// to do safely. For now, this is safe and works.
|
||||
var cs = pattern.substring(classStart + 1, i)
|
||||
try {
|
||||
RegExp('[' + cs + ']')
|
||||
} catch (er) {
|
||||
// not a valid class!
|
||||
var sp = this.parse(cs, SUBPARSE)
|
||||
re = re.substr(0, reClassStart) + '\\[' + sp[0] + '\\]'
|
||||
hasMagic = hasMagic || sp[1]
|
||||
inClass = false
|
||||
continue
|
||||
}
|
||||
|
||||
// finish up the class.
|
||||
hasMagic = true
|
||||
inClass = false
|
||||
re += c
|
||||
continue
|
||||
|
||||
default:
|
||||
// swallow any state char that wasn't consumed
|
||||
clearStateChar()
|
||||
|
||||
if (escaping) {
|
||||
// no need
|
||||
escaping = false
|
||||
} else if (reSpecials[c]
|
||||
&& !(c === '^' && inClass)) {
|
||||
re += '\\'
|
||||
}
|
||||
|
||||
re += c
|
||||
|
||||
} // switch
|
||||
} // for
|
||||
|
||||
// handle the case where we left a class open.
|
||||
// "[abc" is valid, equivalent to "\[abc"
|
||||
if (inClass) {
|
||||
// split where the last [ was, and escape it
|
||||
// this is a huge pita. We now have to re-walk
|
||||
// the contents of the would-be class to re-translate
|
||||
// any characters that were passed through as-is
|
||||
cs = pattern.substr(classStart + 1)
|
||||
sp = this.parse(cs, SUBPARSE)
|
||||
re = re.substr(0, reClassStart) + '\\[' + sp[0]
|
||||
hasMagic = hasMagic || sp[1]
|
||||
}
|
||||
|
||||
// handle the case where we had a +( thing at the *end*
|
||||
// of the pattern.
|
||||
// each pattern list stack adds 3 chars, and we need to go through
|
||||
// and escape any | chars that were passed through as-is for the regexp.
|
||||
// Go through and escape them, taking care not to double-escape any
|
||||
// | chars that were already escaped.
|
||||
for (pl = patternListStack.pop(); pl; pl = patternListStack.pop()) {
|
||||
var tail = re.slice(pl.reStart + pl.open.length)
|
||||
this.debug('setting tail', re, pl)
|
||||
// maybe some even number of \, then maybe 1 \, followed by a |
|
||||
tail = tail.replace(/((?:\\{2}){0,64})(\\?)\|/g, function (_, $1, $2) {
|
||||
if (!$2) {
|
||||
// the | isn't already escaped, so escape it.
|
||||
$2 = '\\'
|
||||
}
|
||||
|
||||
// need to escape all those slashes *again*, without escaping the
|
||||
// one that we need for escaping the | character. As it works out,
|
||||
// escaping an even number of slashes can be done by simply repeating
|
||||
// it exactly after itself. That's why this trick works.
|
||||
//
|
||||
// I am sorry that you have to see this.
|
||||
return $1 + $1 + $2 + '|'
|
||||
})
|
||||
|
||||
this.debug('tail=%j\n %s', tail, tail, pl, re)
|
||||
var t = pl.type === '*' ? star
|
||||
: pl.type === '?' ? qmark
|
||||
: '\\' + pl.type
|
||||
|
||||
hasMagic = true
|
||||
re = re.slice(0, pl.reStart) + t + '\\(' + tail
|
||||
}
|
||||
|
||||
// handle trailing things that only matter at the very end.
|
||||
clearStateChar()
|
||||
if (escaping) {
|
||||
// trailing \\
|
||||
re += '\\\\'
|
||||
}
|
||||
|
||||
// only need to apply the nodot start if the re starts with
|
||||
// something that could conceivably capture a dot
|
||||
var addPatternStart = false
|
||||
switch (re.charAt(0)) {
|
||||
case '[': case '.': case '(': addPatternStart = true
|
||||
}
|
||||
|
||||
// Hack to work around lack of negative lookbehind in JS
|
||||
// A pattern like: *.!(x).!(y|z) needs to ensure that a name
|
||||
// like 'a.xyz.yz' doesn't match. So, the first negative
|
||||
// lookahead, has to look ALL the way ahead, to the end of
|
||||
// the pattern.
|
||||
for (var n = negativeLists.length - 1; n > -1; n--) {
|
||||
var nl = negativeLists[n]
|
||||
|
||||
var nlBefore = re.slice(0, nl.reStart)
|
||||
var nlFirst = re.slice(nl.reStart, nl.reEnd - 8)
|
||||
var nlLast = re.slice(nl.reEnd - 8, nl.reEnd)
|
||||
var nlAfter = re.slice(nl.reEnd)
|
||||
|
||||
nlLast += nlAfter
|
||||
|
||||
// Handle nested stuff like *(*.js|!(*.json)), where open parens
|
||||
// mean that we should *not* include the ) in the bit that is considered
|
||||
// "after" the negated section.
|
||||
var openParensBefore = nlBefore.split('(').length - 1
|
||||
var cleanAfter = nlAfter
|
||||
for (i = 0; i < openParensBefore; i++) {
|
||||
cleanAfter = cleanAfter.replace(/\)[+*?]?/, '')
|
||||
}
|
||||
nlAfter = cleanAfter
|
||||
|
||||
var dollar = ''
|
||||
if (nlAfter === '' && isSub !== SUBPARSE) {
|
||||
dollar = '$'
|
||||
}
|
||||
var newRe = nlBefore + nlFirst + nlAfter + dollar + nlLast
|
||||
re = newRe
|
||||
}
|
||||
|
||||
// if the re is not "" at this point, then we need to make sure
|
||||
// it doesn't match against an empty path part.
|
||||
// Otherwise a/* will match a/, which it should not.
|
||||
if (re !== '' && hasMagic) {
|
||||
re = '(?=.)' + re
|
||||
}
|
||||
|
||||
if (addPatternStart) {
|
||||
re = patternStart + re
|
||||
}
|
||||
|
||||
// parsing just a piece of a larger pattern.
|
||||
if (isSub === SUBPARSE) {
|
||||
return [re, hasMagic]
|
||||
}
|
||||
|
||||
// skip the regexp for non-magical patterns
|
||||
// unescape anything in it, though, so that it'll be
|
||||
// an exact match against a file etc.
|
||||
if (!hasMagic) {
|
||||
return globUnescape(pattern)
|
||||
}
|
||||
|
||||
var flags = options.nocase ? 'i' : ''
|
||||
try {
|
||||
var regExp = new RegExp('^' + re + '$', flags)
|
||||
} catch (er) /* istanbul ignore next - should be impossible */ {
|
||||
// If it was an invalid regular expression, then it can't match
|
||||
// anything. This trick looks for a character after the end of
|
||||
// the string, which is of course impossible, except in multi-line
|
||||
// mode, but it's not a /m regex.
|
||||
return new RegExp('$.')
|
||||
}
|
||||
|
||||
regExp._glob = pattern
|
||||
regExp._src = re
|
||||
|
||||
return regExp
|
||||
}
|
||||
|
||||
minimatch.makeRe = function (pattern, options) {
|
||||
return new Minimatch(pattern, options || {}).makeRe()
|
||||
}
|
||||
|
||||
Minimatch.prototype.makeRe = makeRe
|
||||
function makeRe () {
|
||||
if (this.regexp || this.regexp === false) return this.regexp
|
||||
|
||||
// at this point, this.set is a 2d array of partial
|
||||
// pattern strings, or "**".
|
||||
//
|
||||
// It's better to use .match(). This function shouldn't
|
||||
// be used, really, but it's pretty convenient sometimes,
|
||||
// when you just want to work with a regex.
|
||||
var set = this.set
|
||||
|
||||
if (!set.length) {
|
||||
this.regexp = false
|
||||
return this.regexp
|
||||
}
|
||||
var options = this.options
|
||||
|
||||
var twoStar = options.noglobstar ? star
|
||||
: options.dot ? twoStarDot
|
||||
: twoStarNoDot
|
||||
var flags = options.nocase ? 'i' : ''
|
||||
|
||||
var re = set.map(function (pattern) {
|
||||
return pattern.map(function (p) {
|
||||
return (p === GLOBSTAR) ? twoStar
|
||||
: (typeof p === 'string') ? regExpEscape(p)
|
||||
: p._src
|
||||
}).join('\\\/')
|
||||
}).join('|')
|
||||
|
||||
// must match entire pattern
|
||||
// ending in a * or ** will make it less strict.
|
||||
re = '^(?:' + re + ')$'
|
||||
|
||||
// can match anything, as long as it's not this.
|
||||
if (this.negate) re = '^(?!' + re + ').*$'
|
||||
|
||||
try {
|
||||
this.regexp = new RegExp(re, flags)
|
||||
} catch (ex) /* istanbul ignore next - should be impossible */ {
|
||||
this.regexp = false
|
||||
}
|
||||
return this.regexp
|
||||
}
|
||||
|
||||
minimatch.match = function (list, pattern, options) {
|
||||
options = options || {}
|
||||
var mm = new Minimatch(pattern, options)
|
||||
list = list.filter(function (f) {
|
||||
return mm.match(f)
|
||||
})
|
||||
if (mm.options.nonull && !list.length) {
|
||||
list.push(pattern)
|
||||
}
|
||||
return list
|
||||
}
|
||||
|
||||
Minimatch.prototype.match = function match (f, partial) {
|
||||
if (typeof partial === 'undefined') partial = this.partial
|
||||
this.debug('match', f, this.pattern)
|
||||
// short-circuit in the case of busted things.
|
||||
// comments, etc.
|
||||
if (this.comment) return false
|
||||
if (this.empty) return f === ''
|
||||
|
||||
if (f === '/' && partial) return true
|
||||
|
||||
var options = this.options
|
||||
|
||||
// windows: need to use /, not \
|
||||
if (path.sep !== '/') {
|
||||
f = f.split(path.sep).join('/')
|
||||
}
|
||||
|
||||
// treat the test path as a set of pathparts.
|
||||
f = f.split(slashSplit)
|
||||
this.debug(this.pattern, 'split', f)
|
||||
|
||||
// just ONE of the pattern sets in this.set needs to match
|
||||
// in order for it to be valid. If negating, then just one
|
||||
// match means that we have failed.
|
||||
// Either way, return on the first hit.
|
||||
|
||||
var set = this.set
|
||||
this.debug(this.pattern, 'set', set)
|
||||
|
||||
// Find the basename of the path by looking for the last non-empty segment
|
||||
var filename
|
||||
var i
|
||||
for (i = f.length - 1; i >= 0; i--) {
|
||||
filename = f[i]
|
||||
if (filename) break
|
||||
}
|
||||
|
||||
for (i = 0; i < set.length; i++) {
|
||||
var pattern = set[i]
|
||||
var file = f
|
||||
if (options.matchBase && pattern.length === 1) {
|
||||
file = [filename]
|
||||
}
|
||||
var hit = this.matchOne(file, pattern, partial)
|
||||
if (hit) {
|
||||
if (options.flipNegate) return true
|
||||
return !this.negate
|
||||
}
|
||||
}
|
||||
|
||||
// didn't get any hits. this is success if it's a negative
|
||||
// pattern, failure otherwise.
|
||||
if (options.flipNegate) return false
|
||||
return this.negate
|
||||
}
|
||||
|
||||
// set partial to true to test if, for example,
|
||||
// "/a/b" matches the start of "/*/b/*/d"
|
||||
// Partial means, if you run out of file before you run
|
||||
// out of pattern, then that's fine, as long as all
|
||||
// the parts match.
|
||||
Minimatch.prototype.matchOne = function (file, pattern, partial) {
|
||||
var options = this.options
|
||||
|
||||
this.debug('matchOne',
|
||||
{ 'this': this, file: file, pattern: pattern })
|
||||
|
||||
this.debug('matchOne', file.length, pattern.length)
|
||||
|
||||
for (var fi = 0,
|
||||
pi = 0,
|
||||
fl = file.length,
|
||||
pl = pattern.length
|
||||
; (fi < fl) && (pi < pl)
|
||||
; fi++, pi++) {
|
||||
this.debug('matchOne loop')
|
||||
var p = pattern[pi]
|
||||
var f = file[fi]
|
||||
|
||||
this.debug(pattern, p, f)
|
||||
|
||||
// should be impossible.
|
||||
// some invalid regexp stuff in the set.
|
||||
/* istanbul ignore if */
|
||||
if (p === false) return false
|
||||
|
||||
if (p === GLOBSTAR) {
|
||||
this.debug('GLOBSTAR', [pattern, p, f])
|
||||
|
||||
// "**"
|
||||
// a/**/b/**/c would match the following:
|
||||
// a/b/x/y/z/c
|
||||
// a/x/y/z/b/c
|
||||
// a/b/x/b/x/c
|
||||
// a/b/c
|
||||
// To do this, take the rest of the pattern after
|
||||
// the **, and see if it would match the file remainder.
|
||||
// If so, return success.
|
||||
// If not, the ** "swallows" a segment, and try again.
|
||||
// This is recursively awful.
|
||||
//
|
||||
// a/**/b/**/c matching a/b/x/y/z/c
|
||||
// - a matches a
|
||||
// - doublestar
|
||||
// - matchOne(b/x/y/z/c, b/**/c)
|
||||
// - b matches b
|
||||
// - doublestar
|
||||
// - matchOne(x/y/z/c, c) -> no
|
||||
// - matchOne(y/z/c, c) -> no
|
||||
// - matchOne(z/c, c) -> no
|
||||
// - matchOne(c, c) yes, hit
|
||||
var fr = fi
|
||||
var pr = pi + 1
|
||||
if (pr === pl) {
|
||||
this.debug('** at the end')
|
||||
// a ** at the end will just swallow the rest.
|
||||
// We have found a match.
|
||||
// however, it will not swallow /.x, unless
|
||||
// options.dot is set.
|
||||
// . and .. are *never* matched by **, for explosively
|
||||
// exponential reasons.
|
||||
for (; fi < fl; fi++) {
|
||||
if (file[fi] === '.' || file[fi] === '..' ||
|
||||
(!options.dot && file[fi].charAt(0) === '.')) return false
|
||||
}
|
||||
return true
|
||||
}
|
||||
|
||||
// ok, let's see if we can swallow whatever we can.
|
||||
while (fr < fl) {
|
||||
var swallowee = file[fr]
|
||||
|
||||
this.debug('\nglobstar while', file, fr, pattern, pr, swallowee)
|
||||
|
||||
// XXX remove this slice. Just pass the start index.
|
||||
if (this.matchOne(file.slice(fr), pattern.slice(pr), partial)) {
|
||||
this.debug('globstar found match!', fr, fl, swallowee)
|
||||
// found a match.
|
||||
return true
|
||||
} else {
|
||||
// can't swallow "." or ".." ever.
|
||||
// can only swallow ".foo" when explicitly asked.
|
||||
if (swallowee === '.' || swallowee === '..' ||
|
||||
(!options.dot && swallowee.charAt(0) === '.')) {
|
||||
this.debug('dot detected!', file, fr, pattern, pr)
|
||||
break
|
||||
}
|
||||
|
||||
// ** swallows a segment, and continue.
|
||||
this.debug('globstar swallow a segment, and continue')
|
||||
fr++
|
||||
}
|
||||
}
|
||||
|
||||
// no match was found.
|
||||
// However, in partial mode, we can't say this is necessarily over.
|
||||
// If there's more *pattern* left, then
|
||||
/* istanbul ignore if */
|
||||
if (partial) {
|
||||
// ran out of file
|
||||
this.debug('\n>>> no match, partial?', file, fr, pattern, pr)
|
||||
if (fr === fl) return true
|
||||
}
|
||||
return false
|
||||
}
|
||||
|
||||
// something other than **
|
||||
// non-magic patterns just have to match exactly
|
||||
// patterns with magic have been turned into regexps.
|
||||
var hit
|
||||
if (typeof p === 'string') {
|
||||
hit = f === p
|
||||
this.debug('string match', p, f, hit)
|
||||
} else {
|
||||
hit = f.match(p)
|
||||
this.debug('pattern match', p, f, hit)
|
||||
}
|
||||
|
||||
if (!hit) return false
|
||||
}
|
||||
|
||||
// Note: ending in / means that we'll get a final ""
|
||||
// at the end of the pattern. This can only match a
|
||||
// corresponding "" at the end of the file.
|
||||
// If the file ends in /, then it can only match a
|
||||
// a pattern that ends in /, unless the pattern just
|
||||
// doesn't have any more for it. But, a/b/ should *not*
|
||||
// match "a/b/*", even though "" matches against the
|
||||
// [^/]*? pattern, except in partial mode, where it might
|
||||
// simply not be reached yet.
|
||||
// However, a/b/ should still satisfy a/*
|
||||
|
||||
// now either we fell off the end of the pattern, or we're done.
|
||||
if (fi === fl && pi === pl) {
|
||||
// ran out of pattern and filename at the same time.
|
||||
// an exact hit!
|
||||
return true
|
||||
} else if (fi === fl) {
|
||||
// ran out of file, but still had pattern left.
|
||||
// this is ok if we're doing the match as part of
|
||||
// a glob fs traversal.
|
||||
return partial
|
||||
} else /* istanbul ignore else */ if (pi === pl) {
|
||||
// ran out of pattern, still have file left.
|
||||
// this is only acceptable if we're on the very last
|
||||
// empty segment of a file with a trailing slash.
|
||||
// a/* should match a/b/
|
||||
return (fi === fl - 1) && (file[fi] === '')
|
||||
}
|
||||
|
||||
// should be unreachable.
|
||||
/* istanbul ignore next */
|
||||
throw new Error('wtf?')
|
||||
}
|
||||
|
||||
// replace stuff like \* with *
|
||||
function globUnescape (s) {
|
||||
return s.replace(/\\(.)/g, '$1')
|
||||
}
|
||||
|
||||
function regExpEscape (s) {
|
||||
return s.replace(/[-[\]{}()*+?.,\\^$|#\s]/g, '\\$&')
|
||||
}
|
||||
33
vscodeEvalExtension/node_modules/eslint/node_modules/minimatch/package.json
generated
vendored
Normal file
33
vscodeEvalExtension/node_modules/eslint/node_modules/minimatch/package.json
generated
vendored
Normal file
@@ -0,0 +1,33 @@
|
||||
{
|
||||
"author": "Isaac Z. Schlueter <i@izs.me> (http://blog.izs.me)",
|
||||
"name": "minimatch",
|
||||
"description": "a glob matcher in javascript",
|
||||
"version": "3.1.2",
|
||||
"publishConfig": {
|
||||
"tag": "v3-legacy"
|
||||
},
|
||||
"repository": {
|
||||
"type": "git",
|
||||
"url": "git://github.com/isaacs/minimatch.git"
|
||||
},
|
||||
"main": "minimatch.js",
|
||||
"scripts": {
|
||||
"test": "tap",
|
||||
"preversion": "npm test",
|
||||
"postversion": "npm publish",
|
||||
"postpublish": "git push origin --all; git push origin --tags"
|
||||
},
|
||||
"engines": {
|
||||
"node": "*"
|
||||
},
|
||||
"dependencies": {
|
||||
"brace-expansion": "^1.1.7"
|
||||
},
|
||||
"devDependencies": {
|
||||
"tap": "^15.1.6"
|
||||
},
|
||||
"license": "ISC",
|
||||
"files": [
|
||||
"minimatch.js"
|
||||
]
|
||||
}
|
||||
179
vscodeEvalExtension/node_modules/eslint/package.json
generated
vendored
Normal file
179
vscodeEvalExtension/node_modules/eslint/package.json
generated
vendored
Normal file
@@ -0,0 +1,179 @@
|
||||
{
|
||||
"name": "eslint",
|
||||
"version": "8.56.0",
|
||||
"author": "Nicholas C. Zakas <nicholas+npm@nczconsulting.com>",
|
||||
"description": "An AST-based pattern checker for JavaScript.",
|
||||
"bin": {
|
||||
"eslint": "./bin/eslint.js"
|
||||
},
|
||||
"main": "./lib/api.js",
|
||||
"exports": {
|
||||
"./package.json": "./package.json",
|
||||
".": "./lib/api.js",
|
||||
"./use-at-your-own-risk": "./lib/unsupported-api.js"
|
||||
},
|
||||
"scripts": {
|
||||
"build:docs:update-links": "node tools/fetch-docs-links.js",
|
||||
"build:site": "node Makefile.js gensite",
|
||||
"build:webpack": "node Makefile.js webpack",
|
||||
"build:readme": "node tools/update-readme.js",
|
||||
"lint": "node Makefile.js lint",
|
||||
"lint:docs:js": "node Makefile.js lintDocsJS",
|
||||
"lint:docs:rule-examples": "node Makefile.js checkRuleExamples",
|
||||
"lint:fix": "node Makefile.js lint -- fix",
|
||||
"lint:fix:docs:js": "node Makefile.js lintDocsJS -- fix",
|
||||
"release:generate:alpha": "node Makefile.js generatePrerelease -- alpha",
|
||||
"release:generate:beta": "node Makefile.js generatePrerelease -- beta",
|
||||
"release:generate:latest": "node Makefile.js generateRelease",
|
||||
"release:generate:rc": "node Makefile.js generatePrerelease -- rc",
|
||||
"release:publish": "node Makefile.js publishRelease",
|
||||
"test": "node Makefile.js test",
|
||||
"test:cli": "mocha",
|
||||
"test:fuzz": "node Makefile.js fuzz",
|
||||
"test:performance": "node Makefile.js perf"
|
||||
},
|
||||
"gitHooks": {
|
||||
"pre-commit": "lint-staged"
|
||||
},
|
||||
"lint-staged": {
|
||||
"*.js": "eslint --fix",
|
||||
"*.md": "markdownlint --fix",
|
||||
"lib/rules/*.js": [
|
||||
"node tools/update-eslint-all.js",
|
||||
"git add packages/js/src/configs/eslint-all.js"
|
||||
],
|
||||
"docs/src/rules/*.md": [
|
||||
"node tools/check-rule-examples.js",
|
||||
"node tools/fetch-docs-links.js",
|
||||
"git add docs/src/_data/further_reading_links.json"
|
||||
],
|
||||
"docs/**/*.svg": "npx svgo -r --multipass"
|
||||
},
|
||||
"files": [
|
||||
"LICENSE",
|
||||
"README.md",
|
||||
"bin",
|
||||
"conf",
|
||||
"lib",
|
||||
"messages"
|
||||
],
|
||||
"repository": "eslint/eslint",
|
||||
"funding": "https://opencollective.com/eslint",
|
||||
"homepage": "https://eslint.org",
|
||||
"bugs": "https://github.com/eslint/eslint/issues/",
|
||||
"dependencies": {
|
||||
"@eslint-community/eslint-utils": "^4.2.0",
|
||||
"@eslint-community/regexpp": "^4.6.1",
|
||||
"@eslint/eslintrc": "^2.1.4",
|
||||
"@eslint/js": "8.56.0",
|
||||
"@humanwhocodes/config-array": "^0.11.13",
|
||||
"@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",
|
||||
"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",
|
||||
"esutils": "^2.0.2",
|
||||
"fast-deep-equal": "^3.1.3",
|
||||
"file-entry-cache": "^6.0.1",
|
||||
"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",
|
||||
"natural-compare": "^1.4.0",
|
||||
"optionator": "^0.9.3",
|
||||
"strip-ansi": "^6.0.1",
|
||||
"text-table": "^0.2.0"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@babel/core": "^7.4.3",
|
||||
"@babel/preset-env": "^7.4.3",
|
||||
"@wdio/browser-runner": "^8.14.6",
|
||||
"@wdio/cli": "^8.14.6",
|
||||
"@wdio/concise-reporter": "^8.14.0",
|
||||
"@wdio/globals": "^8.14.6",
|
||||
"@wdio/mocha-framework": "^8.14.0",
|
||||
"babel-loader": "^8.0.5",
|
||||
"c8": "^7.12.0",
|
||||
"chai": "^4.0.1",
|
||||
"cheerio": "^0.22.0",
|
||||
"common-tags": "^1.8.0",
|
||||
"core-js": "^3.1.3",
|
||||
"ejs": "^3.0.2",
|
||||
"eslint": "file:.",
|
||||
"eslint-config-eslint": "file:packages/eslint-config-eslint",
|
||||
"eslint-plugin-eslint-comments": "^3.2.0",
|
||||
"eslint-plugin-eslint-plugin": "^5.2.1",
|
||||
"eslint-plugin-internal-rules": "file:tools/internal-rules",
|
||||
"eslint-plugin-jsdoc": "^46.2.5",
|
||||
"eslint-plugin-n": "^16.4.0",
|
||||
"eslint-plugin-unicorn": "^49.0.0",
|
||||
"eslint-release": "^3.2.0",
|
||||
"eslump": "^3.0.0",
|
||||
"esprima": "^4.0.1",
|
||||
"fast-glob": "^3.2.11",
|
||||
"fs-teardown": "^0.1.3",
|
||||
"glob": "^7.1.6",
|
||||
"got": "^11.8.3",
|
||||
"gray-matter": "^4.0.3",
|
||||
"lint-staged": "^11.0.0",
|
||||
"load-perf": "^0.2.0",
|
||||
"markdown-it": "^12.2.0",
|
||||
"markdown-it-container": "^3.0.0",
|
||||
"markdownlint": "^0.32.0",
|
||||
"markdownlint-cli": "^0.37.0",
|
||||
"marked": "^4.0.8",
|
||||
"memfs": "^3.0.1",
|
||||
"metascraper": "^5.25.7",
|
||||
"metascraper-description": "^5.25.7",
|
||||
"metascraper-image": "^5.29.3",
|
||||
"metascraper-logo": "^5.25.7",
|
||||
"metascraper-logo-favicon": "^5.25.7",
|
||||
"metascraper-title": "^5.25.7",
|
||||
"mocha": "^8.3.2",
|
||||
"mocha-junit-reporter": "^2.0.0",
|
||||
"node-polyfill-webpack-plugin": "^1.0.3",
|
||||
"npm-license": "^0.3.3",
|
||||
"pirates": "^4.0.5",
|
||||
"progress": "^2.0.3",
|
||||
"proxyquire": "^2.0.1",
|
||||
"recast": "^0.23.0",
|
||||
"regenerator-runtime": "^0.14.0",
|
||||
"rollup-plugin-node-polyfills": "^0.2.1",
|
||||
"semver": "^7.5.3",
|
||||
"shelljs": "^0.8.2",
|
||||
"sinon": "^11.0.0",
|
||||
"vite-plugin-commonjs": "^0.10.0",
|
||||
"webdriverio": "^8.14.6",
|
||||
"webpack": "^5.23.0",
|
||||
"webpack-cli": "^4.5.0",
|
||||
"yorkie": "^2.0.0"
|
||||
},
|
||||
"keywords": [
|
||||
"ast",
|
||||
"lint",
|
||||
"javascript",
|
||||
"ecmascript",
|
||||
"espree"
|
||||
],
|
||||
"license": "MIT",
|
||||
"engines": {
|
||||
"node": "^12.22.0 || ^14.17.0 || >=16.0.0"
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user