diff --git a/classes/Agile.DevopsComponents.html b/classes/Agile.DevopsComponents.html new file mode 100644 index 000000000..b7fd4485f --- /dev/null +++ b/classes/Agile.DevopsComponents.html @@ -0,0 +1,81 @@ +DevopsComponents | Jira.js - Jira Cloud API library +

Constructors

Properties

client: Client

Methods

  • Delete the Component data currently stored for the given ID.

    +

    Deletion is performed asynchronously. The getComponentById operation can be used to confirm that data has been +deleted successfully (if needed).

    +

    Only Connect apps that define the jiraDevOpsComponentProvider module can access this resource. This resource +requires the 'DELETE' scope for Connect apps.

    +

    Type Parameters

    • T = void

    Parameters

    Returns Promise<void>

  • Delete the Component data currently stored for the given ID.

    +

    Deletion is performed asynchronously. The getComponentById operation can be used to confirm that data has been +deleted successfully (if needed).

    +

    Only Connect apps that define the jiraDevOpsComponentProvider module can access this resource. This resource +requires the 'DELETE' scope for Connect apps.

    +

    Type Parameters

    • T = void

    Parameters

    Returns Promise<T>

  • Bulk delete all Components that match the given request.

    +

    One or more query params must be supplied to specify Properties to delete by. If more than one Property is +provided, data will be deleted that matches ALL of the Properties (e.g. treated as an AND). See the documentation +for the submitComponents operation for more details.

    +

    E.g. DELETE /bulkByProperties?accountId=account-123&createdBy=user-456

    +

    Deletion is performed asynchronously. The getComponentById operation can be used to confirm that data has been +deleted successfully (if needed).

    +

    Only Connect apps that define the jiraDevOpsComponentProvider module can access this resource. This resource +requires the 'DELETE' scope for Connect apps.

    +

    Type Parameters

    • T = void

    Parameters

    Returns Promise<void>

  • Bulk delete all Components that match the given request.

    +

    One or more query params must be supplied to specify Properties to delete by. If more than one Property is +provided, data will be deleted that matches ALL of the Properties (e.g. treated as an AND). See the documentation +for the submitComponents operation for more details.

    +

    E.g. DELETE /bulkByProperties?accountId=account-123&createdBy=user-456

    +

    Deletion is performed asynchronously. The getComponentById operation can be used to confirm that data has been +deleted successfully (if needed).

    +

    Only Connect apps that define the jiraDevOpsComponentProvider module can access this resource. This resource +requires the 'DELETE' scope for Connect apps.

    +

    Type Parameters

    • T = void

    Parameters

    Returns Promise<T>

  • Retrieve the currently stored Component data for the given ID.

    +

    The result will be what is currently stored, ignoring any pending updates or deletes.

    +

    Only Connect apps that define the jiraDevOpsComponentProvider module can access this resource. This resource +requires the 'READ' scope for Connect apps.

    +

    Type Parameters

    Parameters

    Returns Promise<void>

  • Retrieve the currently stored Component data for the given ID.

    +

    The result will be what is currently stored, ignoring any pending updates or deletes.

    +

    Only Connect apps that define the jiraDevOpsComponentProvider module can access this resource. This resource +requires the 'READ' scope for Connect apps.

    +

    Type Parameters

    Parameters

    Returns Promise<T>

  • Update / insert DevOps Component data.

    +

    Components are identified by their ID, and existing Component data for the same ID will be replaced if it exists +and the updateSequenceNumber of existing data is less than the incoming data.

    +

    Submissions are performed asynchronously. Submitted data will eventually be available in Jira; most updates are +available within a short period of time, but may take some time during peak load and/or maintenance times. The +getComponentById operation can be used to confirm that data has been stored successfully (if needed).

    +

    In the case of multiple Components being submitted in one request, each is validated individually prior to +submission. Details of which Components failed submission (if any) are available in the response object.

    +

    A maximum of 1000 components can be submitted in one request.

    +

    Only Connect apps that define the jiraDevOpsComponentProvider module can access this resource. This resource +requires the 'WRITE' scope for Connect apps.

    +

    Type Parameters

    Parameters

    Returns Promise<void>

  • Update / insert DevOps Component data.

    +

    Components are identified by their ID, and existing Component data for the same ID will be replaced if it exists +and the updateSequenceNumber of existing data is less than the incoming data.

    +

    Submissions are performed asynchronously. Submitted data will eventually be available in Jira; most updates are +available within a short period of time, but may take some time during peak load and/or maintenance times. The +getComponentById operation can be used to confirm that data has been stored successfully (if needed).

    +

    In the case of multiple Components being submitted in one request, each is validated individually prior to +submission. Details of which Components failed submission (if any) are available in the response object.

    +

    A maximum of 1000 components can be submitted in one request.

    +

    Only Connect apps that define the jiraDevOpsComponentProvider module can access this resource. This resource +requires the 'WRITE' scope for Connect apps.

    +

    Type Parameters

    Parameters

    Returns Promise<T>

\ No newline at end of file diff --git a/classes/Agile.Operations.html b/classes/Agile.Operations.html new file mode 100644 index 000000000..1fa1192e7 --- /dev/null +++ b/classes/Agile.Operations.html @@ -0,0 +1,136 @@ +Operations | Jira.js - Jira Cloud API library +

Constructors

Properties

client: Client

Methods

  • Bulk delete all Entries that match the given request.

    +

    One or more query params must be supplied to specify Properties to delete by. If more than one Property is +provided, data will be deleted that matches ALL of the Properties (e.g. treated as an AND). See the documentation +for the submitEntity operation for more details.

    +

    E.g. DELETE /bulkByProperties?accountId=account-123&createdBy=user-456

    +

    Deletion is performed asynchronously. The getIncidentById operation can be used to confirm that data has been +deleted successfully (if needed).

    +

    Only Connect apps that define the jiraOperationsInfoProvider module can access this resource. This resource +requires the 'DELETE' scope for Connect apps.

    +

    Type Parameters

    • T = unknown

    Parameters

    Returns Promise<void>

  • Bulk delete all Entries that match the given request.

    +

    One or more query params must be supplied to specify Properties to delete by. If more than one Property is +provided, data will be deleted that matches ALL of the Properties (e.g. treated as an AND). See the documentation +for the submitEntity operation for more details.

    +

    E.g. DELETE /bulkByProperties?accountId=account-123&createdBy=user-456

    +

    Deletion is performed asynchronously. The getIncidentById operation can be used to confirm that data has been +deleted successfully (if needed).

    +

    Only Connect apps that define the jiraOperationsInfoProvider module can access this resource. This resource +requires the 'DELETE' scope for Connect apps.

    +

    Type Parameters

    • T = unknown

    Parameters

    Returns Promise<T>

  • Delete the Incident data currently stored for the given ID.

    +

    Deletion is performed asynchronously. The getIncidentById operation can be used to confirm that data has been +deleted successfully (if needed).

    +

    Only Connect apps that define the jiraOperationsInfoProvider module can access this resource. This resource +requires the 'DELETE' scope for Connect apps.

    +

    Type Parameters

    • T = void

    Parameters

    Returns Promise<void>

  • Delete the Incident data currently stored for the given ID.

    +

    Deletion is performed asynchronously. The getIncidentById operation can be used to confirm that data has been +deleted successfully (if needed).

    +

    Only Connect apps that define the jiraOperationsInfoProvider module can access this resource. This resource +requires the 'DELETE' scope for Connect apps.

    +

    Type Parameters

    • T = void

    Parameters

    Returns Promise<T>

  • Delete the Review data currently stored for the given ID.

    +

    Deletion is performed asynchronously. The getReviewById operation can be used to confirm that data has been deleted +successfully (if needed).

    +

    Only Connect apps that define the jiraOperationsInfoProvider module can access this resource. This resource +requires the 'DELETE' scope for Connect apps.

    +

    Type Parameters

    • T = void

    Parameters

    Returns Promise<void>

  • Delete the Review data currently stored for the given ID.

    +

    Deletion is performed asynchronously. The getReviewById operation can be used to confirm that data has been deleted +successfully (if needed).

    +

    Only Connect apps that define the jiraOperationsInfoProvider module can access this resource. This resource +requires the 'DELETE' scope for Connect apps.

    +

    Type Parameters

    • T = void

    Parameters

    Returns Promise<T>

  • Bulk delete all Operations Workspaces that match the given request.

    +

    Only Connect apps that define the jiraOperationsInfoProvider module can access this resource. This resource +requires the 'DELETE' scope for Connect apps.

    +

    E.g. DELETE /bulk?workspaceIds=111-222-333,444-555-666

    +

    Type Parameters

    • T = void

    Parameters

    Returns Promise<void>

  • Bulk delete all Operations Workspaces that match the given request.

    +

    Only Connect apps that define the jiraOperationsInfoProvider module can access this resource. This resource +requires the 'DELETE' scope for Connect apps.

    +

    E.g. DELETE /bulk?workspaceIds=111-222-333,444-555-666

    +

    Type Parameters

    • T = void

    Parameters

    Returns Promise<T>

  • Retrieve the currently stored Incident data for the given ID.

    +

    The result will be what is currently stored, ignoring any pending updates or deletes.

    +

    Only Connect apps that define the jiraOperationsInfoProvider module can access this resource. This resource +requires the 'READ' scope for Connect apps.

    +

    Type Parameters

    Parameters

    Returns Promise<void>

  • Retrieve the currently stored Incident data for the given ID.

    +

    The result will be what is currently stored, ignoring any pending updates or deletes.

    +

    Only Connect apps that define the jiraOperationsInfoProvider module can access this resource. This resource +requires the 'READ' scope for Connect apps.

    +

    Type Parameters

    Parameters

    Returns Promise<T>

  • Retrieve the currently stored Review data for the given ID.

    +

    The result will be what is currently stored, ignoring any pending updates or deletes.

    +

    Only Connect apps that define the jiraOperationsInfoProvider module can access this resource. This resource +requires the 'READ' scope for Connect apps.

    +

    Type Parameters

    Parameters

    Returns Promise<void>

  • Retrieve the currently stored Review data for the given ID.

    +

    The result will be what is currently stored, ignoring any pending updates or deletes.

    +

    Only Connect apps that define the jiraOperationsInfoProvider module can access this resource. This resource +requires the 'READ' scope for Connect apps.

    +

    Type Parameters

    Parameters

    Returns Promise<T>

  • Retrieve the either all Operations Workspace IDs associated with the Jira site or a specific Operations Workspace +ID for the given ID.

    +

    The result will be what is currently stored, ignoring any pending updates or deletes.

    +

    E.g. GET /workspace?workspaceId=111-222-333

    +

    Only Connect apps that define the jiraOperationsInfoProvider module can access this resource. This resource +requires the 'READ' scope for Connect apps.

    +

    Type Parameters

    Parameters

    Returns Promise<void>

  • Retrieve the either all Operations Workspace IDs associated with the Jira site or a specific Operations Workspace +ID for the given ID.

    +

    The result will be what is currently stored, ignoring any pending updates or deletes.

    +

    E.g. GET /workspace?workspaceId=111-222-333

    +

    Only Connect apps that define the jiraOperationsInfoProvider module can access this resource. This resource +requires the 'READ' scope for Connect apps.

    +

    Type Parameters

    Parameters

    Returns Promise<T>

  • Update / insert Incident or Review data.

    +

    Incidents and reviews are identified by their ID, and existing Incident and Review data for the same ID will be +replaced if it exists and the updateSequenceNumber of existing data is less than the incoming data.

    +

    Submissions are performed asynchronously. Submitted data will eventually be available in Jira; most updates are +available within a short period of time, but may take some time during peak load and/or maintenance times. The +getIncidentById or getReviewById operation can be used to confirm that data has been stored successfully (if +needed).

    +

    In the case of multiple Incidents and Reviews being submitted in one request, each is validated individually prior +to submission. Details of which entities failed submission (if any) are available in the response object.

    +

    A maximum of 1000 incidents can be submitted in one request.

    +

    Only Connect apps that define the jiraOperationsInfoProvider module can access this resource. This resource +requires the 'WRITE' scope for Connect apps.

    +

    Type Parameters

    Parameters

    Returns Promise<void>

  • Update / insert Incident or Review data.

    +

    Incidents and reviews are identified by their ID, and existing Incident and Review data for the same ID will be +replaced if it exists and the updateSequenceNumber of existing data is less than the incoming data.

    +

    Submissions are performed asynchronously. Submitted data will eventually be available in Jira; most updates are +available within a short period of time, but may take some time during peak load and/or maintenance times. The +getIncidentById or getReviewById operation can be used to confirm that data has been stored successfully (if +needed).

    +

    In the case of multiple Incidents and Reviews being submitted in one request, each is validated individually prior +to submission. Details of which entities failed submission (if any) are available in the response object.

    +

    A maximum of 1000 incidents can be submitted in one request.

    +

    Only Connect apps that define the jiraOperationsInfoProvider module can access this resource. This resource +requires the 'WRITE' scope for Connect apps.

    +

    Type Parameters

    Parameters

    Returns Promise<T>

  • Insert Operations Workspace IDs to establish a relationship between them and the Jira site the app is installed in. +If a relationship between the Workspace ID and Jira already exists then the workspace ID will be ignored and Jira +will process the rest of the entries.

    +

    Only Connect apps that define the jiraOperationsInfoProvider module can access this resource. This resource +requires the 'WRITE' scope for Connect apps.

    +

    Type Parameters

    Returns Promise<void>

  • Insert Operations Workspace IDs to establish a relationship between them and the Jira site the app is installed in. +If a relationship between the Workspace ID and Jira already exists then the workspace ID will be ignored and Jira +will process the rest of the entries.

    +

    Only Connect apps that define the jiraOperationsInfoProvider module can access this resource. This resource +requires the 'WRITE' scope for Connect apps.

    +

    Type Parameters

    Parameters

    Returns Promise<T>

\ No newline at end of file diff --git a/classes/HttpException.html b/classes/HttpException.html new file mode 100644 index 000000000..0f2c500ab --- /dev/null +++ b/classes/HttpException.html @@ -0,0 +1,66 @@ +HttpException | Jira.js - Jira Cloud API library +

Defines the base HTTP exception, which is handled by the default Exceptions Handler.

+

Hierarchy

  • Error
    • HttpException

Constructors

  • Instantiate a plain HTTP Exception.

    +

    Parameters

    • response: string | Record<string, any>

      String, object describing the error condition or the error cause.

      +
    • Optional status: number

      HTTP response status code.

      +
    • Optional options: HttpExceptionOptions

      An object used to add an error cause. Configures error chaining support

      +

    Returns HttpException

    Example

    throw new HttpException('message', HttpStatus.BAD_REQUEST);
    throw new HttpException('custom message', HttpStatus.BAD_REQUEST, {
    cause: new Error('Cause Error'),
    }); +
    +

    Usage Notes

    The constructor arguments define the response and the HTTP response status code.

    +
      +
    • The response argument (required) defines the JSON response body. alternatively, it can also be + an error object that is used to define an error cause.
    • +
    • The status argument (optional) defines the HTTP Status Code.
    • +
    • The options argument (optional) defines additional error options. Currently, it supports the cause attribute, + and can be used as an alternative way to specify the error cause: const error = new HttpException('description', 400, { cause: new Error() });
    • +
    +

    By default, the JSON response body contains two properties:

    +
      +
    • statusCode: the Http Status Code.
    • +
    • message: a short description of the HTTP error by default; override this +by supplying a string in the response parameter.
    • +
    +

    The status argument is required, and should be a valid HTTP status code. +Best practice is to use the HttpStatus enum imported from nestjs/common.

    +

    See

    +

Properties

cause?: unknown
code?: string
message: string
name: string
response: string | Record<string, any>

String, object describing the error condition or the error cause.

+
stack?: string
status: number
statusText?: string
prepareStackTrace?: ((err, stackTraces) => any)

Optional override for formatting stack traces

+

Type declaration

    • (err, stackTraces): any
    • Parameters

      • err: Error
      • stackTraces: CallSite[]

      Returns any

stackTraceLimit: number

Methods

  • Parameters

    • response: string | Record<string, any>
    • Optional status: number

    Returns number

  • Parameters

    • response: string | Record<string, any>
    • Optional status: number

    Returns undefined | string

  • Create .stack property on a target object

    +

    Parameters

    • targetObject: object
    • Optional constructorOpt: Function

    Returns void

\ No newline at end of file diff --git a/docs/classes/Agile.DevopsComponents.html b/docs/classes/Agile.DevopsComponents.html new file mode 100644 index 000000000..b7fd4485f --- /dev/null +++ b/docs/classes/Agile.DevopsComponents.html @@ -0,0 +1,81 @@ +DevopsComponents | Jira.js - Jira Cloud API library +

Constructors

Properties

client: Client

Methods

  • Delete the Component data currently stored for the given ID.

    +

    Deletion is performed asynchronously. The getComponentById operation can be used to confirm that data has been +deleted successfully (if needed).

    +

    Only Connect apps that define the jiraDevOpsComponentProvider module can access this resource. This resource +requires the 'DELETE' scope for Connect apps.

    +

    Type Parameters

    • T = void

    Parameters

    Returns Promise<void>

  • Delete the Component data currently stored for the given ID.

    +

    Deletion is performed asynchronously. The getComponentById operation can be used to confirm that data has been +deleted successfully (if needed).

    +

    Only Connect apps that define the jiraDevOpsComponentProvider module can access this resource. This resource +requires the 'DELETE' scope for Connect apps.

    +

    Type Parameters

    • T = void

    Parameters

    Returns Promise<T>

  • Bulk delete all Components that match the given request.

    +

    One or more query params must be supplied to specify Properties to delete by. If more than one Property is +provided, data will be deleted that matches ALL of the Properties (e.g. treated as an AND). See the documentation +for the submitComponents operation for more details.

    +

    E.g. DELETE /bulkByProperties?accountId=account-123&createdBy=user-456

    +

    Deletion is performed asynchronously. The getComponentById operation can be used to confirm that data has been +deleted successfully (if needed).

    +

    Only Connect apps that define the jiraDevOpsComponentProvider module can access this resource. This resource +requires the 'DELETE' scope for Connect apps.

    +

    Type Parameters

    • T = void

    Parameters

    Returns Promise<void>

  • Bulk delete all Components that match the given request.

    +

    One or more query params must be supplied to specify Properties to delete by. If more than one Property is +provided, data will be deleted that matches ALL of the Properties (e.g. treated as an AND). See the documentation +for the submitComponents operation for more details.

    +

    E.g. DELETE /bulkByProperties?accountId=account-123&createdBy=user-456

    +

    Deletion is performed asynchronously. The getComponentById operation can be used to confirm that data has been +deleted successfully (if needed).

    +

    Only Connect apps that define the jiraDevOpsComponentProvider module can access this resource. This resource +requires the 'DELETE' scope for Connect apps.

    +

    Type Parameters

    • T = void

    Parameters

    Returns Promise<T>

  • Retrieve the currently stored Component data for the given ID.

    +

    The result will be what is currently stored, ignoring any pending updates or deletes.

    +

    Only Connect apps that define the jiraDevOpsComponentProvider module can access this resource. This resource +requires the 'READ' scope for Connect apps.

    +

    Type Parameters

    Parameters

    Returns Promise<void>

  • Retrieve the currently stored Component data for the given ID.

    +

    The result will be what is currently stored, ignoring any pending updates or deletes.

    +

    Only Connect apps that define the jiraDevOpsComponentProvider module can access this resource. This resource +requires the 'READ' scope for Connect apps.

    +

    Type Parameters

    Parameters

    Returns Promise<T>

  • Update / insert DevOps Component data.

    +

    Components are identified by their ID, and existing Component data for the same ID will be replaced if it exists +and the updateSequenceNumber of existing data is less than the incoming data.

    +

    Submissions are performed asynchronously. Submitted data will eventually be available in Jira; most updates are +available within a short period of time, but may take some time during peak load and/or maintenance times. The +getComponentById operation can be used to confirm that data has been stored successfully (if needed).

    +

    In the case of multiple Components being submitted in one request, each is validated individually prior to +submission. Details of which Components failed submission (if any) are available in the response object.

    +

    A maximum of 1000 components can be submitted in one request.

    +

    Only Connect apps that define the jiraDevOpsComponentProvider module can access this resource. This resource +requires the 'WRITE' scope for Connect apps.

    +

    Type Parameters

    Parameters

    Returns Promise<void>

  • Update / insert DevOps Component data.

    +

    Components are identified by their ID, and existing Component data for the same ID will be replaced if it exists +and the updateSequenceNumber of existing data is less than the incoming data.

    +

    Submissions are performed asynchronously. Submitted data will eventually be available in Jira; most updates are +available within a short period of time, but may take some time during peak load and/or maintenance times. The +getComponentById operation can be used to confirm that data has been stored successfully (if needed).

    +

    In the case of multiple Components being submitted in one request, each is validated individually prior to +submission. Details of which Components failed submission (if any) are available in the response object.

    +

    A maximum of 1000 components can be submitted in one request.

    +

    Only Connect apps that define the jiraDevOpsComponentProvider module can access this resource. This resource +requires the 'WRITE' scope for Connect apps.

    +

    Type Parameters

    Parameters

    Returns Promise<T>

\ No newline at end of file diff --git a/docs/classes/Agile.Operations.html b/docs/classes/Agile.Operations.html new file mode 100644 index 000000000..1fa1192e7 --- /dev/null +++ b/docs/classes/Agile.Operations.html @@ -0,0 +1,136 @@ +Operations | Jira.js - Jira Cloud API library +

Constructors

Properties

client: Client

Methods

  • Bulk delete all Entries that match the given request.

    +

    One or more query params must be supplied to specify Properties to delete by. If more than one Property is +provided, data will be deleted that matches ALL of the Properties (e.g. treated as an AND). See the documentation +for the submitEntity operation for more details.

    +

    E.g. DELETE /bulkByProperties?accountId=account-123&createdBy=user-456

    +

    Deletion is performed asynchronously. The getIncidentById operation can be used to confirm that data has been +deleted successfully (if needed).

    +

    Only Connect apps that define the jiraOperationsInfoProvider module can access this resource. This resource +requires the 'DELETE' scope for Connect apps.

    +

    Type Parameters

    • T = unknown

    Parameters

    Returns Promise<void>

  • Bulk delete all Entries that match the given request.

    +

    One or more query params must be supplied to specify Properties to delete by. If more than one Property is +provided, data will be deleted that matches ALL of the Properties (e.g. treated as an AND). See the documentation +for the submitEntity operation for more details.

    +

    E.g. DELETE /bulkByProperties?accountId=account-123&createdBy=user-456

    +

    Deletion is performed asynchronously. The getIncidentById operation can be used to confirm that data has been +deleted successfully (if needed).

    +

    Only Connect apps that define the jiraOperationsInfoProvider module can access this resource. This resource +requires the 'DELETE' scope for Connect apps.

    +

    Type Parameters

    • T = unknown

    Parameters

    Returns Promise<T>

  • Delete the Incident data currently stored for the given ID.

    +

    Deletion is performed asynchronously. The getIncidentById operation can be used to confirm that data has been +deleted successfully (if needed).

    +

    Only Connect apps that define the jiraOperationsInfoProvider module can access this resource. This resource +requires the 'DELETE' scope for Connect apps.

    +

    Type Parameters

    • T = void

    Parameters

    Returns Promise<void>

  • Delete the Incident data currently stored for the given ID.

    +

    Deletion is performed asynchronously. The getIncidentById operation can be used to confirm that data has been +deleted successfully (if needed).

    +

    Only Connect apps that define the jiraOperationsInfoProvider module can access this resource. This resource +requires the 'DELETE' scope for Connect apps.

    +

    Type Parameters

    • T = void

    Parameters

    Returns Promise<T>

  • Delete the Review data currently stored for the given ID.

    +

    Deletion is performed asynchronously. The getReviewById operation can be used to confirm that data has been deleted +successfully (if needed).

    +

    Only Connect apps that define the jiraOperationsInfoProvider module can access this resource. This resource +requires the 'DELETE' scope for Connect apps.

    +

    Type Parameters

    • T = void

    Parameters

    Returns Promise<void>

  • Delete the Review data currently stored for the given ID.

    +

    Deletion is performed asynchronously. The getReviewById operation can be used to confirm that data has been deleted +successfully (if needed).

    +

    Only Connect apps that define the jiraOperationsInfoProvider module can access this resource. This resource +requires the 'DELETE' scope for Connect apps.

    +

    Type Parameters

    • T = void

    Parameters

    Returns Promise<T>

  • Bulk delete all Operations Workspaces that match the given request.

    +

    Only Connect apps that define the jiraOperationsInfoProvider module can access this resource. This resource +requires the 'DELETE' scope for Connect apps.

    +

    E.g. DELETE /bulk?workspaceIds=111-222-333,444-555-666

    +

    Type Parameters

    • T = void

    Parameters

    Returns Promise<void>

  • Bulk delete all Operations Workspaces that match the given request.

    +

    Only Connect apps that define the jiraOperationsInfoProvider module can access this resource. This resource +requires the 'DELETE' scope for Connect apps.

    +

    E.g. DELETE /bulk?workspaceIds=111-222-333,444-555-666

    +

    Type Parameters

    • T = void

    Parameters

    Returns Promise<T>

  • Retrieve the currently stored Incident data for the given ID.

    +

    The result will be what is currently stored, ignoring any pending updates or deletes.

    +

    Only Connect apps that define the jiraOperationsInfoProvider module can access this resource. This resource +requires the 'READ' scope for Connect apps.

    +

    Type Parameters

    Parameters

    Returns Promise<void>

  • Retrieve the currently stored Incident data for the given ID.

    +

    The result will be what is currently stored, ignoring any pending updates or deletes.

    +

    Only Connect apps that define the jiraOperationsInfoProvider module can access this resource. This resource +requires the 'READ' scope for Connect apps.

    +

    Type Parameters

    Parameters

    Returns Promise<T>

  • Retrieve the currently stored Review data for the given ID.

    +

    The result will be what is currently stored, ignoring any pending updates or deletes.

    +

    Only Connect apps that define the jiraOperationsInfoProvider module can access this resource. This resource +requires the 'READ' scope for Connect apps.

    +

    Type Parameters

    Parameters

    Returns Promise<void>

  • Retrieve the currently stored Review data for the given ID.

    +

    The result will be what is currently stored, ignoring any pending updates or deletes.

    +

    Only Connect apps that define the jiraOperationsInfoProvider module can access this resource. This resource +requires the 'READ' scope for Connect apps.

    +

    Type Parameters

    Parameters

    Returns Promise<T>

  • Retrieve the either all Operations Workspace IDs associated with the Jira site or a specific Operations Workspace +ID for the given ID.

    +

    The result will be what is currently stored, ignoring any pending updates or deletes.

    +

    E.g. GET /workspace?workspaceId=111-222-333

    +

    Only Connect apps that define the jiraOperationsInfoProvider module can access this resource. This resource +requires the 'READ' scope for Connect apps.

    +

    Type Parameters

    Parameters

    Returns Promise<void>

  • Retrieve the either all Operations Workspace IDs associated with the Jira site or a specific Operations Workspace +ID for the given ID.

    +

    The result will be what is currently stored, ignoring any pending updates or deletes.

    +

    E.g. GET /workspace?workspaceId=111-222-333

    +

    Only Connect apps that define the jiraOperationsInfoProvider module can access this resource. This resource +requires the 'READ' scope for Connect apps.

    +

    Type Parameters

    Parameters

    Returns Promise<T>

  • Update / insert Incident or Review data.

    +

    Incidents and reviews are identified by their ID, and existing Incident and Review data for the same ID will be +replaced if it exists and the updateSequenceNumber of existing data is less than the incoming data.

    +

    Submissions are performed asynchronously. Submitted data will eventually be available in Jira; most updates are +available within a short period of time, but may take some time during peak load and/or maintenance times. The +getIncidentById or getReviewById operation can be used to confirm that data has been stored successfully (if +needed).

    +

    In the case of multiple Incidents and Reviews being submitted in one request, each is validated individually prior +to submission. Details of which entities failed submission (if any) are available in the response object.

    +

    A maximum of 1000 incidents can be submitted in one request.

    +

    Only Connect apps that define the jiraOperationsInfoProvider module can access this resource. This resource +requires the 'WRITE' scope for Connect apps.

    +

    Type Parameters

    Parameters

    Returns Promise<void>

  • Update / insert Incident or Review data.

    +

    Incidents and reviews are identified by their ID, and existing Incident and Review data for the same ID will be +replaced if it exists and the updateSequenceNumber of existing data is less than the incoming data.

    +

    Submissions are performed asynchronously. Submitted data will eventually be available in Jira; most updates are +available within a short period of time, but may take some time during peak load and/or maintenance times. The +getIncidentById or getReviewById operation can be used to confirm that data has been stored successfully (if +needed).

    +

    In the case of multiple Incidents and Reviews being submitted in one request, each is validated individually prior +to submission. Details of which entities failed submission (if any) are available in the response object.

    +

    A maximum of 1000 incidents can be submitted in one request.

    +

    Only Connect apps that define the jiraOperationsInfoProvider module can access this resource. This resource +requires the 'WRITE' scope for Connect apps.

    +

    Type Parameters

    Parameters

    Returns Promise<T>

  • Insert Operations Workspace IDs to establish a relationship between them and the Jira site the app is installed in. +If a relationship between the Workspace ID and Jira already exists then the workspace ID will be ignored and Jira +will process the rest of the entries.

    +

    Only Connect apps that define the jiraOperationsInfoProvider module can access this resource. This resource +requires the 'WRITE' scope for Connect apps.

    +

    Type Parameters

    Returns Promise<void>

  • Insert Operations Workspace IDs to establish a relationship between them and the Jira site the app is installed in. +If a relationship between the Workspace ID and Jira already exists then the workspace ID will be ignored and Jira +will process the rest of the entries.

    +

    Only Connect apps that define the jiraOperationsInfoProvider module can access this resource. This resource +requires the 'WRITE' scope for Connect apps.

    +

    Type Parameters

    Parameters

    Returns Promise<T>

\ No newline at end of file diff --git a/docs/classes/HttpException.html b/docs/classes/HttpException.html new file mode 100644 index 000000000..0f2c500ab --- /dev/null +++ b/docs/classes/HttpException.html @@ -0,0 +1,66 @@ +HttpException | Jira.js - Jira Cloud API library +

Defines the base HTTP exception, which is handled by the default Exceptions Handler.

+

Hierarchy

  • Error
    • HttpException

Constructors

  • Instantiate a plain HTTP Exception.

    +

    Parameters

    • response: string | Record<string, any>

      String, object describing the error condition or the error cause.

      +
    • Optional status: number

      HTTP response status code.

      +
    • Optional options: HttpExceptionOptions

      An object used to add an error cause. Configures error chaining support

      +

    Returns HttpException

    Example

    throw new HttpException('message', HttpStatus.BAD_REQUEST);
    throw new HttpException('custom message', HttpStatus.BAD_REQUEST, {
    cause: new Error('Cause Error'),
    }); +
    +

    Usage Notes

    The constructor arguments define the response and the HTTP response status code.

    +
      +
    • The response argument (required) defines the JSON response body. alternatively, it can also be + an error object that is used to define an error cause.
    • +
    • The status argument (optional) defines the HTTP Status Code.
    • +
    • The options argument (optional) defines additional error options. Currently, it supports the cause attribute, + and can be used as an alternative way to specify the error cause: const error = new HttpException('description', 400, { cause: new Error() });
    • +
    +

    By default, the JSON response body contains two properties:

    +
      +
    • statusCode: the Http Status Code.
    • +
    • message: a short description of the HTTP error by default; override this +by supplying a string in the response parameter.
    • +
    +

    The status argument is required, and should be a valid HTTP status code. +Best practice is to use the HttpStatus enum imported from nestjs/common.

    +

    See

    +

Properties

cause?: unknown
code?: string
message: string
name: string
response: string | Record<string, any>

String, object describing the error condition or the error cause.

+
stack?: string
status: number
statusText?: string
prepareStackTrace?: ((err, stackTraces) => any)

Optional override for formatting stack traces

+

Type declaration

    • (err, stackTraces): any
    • Parameters

      • err: Error
      • stackTraces: CallSite[]

      Returns any

stackTraceLimit: number

Methods

  • Parameters

    • response: string | Record<string, any>
    • Optional status: number

    Returns number

  • Parameters

    • response: string | Record<string, any>
    • Optional status: number

    Returns undefined | string

  • Create .stack property on a target object

    +

    Parameters

    • targetObject: object
    • Optional constructorOpt: Function

    Returns void

\ No newline at end of file diff --git a/docs/functions/isNil.html b/docs/functions/isNil.html new file mode 100644 index 000000000..d3b1243a0 --- /dev/null +++ b/docs/functions/isNil.html @@ -0,0 +1,17 @@ +isNil | Jira.js - Jira Cloud API library +
\ No newline at end of file diff --git a/docs/functions/isNumber.html b/docs/functions/isNumber.html new file mode 100644 index 000000000..deb87d2f8 --- /dev/null +++ b/docs/functions/isNumber.html @@ -0,0 +1,17 @@ +isNumber | Jira.js - Jira Cloud API library +
\ No newline at end of file diff --git a/docs/functions/isObject.html b/docs/functions/isObject.html new file mode 100644 index 000000000..9434c18e8 --- /dev/null +++ b/docs/functions/isObject.html @@ -0,0 +1,17 @@ +isObject | Jira.js - Jira Cloud API library +
\ No newline at end of file diff --git a/docs/functions/isString.html b/docs/functions/isString.html new file mode 100644 index 000000000..0a970559c --- /dev/null +++ b/docs/functions/isString.html @@ -0,0 +1,17 @@ +isString | Jira.js - Jira Cloud API library +
\ No newline at end of file diff --git a/docs/functions/isUndefined.html b/docs/functions/isUndefined.html new file mode 100644 index 000000000..b5ae1e1c8 --- /dev/null +++ b/docs/functions/isUndefined.html @@ -0,0 +1,17 @@ +isUndefined | Jira.js - Jira Cloud API library +
\ No newline at end of file diff --git a/docs/interfaces/Agile.AgileModels.GetComponentById.html b/docs/interfaces/Agile.AgileModels.GetComponentById.html new file mode 100644 index 000000000..979819727 --- /dev/null +++ b/docs/interfaces/Agile.AgileModels.GetComponentById.html @@ -0,0 +1,50 @@ +GetComponentById | Jira.js - Jira Cloud API library +

Data related to a specific component in a specific workspace that is affected by incidents.*

+
interface GetComponentById {
    avatarUrl: string;
    componentType: string;
    description: string;
    id: string;
    lastUpdated: string;
    name: string;
    providerName?: string;
    schemaVersion: string;
    tier: string;
    updateSequenceNumber: number;
    url: string;
}

Properties

avatarUrl: string

A URL to display a logo representing this devops component, if available.

+
componentType: string

The type of the component. Will be shown in the UI.

+
description: string

A description of the DevOps Component in Markdown format. Will be shown in the UI.

+
id: string

The identifier for the DevOps Component. Must be unique for a given Provider.

+
lastUpdated: string

The last-updated timestamp to present to the user the last time the DevOps Component was updated.

+

Expected format is an RFC3339 formatted string.

+
name: string

The human-readable name for the DevOps Component. Will be shown in the UI.

+
providerName?: string

The human-readable name for the Provider that owns this DevOps Component. Will be shown in the UI.

+
schemaVersion: string

The DevOpsComponentData schema version used for this devops component data.

+

Placeholder to support potential schema changes in the future.

+
tier: string

The tier of the component. Will be shown in the UI.

+
updateSequenceNumber: number

An ID used to apply an ordering to updates for this DevOps Component in the case of out-of-order receipt of update +requests.

+

This can be any monotonically increasing number. A suggested implementation is to use epoch millis from the +Provider system, but other alternatives are valid (e.g. a Provider could store a counter against each DevOps +Component and increment that on each update to Jira).

+

Updates for a DevOps Component that are received with an updateSqeuenceId lower than what is currently stored will +be ignored.

+
url: string

A URL users can use to link to a summary view of this devops component, if appropriate.

+

This could be any location that makes sense in the Provider system (e.g. if the summary information comes from a +specific project, it might make sense to link the user to the component in that project).

+
\ No newline at end of file diff --git a/docs/interfaces/Agile.AgileModels.GetIncidentById.html b/docs/interfaces/Agile.AgileModels.GetIncidentById.html new file mode 100644 index 000000000..eabdf27d1 --- /dev/null +++ b/docs/interfaces/Agile.AgileModels.GetIncidentById.html @@ -0,0 +1,58 @@ +GetIncidentById | Jira.js - Jira Cloud API library +

Data related to a specific incident in a specific container that the incident is present in. Must specify at least +one association to a component.*

+
interface GetIncidentById {
    affectedComponents: string[];
    associations?: {
        associationType?: string;
        values?: string[];
    }[];
    createdDate: string;
    description: string;
    id: string;
    lastUpdated: string;
    schemaVersion: string;
    severity?: {
        level: string;
    };
    status: string;
    summary: string;
    updateSequenceNumber: number;
    url: string;
}

Properties

affectedComponents: string[]

The IDs of the Components impacted by this Incident. Must be unique for a given Provider.

+
associations?: {
    associationType?: string;
    values?: string[];
}[]

The IDs of the Jira issues related to this Incident. Must be unique for a given Provider.

+

Type declaration

  • Optional associationType?: string

    The type of the association being made

    +
  • Optional values?: string[]
createdDate: string

The timestamp to present to the user that shows when the Incident was raised.

+

Expected format is an RFC3339 formatted string.

+
description: string

A description of the issue in Markdown format. Will be shown in the UI and used when creating Jira Issues.

+
id: string

The identifier for the Incident. Must be unique for a given Provider.

+
lastUpdated: string

The last-updated timestamp to present to the user the last time the Incident was updated.

+

Expected format is an RFC3339 formatted string.

+
schemaVersion: string

The IncidentData schema version used for this incident data.

+

Placeholder to support potential schema changes in the future.

+
severity?: {
    level: string;
}

Severity information for a single Incident.

+

This is the severity information that will be presented to the user on e.g. the Jira Incidents screen.

+

Type declaration

  • level: string

    The severity level of the Incident with P1 being the highest and P5 being the lowest

    +
status: string

The current status of the Incident.

+
summary: string

The human-readable summary for the Incident. Will be shown in the UI.

+

If not provided, will use the ID for display.

+
updateSequenceNumber: number

An ID used to apply an ordering to updates for this Incident in the case of out-of-order receipt of update +requests.

+

This can be any monotonically increasing number. A suggested implementation is to use epoch millis from the +Provider system, but other alternatives are valid (e.g. a Provider could store a counter against each Incident and +increment that on each update to Jira).

+

Updates for a Incident that are received with an updateSqeuenceId lower than what is currently stored will be +ignored.

+
url: string

A URL users can use to link to a summary view of this incident, if appropriate.

+

This could be any location that makes sense in the Provider system (e.g. if the summary information comes from a +specific project, it might make sense to link the user to the incident in that project).

+
\ No newline at end of file diff --git a/docs/interfaces/Agile.AgileModels.GetLinkedWorkspaceById.html b/docs/interfaces/Agile.AgileModels.GetLinkedWorkspaceById.html new file mode 100644 index 000000000..837b3829e --- /dev/null +++ b/docs/interfaces/Agile.AgileModels.GetLinkedWorkspaceById.html @@ -0,0 +1,22 @@ +GetLinkedWorkspaceById | Jira.js - Jira Cloud API library +

The Security Workspace information stored for the given ID.

+
interface GetLinkedWorkspaceById {
    updatedAt: string;
    workspaceId: string;
}

Properties

Properties

updatedAt: string

Latest date and time that the Security Workspace was updated in Jira.

+
workspaceId: string

The Security Workspace ID

+
\ No newline at end of file diff --git a/docs/interfaces/Agile.AgileModels.GetLinkedWorkspaces.html b/docs/interfaces/Agile.AgileModels.GetLinkedWorkspaces.html new file mode 100644 index 000000000..3f5354b40 --- /dev/null +++ b/docs/interfaces/Agile.AgileModels.GetLinkedWorkspaces.html @@ -0,0 +1,20 @@ +GetLinkedWorkspaces | Jira.js - Jira Cloud API library +

The payload of linked Security Workspace IDs.

+
interface GetLinkedWorkspaces {
    workspaceIds: string[];
}

Properties

Properties

workspaceIds: string[]

The IDs of Security Workspaces that are linked to this Jira site.

+
\ No newline at end of file diff --git a/docs/interfaces/Agile.AgileModels.GetReviewById.html b/docs/interfaces/Agile.AgileModels.GetReviewById.html new file mode 100644 index 000000000..945cf6136 --- /dev/null +++ b/docs/interfaces/Agile.AgileModels.GetReviewById.html @@ -0,0 +1,52 @@ +GetReviewById | Jira.js - Jira Cloud API library +

Data related to a specific post-incident review. Must specify at least one association to an incident.*

+
interface GetReviewById {
    associations?: {
        associationType?: string;
        values?: string[];
    }[];
    createdDate: string;
    description: string;
    id: string;
    lastUpdated: string;
    reviews: string[];
    schemaVersion: string;
    status: string;
    summary: string;
    updateSequenceNumber: number;
    url: string;
}

Properties

associations?: {
    associationType?: string;
    values?: string[];
}[]

The IDs of the Jira issues related to this Incident. Must be unique for a given Provider.

+

Type declaration

  • Optional associationType?: string

    The type of the association being made

    +
  • Optional values?: string[]
createdDate: string

The timestamp to present to the user that shows when the Review was raised.

+

Expected format is an RFC3339 formatted string.

+
description: string

A description of the review in Markdown format. Will be shown in the UI and used when creating Jira Issues.

+
id: string

The identifier for the Review. Must be unique for a given Provider.

+
lastUpdated: string

The last-updated timestamp to present to the user the last time the Review was updated.

+

Expected format is an RFC3339 formatted string.

+
reviews: string[]

The IDs of the Incidents covered by this Review. Must be unique for a given Provider.

+
schemaVersion: string

The PostIncidentReviewData schema version used for this post-incident review data.

+

Placeholder to support potential schema changes in the future.

+
status: string

The current status of the Post-Incident Review.

+
summary: string

The human-readable summary for the Post-Incident Review. Will be shown in the UI.

+

If not provided, will use the ID for display.

+
updateSequenceNumber: number

An ID used to apply an ordering to updates for this Review in the case of out-of-order receipt of update requests.

+

This can be any monotonically increasing number. A suggested implementation is to use epoch millis from the +Provider system, but other alternatives are valid (e.g. a Provider could store a counter against each Review and +increment that on each update to Jira).

+

Updates for a Review that are received with an updateSqeuenceId lower than what is currently stored will be +ignored.

+
url: string

A URL users can use to link to a summary view of this review, if appropriate.

+

This could be any location that makes sense in the Provider system (e.g. if the summary information comes from a +specific project, it might make sense to link the user to the review in that project).

+
\ No newline at end of file diff --git a/docs/interfaces/Agile.AgileModels.GetVulnerabilityById.html b/docs/interfaces/Agile.AgileModels.GetVulnerabilityById.html new file mode 100644 index 000000000..0b5e7bcbd --- /dev/null +++ b/docs/interfaces/Agile.AgileModels.GetVulnerabilityById.html @@ -0,0 +1,84 @@ +GetVulnerabilityById | Jira.js - Jira Cloud API library +

Data related to a specific vulnerability in a specific workspace that the vulnerability is present in. Must specify +at least one association.*

+
interface GetVulnerabilityById {
    addAssociations?: {}[];
    additionalInfo?: {
        content: string;
        url?: string;
    };
    associationsLastUpdated?: string;
    associationsUpdateSequenceNumber?: number;
    containerId: string;
    description: string;
    displayName: string;
    id: string;
    identifiers?: {
        displayName: string;
        url: string;
    }[];
    introducedDate: string;
    lastUpdated: string;
    removeAssociations?: {}[];
    schemaVersion: string;
    severity: {
        level: string;
    };
    status: string;
    type: string;
    updateSequenceNumber: number;
    url: string;
}

Properties

addAssociations?: {}[]

The associations (e.g. Jira issue) to add in addition to the currently stored associations of the Security +Vulnerability.

+

Type declaration

    additionalInfo?: {
        content: string;
        url?: string;
    }

    Extra information (optional). This data will be shown in the security feature under the vulnerability displayName.

    +

    Type declaration

    • content: string

      The content of the additionalInfo.

      +
    • Optional url?: string

      Optional URL linking to the information

      +
    associationsLastUpdated?: string

    An ISO-8601 Date-time string representing the last time the provider updated associations on this entity.

    +

    Expected format is an RFC3339 formatted string.

    +
    associationsUpdateSequenceNumber?: number

    A sequence number to compare when writing entity associations to the database.

    +

    This can be any monotonically increasing number. A highly recommended implementation is to use epoch millis.

    +

    This is an optional field. If it is not provided it will default to being equal to the corresponding entity's +updateSequenceNumber.

    +

    Associations are written following a LastWriteWins strategy, association that are received with an +associationsUpdateSequenceNumber lower than what is currently stored will be ignored.

    +
    containerId: string

    The identifier of the Container where this Vulnerability was found. Must be unique for a given Provider. This must +follow this regex pattern: [a-zA-Z0-9\\-_.~@:{}=]+(/[a-zA-Z0-9\\-_.~@:{}=]+)*

    +
    description: string

    A description of the issue in markdown format that will be shown in the UI and used when creating Jira Issues. HTML +tags are not supported in the markdown format. For creating a new line \n can be used. Read more about the +accepted markdown transformations +here.

    +
    displayName: string

    The human-readable name for the Vulnerability. Will be shown in the UI.

    +

    If not provided, will use the ID for display.

    +
    id: string

    The identifier for the Vulnerability. Must be unique for a given Provider.

    +
    identifiers?: {
        displayName: string;
        url: string;
    }[]

    The identifying information for the Vulnerability.

    +

    Type declaration

    • displayName: string

      The display name of the Vulnerability identified.

      +
    • url: string

      A URL users can use to link to the definition of the Vulnerability identified.

      +
    introducedDate: string

    The timestamp to present to the user that shows when the Vulnerability was introduced.

    +

    Expected format is an RFC3339 formatted string.

    +
    lastUpdated: string

    The last-updated timestamp to present to the user the last time the Vulnerability was updated.

    +

    Expected format is an RFC3339 formatted string.

    +
    removeAssociations?: {}[]

    The associations (e.g. Jira issue) to remove from currently stored associations of the Security Vulnerability.

    +

    Type declaration

      schemaVersion: string

      The VulnerabilityData schema version used for this vulnerability data.

      +

      Placeholder to support potential schema changes in the future.

      +
      severity: {
          level: string;
      }

      Severity information for a single Vulnerability.

      +

      This is the severity information that will be presented to the user on e.g. the Jira Security screen.

      +

      Type declaration

      • level: string

        The severity level of the Vulnerability.

        +
      status: string

      The current status of the Vulnerability.

      +
      type: string

      The type of Vulnerability detected.

      +
      updateSequenceNumber: number

      An ID used to apply an ordering to updates for this Vulnerability in the case of out-of-order receipt of update +requests.

      +

      This can be any monotonically increasing number. A suggested implementation is to use epoch millis from the +Provider system, but other alternatives are valid (e.g. a Provider could store a counter against each Vulnerability +and increment that on each update to Jira).

      +

      Updates for a Vulnerability that are received with an updateSequenceId lower than what is currently stored will be +ignored.

      +
      url: string

      A URL users can use to link to a summary view of this vulnerability, if appropriate.

      +

      This could be any location that makes sense in the Provider system (e.g. if the summary information comes from a +specific project, it might make sense to link the user to the vulnerability in that project).

      +
      \ No newline at end of file diff --git a/docs/interfaces/Agile.AgileModels.GetWorkspaces.html b/docs/interfaces/Agile.AgileModels.GetWorkspaces.html new file mode 100644 index 000000000..50dfd1cd2 --- /dev/null +++ b/docs/interfaces/Agile.AgileModels.GetWorkspaces.html @@ -0,0 +1,20 @@ +GetWorkspaces | Jira.js - Jira Cloud API library +

      The payload of Operations Workspace Ids.

      +
      interface GetWorkspaces {
          workspaceIds: string[];
      }

      Properties

      Properties

      workspaceIds: string[]

      The IDs of Operations Workspaces that are available to this Jira site.

      +
      \ No newline at end of file diff --git a/docs/interfaces/Agile.AgileModels.Scope.html b/docs/interfaces/Agile.AgileModels.Scope.html new file mode 100644 index 000000000..5b8a4d01e --- /dev/null +++ b/docs/interfaces/Agile.AgileModels.Scope.html @@ -0,0 +1,36 @@ +Scope | Jira.js - Jira Cloud API library +

      The projects the item is associated with. Indicated for items associated with next-gen +projects.

      +
      interface Scope {
          project?: {
              avatarUrls?: Agile.AgileModels.AvatarUrls;
              id?: string;
              key?: string;
              name?: string;
              projectCategory?: {
                  description?: string;
                  id?: string;
                  name?: string;
                  self?: string;
              };
              projectTypeKey?: string;
              self?: string;
              simplified?: boolean;
          };
          type?: string;
      }

      Properties

      Properties

      project?: {
          avatarUrls?: Agile.AgileModels.AvatarUrls;
          id?: string;
          key?: string;
          name?: string;
          projectCategory?: {
              description?: string;
              id?: string;
              name?: string;
              self?: string;
          };
          projectTypeKey?: string;
          self?: string;
          simplified?: boolean;
      }

      Details about a project.

      +

      Type declaration

      • Optional avatarUrls?: Agile.AgileModels.AvatarUrls
      • Optional id?: string

        The ID of the project.

        +
      • Optional key?: string

        The key of the project.

        +
      • Optional name?: string

        The name of the project.

        +
      • Optional projectCategory?: {
            description?: string;
            id?: string;
            name?: string;
            self?: string;
        }

        A project category.

        +
        • Optional description?: string

          The name of the project category.

          +
        • Optional id?: string

          The ID of the project category.

          +
        • Optional name?: string

          The description of the project category.

          +
        • Optional self?: string

          The URL of the project category.

          +
      • Optional projectTypeKey?: string

        The project +type of the +project.

        +
      • Optional self?: string

        The URL of the project details.

        +
      • Optional simplified?: boolean

        Whether or not the project is simplified.

        +
      type?: string

      The type of scope.

      +
      \ No newline at end of file diff --git a/docs/interfaces/Agile.AgileModels.SubmitComponents.html b/docs/interfaces/Agile.AgileModels.SubmitComponents.html new file mode 100644 index 000000000..fc6f78ec0 --- /dev/null +++ b/docs/interfaces/Agile.AgileModels.SubmitComponents.html @@ -0,0 +1,33 @@ +SubmitComponents | Jira.js - Jira Cloud API library +

      The result of a successful submitDevopsComponents request.*

      +
      interface SubmitComponents {
          acceptedComponents?: string[];
          failedComponents?: {};
          unknownProjectKeys?: string[];
      }

      Properties

      acceptedComponents?: string[]

      The IDs of Components that have been accepted for submission.

      +

      A Component may be rejected if it was only associated with unknown project keys.

      +

      Note that a Component that isn't updated due to it's updateSequenceNumber being out of order is not considered a +failed submission.

      +
      failedComponents?: {}

      Details of Components that have not been accepted for submission, usually due to a problem with the request data.

      +

      The object (if present) will be keyed by Component ID and include any errors associated with that Component that +have prevented it being submitted.

      +

      Type declaration

        unknownProjectKeys?: string[]

        Project keys that are not known on this Jira instance (if any).

        +

        These may be invalid keys (e.g. UTF is sometimes incorrectly identified as a Jira project key), or they may be +for projects that no longer exist.

        +

        If a Component has been associated with project keys other than those in this array it will still be stored against +those valid keys. If a Component was only associated with project keys deemed to be invalid it won't be persisted.

        +
        \ No newline at end of file diff --git a/docs/interfaces/Agile.AgileModels.SubmitEntity.html b/docs/interfaces/Agile.AgileModels.SubmitEntity.html new file mode 100644 index 000000000..5bacc0540 --- /dev/null +++ b/docs/interfaces/Agile.AgileModels.SubmitEntity.html @@ -0,0 +1,33 @@ +SubmitEntity | Jira.js - Jira Cloud API library +

        The result of a successful submitIncidents request.*

        +
        interface SubmitEntity {
            acceptedIncidents?: string[];
            failedIncidents?: {};
            unknownProjectKeys?: string[];
        }

        Properties

        acceptedIncidents?: string[]

        The IDs of Incidents that have been accepted for submission.

        +

        A Incident may be rejected if it was only associated with unknown project keys.

        +

        Note that a Incident that isn't updated due to it's updateSequenceNumber being out of order is not considered a +failed submission.

        +
        failedIncidents?: {}

        Details of Incidents that have not been accepted for submission, usually due to a problem with the request data.

        +

        The object (if present) will be keyed by Incident ID and include any errors associated with that Incident that have +prevented it being submitted.

        +

        Type declaration

          unknownProjectKeys?: string[]

          Project keys that are not known on this Jira instance (if any).

          +

          These may be invalid keys (e.g. UTF is sometimes incorrectly identified as a Jira project key), or they may be +for projects that no longer exist.

          +

          If a Incident has been associated with project keys other than those in this array it will still be stored against +those valid keys. If a Incident was only associated with project keys deemed to be invalid it won't be persisted.

          +
          \ No newline at end of file diff --git a/docs/interfaces/Agile.AgileModels.SubmitOperationsWorkspaces.html b/docs/interfaces/Agile.AgileModels.SubmitOperationsWorkspaces.html new file mode 100644 index 000000000..981458b98 --- /dev/null +++ b/docs/interfaces/Agile.AgileModels.SubmitOperationsWorkspaces.html @@ -0,0 +1,20 @@ +SubmitOperationsWorkspaces | Jira.js - Jira Cloud API library +

          The result of a successful submitOperationsWorkspaces request.*

          +
          interface SubmitOperationsWorkspaces {
              acceptedWorkspaceIds?: string[];
          }

          Properties

          acceptedWorkspaceIds?: string[]

          The IDs of Operations Workspaces that have been linked to the Jira site in this request.

          +
          \ No newline at end of file diff --git a/docs/interfaces/Agile.AgileModels.SubmitVulnerabilities.html b/docs/interfaces/Agile.AgileModels.SubmitVulnerabilities.html new file mode 100644 index 000000000..bd6c3c84c --- /dev/null +++ b/docs/interfaces/Agile.AgileModels.SubmitVulnerabilities.html @@ -0,0 +1,33 @@ +SubmitVulnerabilities | Jira.js - Jira Cloud API library +

          The result of a successful submitVulnerabilities request.*

          +
          interface SubmitVulnerabilities {
              acceptedVulnerabilities?: string[];
              failedVulnerabilities?: {};
              unknownAssociations?: {}[];
          }

          Properties

          acceptedVulnerabilities?: string[]

          The IDs of Vulnerabilities that have been accepted for submission.

          +

          A Vulnerability may be rejected if it was only associated with unknown project keys.

          +

          Note that a Vulnerability that isn't updated due to it's updateSequenceNumber being out of order is not considered +a failed submission.

          +
          failedVulnerabilities?: {}

          Details of Vulnerabilities that have not been accepted for submission, usually due to a problem with the request +data.

          +

          The object (if present) will be keyed by Vulnerability ID and include any errors associated with that Vulnerability +that have prevented it being submitted.

          +

          Type declaration

            unknownAssociations?: {}[]

            Associations (e.g. Service IDs) that are not known on this Jira instance (if any).

            +

            If a Vulnerability has been associated with any other association other than those in this array it will still be +stored against those valid associations. If a Vulnerability was only associated with the associations in this +array, it is deemed to be invalid and it won't be persisted.

            +

            Type declaration

              \ No newline at end of file diff --git a/docs/interfaces/Agile.AgileParameters.DeleteComponentById.html b/docs/interfaces/Agile.AgileParameters.DeleteComponentById.html new file mode 100644 index 000000000..d6f1ca2f6 --- /dev/null +++ b/docs/interfaces/Agile.AgileParameters.DeleteComponentById.html @@ -0,0 +1,19 @@ +DeleteComponentById | Jira.js - Jira Cloud API library +
              interface DeleteComponentById {
                  componentId: string;
              }

              Properties

              Properties

              componentId: string

              The ID of the Component to delete.

              +
              \ No newline at end of file diff --git a/docs/interfaces/Agile.AgileParameters.DeleteComponentsByProperty.html b/docs/interfaces/Agile.AgileParameters.DeleteComponentsByProperty.html new file mode 100644 index 000000000..e47778a44 --- /dev/null +++ b/docs/interfaces/Agile.AgileParameters.DeleteComponentsByProperty.html @@ -0,0 +1,19 @@ +DeleteComponentsByProperty | Jira.js - Jira Cloud API library +
              interface DeleteComponentsByProperty {
                  accountId?: string;
                  createdBy?: string;
                  [key: string]: any;
              }

              Indexable

              [key: string]: any

              Properties

              Properties

              accountId?: string
              createdBy?: string
              \ No newline at end of file diff --git a/docs/interfaces/Agile.AgileParameters.DeleteEntityByProperty.html b/docs/interfaces/Agile.AgileParameters.DeleteEntityByProperty.html new file mode 100644 index 000000000..a89d1e3d4 --- /dev/null +++ b/docs/interfaces/Agile.AgileParameters.DeleteEntityByProperty.html @@ -0,0 +1,19 @@ +DeleteEntityByProperty | Jira.js - Jira Cloud API library +
              interface DeleteEntityByProperty {
                  accountId?: string;
                  createdBy?: string;
                  [key: string]: any;
              }

              Indexable

              [key: string]: any

              Properties

              Properties

              accountId?: string
              createdBy?: string
              \ No newline at end of file diff --git a/docs/interfaces/Agile.AgileParameters.DeleteIncidentById.html b/docs/interfaces/Agile.AgileParameters.DeleteIncidentById.html new file mode 100644 index 000000000..1861eafa6 --- /dev/null +++ b/docs/interfaces/Agile.AgileParameters.DeleteIncidentById.html @@ -0,0 +1,19 @@ +DeleteIncidentById | Jira.js - Jira Cloud API library +
              interface DeleteIncidentById {
                  incidentId: string;
              }

              Properties

              Properties

              incidentId: string

              The ID of the Incident to delete.

              +
              \ No newline at end of file diff --git a/docs/interfaces/Agile.AgileParameters.DeleteReviewById.html b/docs/interfaces/Agile.AgileParameters.DeleteReviewById.html new file mode 100644 index 000000000..b3cbba979 --- /dev/null +++ b/docs/interfaces/Agile.AgileParameters.DeleteReviewById.html @@ -0,0 +1,19 @@ +DeleteReviewById | Jira.js - Jira Cloud API library +
              interface DeleteReviewById {
                  reviewId: string;
              }

              Properties

              Properties

              reviewId: string

              The ID of the Review to delete.

              +
              \ No newline at end of file diff --git a/docs/interfaces/Agile.AgileParameters.DeleteWorkspaces.html b/docs/interfaces/Agile.AgileParameters.DeleteWorkspaces.html new file mode 100644 index 000000000..c3d611e78 --- /dev/null +++ b/docs/interfaces/Agile.AgileParameters.DeleteWorkspaces.html @@ -0,0 +1,18 @@ +DeleteWorkspaces | Jira.js - Jira Cloud API library +
              interface DeleteWorkspaces {
                  workspaceIds: string[];
              }

              Properties

              Properties

              workspaceIds: string[]
              \ No newline at end of file diff --git a/docs/interfaces/Agile.AgileParameters.GetComponentById.html b/docs/interfaces/Agile.AgileParameters.GetComponentById.html new file mode 100644 index 000000000..8c6b06924 --- /dev/null +++ b/docs/interfaces/Agile.AgileParameters.GetComponentById.html @@ -0,0 +1,19 @@ +GetComponentById | Jira.js - Jira Cloud API library +
              interface GetComponentById {
                  componentId: string;
              }

              Properties

              Properties

              componentId: string

              The ID of the Component to fetch.

              +
              \ No newline at end of file diff --git a/docs/interfaces/Agile.AgileParameters.GetIncidentById.html b/docs/interfaces/Agile.AgileParameters.GetIncidentById.html new file mode 100644 index 000000000..03f854aea --- /dev/null +++ b/docs/interfaces/Agile.AgileParameters.GetIncidentById.html @@ -0,0 +1,19 @@ +GetIncidentById | Jira.js - Jira Cloud API library +
              interface GetIncidentById {
                  incidentId: string;
              }

              Properties

              Properties

              incidentId: string

              The ID of the Incident to fetch.

              +
              \ No newline at end of file diff --git a/docs/interfaces/Agile.AgileParameters.GetReviewById.html b/docs/interfaces/Agile.AgileParameters.GetReviewById.html new file mode 100644 index 000000000..97fc778ef --- /dev/null +++ b/docs/interfaces/Agile.AgileParameters.GetReviewById.html @@ -0,0 +1,19 @@ +GetReviewById | Jira.js - Jira Cloud API library +
              interface GetReviewById {
                  reviewId: string;
              }

              Properties

              Properties

              reviewId: string

              The ID of the Review to fetch.

              +
              \ No newline at end of file diff --git a/docs/interfaces/Agile.AgileParameters.GetWorkspaces.html b/docs/interfaces/Agile.AgileParameters.GetWorkspaces.html new file mode 100644 index 000000000..d0a7c8e51 --- /dev/null +++ b/docs/interfaces/Agile.AgileParameters.GetWorkspaces.html @@ -0,0 +1,18 @@ +GetWorkspaces | Jira.js - Jira Cloud API library +
              interface GetWorkspaces {
                  workspaceId: string;
              }

              Properties

              Properties

              workspaceId: string
              \ No newline at end of file diff --git a/docs/interfaces/Agile.AgileParameters.SubmitComponents.html b/docs/interfaces/Agile.AgileParameters.SubmitComponents.html new file mode 100644 index 000000000..44bab8468 --- /dev/null +++ b/docs/interfaces/Agile.AgileParameters.SubmitComponents.html @@ -0,0 +1,49 @@ +SubmitComponents | Jira.js - Jira Cloud API library +
              interface SubmitComponents {
                  components: {
                      avatarUrl: string;
                      componentType: string;
                      description: string;
                      id: string;
                      lastUpdated: string;
                      name: string;
                      providerName?: string;
                      schemaVersion: string;
                      tier: string;
                      updateSequenceNumber: number;
                      url: string;
                  }[];
                  properties?: {};
                  providerMetadata?: {
                      product?: string;
                  };
              }

              Properties

              components: {
                  avatarUrl: string;
                  componentType: string;
                  description: string;
                  id: string;
                  lastUpdated: string;
                  name: string;
                  providerName?: string;
                  schemaVersion: string;
                  tier: string;
                  updateSequenceNumber: number;
                  url: string;
              }[]

              Type declaration

              • avatarUrl: string

                A URL to display a logo representing this devops component, if available.

                +
              • componentType: string

                The type of the component. Will be shown in the UI.

                +
              • description: string

                A description of the DevOps Component in Markdown format. Will be shown in the UI.

                +
              • id: string

                The identifier for the DevOps Component. Must be unique for a given Provider.

                +
              • lastUpdated: string

                The last-updated timestamp to present to the user the last time the DevOps Component was updated.

                +

                Expected format is an RFC3339 formatted string.

                +
              • name: string

                The human-readable name for the DevOps Component. Will be shown in the UI.

                +
              • Optional providerName?: string

                The human-readable name for the Provider that owns this DevOps Component. Will be shown in the UI.

                +
              • schemaVersion: string

                The DevOpsComponentData schema version used for this devops component data.

                +

                Placeholder to support potential schema changes in the future.

                +
              • tier: string

                The tier of the component. Will be shown in the UI.

                +
              • updateSequenceNumber: number

                An ID used to apply an ordering to updates for this DevOps Component in the case of out-of-order receipt of +update requests.

                +

                This can be any monotonically increasing number. A suggested implementation is to use epoch millis from the +Provider system, but other alternatives are valid (e.g. a Provider could store a counter against each DevOps +Component and increment that on each update to Jira).

                +

                Updates for a DevOps Component that are received with an updateSequenceId lower than what is currently stored +will be ignored.

                +
              • url: string

                A URL users can use to link to a summary view of this devops component, if appropriate.

                +

                This could be any location that makes sense in the Provider system (e.g. if the summary information comes from a +specific project, it might make sense to link the user to the component in that project).

                +
              properties?: {}

              Properties assigned to incidents/components/review data that can then be used for delete / query operations.

              +

              Examples might be an account or user ID that can then be used to clean up data if an account is removed from the +Provider system.

              +

              Properties are supplied as key/value pairs, and a maximum of 5 properties can be supplied, keys cannot contain ':' +or start with '_'.

              +

              Type declaration

                providerMetadata?: {
                    product?: string;
                }

                Information about the provider. This is useful for auditing, logging, debugging, and other internal uses. It is not +considered private information. Hence, it may not contain personally identifiable information.

                +

                Type declaration

                • Optional product?: string

                  An optional name of the source of the incidents.

                  +
                \ No newline at end of file diff --git a/docs/interfaces/Agile.AgileParameters.SubmitEntity.html b/docs/interfaces/Agile.AgileParameters.SubmitEntity.html new file mode 100644 index 000000000..079fdf686 --- /dev/null +++ b/docs/interfaces/Agile.AgileParameters.SubmitEntity.html @@ -0,0 +1,27 @@ +SubmitEntity | Jira.js - Jira Cloud API library +
                interface SubmitEntity {
                    properties?: {};
                    providerMetadata?: {
                        product?: string;
                    };
                    [key: string]: any;
                }

                Indexable

                [key: string]: any

                Properties

                properties?: {}

                Properties assigned to incidents/components/review data that can then be used for delete / query operations.

                +

                Examples might be an account or user ID that can then be used to clean up data if an account is removed from the +Provider system.

                +

                Properties are supplied as key/value pairs, and a maximum of 5 properties can be supplied, keys cannot contain ':' +or start with '_'.

                +

                Type declaration

                  providerMetadata?: {
                      product?: string;
                  }

                  Information about the provider. This is useful for auditing, logging, debugging, and other internal uses. It is not +considered private information. Hence, it may not contain personally identifiable information.

                  +

                  Type declaration

                  • Optional product?: string

                    An optional name of the source of the incidents.

                    +
                  \ No newline at end of file diff --git a/docs/interfaces/Agile.AgileParameters.SubmitOperationsWorkspaces.html b/docs/interfaces/Agile.AgileParameters.SubmitOperationsWorkspaces.html new file mode 100644 index 000000000..cb745f8e6 --- /dev/null +++ b/docs/interfaces/Agile.AgileParameters.SubmitOperationsWorkspaces.html @@ -0,0 +1,19 @@ +SubmitOperationsWorkspaces | Jira.js - Jira Cloud API library +
                  interface SubmitOperationsWorkspaces {
                      workspaceIds?: string[];
                  }

                  Properties

                  Properties

                  workspaceIds?: string[]

                  The IDs of Operations Workspaces that are available to this Jira site.

                  +
                  \ No newline at end of file diff --git a/docs/interfaces/HttpExceptionOptions.html b/docs/interfaces/HttpExceptionOptions.html new file mode 100644 index 000000000..fd27a5aaf --- /dev/null +++ b/docs/interfaces/HttpExceptionOptions.html @@ -0,0 +1,20 @@ +HttpExceptionOptions | Jira.js - Jira Cloud API library +
                  interface HttpExceptionOptions {
                      cause?: unknown;
                      description?: string;
                  }

                  Properties

                  Properties

                  cause?: unknown

                  Original cause of the error

                  +
                  description?: string
                  \ No newline at end of file diff --git a/docs/variables/DEFAULT_EXCEPTION_CODE.html b/docs/variables/DEFAULT_EXCEPTION_CODE.html new file mode 100644 index 000000000..59aa0effa --- /dev/null +++ b/docs/variables/DEFAULT_EXCEPTION_CODE.html @@ -0,0 +1,17 @@ +DEFAULT_EXCEPTION_CODE | Jira.js - Jira Cloud API library +

                  Variable DEFAULT_EXCEPTION_CODEConst

                  DEFAULT_EXCEPTION_CODE: "INTERNAL_SERVER_ERROR" = 'INTERNAL_SERVER_ERROR'
                  \ No newline at end of file diff --git a/docs/variables/DEFAULT_EXCEPTION_MESSAGE.html b/docs/variables/DEFAULT_EXCEPTION_MESSAGE.html new file mode 100644 index 000000000..a6a77e00b --- /dev/null +++ b/docs/variables/DEFAULT_EXCEPTION_MESSAGE.html @@ -0,0 +1,17 @@ +DEFAULT_EXCEPTION_MESSAGE | Jira.js - Jira Cloud API library +

                  Variable DEFAULT_EXCEPTION_MESSAGEConst

                  DEFAULT_EXCEPTION_MESSAGE: "Something went wrong" = 'Something went wrong'
                  \ No newline at end of file diff --git a/docs/variables/DEFAULT_EXCEPTION_STATUS.html b/docs/variables/DEFAULT_EXCEPTION_STATUS.html new file mode 100644 index 000000000..57e748870 --- /dev/null +++ b/docs/variables/DEFAULT_EXCEPTION_STATUS.html @@ -0,0 +1,17 @@ +DEFAULT_EXCEPTION_STATUS | Jira.js - Jira Cloud API library +

                  Variable DEFAULT_EXCEPTION_STATUSConst

                  DEFAULT_EXCEPTION_STATUS: 500 = 500
                  \ No newline at end of file diff --git a/docs/variables/DEFAULT_EXCEPTION_STATUS_TEXT.html b/docs/variables/DEFAULT_EXCEPTION_STATUS_TEXT.html new file mode 100644 index 000000000..bece7d9ae --- /dev/null +++ b/docs/variables/DEFAULT_EXCEPTION_STATUS_TEXT.html @@ -0,0 +1,17 @@ +DEFAULT_EXCEPTION_STATUS_TEXT | Jira.js - Jira Cloud API library +

                  Variable DEFAULT_EXCEPTION_STATUS_TEXTConst

                  DEFAULT_EXCEPTION_STATUS_TEXT: "Internal server error" = 'Internal server error'
                  \ No newline at end of file diff --git a/functions/isNil.html b/functions/isNil.html new file mode 100644 index 000000000..d3b1243a0 --- /dev/null +++ b/functions/isNil.html @@ -0,0 +1,17 @@ +isNil | Jira.js - Jira Cloud API library +
                  \ No newline at end of file diff --git a/functions/isNumber.html b/functions/isNumber.html new file mode 100644 index 000000000..deb87d2f8 --- /dev/null +++ b/functions/isNumber.html @@ -0,0 +1,17 @@ +isNumber | Jira.js - Jira Cloud API library +
                  \ No newline at end of file diff --git a/functions/isObject.html b/functions/isObject.html new file mode 100644 index 000000000..9434c18e8 --- /dev/null +++ b/functions/isObject.html @@ -0,0 +1,17 @@ +isObject | Jira.js - Jira Cloud API library +
                  \ No newline at end of file diff --git a/functions/isString.html b/functions/isString.html new file mode 100644 index 000000000..0a970559c --- /dev/null +++ b/functions/isString.html @@ -0,0 +1,17 @@ +isString | Jira.js - Jira Cloud API library +
                  \ No newline at end of file diff --git a/functions/isUndefined.html b/functions/isUndefined.html new file mode 100644 index 000000000..b5ae1e1c8 --- /dev/null +++ b/functions/isUndefined.html @@ -0,0 +1,17 @@ +isUndefined | Jira.js - Jira Cloud API library +
                  \ No newline at end of file diff --git a/interfaces/Agile.AgileModels.GetComponentById.html b/interfaces/Agile.AgileModels.GetComponentById.html new file mode 100644 index 000000000..979819727 --- /dev/null +++ b/interfaces/Agile.AgileModels.GetComponentById.html @@ -0,0 +1,50 @@ +GetComponentById | Jira.js - Jira Cloud API library +

                  Data related to a specific component in a specific workspace that is affected by incidents.*

                  +
                  interface GetComponentById {
                      avatarUrl: string;
                      componentType: string;
                      description: string;
                      id: string;
                      lastUpdated: string;
                      name: string;
                      providerName?: string;
                      schemaVersion: string;
                      tier: string;
                      updateSequenceNumber: number;
                      url: string;
                  }

                  Properties

                  avatarUrl: string

                  A URL to display a logo representing this devops component, if available.

                  +
                  componentType: string

                  The type of the component. Will be shown in the UI.

                  +
                  description: string

                  A description of the DevOps Component in Markdown format. Will be shown in the UI.

                  +
                  id: string

                  The identifier for the DevOps Component. Must be unique for a given Provider.

                  +
                  lastUpdated: string

                  The last-updated timestamp to present to the user the last time the DevOps Component was updated.

                  +

                  Expected format is an RFC3339 formatted string.

                  +
                  name: string

                  The human-readable name for the DevOps Component. Will be shown in the UI.

                  +
                  providerName?: string

                  The human-readable name for the Provider that owns this DevOps Component. Will be shown in the UI.

                  +
                  schemaVersion: string

                  The DevOpsComponentData schema version used for this devops component data.

                  +

                  Placeholder to support potential schema changes in the future.

                  +
                  tier: string

                  The tier of the component. Will be shown in the UI.

                  +
                  updateSequenceNumber: number

                  An ID used to apply an ordering to updates for this DevOps Component in the case of out-of-order receipt of update +requests.

                  +

                  This can be any monotonically increasing number. A suggested implementation is to use epoch millis from the +Provider system, but other alternatives are valid (e.g. a Provider could store a counter against each DevOps +Component and increment that on each update to Jira).

                  +

                  Updates for a DevOps Component that are received with an updateSqeuenceId lower than what is currently stored will +be ignored.

                  +
                  url: string

                  A URL users can use to link to a summary view of this devops component, if appropriate.

                  +

                  This could be any location that makes sense in the Provider system (e.g. if the summary information comes from a +specific project, it might make sense to link the user to the component in that project).

                  +
                  \ No newline at end of file diff --git a/interfaces/Agile.AgileModels.GetIncidentById.html b/interfaces/Agile.AgileModels.GetIncidentById.html new file mode 100644 index 000000000..eabdf27d1 --- /dev/null +++ b/interfaces/Agile.AgileModels.GetIncidentById.html @@ -0,0 +1,58 @@ +GetIncidentById | Jira.js - Jira Cloud API library +

                  Data related to a specific incident in a specific container that the incident is present in. Must specify at least +one association to a component.*

                  +
                  interface GetIncidentById {
                      affectedComponents: string[];
                      associations?: {
                          associationType?: string;
                          values?: string[];
                      }[];
                      createdDate: string;
                      description: string;
                      id: string;
                      lastUpdated: string;
                      schemaVersion: string;
                      severity?: {
                          level: string;
                      };
                      status: string;
                      summary: string;
                      updateSequenceNumber: number;
                      url: string;
                  }

                  Properties

                  affectedComponents: string[]

                  The IDs of the Components impacted by this Incident. Must be unique for a given Provider.

                  +
                  associations?: {
                      associationType?: string;
                      values?: string[];
                  }[]

                  The IDs of the Jira issues related to this Incident. Must be unique for a given Provider.

                  +

                  Type declaration

                  • Optional associationType?: string

                    The type of the association being made

                    +
                  • Optional values?: string[]
                  createdDate: string

                  The timestamp to present to the user that shows when the Incident was raised.

                  +

                  Expected format is an RFC3339 formatted string.

                  +
                  description: string

                  A description of the issue in Markdown format. Will be shown in the UI and used when creating Jira Issues.

                  +
                  id: string

                  The identifier for the Incident. Must be unique for a given Provider.

                  +
                  lastUpdated: string

                  The last-updated timestamp to present to the user the last time the Incident was updated.

                  +

                  Expected format is an RFC3339 formatted string.

                  +
                  schemaVersion: string

                  The IncidentData schema version used for this incident data.

                  +

                  Placeholder to support potential schema changes in the future.

                  +
                  severity?: {
                      level: string;
                  }

                  Severity information for a single Incident.

                  +

                  This is the severity information that will be presented to the user on e.g. the Jira Incidents screen.

                  +

                  Type declaration

                  • level: string

                    The severity level of the Incident with P1 being the highest and P5 being the lowest

                    +
                  status: string

                  The current status of the Incident.

                  +
                  summary: string

                  The human-readable summary for the Incident. Will be shown in the UI.

                  +

                  If not provided, will use the ID for display.

                  +
                  updateSequenceNumber: number

                  An ID used to apply an ordering to updates for this Incident in the case of out-of-order receipt of update +requests.

                  +

                  This can be any monotonically increasing number. A suggested implementation is to use epoch millis from the +Provider system, but other alternatives are valid (e.g. a Provider could store a counter against each Incident and +increment that on each update to Jira).

                  +

                  Updates for a Incident that are received with an updateSqeuenceId lower than what is currently stored will be +ignored.

                  +
                  url: string

                  A URL users can use to link to a summary view of this incident, if appropriate.

                  +

                  This could be any location that makes sense in the Provider system (e.g. if the summary information comes from a +specific project, it might make sense to link the user to the incident in that project).

                  +
                  \ No newline at end of file diff --git a/interfaces/Agile.AgileModels.GetLinkedWorkspaceById.html b/interfaces/Agile.AgileModels.GetLinkedWorkspaceById.html new file mode 100644 index 000000000..837b3829e --- /dev/null +++ b/interfaces/Agile.AgileModels.GetLinkedWorkspaceById.html @@ -0,0 +1,22 @@ +GetLinkedWorkspaceById | Jira.js - Jira Cloud API library +

                  The Security Workspace information stored for the given ID.

                  +
                  interface GetLinkedWorkspaceById {
                      updatedAt: string;
                      workspaceId: string;
                  }

                  Properties

                  Properties

                  updatedAt: string

                  Latest date and time that the Security Workspace was updated in Jira.

                  +
                  workspaceId: string

                  The Security Workspace ID

                  +
                  \ No newline at end of file diff --git a/interfaces/Agile.AgileModels.GetLinkedWorkspaces.html b/interfaces/Agile.AgileModels.GetLinkedWorkspaces.html new file mode 100644 index 000000000..3f5354b40 --- /dev/null +++ b/interfaces/Agile.AgileModels.GetLinkedWorkspaces.html @@ -0,0 +1,20 @@ +GetLinkedWorkspaces | Jira.js - Jira Cloud API library +

                  The payload of linked Security Workspace IDs.

                  +
                  interface GetLinkedWorkspaces {
                      workspaceIds: string[];
                  }

                  Properties

                  Properties

                  workspaceIds: string[]

                  The IDs of Security Workspaces that are linked to this Jira site.

                  +
                  \ No newline at end of file diff --git a/interfaces/Agile.AgileModels.GetReviewById.html b/interfaces/Agile.AgileModels.GetReviewById.html new file mode 100644 index 000000000..945cf6136 --- /dev/null +++ b/interfaces/Agile.AgileModels.GetReviewById.html @@ -0,0 +1,52 @@ +GetReviewById | Jira.js - Jira Cloud API library +

                  Data related to a specific post-incident review. Must specify at least one association to an incident.*

                  +
                  interface GetReviewById {
                      associations?: {
                          associationType?: string;
                          values?: string[];
                      }[];
                      createdDate: string;
                      description: string;
                      id: string;
                      lastUpdated: string;
                      reviews: string[];
                      schemaVersion: string;
                      status: string;
                      summary: string;
                      updateSequenceNumber: number;
                      url: string;
                  }

                  Properties

                  associations?: {
                      associationType?: string;
                      values?: string[];
                  }[]

                  The IDs of the Jira issues related to this Incident. Must be unique for a given Provider.

                  +

                  Type declaration

                  • Optional associationType?: string

                    The type of the association being made

                    +
                  • Optional values?: string[]
                  createdDate: string

                  The timestamp to present to the user that shows when the Review was raised.

                  +

                  Expected format is an RFC3339 formatted string.

                  +
                  description: string

                  A description of the review in Markdown format. Will be shown in the UI and used when creating Jira Issues.

                  +
                  id: string

                  The identifier for the Review. Must be unique for a given Provider.

                  +
                  lastUpdated: string

                  The last-updated timestamp to present to the user the last time the Review was updated.

                  +

                  Expected format is an RFC3339 formatted string.

                  +
                  reviews: string[]

                  The IDs of the Incidents covered by this Review. Must be unique for a given Provider.

                  +
                  schemaVersion: string

                  The PostIncidentReviewData schema version used for this post-incident review data.

                  +

                  Placeholder to support potential schema changes in the future.

                  +
                  status: string

                  The current status of the Post-Incident Review.

                  +
                  summary: string

                  The human-readable summary for the Post-Incident Review. Will be shown in the UI.

                  +

                  If not provided, will use the ID for display.

                  +
                  updateSequenceNumber: number

                  An ID used to apply an ordering to updates for this Review in the case of out-of-order receipt of update requests.

                  +

                  This can be any monotonically increasing number. A suggested implementation is to use epoch millis from the +Provider system, but other alternatives are valid (e.g. a Provider could store a counter against each Review and +increment that on each update to Jira).

                  +

                  Updates for a Review that are received with an updateSqeuenceId lower than what is currently stored will be +ignored.

                  +
                  url: string

                  A URL users can use to link to a summary view of this review, if appropriate.

                  +

                  This could be any location that makes sense in the Provider system (e.g. if the summary information comes from a +specific project, it might make sense to link the user to the review in that project).

                  +
                  \ No newline at end of file diff --git a/interfaces/Agile.AgileModels.GetVulnerabilityById.html b/interfaces/Agile.AgileModels.GetVulnerabilityById.html new file mode 100644 index 000000000..0b5e7bcbd --- /dev/null +++ b/interfaces/Agile.AgileModels.GetVulnerabilityById.html @@ -0,0 +1,84 @@ +GetVulnerabilityById | Jira.js - Jira Cloud API library +

                  Data related to a specific vulnerability in a specific workspace that the vulnerability is present in. Must specify +at least one association.*

                  +
                  interface GetVulnerabilityById {
                      addAssociations?: {}[];
                      additionalInfo?: {
                          content: string;
                          url?: string;
                      };
                      associationsLastUpdated?: string;
                      associationsUpdateSequenceNumber?: number;
                      containerId: string;
                      description: string;
                      displayName: string;
                      id: string;
                      identifiers?: {
                          displayName: string;
                          url: string;
                      }[];
                      introducedDate: string;
                      lastUpdated: string;
                      removeAssociations?: {}[];
                      schemaVersion: string;
                      severity: {
                          level: string;
                      };
                      status: string;
                      type: string;
                      updateSequenceNumber: number;
                      url: string;
                  }

                  Properties

                  addAssociations?: {}[]

                  The associations (e.g. Jira issue) to add in addition to the currently stored associations of the Security +Vulnerability.

                  +

                  Type declaration

                    additionalInfo?: {
                        content: string;
                        url?: string;
                    }

                    Extra information (optional). This data will be shown in the security feature under the vulnerability displayName.

                    +

                    Type declaration

                    • content: string

                      The content of the additionalInfo.

                      +
                    • Optional url?: string

                      Optional URL linking to the information

                      +
                    associationsLastUpdated?: string

                    An ISO-8601 Date-time string representing the last time the provider updated associations on this entity.

                    +

                    Expected format is an RFC3339 formatted string.

                    +
                    associationsUpdateSequenceNumber?: number

                    A sequence number to compare when writing entity associations to the database.

                    +

                    This can be any monotonically increasing number. A highly recommended implementation is to use epoch millis.

                    +

                    This is an optional field. If it is not provided it will default to being equal to the corresponding entity's +updateSequenceNumber.

                    +

                    Associations are written following a LastWriteWins strategy, association that are received with an +associationsUpdateSequenceNumber lower than what is currently stored will be ignored.

                    +
                    containerId: string

                    The identifier of the Container where this Vulnerability was found. Must be unique for a given Provider. This must +follow this regex pattern: [a-zA-Z0-9\\-_.~@:{}=]+(/[a-zA-Z0-9\\-_.~@:{}=]+)*

                    +
                    description: string

                    A description of the issue in markdown format that will be shown in the UI and used when creating Jira Issues. HTML +tags are not supported in the markdown format. For creating a new line \n can be used. Read more about the +accepted markdown transformations +here.

                    +
                    displayName: string

                    The human-readable name for the Vulnerability. Will be shown in the UI.

                    +

                    If not provided, will use the ID for display.

                    +
                    id: string

                    The identifier for the Vulnerability. Must be unique for a given Provider.

                    +
                    identifiers?: {
                        displayName: string;
                        url: string;
                    }[]

                    The identifying information for the Vulnerability.

                    +

                    Type declaration

                    • displayName: string

                      The display name of the Vulnerability identified.

                      +
                    • url: string

                      A URL users can use to link to the definition of the Vulnerability identified.

                      +
                    introducedDate: string

                    The timestamp to present to the user that shows when the Vulnerability was introduced.

                    +

                    Expected format is an RFC3339 formatted string.

                    +
                    lastUpdated: string

                    The last-updated timestamp to present to the user the last time the Vulnerability was updated.

                    +

                    Expected format is an RFC3339 formatted string.

                    +
                    removeAssociations?: {}[]

                    The associations (e.g. Jira issue) to remove from currently stored associations of the Security Vulnerability.

                    +

                    Type declaration

                      schemaVersion: string

                      The VulnerabilityData schema version used for this vulnerability data.

                      +

                      Placeholder to support potential schema changes in the future.

                      +
                      severity: {
                          level: string;
                      }

                      Severity information for a single Vulnerability.

                      +

                      This is the severity information that will be presented to the user on e.g. the Jira Security screen.

                      +

                      Type declaration

                      • level: string

                        The severity level of the Vulnerability.

                        +
                      status: string

                      The current status of the Vulnerability.

                      +
                      type: string

                      The type of Vulnerability detected.

                      +
                      updateSequenceNumber: number

                      An ID used to apply an ordering to updates for this Vulnerability in the case of out-of-order receipt of update +requests.

                      +

                      This can be any monotonically increasing number. A suggested implementation is to use epoch millis from the +Provider system, but other alternatives are valid (e.g. a Provider could store a counter against each Vulnerability +and increment that on each update to Jira).

                      +

                      Updates for a Vulnerability that are received with an updateSequenceId lower than what is currently stored will be +ignored.

                      +
                      url: string

                      A URL users can use to link to a summary view of this vulnerability, if appropriate.

                      +

                      This could be any location that makes sense in the Provider system (e.g. if the summary information comes from a +specific project, it might make sense to link the user to the vulnerability in that project).

                      +
                      \ No newline at end of file diff --git a/interfaces/Agile.AgileModels.GetWorkspaces.html b/interfaces/Agile.AgileModels.GetWorkspaces.html new file mode 100644 index 000000000..50dfd1cd2 --- /dev/null +++ b/interfaces/Agile.AgileModels.GetWorkspaces.html @@ -0,0 +1,20 @@ +GetWorkspaces | Jira.js - Jira Cloud API library +

                      The payload of Operations Workspace Ids.

                      +
                      interface GetWorkspaces {
                          workspaceIds: string[];
                      }

                      Properties

                      Properties

                      workspaceIds: string[]

                      The IDs of Operations Workspaces that are available to this Jira site.

                      +
                      \ No newline at end of file diff --git a/interfaces/Agile.AgileModels.Scope.html b/interfaces/Agile.AgileModels.Scope.html new file mode 100644 index 000000000..5b8a4d01e --- /dev/null +++ b/interfaces/Agile.AgileModels.Scope.html @@ -0,0 +1,36 @@ +Scope | Jira.js - Jira Cloud API library +

                      The projects the item is associated with. Indicated for items associated with next-gen +projects.

                      +
                      interface Scope {
                          project?: {
                              avatarUrls?: Agile.AgileModels.AvatarUrls;
                              id?: string;
                              key?: string;
                              name?: string;
                              projectCategory?: {
                                  description?: string;
                                  id?: string;
                                  name?: string;
                                  self?: string;
                              };
                              projectTypeKey?: string;
                              self?: string;
                              simplified?: boolean;
                          };
                          type?: string;
                      }

                      Properties

                      Properties

                      project?: {
                          avatarUrls?: Agile.AgileModels.AvatarUrls;
                          id?: string;
                          key?: string;
                          name?: string;
                          projectCategory?: {
                              description?: string;
                              id?: string;
                              name?: string;
                              self?: string;
                          };
                          projectTypeKey?: string;
                          self?: string;
                          simplified?: boolean;
                      }

                      Details about a project.

                      +

                      Type declaration

                      • Optional avatarUrls?: Agile.AgileModels.AvatarUrls
                      • Optional id?: string

                        The ID of the project.

                        +
                      • Optional key?: string

                        The key of the project.

                        +
                      • Optional name?: string

                        The name of the project.

                        +
                      • Optional projectCategory?: {
                            description?: string;
                            id?: string;
                            name?: string;
                            self?: string;
                        }

                        A project category.

                        +
                        • Optional description?: string

                          The name of the project category.

                          +
                        • Optional id?: string

                          The ID of the project category.

                          +
                        • Optional name?: string

                          The description of the project category.

                          +
                        • Optional self?: string

                          The URL of the project category.

                          +
                      • Optional projectTypeKey?: string

                        The project +type of the +project.

                        +
                      • Optional self?: string

                        The URL of the project details.

                        +
                      • Optional simplified?: boolean

                        Whether or not the project is simplified.

                        +
                      type?: string

                      The type of scope.

                      +
                      \ No newline at end of file diff --git a/interfaces/Agile.AgileModels.SubmitComponents.html b/interfaces/Agile.AgileModels.SubmitComponents.html new file mode 100644 index 000000000..fc6f78ec0 --- /dev/null +++ b/interfaces/Agile.AgileModels.SubmitComponents.html @@ -0,0 +1,33 @@ +SubmitComponents | Jira.js - Jira Cloud API library +

                      The result of a successful submitDevopsComponents request.*

                      +
                      interface SubmitComponents {
                          acceptedComponents?: string[];
                          failedComponents?: {};
                          unknownProjectKeys?: string[];
                      }

                      Properties

                      acceptedComponents?: string[]

                      The IDs of Components that have been accepted for submission.

                      +

                      A Component may be rejected if it was only associated with unknown project keys.

                      +

                      Note that a Component that isn't updated due to it's updateSequenceNumber being out of order is not considered a +failed submission.

                      +
                      failedComponents?: {}

                      Details of Components that have not been accepted for submission, usually due to a problem with the request data.

                      +

                      The object (if present) will be keyed by Component ID and include any errors associated with that Component that +have prevented it being submitted.

                      +

                      Type declaration

                        unknownProjectKeys?: string[]

                        Project keys that are not known on this Jira instance (if any).

                        +

                        These may be invalid keys (e.g. UTF is sometimes incorrectly identified as a Jira project key), or they may be +for projects that no longer exist.

                        +

                        If a Component has been associated with project keys other than those in this array it will still be stored against +those valid keys. If a Component was only associated with project keys deemed to be invalid it won't be persisted.

                        +
                        \ No newline at end of file diff --git a/interfaces/Agile.AgileModels.SubmitEntity.html b/interfaces/Agile.AgileModels.SubmitEntity.html new file mode 100644 index 000000000..5bacc0540 --- /dev/null +++ b/interfaces/Agile.AgileModels.SubmitEntity.html @@ -0,0 +1,33 @@ +SubmitEntity | Jira.js - Jira Cloud API library +

                        The result of a successful submitIncidents request.*

                        +
                        interface SubmitEntity {
                            acceptedIncidents?: string[];
                            failedIncidents?: {};
                            unknownProjectKeys?: string[];
                        }

                        Properties

                        acceptedIncidents?: string[]

                        The IDs of Incidents that have been accepted for submission.

                        +

                        A Incident may be rejected if it was only associated with unknown project keys.

                        +

                        Note that a Incident that isn't updated due to it's updateSequenceNumber being out of order is not considered a +failed submission.

                        +
                        failedIncidents?: {}

                        Details of Incidents that have not been accepted for submission, usually due to a problem with the request data.

                        +

                        The object (if present) will be keyed by Incident ID and include any errors associated with that Incident that have +prevented it being submitted.

                        +

                        Type declaration

                          unknownProjectKeys?: string[]

                          Project keys that are not known on this Jira instance (if any).

                          +

                          These may be invalid keys (e.g. UTF is sometimes incorrectly identified as a Jira project key), or they may be +for projects that no longer exist.

                          +

                          If a Incident has been associated with project keys other than those in this array it will still be stored against +those valid keys. If a Incident was only associated with project keys deemed to be invalid it won't be persisted.

                          +
                          \ No newline at end of file diff --git a/interfaces/Agile.AgileModels.SubmitOperationsWorkspaces.html b/interfaces/Agile.AgileModels.SubmitOperationsWorkspaces.html new file mode 100644 index 000000000..981458b98 --- /dev/null +++ b/interfaces/Agile.AgileModels.SubmitOperationsWorkspaces.html @@ -0,0 +1,20 @@ +SubmitOperationsWorkspaces | Jira.js - Jira Cloud API library +

                          The result of a successful submitOperationsWorkspaces request.*

                          +
                          interface SubmitOperationsWorkspaces {
                              acceptedWorkspaceIds?: string[];
                          }

                          Properties

                          acceptedWorkspaceIds?: string[]

                          The IDs of Operations Workspaces that have been linked to the Jira site in this request.

                          +
                          \ No newline at end of file diff --git a/interfaces/Agile.AgileModels.SubmitVulnerabilities.html b/interfaces/Agile.AgileModels.SubmitVulnerabilities.html new file mode 100644 index 000000000..bd6c3c84c --- /dev/null +++ b/interfaces/Agile.AgileModels.SubmitVulnerabilities.html @@ -0,0 +1,33 @@ +SubmitVulnerabilities | Jira.js - Jira Cloud API library +

                          The result of a successful submitVulnerabilities request.*

                          +
                          interface SubmitVulnerabilities {
                              acceptedVulnerabilities?: string[];
                              failedVulnerabilities?: {};
                              unknownAssociations?: {}[];
                          }

                          Properties

                          acceptedVulnerabilities?: string[]

                          The IDs of Vulnerabilities that have been accepted for submission.

                          +

                          A Vulnerability may be rejected if it was only associated with unknown project keys.

                          +

                          Note that a Vulnerability that isn't updated due to it's updateSequenceNumber being out of order is not considered +a failed submission.

                          +
                          failedVulnerabilities?: {}

                          Details of Vulnerabilities that have not been accepted for submission, usually due to a problem with the request +data.

                          +

                          The object (if present) will be keyed by Vulnerability ID and include any errors associated with that Vulnerability +that have prevented it being submitted.

                          +

                          Type declaration

                            unknownAssociations?: {}[]

                            Associations (e.g. Service IDs) that are not known on this Jira instance (if any).

                            +

                            If a Vulnerability has been associated with any other association other than those in this array it will still be +stored against those valid associations. If a Vulnerability was only associated with the associations in this +array, it is deemed to be invalid and it won't be persisted.

                            +

                            Type declaration

                              \ No newline at end of file diff --git a/interfaces/Agile.AgileParameters.DeleteComponentById.html b/interfaces/Agile.AgileParameters.DeleteComponentById.html new file mode 100644 index 000000000..d6f1ca2f6 --- /dev/null +++ b/interfaces/Agile.AgileParameters.DeleteComponentById.html @@ -0,0 +1,19 @@ +DeleteComponentById | Jira.js - Jira Cloud API library +
                              interface DeleteComponentById {
                                  componentId: string;
                              }

                              Properties

                              Properties

                              componentId: string

                              The ID of the Component to delete.

                              +
                              \ No newline at end of file diff --git a/interfaces/Agile.AgileParameters.DeleteComponentsByProperty.html b/interfaces/Agile.AgileParameters.DeleteComponentsByProperty.html new file mode 100644 index 000000000..e47778a44 --- /dev/null +++ b/interfaces/Agile.AgileParameters.DeleteComponentsByProperty.html @@ -0,0 +1,19 @@ +DeleteComponentsByProperty | Jira.js - Jira Cloud API library +
                              interface DeleteComponentsByProperty {
                                  accountId?: string;
                                  createdBy?: string;
                                  [key: string]: any;
                              }

                              Indexable

                              [key: string]: any

                              Properties

                              Properties

                              accountId?: string
                              createdBy?: string
                              \ No newline at end of file diff --git a/interfaces/Agile.AgileParameters.DeleteEntityByProperty.html b/interfaces/Agile.AgileParameters.DeleteEntityByProperty.html new file mode 100644 index 000000000..a89d1e3d4 --- /dev/null +++ b/interfaces/Agile.AgileParameters.DeleteEntityByProperty.html @@ -0,0 +1,19 @@ +DeleteEntityByProperty | Jira.js - Jira Cloud API library +
                              interface DeleteEntityByProperty {
                                  accountId?: string;
                                  createdBy?: string;
                                  [key: string]: any;
                              }

                              Indexable

                              [key: string]: any

                              Properties

                              Properties

                              accountId?: string
                              createdBy?: string
                              \ No newline at end of file diff --git a/interfaces/Agile.AgileParameters.DeleteIncidentById.html b/interfaces/Agile.AgileParameters.DeleteIncidentById.html new file mode 100644 index 000000000..1861eafa6 --- /dev/null +++ b/interfaces/Agile.AgileParameters.DeleteIncidentById.html @@ -0,0 +1,19 @@ +DeleteIncidentById | Jira.js - Jira Cloud API library +
                              interface DeleteIncidentById {
                                  incidentId: string;
                              }

                              Properties

                              Properties

                              incidentId: string

                              The ID of the Incident to delete.

                              +
                              \ No newline at end of file diff --git a/interfaces/Agile.AgileParameters.DeleteReviewById.html b/interfaces/Agile.AgileParameters.DeleteReviewById.html new file mode 100644 index 000000000..b3cbba979 --- /dev/null +++ b/interfaces/Agile.AgileParameters.DeleteReviewById.html @@ -0,0 +1,19 @@ +DeleteReviewById | Jira.js - Jira Cloud API library +
                              interface DeleteReviewById {
                                  reviewId: string;
                              }

                              Properties

                              Properties

                              reviewId: string

                              The ID of the Review to delete.

                              +
                              \ No newline at end of file diff --git a/interfaces/Agile.AgileParameters.DeleteWorkspaces.html b/interfaces/Agile.AgileParameters.DeleteWorkspaces.html new file mode 100644 index 000000000..c3d611e78 --- /dev/null +++ b/interfaces/Agile.AgileParameters.DeleteWorkspaces.html @@ -0,0 +1,18 @@ +DeleteWorkspaces | Jira.js - Jira Cloud API library +
                              interface DeleteWorkspaces {
                                  workspaceIds: string[];
                              }

                              Properties

                              Properties

                              workspaceIds: string[]
                              \ No newline at end of file diff --git a/interfaces/Agile.AgileParameters.GetComponentById.html b/interfaces/Agile.AgileParameters.GetComponentById.html new file mode 100644 index 000000000..8c6b06924 --- /dev/null +++ b/interfaces/Agile.AgileParameters.GetComponentById.html @@ -0,0 +1,19 @@ +GetComponentById | Jira.js - Jira Cloud API library +
                              interface GetComponentById {
                                  componentId: string;
                              }

                              Properties

                              Properties

                              componentId: string

                              The ID of the Component to fetch.

                              +
                              \ No newline at end of file diff --git a/interfaces/Agile.AgileParameters.GetIncidentById.html b/interfaces/Agile.AgileParameters.GetIncidentById.html new file mode 100644 index 000000000..03f854aea --- /dev/null +++ b/interfaces/Agile.AgileParameters.GetIncidentById.html @@ -0,0 +1,19 @@ +GetIncidentById | Jira.js - Jira Cloud API library +
                              interface GetIncidentById {
                                  incidentId: string;
                              }

                              Properties

                              Properties

                              incidentId: string

                              The ID of the Incident to fetch.

                              +
                              \ No newline at end of file diff --git a/interfaces/Agile.AgileParameters.GetReviewById.html b/interfaces/Agile.AgileParameters.GetReviewById.html new file mode 100644 index 000000000..97fc778ef --- /dev/null +++ b/interfaces/Agile.AgileParameters.GetReviewById.html @@ -0,0 +1,19 @@ +GetReviewById | Jira.js - Jira Cloud API library +
                              interface GetReviewById {
                                  reviewId: string;
                              }

                              Properties

                              Properties

                              reviewId: string

                              The ID of the Review to fetch.

                              +
                              \ No newline at end of file diff --git a/interfaces/Agile.AgileParameters.GetWorkspaces.html b/interfaces/Agile.AgileParameters.GetWorkspaces.html new file mode 100644 index 000000000..d0a7c8e51 --- /dev/null +++ b/interfaces/Agile.AgileParameters.GetWorkspaces.html @@ -0,0 +1,18 @@ +GetWorkspaces | Jira.js - Jira Cloud API library +
                              interface GetWorkspaces {
                                  workspaceId: string;
                              }

                              Properties

                              Properties

                              workspaceId: string
                              \ No newline at end of file diff --git a/interfaces/Agile.AgileParameters.SubmitComponents.html b/interfaces/Agile.AgileParameters.SubmitComponents.html new file mode 100644 index 000000000..44bab8468 --- /dev/null +++ b/interfaces/Agile.AgileParameters.SubmitComponents.html @@ -0,0 +1,49 @@ +SubmitComponents | Jira.js - Jira Cloud API library +
                              interface SubmitComponents {
                                  components: {
                                      avatarUrl: string;
                                      componentType: string;
                                      description: string;
                                      id: string;
                                      lastUpdated: string;
                                      name: string;
                                      providerName?: string;
                                      schemaVersion: string;
                                      tier: string;
                                      updateSequenceNumber: number;
                                      url: string;
                                  }[];
                                  properties?: {};
                                  providerMetadata?: {
                                      product?: string;
                                  };
                              }

                              Properties

                              components: {
                                  avatarUrl: string;
                                  componentType: string;
                                  description: string;
                                  id: string;
                                  lastUpdated: string;
                                  name: string;
                                  providerName?: string;
                                  schemaVersion: string;
                                  tier: string;
                                  updateSequenceNumber: number;
                                  url: string;
                              }[]

                              Type declaration

                              • avatarUrl: string

                                A URL to display a logo representing this devops component, if available.

                                +
                              • componentType: string

                                The type of the component. Will be shown in the UI.

                                +
                              • description: string

                                A description of the DevOps Component in Markdown format. Will be shown in the UI.

                                +
                              • id: string

                                The identifier for the DevOps Component. Must be unique for a given Provider.

                                +
                              • lastUpdated: string

                                The last-updated timestamp to present to the user the last time the DevOps Component was updated.

                                +

                                Expected format is an RFC3339 formatted string.

                                +
                              • name: string

                                The human-readable name for the DevOps Component. Will be shown in the UI.

                                +
                              • Optional providerName?: string

                                The human-readable name for the Provider that owns this DevOps Component. Will be shown in the UI.

                                +
                              • schemaVersion: string

                                The DevOpsComponentData schema version used for this devops component data.

                                +

                                Placeholder to support potential schema changes in the future.

                                +
                              • tier: string

                                The tier of the component. Will be shown in the UI.

                                +
                              • updateSequenceNumber: number

                                An ID used to apply an ordering to updates for this DevOps Component in the case of out-of-order receipt of +update requests.

                                +

                                This can be any monotonically increasing number. A suggested implementation is to use epoch millis from the +Provider system, but other alternatives are valid (e.g. a Provider could store a counter against each DevOps +Component and increment that on each update to Jira).

                                +

                                Updates for a DevOps Component that are received with an updateSequenceId lower than what is currently stored +will be ignored.

                                +
                              • url: string

                                A URL users can use to link to a summary view of this devops component, if appropriate.

                                +

                                This could be any location that makes sense in the Provider system (e.g. if the summary information comes from a +specific project, it might make sense to link the user to the component in that project).

                                +
                              properties?: {}

                              Properties assigned to incidents/components/review data that can then be used for delete / query operations.

                              +

                              Examples might be an account or user ID that can then be used to clean up data if an account is removed from the +Provider system.

                              +

                              Properties are supplied as key/value pairs, and a maximum of 5 properties can be supplied, keys cannot contain ':' +or start with '_'.

                              +

                              Type declaration

                                providerMetadata?: {
                                    product?: string;
                                }

                                Information about the provider. This is useful for auditing, logging, debugging, and other internal uses. It is not +considered private information. Hence, it may not contain personally identifiable information.

                                +

                                Type declaration

                                • Optional product?: string

                                  An optional name of the source of the incidents.

                                  +
                                \ No newline at end of file diff --git a/interfaces/Agile.AgileParameters.SubmitEntity.html b/interfaces/Agile.AgileParameters.SubmitEntity.html new file mode 100644 index 000000000..079fdf686 --- /dev/null +++ b/interfaces/Agile.AgileParameters.SubmitEntity.html @@ -0,0 +1,27 @@ +SubmitEntity | Jira.js - Jira Cloud API library +
                                interface SubmitEntity {
                                    properties?: {};
                                    providerMetadata?: {
                                        product?: string;
                                    };
                                    [key: string]: any;
                                }

                                Indexable

                                [key: string]: any

                                Properties

                                properties?: {}

                                Properties assigned to incidents/components/review data that can then be used for delete / query operations.

                                +

                                Examples might be an account or user ID that can then be used to clean up data if an account is removed from the +Provider system.

                                +

                                Properties are supplied as key/value pairs, and a maximum of 5 properties can be supplied, keys cannot contain ':' +or start with '_'.

                                +

                                Type declaration

                                  providerMetadata?: {
                                      product?: string;
                                  }

                                  Information about the provider. This is useful for auditing, logging, debugging, and other internal uses. It is not +considered private information. Hence, it may not contain personally identifiable information.

                                  +

                                  Type declaration

                                  • Optional product?: string

                                    An optional name of the source of the incidents.

                                    +
                                  \ No newline at end of file diff --git a/interfaces/Agile.AgileParameters.SubmitOperationsWorkspaces.html b/interfaces/Agile.AgileParameters.SubmitOperationsWorkspaces.html new file mode 100644 index 000000000..cb745f8e6 --- /dev/null +++ b/interfaces/Agile.AgileParameters.SubmitOperationsWorkspaces.html @@ -0,0 +1,19 @@ +SubmitOperationsWorkspaces | Jira.js - Jira Cloud API library +
                                  interface SubmitOperationsWorkspaces {
                                      workspaceIds?: string[];
                                  }

                                  Properties

                                  Properties

                                  workspaceIds?: string[]

                                  The IDs of Operations Workspaces that are available to this Jira site.

                                  +
                                  \ No newline at end of file diff --git a/interfaces/HttpExceptionOptions.html b/interfaces/HttpExceptionOptions.html new file mode 100644 index 000000000..fd27a5aaf --- /dev/null +++ b/interfaces/HttpExceptionOptions.html @@ -0,0 +1,20 @@ +HttpExceptionOptions | Jira.js - Jira Cloud API library +
                                  interface HttpExceptionOptions {
                                      cause?: unknown;
                                      description?: string;
                                  }

                                  Properties

                                  Properties

                                  cause?: unknown

                                  Original cause of the error

                                  +
                                  description?: string
                                  \ No newline at end of file diff --git a/node_modules/@swc/helpers/_/_identity/package.json b/node_modules/@swc/helpers/_/_identity/package.json new file mode 100644 index 000000000..3b45f4c7f --- /dev/null +++ b/node_modules/@swc/helpers/_/_identity/package.json @@ -0,0 +1,4 @@ +{ + "main": "../../cjs/_identity.cjs", + "module": "../../esm/_identity.js" +} diff --git a/node_modules/@swc/helpers/_/_using_ctx/package.json b/node_modules/@swc/helpers/_/_using_ctx/package.json new file mode 100644 index 000000000..b1aaebc97 --- /dev/null +++ b/node_modules/@swc/helpers/_/_using_ctx/package.json @@ -0,0 +1,4 @@ +{ + "main": "../../cjs/_using_ctx.cjs", + "module": "../../esm/_using_ctx.js" +} diff --git a/node_modules/@swc/helpers/cjs/_identity.cjs b/node_modules/@swc/helpers/cjs/_identity.cjs new file mode 100644 index 000000000..d8b7f0c4d --- /dev/null +++ b/node_modules/@swc/helpers/cjs/_identity.cjs @@ -0,0 +1,6 @@ +"use strict"; + +exports._ = exports._identity = _identity; +function _identity(x) { + return x; +} diff --git a/node_modules/@swc/helpers/cjs/_using_ctx.cjs b/node_modules/@swc/helpers/cjs/_using_ctx.cjs new file mode 100644 index 000000000..83434b5db --- /dev/null +++ b/node_modules/@swc/helpers/cjs/_using_ctx.cjs @@ -0,0 +1,74 @@ +"use strict"; + +exports._ = exports._using_ctx = _using_ctx; +function _using_ctx() { + var _disposeSuppressedError = typeof SuppressedError === "function" + // eslint-disable-next-line no-undef + ? SuppressedError + : (function(error, suppressed) { + var err = new Error(); + err.name = "SuppressedError"; + err.suppressed = suppressed; + err.error = error; + return err; + }), + empty = {}, + stack = []; + function using(isAwait, value) { + if (value != null) { + if (Object(value) !== value) { + throw new TypeError("using declarations can only be used with objects, functions, null, or undefined."); + } + // core-js-pure uses Symbol.for for polyfilling well-known symbols + if (isAwait) { + var dispose = value[Symbol.asyncDispose || Symbol.for("Symbol.asyncDispose")]; + } + if (dispose == null) { + dispose = value[Symbol.dispose || Symbol.for("Symbol.dispose")]; + } + if (typeof dispose !== "function") { + throw new TypeError(`Property [Symbol.dispose] is not a function.`); + } + stack.push({ v: value, d: dispose, a: isAwait }); + } else if (isAwait) { + // provide the nullish `value` as `d` for minification gain + stack.push({ d: value, a: isAwait }); + } + return value; + } + return { + // error + e: empty, + // using + u: using.bind(null, false), + // await using + a: using.bind(null, true), + // dispose + d: function() { + var error = this.e; + + function next() { + // eslint-disable-next-line @typescript-eslint/no-use-before-define + while ((resource = stack.pop())) { + try { + var resource, disposalResult = resource.d && resource.d.call(resource.v); + if (resource.a) { + return Promise.resolve(disposalResult).then(next, err); + } + } catch (e) { + return err(e); + } + } + if (error !== empty) throw error; + } + + function err(e) { + error = error !== empty ? new _disposeSuppressedError(error, e) : e; + + return next(); + } + + return next(); + } + }; +} diff --git a/node_modules/@swc/helpers/esm/_identity.js b/node_modules/@swc/helpers/esm/_identity.js new file mode 100644 index 000000000..f05917b99 --- /dev/null +++ b/node_modules/@swc/helpers/esm/_identity.js @@ -0,0 +1,5 @@ +export function _identity(x) { + return x; +} + +export { _identity as _ }; diff --git a/node_modules/@swc/helpers/esm/_using_ctx.js b/node_modules/@swc/helpers/esm/_using_ctx.js new file mode 100644 index 000000000..b1129c44c --- /dev/null +++ b/node_modules/@swc/helpers/esm/_using_ctx.js @@ -0,0 +1,73 @@ +export function _using_ctx() { + var _disposeSuppressedError = typeof SuppressedError === "function" + // eslint-disable-next-line no-undef + ? SuppressedError + : (function(error, suppressed) { + var err = new Error(); + err.name = "SuppressedError"; + err.suppressed = suppressed; + err.error = error; + return err; + }), + empty = {}, + stack = []; + function using(isAwait, value) { + if (value != null) { + if (Object(value) !== value) { + throw new TypeError("using declarations can only be used with objects, functions, null, or undefined."); + } + // core-js-pure uses Symbol.for for polyfilling well-known symbols + if (isAwait) { + var dispose = value[Symbol.asyncDispose || Symbol.for("Symbol.asyncDispose")]; + } + if (dispose == null) { + dispose = value[Symbol.dispose || Symbol.for("Symbol.dispose")]; + } + if (typeof dispose !== "function") { + throw new TypeError(`Property [Symbol.dispose] is not a function.`); + } + stack.push({ v: value, d: dispose, a: isAwait }); + } else if (isAwait) { + // provide the nullish `value` as `d` for minification gain + stack.push({ d: value, a: isAwait }); + } + return value; + } + return { + // error + e: empty, + // using + u: using.bind(null, false), + // await using + a: using.bind(null, true), + // dispose + d: function() { + var error = this.e; + + function next() { + // eslint-disable-next-line @typescript-eslint/no-use-before-define + while ((resource = stack.pop())) { + try { + var resource, disposalResult = resource.d && resource.d.call(resource.v); + if (resource.a) { + return Promise.resolve(disposalResult).then(next, err); + } + } catch (e) { + return err(e); + } + } + if (error !== empty) throw error; + } + + function err(e) { + error = error !== empty ? new _disposeSuppressedError(error, e) : e; + + return next(); + } + + return next(); + } + }; +} + +export { _using_ctx as _ }; diff --git a/node_modules/@swc/helpers/src/_identity.mjs b/node_modules/@swc/helpers/src/_identity.mjs new file mode 100644 index 000000000..5ab4a08a7 --- /dev/null +++ b/node_modules/@swc/helpers/src/_identity.mjs @@ -0,0 +1 @@ +export { _ as default } from "../esm/_identity.js"; diff --git a/node_modules/@swc/helpers/src/_using_ctx.mjs b/node_modules/@swc/helpers/src/_using_ctx.mjs new file mode 100644 index 000000000..87e80979e --- /dev/null +++ b/node_modules/@swc/helpers/src/_using_ctx.mjs @@ -0,0 +1 @@ +export { _ as default } from "../esm/_using_ctx.js"; diff --git a/node_modules/@typescript-eslint/eslint-plugin/dist/rules/only-throw-error.js b/node_modules/@typescript-eslint/eslint-plugin/dist/rules/only-throw-error.js new file mode 100644 index 000000000..bdd4ca268 --- /dev/null +++ b/node_modules/@typescript-eslint/eslint-plugin/dist/rules/only-throw-error.js @@ -0,0 +1,96 @@ +"use strict"; +var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) { + if (k2 === undefined) k2 = k; + var desc = Object.getOwnPropertyDescriptor(m, k); + if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) { + desc = { enumerable: true, get: function() { return m[k]; } }; + } + Object.defineProperty(o, k2, desc); +}) : (function(o, m, k, k2) { + if (k2 === undefined) k2 = k; + o[k2] = m[k]; +})); +var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) { + Object.defineProperty(o, "default", { enumerable: true, value: v }); +}) : function(o, v) { + o["default"] = v; +}); +var __importStar = (this && this.__importStar) || function (mod) { + if (mod && mod.__esModule) return mod; + var result = {}; + if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k); + __setModuleDefault(result, mod); + return result; +}; +Object.defineProperty(exports, "__esModule", { value: true }); +const utils_1 = require("@typescript-eslint/utils"); +const ts = __importStar(require("typescript")); +const util_1 = require("../util"); +exports.default = (0, util_1.createRule)({ + name: 'only-throw-error', + meta: { + type: 'problem', + docs: { + description: 'Disallow throwing non-`Error` values as exceptions', + recommended: 'strict', + extendsBaseRule: 'no-throw-literal', + requiresTypeChecking: true, + }, + schema: [ + { + type: 'object', + properties: { + allowThrowingAny: { + type: 'boolean', + }, + allowThrowingUnknown: { + type: 'boolean', + }, + }, + additionalProperties: false, + }, + ], + messages: { + object: 'Expected an error object to be thrown.', + undef: 'Do not throw undefined.', + }, + }, + defaultOptions: [ + { + allowThrowingAny: true, + allowThrowingUnknown: true, + }, + ], + create(context, [options]) { + const services = (0, util_1.getParserServices)(context); + function checkThrowArgument(node) { + if (node.type === utils_1.AST_NODE_TYPES.AwaitExpression || + node.type === utils_1.AST_NODE_TYPES.YieldExpression) { + return; + } + const type = services.getTypeAtLocation(node); + if (type.flags & ts.TypeFlags.Undefined) { + context.report({ node, messageId: 'undef' }); + return; + } + if (options.allowThrowingAny && (0, util_1.isTypeAnyType)(type)) { + return; + } + if (options.allowThrowingUnknown && (0, util_1.isTypeUnknownType)(type)) { + return; + } + if ((0, util_1.isErrorLike)(services.program, type)) { + return; + } + context.report({ node, messageId: 'object' }); + } + return { + ThrowStatement(node) { + if (node.argument) { + checkThrowArgument(node.argument); + } + }, + }; + }, +}); +//# sourceMappingURL=only-throw-error.js.map \ No newline at end of file diff --git a/node_modules/@typescript-eslint/eslint-plugin/dist/rules/only-throw-error.js.map b/node_modules/@typescript-eslint/eslint-plugin/dist/rules/only-throw-error.js.map new file mode 100644 index 000000000..3320a4e91 --- /dev/null +++ b/node_modules/@typescript-eslint/eslint-plugin/dist/rules/only-throw-error.js.map @@ -0,0 +1 @@ +{"version":3,"file":"only-throw-error.js","sourceRoot":"","sources":["../../src/rules/only-throw-error.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;AACA,oDAA0D;AAC1D,+CAAiC;AAEjC,kCAMiB;AAWjB,kBAAe,IAAA,iBAAU,EAAsB;IAC7C,IAAI,EAAE,kBAAkB;IACxB,IAAI,EAAE;QACJ,IAAI,EAAE,SAAS;QACf,IAAI,EAAE;YACJ,WAAW,EAAE,oDAAoD;YACjE,WAAW,EAAE,QAAQ;YACrB,eAAe,EAAE,kBAAkB;YACnC,oBAAoB,EAAE,IAAI;SAC3B;QACD,MAAM,EAAE;YACN;gBACE,IAAI,EAAE,QAAQ;gBACd,UAAU,EAAE;oBACV,gBAAgB,EAAE;wBAChB,IAAI,EAAE,SAAS;qBAChB;oBACD,oBAAoB,EAAE;wBACpB,IAAI,EAAE,SAAS;qBAChB;iBACF;gBACD,oBAAoB,EAAE,KAAK;aAC5B;SACF;QACD,QAA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Q,CAAC,CAAC;gBACpC,CAAC;YACH,CAAC;SACF,CAAC;IACJ,CAAC;CACF,CAAC,CAAC"} \ No newline at end of file diff --git a/node_modules/@typescript-eslint/eslint-plugin/dist/rules/prefer-optional-chain-utils/checkNullishAndReport.js b/node_modules/@typescript-eslint/eslint-plugin/dist/rules/prefer-optional-chain-utils/checkNullishAndReport.js new file mode 100644 index 000000000..871984984 --- /dev/null +++ b/node_modules/@typescript-eslint/eslint-plugin/dist/rules/prefer-optional-chain-utils/checkNullishAndReport.js @@ -0,0 +1,37 @@ +"use strict"; +var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) { + if (k2 === undefined) k2 = k; + var desc = Object.getOwnPropertyDescriptor(m, k); + if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) { + desc = { enumerable: true, get: function() { return m[k]; } }; + } + Object.defineProperty(o, k2, desc); +}) : (function(o, m, k, k2) { + if (k2 === undefined) k2 = k; + o[k2] = m[k]; +})); +var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) { + Object.defineProperty(o, "default", { enumerable: true, value: v }); +}) : function(o, v) { + o["default"] = v; +}); +var __importStar = (this && this.__importStar) || function (mod) { + if (mod && mod.__esModule) return mod; + var result = {}; + if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k); + __setModuleDefault(result, mod); + return result; +}; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.checkNullishAndReport = void 0; +const type_utils_1 = require("@typescript-eslint/type-utils"); +const ts_api_utils_1 = require("ts-api-utils"); +const ts = __importStar(require("typescript")); +function checkNullishAndReport(context, parserServices, { requireNullish }, maybeNullishNodes, descriptor) { + if (!requireNullish || + maybeNullishNodes.some(node => (0, ts_api_utils_1.unionTypeParts)(parserServices.getTypeAtLocation(node)).some(t => (0, type_utils_1.isTypeFlagSet)(t, ts.TypeFlags.Null | ts.TypeFlags.Undefined)))) { + context.report(descriptor); + } +} +exports.checkNullishAndReport = checkNullishAndReport; +//# sourceMappingURL=checkNullishAndReport.js.map \ No newline at end of file diff --git a/node_modules/@typescript-eslint/eslint-plugin/dist/rules/prefer-optional-chain-utils/checkNullishAndReport.js.map b/node_modules/@typescript-eslint/eslint-plugin/dist/rules/prefer-optional-chain-utils/checkNullishAndReport.js.map new file mode 100644 index 000000000..e3f920fa1 --- /dev/null +++ b/node_modules/@typescript-eslint/eslint-plugin/dist/rules/prefer-optional-chain-utils/checkNullishAndReport.js.map @@ -0,0 +1 @@ +{"version":3,"file":"checkNullishAndReport.js","sourceRoot":"","sources":["../../../src/rules/prefer-optional-chain-utils/checkNullishAndReport.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,8DAA8D;AAS9D,+CAA8C;AAC9C,+CAAiC;AAOjC,SAAgB,qBAAqB,CACnC,OAGC,EACD,cAAiD,EACjD,EAAE,cAAc,EAA8B,EAC9C,iBAAwC,EACxC,UAA2D;IAE3D,IACE,CAAC,cAAc;QACf,iBAAiB,CAAC,IAAI,CAAC,IAAI,CAAC,EAAE,CAC5B,IAAA,6BAAc,EAAC,cAAc,CAAC,iBAAiB,CAAC,IAAI,CAAC,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,EAAE,CAC9D,IAAA,0BAAa,EAAC,CAAC,EAAE,EAAE,CAAC,SAAS,CAAC,IAAI,GAAG,EAAE,CAAC,SAAS,CAAC,SAAS,CAAC,CAC7D,CACF,EACD,CAAC;QACD,OAAO,CAAC,MAAM,CAAC,UAAU,CAAC,CAAC;IAC7B,CAAC;AACH,CAAC;AApBD,sDAoBC"} \ No newline at end of file diff --git a/node_modules/@typescript-eslint/eslint-plugin/dist/rules/use-unknown-in-catch-callback-variable.js b/node_modules/@typescript-eslint/eslint-plugin/dist/rules/use-unknown-in-catch-callback-variable.js new file mode 100644 index 000000000..e8dfba7db --- /dev/null +++ b/node_modules/@typescript-eslint/eslint-plugin/dist/rules/use-unknown-in-catch-callback-variable.js @@ -0,0 +1,283 @@ +"use strict"; +var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) { + if (k2 === undefined) k2 = k; + var desc = Object.getOwnPropertyDescriptor(m, k); + if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) { + desc = { enumerable: true, get: function() { return m[k]; } }; + } + Object.defineProperty(o, k2, desc); +}) : (function(o, m, k, k2) { + if (k2 === undefined) k2 = k; + o[k2] = m[k]; +})); +var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) { + Object.defineProperty(o, "default", { enumerable: true, value: v }); +}) : function(o, v) { + o["default"] = v; +}); +var __importStar = (this && this.__importStar) || function (mod) { + if (mod && mod.__esModule) return mod; + var result = {}; + if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k); + __setModuleDefault(result, mod); + return result; +}; +Object.defineProperty(exports, "__esModule", { value: true }); +const utils_1 = require("@typescript-eslint/utils"); +const tsutils = __importStar(require("ts-api-utils")); +const util_1 = require("../util"); +const useUnknownMessageBase = 'Prefer the safe `: unknown` for a catch callback variable.'; +exports.default = (0, util_1.createRule)({ + name: 'use-unknown-in-catch-callback-variable', + meta: { + docs: { + description: 'Enforce typing arguments in `.catch()` callbacks as `unknown`', + requiresTypeChecking: true, + recommended: 'strict', + }, + type: 'suggestion', + messages: { + useUnknown: useUnknownMessageBase, + useUnknownArrayDestructuringPattern: useUnknownMessageBase + ' The thrown error may not be iterable.', + useUnknownObjectDestructuringPattern: useUnknownMessageBase + + ' The thrown error may be nullable, or may not have the expected shape.', + useUnknownSpreadArgs: useUnknownMessageBase + + ' The argument list may contain a handler that does not use `unknown` for the catch callback variable.', + addUnknownTypeAnnotationSuggestion: 'Add an explicit `: unknown` type annotation to the catch variable.', + addUnknownRestTypeAnnotationSuggestion: 'Add an explicit `: [unknown]` type annotation to the catch rest variable.', + wrongTypeAnnotationSuggestion: 'Change existing type annotation to `: unknown`.', + wrongRestTypeAnnotationSuggestion: 'Change existing type annotation to `: [unknown]`.', + }, + fixable: 'code', + schema: [], + hasSuggestions: true, + }, + defaultOptions: [], + create(context) { + const services = (0, util_1.getParserServices)(context); + const checker = services.program.getTypeChecker(); + function isPromiseCatchAccess(node) { + if (!(node.type === utils_1.AST_NODE_TYPES.MemberExpression && + isStaticMemberAccessOfValue(node, 'catch'))) { + return false; + } + const objectTsNode = services.esTreeNodeToTSNodeMap.get(node.object); + const tsNode = services.esTreeNodeToTSNodeMap.get(node); + return tsutils.isThenableType(checker, tsNode, checker.getTypeAtLocation(objectTsNode)); + } + function isFlaggableHandlerType(type) { + for (const unionPart of tsutils.unionTypeParts(type)) { + const callSignatures = tsutils.getCallSignaturesOfType(unionPart); + if (callSignatures.length === 0) { + // Ignore any non-function components to the type. Those are not this rule's problem. + continue; + } + for (const callSignature of callSignatures) { + const firstParam = callSignature.parameters.at(0); + if (!firstParam) { + // it's not an issue if there's no catch variable at all. + continue; + } + let firstParamType = checker.getTypeOfSymbol(firstParam); + const decl = firstParam.valueDeclaration; + if (decl != null && (0, util_1.isRestParameterDeclaration)(decl)) { + if (checker.isArrayType(firstParamType)) { + firstParamType = checker.getTypeArguments(firstParamType)[0]; + } + else if (checker.isTupleType(firstParamType)) { + firstParamType = checker.getTypeArguments(firstParamType)[0]; + } + else { + // a rest arg that's not an array or tuple should definitely be flagged. + return true; + } + } + if (!tsutils.isIntrinsicUnknownType(firstParamType)) { + return true; + } + } + } + return false; + } + /** + * If passed an ordinary expression, this will check it as expected. + * + * If passed a spread element, it treats it as the union of unwrapped array/tuple type. + */ + function shouldFlagArgument(node) { + const argument = services.esTreeNodeToTSNodeMap.get(node); + const typeOfArgument = checker.getTypeAtLocation(argument); + return isFlaggableHandlerType(typeOfArgument); + } + function shouldFlagMultipleSpreadArgs(argumentsList) { + // One could try to be clever about unpacking fixed length tuples and stuff + // like that, but there's no need, since this is all invalid use of `.catch` + // anyway at the end of the day. Instead, we'll just check whether any of the + // possible args types would violate the rule on its own. + return argumentsList.some(argument => shouldFlagArgument(argument)); + } + function shouldFlagSingleSpreadArg(node) { + const spreadArgs = services.esTreeNodeToTSNodeMap.get(node.argument); + const spreadArgsType = checker.getTypeAtLocation(spreadArgs); + if (checker.isArrayType(spreadArgsType)) { + const arrayType = checker.getTypeArguments(spreadArgsType)[0]; + return isFlaggableHandlerType(arrayType); + } + if (checker.isTupleType(spreadArgsType)) { + const firstType = checker.getTypeArguments(spreadArgsType).at(0); + if (!firstType) { + // empty spread args. Suspect code, but not a problem for this rule. + return false; + } + return isFlaggableHandlerType(firstType); + } + return true; + } + /** + * Analyzes the syntax of the catch argument and makes a best effort to pinpoint + * why it's reporting, and to come up with a suggested fix if possible. + * + * This function is explicitly operating under the assumption that the + * rule _is reporting_, so it is not guaranteed to be sound to call otherwise. + */ + function refineReportForNormalArgumentIfPossible(argument) { + // Only know how to be helpful if a function literal has been provided. + if (!(argument.type === utils_1.AST_NODE_TYPES.ArrowFunctionExpression || + argument.type === utils_1.AST_NODE_TYPES.FunctionExpression)) { + return undefined; + } + const catchVariableOuterWithIncorrectTypes = (0, util_1.nullThrows)(argument.params.at(0), 'There should have been at least one parameter for the rule to have flagged.'); + // Function expressions can't have parameter properties; those only exist in constructors. + const catchVariableOuter = catchVariableOuterWithIncorrectTypes; + const catchVariableInner = catchVariableOuter.type === utils_1.AST_NODE_TYPES.AssignmentPattern + ? catchVariableOuter.left + : catchVariableOuter; + switch (catchVariableInner.type) { + case utils_1.AST_NODE_TYPES.Identifier: { + const catchVariableTypeAnnotation = catchVariableInner.typeAnnotation; + if (catchVariableTypeAnnotation == null) { + return { + node: catchVariableOuter, + suggest: [ + { + messageId: 'addUnknownTypeAnnotationSuggestion', + fix: (fixer) => { + if (argument.type === + utils_1.AST_NODE_TYPES.ArrowFunctionExpression && + (0, util_1.isParenlessArrowFunction)(argument, context.sourceCode)) { + return [ + fixer.insertTextBefore(catchVariableInner, '('), + fixer.insertTextAfter(catchVariableInner, ': unknown)'), + ]; + } + return [ + fixer.insertTextAfter(catchVariableInner, ': unknown'), + ]; + }, + }, + ], + }; + } + return { + node: catchVariableOuter, + suggest: [ + { + messageId: 'wrongTypeAnnotationSuggestion', + fix: (fixer) => fixer.replaceText(catchVariableTypeAnnotation, ': unknown'), + }, + ], + }; + } + case utils_1.AST_NODE_TYPES.ArrayPattern: { + return { + node: catchVariableOuter, + messageId: 'useUnknownArrayDestructuringPattern', + }; + } + case utils_1.AST_NODE_TYPES.ObjectPattern: { + return { + node: catchVariableOuter, + messageId: 'useUnknownObjectDestructuringPattern', + }; + } + case utils_1.AST_NODE_TYPES.RestElement: { + const catchVariableTypeAnnotation = catchVariableInner.typeAnnotation; + if (catchVariableTypeAnnotation == null) { + return { + node: catchVariableOuter, + suggest: [ + { + messageId: 'addUnknownRestTypeAnnotationSuggestion', + fix: (fixer) => fixer.insertTextAfter(catchVariableInner, ': [unknown]'), + }, + ], + }; + } + return { + node: catchVariableOuter, + suggest: [ + { + messageId: 'wrongRestTypeAnnotationSuggestion', + fix: (fixer) => fixer.replaceText(catchVariableTypeAnnotation, ': [unknown]'), + }, + ], + }; + } + } + } + return { + CallExpression(node) { + if (node.arguments.length === 0 || !isPromiseCatchAccess(node.callee)) { + return; + } + const firstArgument = node.arguments[0]; + // Deal with some special cases around spread element args. + // promise.catch(...handlers), promise.catch(...handlers, ...moreHandlers). + if (firstArgument.type === utils_1.AST_NODE_TYPES.SpreadElement) { + if (node.arguments.length === 1) { + if (shouldFlagSingleSpreadArg(firstArgument)) { + context.report({ + node: firstArgument, + messageId: 'useUnknown', + }); + } + } + else if (shouldFlagMultipleSpreadArgs(node.arguments)) { + context.report({ + node, + messageId: 'useUnknownSpreadArgs', + }); + } + return; + } + // First argument is an "ordinary" argument (i.e. not a spread argument) + // promise.catch(f), promise.catch(() => {}), promise.catch(, <>) + if (shouldFlagArgument(firstArgument)) { + // We are now guaranteed to report, but we have a bit of work to do + // to determine exactly where, and whether we can fix it. + const overrides = refineReportForNormalArgumentIfPossible(firstArgument); + context.report({ + node: firstArgument, + messageId: 'useUnknown', + ...overrides, + }); + } + }, + }; + }, +}); +/** + * Answers whether the member expression looks like + * `x.memberName`, `x['memberName']`, + * or even `const mn = 'memberName'; x[mn]` (or optional variants thereof). + */ +function isStaticMemberAccessOfValue(memberExpression, value, scope) { + if (!memberExpression.computed) { + // x.memberName case. + return memberExpression.property.name === value; + } + // x['memberName'] cases. + const staticValueResult = (0, util_1.getStaticValue)(memberExpression.property, scope); + return staticValueResult != null && value === staticValueResult.value; +} +//# sourceMappingURL=use-unknown-in-catch-callback-variable.js.map \ No newline at end of file diff --git a/node_modules/@typescript-eslint/eslint-plugin/dist/rules/use-unknown-in-catch-callback-variable.js.map b/node_modules/@typescript-eslint/eslint-plugin/dist/rules/use-unknown-in-catch-callback-variable.js.map new file mode 100644 index 000000000..8895ac22c --- /dev/null +++ b/node_modules/@typescript-eslint/eslint-plugin/dist/rules/use-unknown-in-catch-callback-variable.js.map @@ -0,0 +1 @@ +{"version":3,"file":"use-unknown-in-catch-callback-variable.js","sourceRoot":"","sources":["../../src/rules/use-unknown-in-catch-callback-variable.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;AACA,oDAA0D;AAK1D,sDAAwC;AAGxC,kCAOiB;AAYjB,MAAM,qBAAqB,GACzB,4DAA4D,CAAC;AAE/D,kBAAe,IAAA,iBAAU,EAAiB;IACxC,IAAI,EAAE,wCAAwC;IAC9C,IAAI,EAAE;QACJ,IAAI,EAAE;YACJ,WAAW,EACT,+DAA+D;YACjE,oBAAoB,EAAE,IAAI;YAC1B,WAAW,EAAE,QAAQ;SACtB;QACD,IAAI,EAAE,YAAY;QAClB,QAAQ,EAAE;YACR,UAAU,EAAE,qBAAqB;YACjC,mCAAmC,EACjC,qBAAqB,GAAG,wCAAwC;YAClE,oCAAoC,EAClC,qBAAqB;gBACrB,wEAAwE;YAC1E,oBAAoB,EAClB,qBAAqB;gBACrB,uGAAuG;YACzG,kCAAk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dist/util/getForStatementHeadLoc.js b/node_modules/@typescript-eslint/eslint-plugin/dist/util/getForStatementHeadLoc.js new file mode 100644 index 000000000..aab972ed7 --- /dev/null +++ b/node_modules/@typescript-eslint/eslint-plugin/dist/util/getForStatementHeadLoc.js @@ -0,0 +1,28 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.getForStatementHeadLoc = void 0; +const eslint_utils_1 = require("@typescript-eslint/utils/eslint-utils"); +/** + * Gets the location of the head of the given for statement variant for reporting. + * + * - `for (const foo in bar) expressionOrBlock` + * ^^^^^^^^^^^^^^^^^^^^^^ + * + * - `for (const foo of bar) expressionOrBlock` + * ^^^^^^^^^^^^^^^^^^^^^^ + * + * - `for await (const foo of bar) expressionOrBlock` + * ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + * + * - `for (let i = 0; i < 10; i++) expressionOrBlock` + * ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + */ +function getForStatementHeadLoc(sourceCode, node) { + const closingParens = (0, eslint_utils_1.nullThrows)(sourceCode.getTokenBefore(node.body, token => token.value === ')'), 'for statement must have a closing parenthesis.'); + return { + start: structuredClone(node.loc.start), + end: structuredClone(closingParens.loc.end), + }; +} +exports.getForStatementHeadLoc = getForStatementHeadLoc; +//# sourceMappingURL=getForStatementHeadLoc.js.map \ No newline at end of file diff --git a/node_modules/@typescript-eslint/eslint-plugin/dist/util/getForStatementHeadLoc.js.map b/node_modules/@typescript-eslint/eslint-plugin/dist/util/getForStatementHeadLoc.js.map new file mode 100644 index 000000000..64cb84f62 --- /dev/null +++ b/node_modules/@typescript-eslint/eslint-plugin/dist/util/getForStatementHeadLoc.js.map @@ -0,0 +1 @@ +{"version":3,"file":"getForStatementHeadLoc.js","sourceRoot":"","sources":["../../src/util/getForStatementHeadLoc.ts"],"names":[],"mappings":";;;AACA,wEAAmE;AAEnE;;;;;;;;;;;;;;GAcG;AACH,SAAgB,sBAAsB,CACpC,UAA+B,EAC/B,IAGyB;IAEzB,MAAM,aAAa,GAAG,IAAA,yBAAU,EAC9B,UAAU,CAAC,cAAc,CAAC,IAAI,CAAC,IAAI,EAAE,KAAK,CAAC,EAAE,CAAC,KAAK,CAAC,KAAK,KAAK,GAAG,CAAC,EAClE,gDAAgD,CACjD,CAAC;IACF,OAAO;QACL,KAAK,EAAE,eAAe,CAAC,IAAI,CAAC,GAAG,CAAC,KAAK,CAAC;QACtC,GAAG,EAAE,eAAe,CAAC,aAAa,CAAC,GAAG,CAAC,GAAG,CAAC;KAC5C,CAAC;AACJ,CAAC;AAfD,wDAeC"} \ No newline at end of file diff --git a/node_modules/@typescript-eslint/eslint-plugin/dist/util/isAssignee.js b/node_modules/@typescript-eslint/eslint-plugin/dist/util/isAssignee.js new file mode 100644 index 000000000..f77ea441f --- /dev/null +++ b/node_modules/@typescript-eslint/eslint-plugin/dist/util/isAssignee.js @@ -0,0 +1,44 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.isAssignee = void 0; +const utils_1 = require("@typescript-eslint/utils"); +function isAssignee(node) { + const parent = node.parent; + if (!parent) { + return false; + } + // a[i] = 1, a[i] += 1, etc. + if (parent.type === utils_1.AST_NODE_TYPES.AssignmentExpression && + parent.left === node) { + return true; + } + // delete a[i] + if (parent.type === utils_1.AST_NODE_TYPES.UnaryExpression && + parent.operator === 'delete' && + parent.argument === node) { + return true; + } + // a[i]++, --a[i], etc. + if (parent.type === utils_1.AST_NODE_TYPES.UpdateExpression && + parent.argument === node) { + return true; + } + // [a[i]] = [0] + if (parent.type === utils_1.AST_NODE_TYPES.ArrayPattern) { + return true; + } + // [...a[i]] = [0] + if (parent.type === utils_1.AST_NODE_TYPES.RestElement) { + return true; + } + // ({ foo: a[i] }) = { foo: 0 } + if (parent.type === utils_1.AST_NODE_TYPES.Property && + parent.value === node && + parent.parent.type === utils_1.AST_NODE_TYPES.ObjectExpression && + isAssignee(parent.parent)) { + return true; + } + return false; +} +exports.isAssignee = isAssignee; +//# sourceMappingURL=isAssignee.js.map \ No newline at end of file diff --git a/node_modules/@typescript-eslint/eslint-plugin/dist/util/isAssignee.js.map b/node_modules/@typescript-eslint/eslint-plugin/dist/util/isAssignee.js.map new file mode 100644 index 000000000..eb6831604 --- /dev/null +++ b/node_modules/@typescript-eslint/eslint-plugin/dist/util/isAssignee.js.map @@ -0,0 +1 @@ +{"version":3,"file":"isAssignee.js","sourceRoot":"","sources":["../../src/util/isAssignee.ts"],"names":[],"mappings":";;;AACA,oDAA0D;AAE1D,SAAgB,UAAU,CAAC,IAAmB;IAC5C,MAAM,MAAM,GAAG,IAAI,CAAC,MAAM,CAAC;IAC3B,IAAI,CAAC,MAAM,EAAE,CAAC;QACZ,OAAO,KAAK,CAAC;IACf,CAAC;IAED,4BAA4B;IAC5B,IACE,MAAM,CAAC,IAAI,KAAK,sBAAc,CAAC,oBAAoB;QACnD,MAAM,CAAC,IAAI,KAAK,IAAI,EACpB,CAAC;QACD,OAAO,IAAI,CAAC;IACd,CAAC;IAED,cAAc;IACd,IACE,MAAM,CAAC,IAAI,KAAK,sBAAc,CAAC,eAAe;QAC9C,MAAM,CAAC,QAAQ,KAAK,QAAQ;QAC5B,MAAM,CAAC,QAAQ,KAAK,IAAI,EACxB,CAAC;QACD,OAAO,IAAI,CAAC;IACd,CAAC;IAED,uBAAuB;IACvB,IACE,MAAM,CAAC,IAAI,KAAK,sBAAc,CAAC,gBAAgB;QAC/C,MAAM,CAAC,QAAQ,KAAK,IAAI,EACxB,CAAC;QACD,OAAO,IAAI,CAAC;IACd,CAAC;IAED,eAAe;IACf,IAAI,MAAM,CAAC,IAAI,KAAK,sBAAc,CAAC,YAAY,EAAE,CAAC;QAChD,OAAO,IAAI,CAAC;IACd,CAAC;IAED,kBAAkB;IAClB,IAAI,MAAM,CAAC,IAAI,KAAK,sBAAc,CAAC,WAAW,EAAE,CAAC;QAC/C,OAAO,IAAI,CAAC;IACd,CAAC;IAED,+BAA+B;IAC/B,IACE,MAAM,CAAC,IAAI,KAAK,sBAAc,CAAC,QAAQ;QACvC,MAAM,CAAC,KAAK,KAAK,IAAI;QACrB,MAAM,CAAC,MAAM,CAAC,IAAI,KAAK,sBAAc,CAAC,gBAAgB;QACtD,UAAU,CAAC,MAAM,CAAC,MAAM,CAAC,EACzB,CAAC;QACD,OAAO,IAAI,CAAC;IACd,CAAC;IAED,OAAO,KAAK,CAAC;AACf,CAAC;AApDD,gCAoDC"} \ No newline at end of file diff --git a/node_modules/@typescript-eslint/eslint-plugin/docs/rules/adjacent-overload-signatures.mdx b/node_modules/@typescript-eslint/eslint-plugin/docs/rules/adjacent-overload-signatures.mdx new file mode 100644 index 000000000..60f62b2f8 --- /dev/null +++ b/node_modules/@typescript-eslint/eslint-plugin/docs/rules/adjacent-overload-signatures.mdx @@ -0,0 +1,105 @@ +--- +description: 'Require that function overload signatures be consecutive.' +--- + +import Tabs from '@theme/Tabs'; +import TabItem from '@theme/TabItem'; + +> 🛑 This file is source code, not the primary documentation location! 🛑 +> +> See **https://typescript-eslint.io/rules/adjacent-overload-signatures** for documentation. + +Function overload signatures represent multiple ways a function can be called, potentially with different return types. +It's typical for an interface or type alias describing a function to place all overload signatures next to each other. +If Signatures placed elsewhere in the type are easier to be missed by future developers reading the code. + +## Examples + + + + +```ts +declare namespace Foo { + export function foo(s: string): void; + export function foo(n: number): void; + export function bar(): void; + export function foo(sn: string | number): void; +} + +type Foo = { + foo(s: string): void; + foo(n: number): void; + bar(): void; + foo(sn: string | number): void; +}; + +interface Foo { + foo(s: string): void; + foo(n: number): void; + bar(): void; + foo(sn: string | number): void; +} + +class Foo { + foo(s: string): void; + foo(n: number): void; + bar(): void {} + foo(sn: string | number): void {} +} + +export function foo(s: string): void; +export function foo(n: number): void; +export function bar(): void; +export function foo(sn: string | number): void; +``` + + + + +```ts +declare namespace Foo { + export function foo(s: string): void; + export function foo(n: number): void; + export function foo(sn: string | number): void; + export function bar(): void; +} + +type Foo = { + foo(s: string): void; + foo(n: number): void; + foo(sn: string | number): void; + bar(): void; +}; + +interface Foo { + foo(s: string): void; + foo(n: number): void; + foo(sn: string | number): void; + bar(): void; +} + +class Foo { + foo(s: string): void; + foo(n: number): void; + foo(sn: string | number): void {} + bar(): void {} +} + +export function bar(): void; +export function foo(s: string): void; +export function foo(n: number): void; +export function foo(sn: string | number): void; +``` + + + + +## When Not To Use It + +It can sometimes be useful to place overload signatures alongside other meaningful parts of a type. +For example, if each of a function's overloads corresponds to a different property, you might wish to put each overloads next to its corresponding property. +You might consider using [ESLint disable comments](https://eslint.org/docs/latest/use/configure/rules#using-configuration-comments-1) for those specific situations instead of completely disabling this rule. + +## Related To + +- [`unified-signatures`](./unified-signatures.mdx) diff --git a/node_modules/@typescript-eslint/eslint-plugin/docs/rules/array-type.mdx b/node_modules/@typescript-eslint/eslint-plugin/docs/rules/array-type.mdx new file mode 100644 index 000000000..3985ccc7e --- /dev/null +++ b/node_modules/@typescript-eslint/eslint-plugin/docs/rules/array-type.mdx @@ -0,0 +1,123 @@ +--- +description: 'Require consistently using either `T[]` or `Array` for arrays.' +--- + +import Tabs from '@theme/Tabs'; +import TabItem from '@theme/TabItem'; + +> 🛑 This file is source code, not the primary documentation location! 🛑 +> +> See **https://typescript-eslint.io/rules/array-type** for documentation. + +TypeScript provides two equivalent ways to define an array type: `T[]` and `Array`. +The two styles are functionally equivalent. +Using the same style consistently across your codebase makes it easier for developers to read and understand array types. + +## Options + +The default config will enforce that all mutable and readonly arrays use the `'array'` syntax. + +### `"array"` + +Always use `T[]` or `readonly T[]` for all array types. + + + + +```ts option='{ "default": "array" }' +const x: Array = ['a', 'b']; +const y: ReadonlyArray = ['a', 'b']; +``` + + + + +```ts option='{ "default": "array" }' +const x: string[] = ['a', 'b']; +const y: readonly string[] = ['a', 'b']; +``` + + + + +### `"generic"` + +Always use `Array` or `ReadonlyArray` for all array types. + + + + +```ts option='{ "default": "generic" }' +const x: string[] = ['a', 'b']; +const y: readonly string[] = ['a', 'b']; +``` + + + + +```ts option='{ "default": "generic" }' +const x: Array = ['a', 'b']; +const y: ReadonlyArray = ['a', 'b']; +``` + + + + +### `"array-simple"` + +Use `T[]` or `readonly T[]` for simple types (i.e. types which are just primitive names or type references). +Use `Array` or `ReadonlyArray` for all other types (union types, intersection types, object types, function types, etc). + + + + +```ts option='{ "default": "array-simple" }' +const a: (string | number)[] = ['a', 'b']; +const b: { prop: string }[] = [{ prop: 'a' }]; +const c: (() => void)[] = [() => {}]; +const d: Array = ['a', 'b']; +const e: Array = ['a', 'b']; +const f: ReadonlyArray = ['a', 'b']; +``` + + + + +```ts option='{ "default": "array-simple" }' +const a: Array = ['a', 'b']; +const b: Array<{ prop: string }> = [{ prop: 'a' }]; +const c: Array<() => void> = [() => {}]; +const d: MyType[] = ['a', 'b']; +const e: string[] = ['a', 'b']; +const f: readonly string[] = ['a', 'b']; +``` + + + + +## Combination Matrix + +This matrix lists all possible option combinations and their expected results for different types of Arrays. + +| defaultOption | readonlyOption | Array with simple type | Array with non simple type | Readonly array with simple type | Readonly array with non simple type | +| -------------- | -------------- | ---------------------- | -------------------------- | ------------------------------- | ----------------------------------- | +| `array` | | `number[]` | `(Foo & Bar)[]` | `readonly number[]` | `readonly (Foo & Bar)[]` | +| `array` | `array` | `number[]` | `(Foo & Bar)[]` | `readonly number[]` | `readonly (Foo & Bar)[]` | +| `array` | `array-simple` | `number[]` | `(Foo & Bar)[]` | `readonly number[]` | `ReadonlyArray` | +| `array` | `generic` | `number[]` | `(Foo & Bar)[]` | `ReadonlyArray` | `ReadonlyArray` | +| `array-simple` | | `number[]` | `Array` | `readonly number[]` | `ReadonlyArray` | +| `array-simple` | `array` | `number[]` | `Array` | `readonly number[]` | `readonly (Foo & Bar)[]` | +| `array-simple` | `array-simple` | `number[]` | `Array` | `readonly number[]` | `ReadonlyArray` | +| `array-simple` | `generic` | `number[]` | `Array` | `ReadonlyArray` | `ReadonlyArray` | +| `generic` | | `Array` | `Array` | `ReadonlyArray` | `ReadonlyArray` | +| `generic` | `array` | `Array` | `Array` | `readonly number[]` | `readonly (Foo & Bar)[]` | +| `generic` | `array-simple` | `Array` | `Array` | `readonly number[]` | `ReadonlyArray` | +| `generic` | `generic` | `Array` | `Array` | `ReadonlyArray` | `ReadonlyArray` | + +## When Not To Use It + +This rule is purely a stylistic rule for maintaining consistency in your project. +You can turn it off if you don't want to keep a consistent style for array types. + +However, keep in mind that inconsistent style can harm readability in a project. +We recommend picking a single option for this rule that works best for your project. diff --git a/node_modules/@typescript-eslint/eslint-plugin/docs/rules/await-thenable.mdx b/node_modules/@typescript-eslint/eslint-plugin/docs/rules/await-thenable.mdx new file mode 100644 index 000000000..3ad4c18de --- /dev/null +++ b/node_modules/@typescript-eslint/eslint-plugin/docs/rules/await-thenable.mdx @@ -0,0 +1,48 @@ +--- +description: 'Disallow awaiting a value that is not a Thenable.' +--- + +import Tabs from '@theme/Tabs'; +import TabItem from '@theme/TabItem'; + +> 🛑 This file is source code, not the primary documentation location! 🛑 +> +> See **https://typescript-eslint.io/rules/await-thenable** for documentation. + +A "Thenable" value is an object which has a `then` method, such as a Promise. +The `await` keyword is generally used to retrieve the result of calling a Thenable's `then` method. + +If the `await` keyword is used on a value that is not a Thenable, the value is directly resolved immediately. +While doing so is valid JavaScript, it is often a programmer error, such as forgetting to add parenthesis to call a function that returns a Promise. + +## Examples + + + + +```ts +await 'value'; + +const createValue = () => 'value'; +await createValue(); +``` + + + + +```ts +await Promise.resolve('value'); + +const createValue = async () => 'value'; +await createValue(); +``` + + + + +## When Not To Use It + +If you want to allow code to `await` non-Promise values. +For example, if your framework is in transition from one style of asynchronous code to another, it may be useful to include `await`s unnecessarily. +This is generally not preferred but can sometimes be useful for visual consistency. +You might consider using [ESLint disable comments](https://eslint.org/docs/latest/use/configure/rules#using-configuration-comments-1) for those specific situations instead of completely disabling this rule. diff --git a/node_modules/@typescript-eslint/eslint-plugin/docs/rules/ban-ts-comment.mdx b/node_modules/@typescript-eslint/eslint-plugin/docs/rules/ban-ts-comment.mdx new file mode 100644 index 000000000..ca36964e2 --- /dev/null +++ b/node_modules/@typescript-eslint/eslint-plugin/docs/rules/ban-ts-comment.mdx @@ -0,0 +1,161 @@ +--- +description: 'Disallow `@ts-` comments or require descriptions after directives.' +--- + +import Tabs from '@theme/Tabs'; +import TabItem from '@theme/TabItem'; + +> 🛑 This file is source code, not the primary documentation location! 🛑 +> +> See **https://typescript-eslint.io/rules/ban-ts-comment** for documentation. + +TypeScript provides several directive comments that can be used to alter how it processes files. +Using these to suppress TypeScript compiler errors reduces the effectiveness of TypeScript overall. +Instead, it's generally better to correct the types of code, to make directives unnecessary. + +The directive comments supported by TypeScript are: + +```ts +// @ts-expect-error +// @ts-ignore +// @ts-nocheck +// @ts-check +``` + +This rule lets you set which directive comments you want to allow in your codebase. + +## Options + +By default, only `@ts-check` is allowed, as it enables rather than suppresses errors. + +### `ts-expect-error`, `ts-ignore`, `ts-nocheck`, `ts-check` directives + +A value of `true` for a particular directive means that this rule will report if it finds any usage of said directive. + + + + +```ts option='{ "ts-ignore": true }' +if (false) { + // @ts-ignore: Unreachable code error + console.log('hello'); +} +if (false) { + /* @ts-ignore: Unreachable code error */ + console.log('hello'); +} +``` + + + + +```ts option='{ "ts-ignore": true }' +if (false) { + // Compiler warns about unreachable code error + console.log('hello'); +} +``` + + + + +### `allow-with-description` + +A value of `'allow-with-description'` for a particular directive means that this rule will report if it finds a directive that does not have a description following the directive (on the same line). + +For example, with `{ 'ts-expect-error': 'allow-with-description' }`: + + + + +```ts option='{ "ts-expect-error": "allow-with-description" }' +if (false) { + // @ts-expect-error + console.log('hello'); +} +if (false) { + /* @ts-expect-error */ + console.log('hello'); +} +``` + + + + +```ts option='{ "ts-expect-error": "allow-with-description" }' +if (false) { + // @ts-expect-error: Unreachable code error + console.log('hello'); +} +if (false) { + /* @ts-expect-error: Unreachable code error */ + console.log('hello'); +} +``` + + + +### `descriptionFormat` + +For each directive type, you can specify a custom format in the form of a regular expression. Only description that matches the pattern will be allowed. + +For example, with `{ 'ts-expect-error': { descriptionFormat: '^: TS\\d+ because .+$' } }`: + + + + +{/* prettier-ignore */} +```ts option='{ "ts-expect-error": { "descriptionFormat": "^: TS\\\\d+ because .+$" } }' +// @ts-expect-error: the library definition is wrong +const a = doSomething('hello'); +``` + + + + +{/* prettier-ignore */} +```ts option='{ "ts-expect-error": { "descriptionFormat": "^: TS\\\\d+ because .+$" } }' +// @ts-expect-error: TS1234 because the library definition is wrong +const a = doSomething('hello'); +``` + + + + +### `minimumDescriptionLength` + +Use `minimumDescriptionLength` to set a minimum length for descriptions when using the `allow-with-description` option for a directive. + +For example, with `{ 'ts-expect-error': 'allow-with-description', minimumDescriptionLength: 10 }` the following pattern is: + + + + +```ts option='{ "ts-expect-error": "allow-with-description", "minimumDescriptionLength": 10 }' +if (false) { + // @ts-expect-error: TODO + console.log('hello'); +} +``` + + + + +```ts option='{ "ts-expect-error": "allow-with-description", "minimumDescriptionLength": 10 }' +if (false) { + // @ts-expect-error The rationale for this override is described in issue #1337 on GitLab + console.log('hello'); +} +``` + + + + +## When Not To Use It + +If your project or its dependencies were not architected with strong type safety in mind, it can be difficult to always adhere to proper TypeScript semantics. +You might consider using [ESLint disable comments](https://eslint.org/docs/latest/use/configure/rules#using-configuration-comments-1) for those specific situations instead of completely disabling this rule. + +## Further Reading + +- TypeScript [Type Checking JavaScript Files](https://www.typescriptlang.org/docs/handbook/type-checking-javascript-files.html) diff --git a/node_modules/@typescript-eslint/eslint-plugin/docs/rules/ban-tslint-comment.mdx b/node_modules/@typescript-eslint/eslint-plugin/docs/rules/ban-tslint-comment.mdx new file mode 100644 index 000000000..c6aa3b9bf --- /dev/null +++ b/node_modules/@typescript-eslint/eslint-plugin/docs/rules/ban-tslint-comment.mdx @@ -0,0 +1,45 @@ +--- +description: 'Disallow `// tslint:` comments.' +--- + +import Tabs from '@theme/Tabs'; +import TabItem from '@theme/TabItem'; + +> 🛑 This file is source code, not the primary documentation location! 🛑 +> +> See **https://typescript-eslint.io/rules/ban-tslint-comment** for documentation. + +Useful when migrating from TSLint to ESLint. Once TSLint has been removed, this rule helps locate TSLint annotations (e.g. `// tslint:disable`). + +> See the [TSLint rule flags docs](https://palantir.github.io/tslint/usage/rule-flags) for reference. + +## Examples + + + + +```ts +/* tslint:disable */ +/* tslint:enable */ +/* tslint:disable:rule1 rule2 rule3... */ +/* tslint:enable:rule1 rule2 rule3... */ +// tslint:disable-next-line +someCode(); // tslint:disable-line +// tslint:disable-next-line:rule1 rule2 rule3... +``` + + + + +```ts +// This is a comment that just happens to mention tslint +/* This is a multiline comment that just happens to mention tslint */ +someCode(); // This is a comment that just happens to mention tslint +``` + + + + +## When Not To Use It + +If you are still using TSLint alongside ESLint. diff --git a/node_modules/@typescript-eslint/eslint-plugin/docs/rules/ban-types.mdx b/node_modules/@typescript-eslint/eslint-plugin/docs/rules/ban-types.mdx new file mode 100644 index 000000000..da30f4959 --- /dev/null +++ b/node_modules/@typescript-eslint/eslint-plugin/docs/rules/ban-types.mdx @@ -0,0 +1,138 @@ +--- +description: 'Disallow certain types.' +--- + +import Tabs from '@theme/Tabs'; +import TabItem from '@theme/TabItem'; + +> 🛑 This file is source code, not the primary documentation location! 🛑 +> +> See **https://typescript-eslint.io/rules/ban-types** for documentation. + +Some built-in types have aliases, while some types are considered dangerous or harmful. +It's often a good idea to ban certain types to help with consistency and safety. + +This rule bans specific types and can suggest alternatives. +Note that it does not ban the corresponding runtime objects from being used. + +## Examples + +Examples of code with the default options: + + + + +```ts +// use lower-case primitives for consistency +const str: String = 'foo'; +const bool: Boolean = true; +const num: Number = 1; +const symb: Symbol = Symbol('foo'); +const bigInt: BigInt = 1n; + +// use a proper function type +const func: Function = () => 1; + +// use safer object types +const lowerObj: Object = {}; +const capitalObj: Object = { a: 'string' }; + +const curly1: {} = 1; +const curly2: {} = { a: 'string' }; +``` + + + + +```ts +// use lower-case primitives for consistency +const str: string = 'foo'; +const bool: boolean = true; +const num: number = 1; +const symb: symbol = Symbol('foo'); +const bigInt: bigint = 1n; + +// use a proper function type +const func: () => number = () => 1; + +// use safer object types +const lowerObj: object = {}; +const capitalObj: { a: string } = { a: 'string' }; + +const curly1: number = 1; +const curly2: Record<'a', string> = { a: 'string' }; +``` + + + + +## Options + +The default options provide a set of "best practices", intended to provide safety and standardization in your codebase: + +- Don't use the upper-case primitive types, you should use the lower-case types for consistency. +- Avoid the `Function` type, as it provides little safety for the following reasons: + - It provides no type safety when calling the value, which means it's easy to provide the wrong arguments. + - It accepts class declarations, which will fail when called, as they are called without the `new` keyword. +- Avoid the `Object` and `{}` types, as they mean "any non-nullish value". + - This is a point of confusion for many developers, who think it means "any object type". + - See [this comment for more information](https://github.com/typescript-eslint/typescript-eslint/issues/2063#issuecomment-675156492). + +
                                  +Default Options + +{/* Inject default options */} + +
                                  + +### `types` + +An object whose keys are the types you want to ban, and the values are error messages. + +The type can either be a type name literal (`Foo`), a type name with generic parameter instantiation(s) (`Foo`), the empty object literal (`{}`), or the empty tuple type (`[]`). + +The values can be: + +- A string, which is the error message to be reported; or +- `false` to specifically un-ban this type (useful when you are using `extendDefaults`); or +- An object with the following properties: + - `message: string` - the message to display when the type is matched. + - `fixWith?: string` - a string to replace the banned type with when the fixer is run. If this is omitted, no fix will be done. + - `suggest?: string[]` - a list of suggested replacements for the banned type. + +### `extendDefaults` + +If you're specifying custom `types`, you can set this to `true` to extend the default `types` configuration. This is a convenience option to save you copying across the defaults when adding another type. + +If this is `false`, the rule will _only_ use the types defined in your configuration. + +Example configuration: + +```jsonc +{ + "@typescript-eslint/ban-types": [ + "error", + { + "types": { + // add a custom message to help explain why not to use it + "Foo": "Don't use Foo because it is unsafe", + + // add a custom message, AND tell the plugin how to fix it + "OldAPI": { + "message": "Use NewAPI instead", + "fixWith": "NewAPI", + }, + + // un-ban a type that's banned by default + "{}": false, + }, + "extendDefaults": true, + }, + ], +} +``` + +## When Not To Use It + +If your project is a rare one that intentionally deals with the class equivalents of primitives, it might not be worthwhile to enable the default `ban-types` options. +You might consider using [ESLint disable comments](https://eslint.org/docs/latest/use/configure/rules#using-configuration-comments-1) for those specific situations instead of completely disabling this rule. diff --git a/node_modules/@typescript-eslint/eslint-plugin/docs/rules/block-spacing.mdx b/node_modules/@typescript-eslint/eslint-plugin/docs/rules/block-spacing.mdx new file mode 100644 index 000000000..de933a031 --- /dev/null +++ b/node_modules/@typescript-eslint/eslint-plugin/docs/rules/block-spacing.mdx @@ -0,0 +1,13 @@ +--- +description: 'Disallow or enforce spaces inside of blocks after opening block and before closing block.' +--- + +import Tabs from '@theme/Tabs'; +import TabItem from '@theme/TabItem'; + +> 🛑 This file is source code, not the primary documentation location! 🛑 +> +> See **https://typescript-eslint.io/rules/block-spacing** for documentation. + +This rule extends the base [`eslint/block-spacing`](https://eslint.org/docs/rules/block-spacing) rule. +This version adds support for TypeScript related blocks (interfaces, object type literals and enums). diff --git a/node_modules/@typescript-eslint/eslint-plugin/docs/rules/brace-style.mdx b/node_modules/@typescript-eslint/eslint-plugin/docs/rules/brace-style.mdx new file mode 100644 index 000000000..a1e4cb18f --- /dev/null +++ b/node_modules/@typescript-eslint/eslint-plugin/docs/rules/brace-style.mdx @@ -0,0 +1,13 @@ +--- +description: 'Enforce consistent brace style for blocks.' +--- + +import Tabs from '@theme/Tabs'; +import TabItem from '@theme/TabItem'; + +> 🛑 This file is source code, not the primary documentation location! 🛑 +> +> See **https://typescript-eslint.io/rules/brace-style** for documentation. + +This rule extends the base [`eslint/brace-style`](https://eslint.org/docs/rules/brace-style) rule. +It adds support for `enum`, `interface`, `namespace` and `module` declarations. diff --git a/node_modules/@typescript-eslint/eslint-plugin/docs/rules/class-literal-property-style.mdx b/node_modules/@typescript-eslint/eslint-plugin/docs/rules/class-literal-property-style.mdx new file mode 100644 index 000000000..d980d3b92 --- /dev/null +++ b/node_modules/@typescript-eslint/eslint-plugin/docs/rules/class-literal-property-style.mdx @@ -0,0 +1,112 @@ +--- +description: 'Enforce that literals on classes are exposed in a consistent style.' +--- + +import Tabs from '@theme/Tabs'; +import TabItem from '@theme/TabItem'; + +> 🛑 This file is source code, not the primary documentation location! 🛑 +> +> See **https://typescript-eslint.io/rules/class-literal-property-style** for documentation. + +Some TypeScript applications store literal values on classes using fields with the `readonly` modifier to prevent them from being reassigned. +When writing TypeScript libraries that could be used by JavaScript users, however, it's typically safer to expose these literals using `getter`s, since the `readonly` modifier is enforced at compile type. + +This rule aims to ensure that literals exposed by classes are done so consistently, in one of the two style described above. +By default this rule prefers the `fields` style as it means JS doesn't have to setup & teardown a function closure. + +## Options + +:::note +This rule only checks for constant _literal_ values (string, template string, number, bigint, boolean, regexp, null). It does not check objects or arrays, because a readonly field behaves differently to a getter in those cases. It also does not check functions, as it is a common pattern to use readonly fields with arrow function values as auto-bound methods. +This is because these types can be mutated and carry with them more complex implications about their usage. +::: + +### `"fields"` + +This style checks for any getter methods that return literal values, and requires them to be defined using fields with the `readonly` modifier instead. + +Examples of code with the `fields` style: + + + + +```ts option='"fields"' +class Mx { + public static get myField1() { + return 1; + } + + private get ['myField2']() { + return 'hello world'; + } +} +``` + + + + +```ts option='"fields"' +class Mx { + public readonly myField1 = 1; + + // not a literal + public readonly myField2 = [1, 2, 3]; + + private readonly ['myField3'] = 'hello world'; + + public get myField4() { + return `hello from ${window.location.href}`; + } +} +``` + + + + +### `"getters"` + +This style checks for any `readonly` fields that are assigned literal values, and requires them to be defined as getters instead. +This style pairs well with the [`@typescript-eslint/prefer-readonly`](prefer-readonly.mdx) rule, +as it will identify fields that can be `readonly`, and thus should be made into getters. + +Examples of code with the `getters` style: + + + + +```ts option='"getters"' +class Mx { + readonly myField1 = 1; + readonly myField2 = `hello world`; + private readonly myField3 = 'hello world'; +} +``` + + + + +```ts option='"getters"' +class Mx { + // no readonly modifier + public myField1 = 'hello'; + + // not a literal + public readonly myField2 = [1, 2, 3]; + + public static get myField3() { + return 1; + } + + private get ['myField4']() { + return 'hello world'; + } +} +``` + + + + +## When Not To Use It + +When you have no strong preference, or do not wish to enforce a particular style for how literal values are exposed by your classes. diff --git a/node_modules/@typescript-eslint/eslint-plugin/docs/rules/class-methods-use-this.mdx b/node_modules/@typescript-eslint/eslint-plugin/docs/rules/class-methods-use-this.mdx new file mode 100644 index 000000000..8e580a8b2 --- /dev/null +++ b/node_modules/@typescript-eslint/eslint-plugin/docs/rules/class-methods-use-this.mdx @@ -0,0 +1,102 @@ +--- +description: 'Enforce that class methods utilize `this`.' +--- + +import Tabs from '@theme/Tabs'; +import TabItem from '@theme/TabItem'; + +> 🛑 This file is source code, not the primary documentation location! 🛑 +> +> See **https://typescript-eslint.io/rules/class-methods-use-this** for documentation. + +This rule extends the base [`eslint/class-methods-use-this`](https://eslint.org/docs/rules/class-methods-use-this) rule. +It adds support for ignoring `override` methods or methods on classes that implement an interface. + +## Options + +This rule adds the following options: + +```ts +interface Options extends BaseClassMethodsUseThisOptions { + ignoreOverrideMethods?: boolean; + ignoreClassesThatImplementAnInterface?: boolean | 'public-fields'; +} + +const defaultOptions: Options = { + ...baseClassMethodsUseThisOptions, + ignoreOverrideMethods: false, + ignoreClassesThatImplementAnInterface: false, +}; +``` + +### `ignoreOverrideMethods` + +Makes the rule to ignores any class member explicitly marked with `override`. + +Example of a correct code when `ignoreOverrideMethods` is set to `true`: + +```ts option='{ "ignoreOverrideMethods": true }' showPlaygroundButton +class X { + override method() {} + override property = () => {}; +} +``` + +### `ignoreClassesThatImplementAnInterface` + +Makes the rule ignore class members that are defined within a class that `implements` a type. +If specified, it can be either: + +- `true`: Ignore all classes that implement an interface +- `'public-fields'`: Ignore only the public fields of classes that implement an interface + +It's important to note that this option does not only apply to members defined in the interface as that would require type information. + +#### `true` + +Example of correct code when `ignoreClassesThatImplementAnInterface` is set to `true`: + +```ts option='{ "ignoreClassesThatImplementAnInterface": true }' showPlaygroundButton +class X implements Y { + method() {} + property = () => {}; +} +``` + +#### `'public-fields'` + +Example of incorrect code when `ignoreClassesThatImplementAnInterface` is set to `'public-fields'`: + + + + +```ts option='{ "ignoreClassesThatImplementAnInterface": "public-fields" }' +class X implements Y { + method() {} + property = () => {}; + + private privateMethod() {} + private privateProperty = () => {}; + + protected privateMethod() {} + protected privateProperty = () => {}; +} +``` + + + + +```ts option='{ "ignoreClassesThatImplementAnInterface": "public-fields" }' +class X implements Y { + method() {} + property = () => {}; +} +``` + + + + +## When Not To Use It + +If your project dynamically changes `this` scopes around in a way TypeScript has difficulties modeling, this rule may not be viable to use. +You might consider using [ESLint disable comments](https://eslint.org/docs/latest/use/configure/rules#using-configuration-comments-1) for those specific situations instead of completely disabling this rule. diff --git a/node_modules/@typescript-eslint/eslint-plugin/docs/rules/comma-dangle.mdx b/node_modules/@typescript-eslint/eslint-plugin/docs/rules/comma-dangle.mdx new file mode 100644 index 000000000..fa934f5ee --- /dev/null +++ b/node_modules/@typescript-eslint/eslint-plugin/docs/rules/comma-dangle.mdx @@ -0,0 +1,23 @@ +--- +description: 'Require or disallow trailing commas.' +--- + +import Tabs from '@theme/Tabs'; +import TabItem from '@theme/TabItem'; + +> 🛑 This file is source code, not the primary documentation location! 🛑 +> +> See **https://typescript-eslint.io/rules/comma-dangle** for documentation. + +This rule extends the base [`eslint/comma-dangle`](https://eslint.org/docs/rules/comma-dangle) rule. +It adds support for TypeScript syntax. + +See the [ESLint documentation](https://eslint.org/docs/rules/comma-dangle) for more details on the `comma-dangle` rule. + +## Options + +In addition to the options supported by the `comma-dangle` rule in ESLint core, the rule adds the following options: + +- `"enums"` is for trailing comma in enum. (e.g. `enum Foo = {Bar,}`) +- `"generics"` is for trailing comma in generic. (e.g. `function foo() {}`) +- `"tuples"` is for trailing comma in tuple. (e.g. `type Foo = [string,]`) diff --git a/node_modules/@typescript-eslint/eslint-plugin/docs/rules/comma-spacing.mdx b/node_modules/@typescript-eslint/eslint-plugin/docs/rules/comma-spacing.mdx new file mode 100644 index 000000000..249f8933e --- /dev/null +++ b/node_modules/@typescript-eslint/eslint-plugin/docs/rules/comma-spacing.mdx @@ -0,0 +1,13 @@ +--- +description: 'Enforce consistent spacing before and after commas.' +--- + +import Tabs from '@theme/Tabs'; +import TabItem from '@theme/TabItem'; + +> 🛑 This file is source code, not the primary documentation location! 🛑 +> +> See **https://typescript-eslint.io/rules/comma-spacing** for documentation. + +This rule extends the base [`eslint/comma-spacing`](https://eslint.org/docs/rules/comma-spacing) rule. +It adds support for trailing comma in a types parameters list. diff --git a/node_modules/@typescript-eslint/eslint-plugin/docs/rules/consistent-generic-constructors.mdx b/node_modules/@typescript-eslint/eslint-plugin/docs/rules/consistent-generic-constructors.mdx new file mode 100644 index 000000000..486147a04 --- /dev/null +++ b/node_modules/@typescript-eslint/eslint-plugin/docs/rules/consistent-generic-constructors.mdx @@ -0,0 +1,85 @@ +--- +description: 'Enforce specifying generic type arguments on type annotation or constructor name of a constructor call.' +--- + +import Tabs from '@theme/Tabs'; +import TabItem from '@theme/TabItem'; + +> 🛑 This file is source code, not the primary documentation location! 🛑 +> +> See **https://typescript-eslint.io/rules/consistent-generic-constructors** for documentation. + +When constructing a generic class, you can specify the type arguments on either the left-hand side (as a type annotation) or the right-hand side (as part of the constructor call): + +```ts +// Left-hand side +const map: Map = new Map(); + +// Right-hand side +const map = new Map(); +``` + +This rule ensures that type arguments appear consistently on one side of the declaration. +Keeping to one side consistently improve code readability. + +> The rule never reports when there are type parameters on both sides, or neither sides of the declaration. +> It also doesn't report if the names of the type annotation and the constructor don't match. + +## Options + +- `constructor` _(default)_: type arguments that **only** appear on the type annotation are disallowed. +- `type-annotation`: type arguments that **only** appear on the constructor are disallowed. + +### `constructor` + + + + +```ts option='"constructor"' +const map: Map = new Map(); +const set: Set = new Set(); +``` + + + + +```ts option='"constructor"' +const map = new Map(); +const map: Map = new MyMap(); +const set = new Set(); +const set = new Set(); +const set: Set = new Set(); +``` + + + + +### `type-annotation` + + + + +```ts option='"type-annotation"' +const map = new Map(); +const set = new Set(); +``` + + + + +```ts option='"type-annotation"' +const map: Map = new Map(); +const set: Set = new Set(); +const set = new Set(); +const set: Set = new Set(); +``` + + + + +## When Not To Use It + +You can turn this rule off if you don't want to enforce one kind of generic constructor style over the other. + +However, keep in mind that inconsistent style can harm readability in a project. +We recommend picking a single option for this rule that works best for your project. diff --git a/node_modules/@typescript-eslint/eslint-plugin/docs/rules/consistent-indexed-object-style.mdx b/node_modules/@typescript-eslint/eslint-plugin/docs/rules/consistent-indexed-object-style.mdx new file mode 100644 index 000000000..661b1b317 --- /dev/null +++ b/node_modules/@typescript-eslint/eslint-plugin/docs/rules/consistent-indexed-object-style.mdx @@ -0,0 +1,89 @@ +--- +description: 'Require or disallow the `Record` type.' +--- + +import Tabs from '@theme/Tabs'; +import TabItem from '@theme/TabItem'; + +> 🛑 This file is source code, not the primary documentation location! 🛑 +> +> See **https://typescript-eslint.io/rules/consistent-indexed-object-style** for documentation. + +TypeScript supports defining arbitrary object keys using an index signature. TypeScript also has a builtin type named `Record` to create an empty object defining only an index signature. For example, the following types are equal: + +```ts +interface Foo { + [key: string]: unknown; +} + +type Foo = { + [key: string]: unknown; +}; + +type Foo = Record; +``` + +Keeping to one declaration form consistently improve code readability. + +## Options + +- `"record"` _(default)_: only allow the `Record` type. +- `"index-signature"`: only allow index signatures. + +### `record` + + + + +```ts option='"record"' +interface Foo { + [key: string]: unknown; +} + +type Foo = { + [key: string]: unknown; +}; +``` + + + + +```ts option='"record"' +type Foo = Record; +``` + + + + +### `index-signature` + + + + +```ts option='"index-signature"' +type Foo = Record; +``` + + + + +```ts option='"index-signature"' +interface Foo { + [key: string]: unknown; +} + +type Foo = { + [key: string]: unknown; +}; +``` + + + + +## When Not To Use It + +This rule is purely a stylistic rule for maintaining consistency in your project. +You can turn it off if you don't want to keep a consistent style for indexed object types. + +However, keep in mind that inconsistent style can harm readability in a project. +We recommend picking a single option for this rule that works best for your project. diff --git a/node_modules/@typescript-eslint/eslint-plugin/docs/rules/consistent-return.mdx b/node_modules/@typescript-eslint/eslint-plugin/docs/rules/consistent-return.mdx new file mode 100644 index 000000000..0f56bddba --- /dev/null +++ b/node_modules/@typescript-eslint/eslint-plugin/docs/rules/consistent-return.mdx @@ -0,0 +1,52 @@ +--- +description: 'Require `return` statements to either always or never specify values.' +--- + +import Tabs from '@theme/Tabs'; +import TabItem from '@theme/TabItem'; + +> 🛑 This file is source code, not the primary documentation location! 🛑 +> +> See **https://typescript-eslint.io/rules/consistent-return** for documentation. + +This rule extends the base [`eslint/consistent-return`](https://eslint.org/docs/rules/consistent-return) rule. +This version adds support for functions that return `void` or `Promise`. + +:::danger warning +If possible, it is recommended to use tsconfig's `noImplicitReturns` option rather than this rule. `noImplicitReturns` is powered by TS's type information and control-flow analysis so it has better coverage than this rule. +::: + + + + +```ts +function foo(): undefined {} +function bar(flag: boolean): undefined { + if (flag) return foo(); + return; +} + +async function baz(flag: boolean): Promise { + if (flag) return; + return foo(); +} +``` + + + + +```ts +function foo(): void {} +function bar(flag: boolean): void { + if (flag) return foo(); + return; +} + +async function baz(flag: boolean): Promise { + if (flag) return 42; + return; +} +``` + + + diff --git a/node_modules/@typescript-eslint/eslint-plugin/docs/rules/consistent-type-assertions.mdx b/node_modules/@typescript-eslint/eslint-plugin/docs/rules/consistent-type-assertions.mdx new file mode 100644 index 000000000..225c35e92 --- /dev/null +++ b/node_modules/@typescript-eslint/eslint-plugin/docs/rules/consistent-type-assertions.mdx @@ -0,0 +1,118 @@ +--- +description: 'Enforce consistent usage of type assertions.' +--- + +import Tabs from '@theme/Tabs'; +import TabItem from '@theme/TabItem'; + +> 🛑 This file is source code, not the primary documentation location! 🛑 +> +> See **https://typescript-eslint.io/rules/consistent-type-assertions** for documentation. + +TypeScript provides two syntaxes for "type assertions": + +- Angle brackets: `value` +- As: `value as Type` + +This rule aims to standardize the use of type assertion style across the codebase. +Keeping to one syntax consistently helps with code readability. + +:::note +Type assertions are also commonly referred as "type casting" in TypeScript. +However, that term is technically slightly different to what is understood by type casting in other languages. +Type assertions are a way to say to the TypeScript compiler, _"I know better than you, it's actually this different type!"_. +::: + +[`const` assertions](https://www.typescriptlang.org/docs/handbook/release-notes/typescript-3-4.html#const-assertions) are always allowed by this rule. +Examples of them include `let x = "hello" as const;` and `let x = "hello";`. + +## Options + +### `assertionStyle` + +This option defines the expected assertion style. Valid values for `assertionStyle` are: + +- `as` will enforce that you always use `... as foo`. +- `angle-bracket` will enforce that you always use `...` +- `never` will enforce that you do not do any type assertions. + +Most codebases will want to enforce not using `angle-bracket` style because it conflicts with JSX syntax, and is confusing when paired with generic syntax. + +Some codebases like to go for an extra level of type safety, and ban assertions altogether via the `never` option. + +### `objectLiteralTypeAssertions` + +Always prefer `const x: T = { ... };` to `const x = { ... } as T;` (or similar with angle brackets). The type assertion in the latter case is either unnecessary or will probably hide an error. + +The compiler will warn for excess properties with this syntax, but not missing _required_ fields. For example: `const x: { foo: number } = {};` will fail to compile, but `const x = {} as { foo: number }` will succeed. + +The const assertion `const x = { foo: 1 } as const`, introduced in TypeScript 3.4, is considered beneficial and is ignored by this option. + +Assertions to `any` are also ignored by this option. + +Examples of code for `{ assertionStyle: 'as', objectLiteralTypeAssertions: 'never' }`: + + + + +```ts option='{ "assertionStyle": "as", "objectLiteralTypeAssertions": "never" }' +const x = { foo: 1 } as T; + +function bar() { + return { foo: 1 } as T; +} +``` + + + + +```ts option='{ "assertionStyle": "as", "objectLiteralTypeAssertions": "never" }' +const x: T = { foo: 1 }; +const y = { foo: 1 } as any; +const z = { foo: 1 } as unknown; + +function bar(): T { + return { foo: 1 }; +} +``` + + + + +Examples of code for `{ assertionStyle: 'as', objectLiteralTypeAssertions: 'allow-as-parameter' }`: + + + + +```ts option='{ "assertionStyle": "as", "objectLiteralTypeAssertions": "allow-as-parameter" }' +const x = { foo: 1 } as T; + +function bar() { + return { foo: 1 } as T; +} +``` + + + + +```tsx option='{ "assertionStyle": "as", "objectLiteralTypeAssertions": "allow-as-parameter" }' +const x: T = { foo: 1 }; +const y = { foo: 1 } as any; +const z = { foo: 1 } as unknown; +bar({ foo: 1 } as T); +new Clazz({ foo: 1 } as T); +function bar() { + throw { foo: 1 } as Foo; +} +const foo = ; +``` + + + + +## When Not To Use It + +If you do not want to enforce consistent type assertions. + +However, keep in mind that inconsistent style can harm readability in a project. +We recommend picking a single option for this rule that works best for your project. diff --git a/node_modules/@typescript-eslint/eslint-plugin/docs/rules/consistent-type-definitions.mdx b/node_modules/@typescript-eslint/eslint-plugin/docs/rules/consistent-type-definitions.mdx new file mode 100644 index 000000000..353bd1cf6 --- /dev/null +++ b/node_modules/@typescript-eslint/eslint-plugin/docs/rules/consistent-type-definitions.mdx @@ -0,0 +1,90 @@ +--- +description: 'Enforce type definitions to consistently use either `interface` or `type`.' +--- + +import Tabs from '@theme/Tabs'; +import TabItem from '@theme/TabItem'; + +> 🛑 This file is source code, not the primary documentation location! 🛑 +> +> See **https://typescript-eslint.io/rules/consistent-type-definitions** for documentation. + +TypeScript provides two common ways to define an object type: `interface` and `type`. + +```ts +// type alias +type T1 = { + a: string; + b: number; +}; + +// interface keyword +interface T2 { + a: string; + b: number; +} +``` + +The two are generally very similar, and can often be used interchangeably. +Using the same type declaration style consistently helps with code readability. + +## Options + +- `"interface"` _(default)_: enforce using `interface`s for object type definitions. +- `"type"`: enforce using `type`s for object type definitions. + +### `interface` + + + + +```ts option='"interface"' +type T = { x: number }; +``` + + + + +```ts option='"interface"' +type T = string; +type Foo = string | {}; + +interface T { + x: number; +} +``` + + + + +### `type` + + + + +```ts option='"type"' +interface T { + x: number; +} +``` + + + + +```ts option='"type"' +type T = { x: number }; +``` + + + + +## When Not To Use It + +If you specifically want to use an interface or type literal for stylistic reasons, you can avoid this rule. + +However, keep in mind that inconsistent style can harm readability in a project. +We recommend picking a single option for this rule that works best for your project. + +There are also subtle differences between `Record` and `interface` that can be difficult to catch statically. +For example, if your project is a dependency of another project that relies on a specific type definition style, this rule may be counterproductive. +You might consider using [ESLint disable comments](https://eslint.org/docs/latest/use/configure/rules#using-configuration-comments-1) for those specific situations instead of completely disabling this rule. diff --git a/node_modules/@typescript-eslint/eslint-plugin/docs/rules/consistent-type-exports.mdx b/node_modules/@typescript-eslint/eslint-plugin/docs/rules/consistent-type-exports.mdx new file mode 100644 index 000000000..7c699d109 --- /dev/null +++ b/node_modules/@typescript-eslint/eslint-plugin/docs/rules/consistent-type-exports.mdx @@ -0,0 +1,96 @@ +--- +description: 'Enforce consistent usage of type exports.' +--- + +import Tabs from '@theme/Tabs'; +import TabItem from '@theme/TabItem'; + +> 🛑 This file is source code, not the primary documentation location! 🛑 +> +> See **https://typescript-eslint.io/rules/consistent-type-exports** for documentation. + +TypeScript allows specifying a `type` keyword on exports to indicate that the export exists only in the type system, not at runtime. +This allows transpilers to drop exports without knowing the types of the dependencies. + +> See [Blog > Consistent Type Exports and Imports: Why and How](/blog/consistent-type-imports-and-exports-why-and-how) for more details. + +## Examples + + + + +```ts +interface ButtonProps { + onClick: () => void; +} + +class Button implements ButtonProps { + onClick = () => console.log('button!'); +} + +export { Button, ButtonProps }; +``` + + + + +```ts +interface ButtonProps { + onClick: () => void; +} + +class Button implements ButtonProps { + onClick = () => console.log('button!'); +} + +export { Button }; +export type { ButtonProps }; +``` + + + + +## Options + +### `fixMixedExportsWithInlineTypeSpecifier` + +When this is set to true, the rule will autofix "mixed" export cases using TS 4.5's "inline type specifier". +If you are using a TypeScript version less than 4.5, then you will not be able to use this option. + +For example the following code: + +```ts +const x = 1; +type T = number; + +export { x, T }; +``` + +With `{fixMixedExportsWithInlineTypeSpecifier: true}` will be fixed to: + +```ts +const x = 1; +type T = number; + +export { x, type T }; +``` + +With `{fixMixedExportsWithInlineTypeSpecifier: false}` will be fixed to: + +```ts +const x = 1; +type T = number; + +export type { T }; +export { x }; +``` + +## When Not To Use It + +If you use `--isolatedModules` the compiler would error if a type is not re-exported using `export type`. +This rule may be less useful in those cases. + +If you specifically want to use both export kinds for stylistic reasons, or don't wish to enforce one style over the other, you can avoid this rule. + +However, keep in mind that inconsistent style can harm readability in a project. +We recommend picking a single option for this rule that works best for your project. diff --git a/node_modules/@typescript-eslint/eslint-plugin/docs/rules/consistent-type-imports.mdx b/node_modules/@typescript-eslint/eslint-plugin/docs/rules/consistent-type-imports.mdx new file mode 100644 index 000000000..8df00017e --- /dev/null +++ b/node_modules/@typescript-eslint/eslint-plugin/docs/rules/consistent-type-imports.mdx @@ -0,0 +1,136 @@ +--- +description: 'Enforce consistent usage of type imports.' +--- + +import Tabs from '@theme/Tabs'; +import TabItem from '@theme/TabItem'; + +> 🛑 This file is source code, not the primary documentation location! 🛑 +> +> See **https://typescript-eslint.io/rules/consistent-type-imports** for documentation. + +TypeScript allows specifying a `type` keyword on imports to indicate that the export exists only in the type system, not at runtime. +This allows transpilers to drop imports without knowing the types of the dependencies. + +> See [Blog > Consistent Type Exports and Imports: Why and How](/blog/consistent-type-imports-and-exports-why-and-how) for more details. + +## Options + +### `prefer` + +This option defines the expected import kind for type-only imports. Valid values for `prefer` are: + +- `type-imports` will enforce that you always use `import type Foo from '...'` except referenced by metadata of decorators. It is the default. +- `no-type-imports` will enforce that you always use `import Foo from '...'`. + +Examples of **correct** code with `{prefer: 'type-imports'}`, and **incorrect** code with `{prefer: 'no-type-imports'}`. + +```ts option='{ "prefer": "type-imports" }' showPlaygroundButton +import type { Foo } from 'Foo'; +import type Bar from 'Bar'; +type T = Foo; +const x: Bar = 1; +``` + +Examples of **incorrect** code with `{prefer: 'type-imports'}`, and **correct** code with `{prefer: 'no-type-imports'}`. + +```ts option='{ "prefer": "type-imports" }' showPlaygroundButton +import { Foo } from 'Foo'; +import Bar from 'Bar'; +type T = Foo; +const x: Bar = 1; +``` + +### `fixStyle` + +This option defines the expected type modifier to be added when an import is detected as used only in the type position. Valid values for `fixStyle` are: + +- `separate-type-imports` will add the type keyword after the import keyword `import type { A } from '...'`. It is the default. +- `inline-type-imports` will inline the type keyword `import { type A } from '...'` and is only available in TypeScript 4.5 and onwards. See [documentation here](https://www.typescriptlang.org/docs/handbook/release-notes/typescript-4-5.html#type-modifiers-on-import-names 'TypeScript 4.5 documentation on type modifiers and import names'). + + + + +```ts +import { Foo } from 'Foo'; +import Bar from 'Bar'; +type T = Foo; +const x: Bar = 1; +``` + + + + +```ts option='{ "fixStyle": "separate-type-imports" }' +import type { Foo } from 'Foo'; +import type Bar from 'Bar'; +type T = Foo; +const x: Bar = 1; +``` + + + + +```ts option='{ "fixStyle": "inline-type-imports" }' +import { type Foo } from 'Foo'; +import type Bar from 'Bar'; +type T = Foo; +const x: Bar = 1; +``` + + + + +### `disallowTypeAnnotations` + +If `true`, type imports in type annotations (`import()`) are not allowed. +Default is `true`. + +Examples of **incorrect** code with `{disallowTypeAnnotations: true}`: + +```ts option='{ "disallowTypeAnnotations": true }' showPlaygroundButton +type T = import('Foo').Foo; +const x: import('Bar') = 1; +``` + +## Caveat: `@decorators` + `experimentalDecorators: true` + `emitDecoratorMetadata: true` + +:::note +If you are using `experimentalDecorators: false` (eg [TypeScript v5.0's stable decorators](https://www.typescriptlang.org/docs/handbook/release-notes/typescript-5-0.html#decorators)) then the rule will always report errors as expected. +This caveat **only** applies to `experimentalDecorators: true` +::: + +The rule will **_not_** report any errors in files _that contain decorators_ when **both** `experimentalDecorators` and `emitDecoratorMetadata` are turned on. + +> See [Blog > Changes to consistent-type-imports when used with legacy decorators and decorator metadata](/blog/changes-to-consistent-type-imports-with-decorators) for more details. + +If you are using [type-aware linting](https://typescript-eslint.io/linting/typed-linting) then we will automatically infer your setup from your tsconfig and you should not need to configure anything. +Otherwise you can explicitly tell our tooling to analyze your code as if the compiler option was turned on by setting both [`parserOptions.emitDecoratorMetadata = true`](https://typescript-eslint.io/packages/parser/#emitdecoratormetadata) and [`parserOptions.experimentalDecorators = true`](https://typescript-eslint.io/packages/parser/#experimentaldecorators). + +## Comparison with `importsNotUsedAsValues` / `verbatimModuleSyntax` + +[`verbatimModuleSyntax`](https://www.typescriptlang.org/tsconfig#verbatimModuleSyntax) was introduced in TypeScript v5.0 (as a replacement for `importsNotUsedAsValues`). +This rule and `verbatimModuleSyntax` _mostly_ behave in the same way. +There are a few behavior differences: +| Situation | `consistent-type-imports` (ESLint) | `verbatimModuleSyntax` (TypeScript) | +| -------------------------------------------------------------- | --------------------------------------------------------- | ----------------------------------------------------------- | +| Unused imports | Ignored (consider using [`@typescript-eslint/no-unused-vars`](/rules/no-unused-vars)) | Type error | +| Usage with `emitDecoratorMetadata` & `experimentalDecorations` | Ignores files that contain decorators | Reports on files that contain decorators | +| Failures detected | Does not fail `tsc` build; can be auto-fixed with `--fix` | Fails `tsc` build; cannot be auto-fixed on the command-line | +| `import { type T } from 'T';` | TypeScript will emit nothing (it "elides" the import) | TypeScript emits `import {} from 'T'` | + +Because there are some differences, using both this rule and `verbatimModuleSyntax` at the same time can lead to conflicting errors. +As such we recommend that you only ever use one _or_ the other -- never both. + +## When Not To Use It + +If you specifically want to use both import kinds for stylistic reasons, or don't wish to enforce one style over the other, you can avoid this rule. + +However, keep in mind that inconsistent style can harm readability in a project. +We recommend picking a single option for this rule that works best for your project. + +## Related To + +- [`no-import-type-side-effects`](./no-import-type-side-effects.mdx) +- [`import/consistent-type-specifier-style`](https://github.com/import-js/eslint-plugin-import/blob/main/docs/rules/consistent-type-specifier-style.md) +- [`import/no-duplicates` with `{"prefer-inline": true}`](https://github.com/import-js/eslint-plugin-import/blob/main/docs/rules/no-duplicates.md#inline-type-imports) diff --git a/node_modules/@typescript-eslint/eslint-plugin/docs/rules/default-param-last.mdx b/node_modules/@typescript-eslint/eslint-plugin/docs/rules/default-param-last.mdx new file mode 100644 index 000000000..38527abf7 --- /dev/null +++ b/node_modules/@typescript-eslint/eslint-plugin/docs/rules/default-param-last.mdx @@ -0,0 +1,60 @@ +--- +description: 'Enforce default parameters to be last.' +--- + +import Tabs from '@theme/Tabs'; +import TabItem from '@theme/TabItem'; + +> 🛑 This file is source code, not the primary documentation location! 🛑 +> +> See **https://typescript-eslint.io/rules/default-param-last** for documentation. + +This rule extends the base [`eslint/default-param-last`](https://eslint.org/docs/rules/default-param-last) rule. +It adds support for optional parameters. + + + + +```ts +function f(a = 0, b: number) {} +function f(a: number, b = 0, c: number) {} +function f(a: number, b?: number, c: number) {} +class Foo { + constructor( + public a = 10, + private b: number, + ) {} +} +class Foo { + constructor( + public a?: number, + private b: number, + ) {} +} +``` + + + + +```ts +function f(a = 0) {} +function f(a: number, b = 0) {} +function f(a: number, b?: number) {} +function f(a: number, b?: number, c = 0) {} +function f(a: number, b = 0, c?: number) {} +class Foo { + constructor( + public a, + private b = 0, + ) {} +} +class Foo { + constructor( + public a, + private b?: number, + ) {} +} +``` + + + diff --git a/node_modules/@typescript-eslint/eslint-plugin/docs/rules/dot-notation.mdx b/node_modules/@typescript-eslint/eslint-plugin/docs/rules/dot-notation.mdx new file mode 100644 index 000000000..ba23d98b3 --- /dev/null +++ b/node_modules/@typescript-eslint/eslint-plugin/docs/rules/dot-notation.mdx @@ -0,0 +1,85 @@ +--- +description: 'Enforce dot notation whenever possible.' +--- + +import Tabs from '@theme/Tabs'; +import TabItem from '@theme/TabItem'; + +> 🛑 This file is source code, not the primary documentation location! 🛑 +> +> See **https://typescript-eslint.io/rules/dot-notation** for documentation. + +This rule extends the base [`eslint/dot-notation`](https://eslint.org/docs/rules/dot-notation) rule. +It adds: + +- Support for optionally ignoring computed `private` and/or `protected` member access. +- Compatibility with TypeScript's `noPropertyAccessFromIndexSignature` option. + +## Options + +This rule adds the following options: + +```ts +interface Options extends BaseDotNotationOptions { + allowPrivateClassPropertyAccess?: boolean; + allowProtectedClassPropertyAccess?: boolean; + allowIndexSignaturePropertyAccess?: boolean; +} + +const defaultOptions: Options = { + ...baseDotNotationDefaultOptions, + allowPrivateClassPropertyAccess: false, + allowProtectedClassPropertyAccess: false, + allowIndexSignaturePropertyAccess: false, +}; +``` + +If the TypeScript compiler option `noPropertyAccessFromIndexSignature` is set to `true`, then this rule always allows the use of square bracket notation to access properties of types that have a `string` index signature, even if `allowIndexSignaturePropertyAccess` is `false`. + +### `allowPrivateClassPropertyAccess` + +Example of a correct code when `allowPrivateClassPropertyAccess` is set to `true`: + +```ts option='{ "allowPrivateClassPropertyAccess": true }' showPlaygroundButton +class X { + private priv_prop = 123; +} + +const x = new X(); +x['priv_prop'] = 123; +``` + +### `allowProtectedClassPropertyAccess` + +Example of a correct code when `allowProtectedClassPropertyAccess` is set to `true`: + +```ts option='{ "allowProtectedClassPropertyAccess": true }' showPlaygroundButton +class X { + protected protected_prop = 123; +} + +const x = new X(); +x['protected_prop'] = 123; +``` + +### `allowIndexSignaturePropertyAccess` + +Example of correct code when `allowIndexSignaturePropertyAccess` is set to `true`: + +```ts option='{ "allowIndexSignaturePropertyAccess": true }' showPlaygroundButton +class X { + [key: string]: number; +} + +const x = new X(); +x['hello'] = 123; +``` + +If the TypeScript compiler option `noPropertyAccessFromIndexSignature` is set to `true`, then the above code is always allowed, even if `allowIndexSignaturePropertyAccess` is `false`. + +## When Not To Use It + +If you specifically want to use both member access kinds for stylistic reasons, or don't wish to enforce one style over the other, you can avoid this rule. + +However, keep in mind that inconsistent style can harm readability in a project. +We recommend picking a single option for this rule that works best for your project. diff --git a/node_modules/@typescript-eslint/eslint-plugin/docs/rules/explicit-function-return-type.mdx b/node_modules/@typescript-eslint/eslint-plugin/docs/rules/explicit-function-return-type.mdx new file mode 100644 index 000000000..f664314cd --- /dev/null +++ b/node_modules/@typescript-eslint/eslint-plugin/docs/rules/explicit-function-return-type.mdx @@ -0,0 +1,347 @@ +--- +description: 'Require explicit return types on functions and class methods.' +--- + +import Tabs from '@theme/Tabs'; +import TabItem from '@theme/TabItem'; + +> 🛑 This file is source code, not the primary documentation location! 🛑 +> +> See **https://typescript-eslint.io/rules/explicit-function-return-type** for documentation. + +Functions in TypeScript often don't need to be given an explicit return type annotation. +Leaving off the return type is less code to read or write and allows the compiler to infer it from the contents of the function. + +However, explicit return types do make it visually more clear what type is returned by a function. +They can also speed up TypeScript type checking performance in large codebases with many large functions. + +This rule enforces that functions do have an explicit return type annotation. + +## Examples + + + + +```ts +// Should indicate that no value is returned (void) +function test() { + return; +} + +// Should indicate that a number is returned +var fn = function () { + return 1; +}; + +// Should indicate that a string is returned +var arrowFn = () => 'test'; + +class Test { + // Should indicate that no value is returned (void) + method() { + return; + } +} +``` + + + + +```ts +// No return value should be expected (void) +function test(): void { + return; +} + +// A return value of type number +var fn = function (): number { + return 1; +}; + +// A return value of type string +var arrowFn = (): string => 'test'; + +class Test { + // No return value should be expected (void) + method(): void { + return; + } +} +``` + + + + +## Options + +### Configuring in a mixed JS/TS codebase + +If you are working on a codebase within which you lint non-TypeScript code (i.e. `.js`/`.mjs`/`.cjs`/`.jsx`), you should ensure that you should use [ESLint `overrides`](https://eslint.org/docs/user-guide/configuring#disabling-rules-only-for-a-group-of-files) to only enable the rule on `.ts`/`.mts`/`.cts`/`.tsx` files. If you don't, then you will get unfixable lint errors reported within `.js`/`.mjs`/`.cjs`/`.jsx` files. + +```jsonc +{ + "rules": { + // disable the rule for all files + "@typescript-eslint/explicit-function-return-type": "off", + }, + "overrides": [ + { + // enable the rule specifically for TypeScript files + "files": ["*.ts", "*.mts", "*.cts", "*.tsx"], + "rules": { + "@typescript-eslint/explicit-function-return-type": "error", + }, + }, + ], +} +``` + +### `allowExpressions` + +Examples of code for this rule with `{ allowExpressions: true }`: + + + + +```ts option='{ "allowExpressions": true }' +function test() {} + +const fn = () => {}; + +export default () => {}; +``` + + + + +```ts option='{ "allowExpressions": true }' +node.addEventListener('click', () => {}); + +node.addEventListener('click', function () {}); + +const foo = arr.map(i => i * i); +``` + + + + +### `allowTypedFunctionExpressions` + +Examples of code for this rule with `{ allowTypedFunctionExpressions: true }`: + + + + +```ts option='{ "allowTypedFunctionExpressions": true }' +let arrowFn = () => 'test'; + +let funcExpr = function () { + return 'test'; +}; + +let objectProp = { + foo: () => 1, +}; +``` + + + + +```ts option='{ "allowTypedFunctionExpressions": true }' +type FuncType = () => string; + +let arrowFn: FuncType = () => 'test'; + +let funcExpr: FuncType = function () { + return 'test'; +}; + +let asTyped = (() => '') as () => string; +let castTyped = <() => string>(() => ''); + +interface ObjectType { + foo(): number; +} +let objectProp: ObjectType = { + foo: () => 1, +}; +let objectPropAs = { + foo: () => 1, +} as ObjectType; +let objectPropCast = { + foo: () => 1, +}; + +declare function functionWithArg(arg: () => number); +functionWithArg(() => 1); + +declare function functionWithObjectArg(arg: { method: () => number }); +functionWithObjectArg({ + method() { + return 1; + }, +}); +``` + + + + +### `allowHigherOrderFunctions` + +Examples of code for this rule with `{ allowHigherOrderFunctions: true }`: + + + + +```ts option='{ "allowHigherOrderFunctions": true }' +var arrowFn = () => () => {}; + +function fn() { + return function () {}; +} +``` + + + + +```ts option='{ "allowHigherOrderFunctions": true }' +var arrowFn = () => (): void => {}; + +function fn() { + return function (): void {}; +} +``` + + + + +### `allowDirectConstAssertionInArrowFunctions` + +Examples of code for this rule with `{ allowDirectConstAssertionInArrowFunctions: true }`: + + + + +```ts option='{ "allowDirectConstAssertionInArrowFunctions": true }' +const func = (value: number) => ({ type: 'X', value }) as any; +const func = (value: number) => ({ type: 'X', value }) as Action; +``` + + + + +```ts option='{ "allowDirectConstAssertionInArrowFunctions": true }' +const func = (value: number) => ({ foo: 'bar', value }) as const; +const func = () => x as const; +``` + + + + +### `allowConciseArrowFunctionExpressionsStartingWithVoid` + +Examples of code for this rule with `{ allowConciseArrowFunctionExpressionsStartingWithVoid: true }`: + + + + +```ts option='{ "allowConciseArrowFunctionExpressionsStartingWithVoid": true }' +var join = (a: string, b: string) => `${a}${b}`; + +const log = (message: string) => { + console.log(message); +}; +``` + + + + +```ts option='{ "allowConciseArrowFunctionExpressionsStartingWithVoid": true }' +var log = (message: string) => void console.log(message); +``` + + + + +### `allowFunctionsWithoutTypeParameters` + +Examples of code for this rule with `{ allowFunctionsWithoutTypeParameters: true }`: + + + + +```ts option='{ "allowFunctionsWithoutTypeParameters": true }' +function foo(t: T) { + return t; +} + +const bar = (t: T) => t; +``` + + + + +```ts option='{ "allowFunctionsWithoutTypeParameters": true }' +function foo(t: T): T { + return t; +} + +const bar = (t: T): T => t; + +function allowedFunction(x: string) { + return x; +} + +const allowedArrow = (x: string) => x; +``` + + + + +### `allowedNames` + +You may pass function/method names you would like this rule to ignore, like so: + +```json +{ + "@typescript-eslint/explicit-function-return-type": [ + "error", + { + "allowedNames": ["ignoredFunctionName", "ignoredMethodName"] + } + ] +} +``` + +### `allowIIFEs` + +Examples of code for this rule with `{ allowIIFEs: true }`: + + + + +```ts option='{ "allowIIFEs": true }' +var func = () => 'foo'; +``` + + + + +```ts option='{ "allowIIFEs": true }' +var foo = (() => 'foo')(); + +var bar = (function () { + return 'bar'; +})(); +``` + + + + +## When Not To Use It + +If you don't find the added cost of explicitly writing function return types to be worth the visual clarity, or your project is not large enough for it to be a factor in type checking performance, then you will not need this rule. + +## Further Reading + +- TypeScript [Functions](https://www.typescriptlang.org/docs/handbook/functions.html#function-types) diff --git a/node_modules/@typescript-eslint/eslint-plugin/docs/rules/explicit-member-accessibility.mdx b/node_modules/@typescript-eslint/eslint-plugin/docs/rules/explicit-member-accessibility.mdx new file mode 100644 index 000000000..59eaa315a --- /dev/null +++ b/node_modules/@typescript-eslint/eslint-plugin/docs/rules/explicit-member-accessibility.mdx @@ -0,0 +1,347 @@ +--- +description: 'Require explicit accessibility modifiers on class properties and methods.' +--- + +import Tabs from '@theme/Tabs'; +import TabItem from '@theme/TabItem'; + +> 🛑 This file is source code, not the primary documentation location! 🛑 +> +> See **https://typescript-eslint.io/rules/explicit-member-accessibility** for documentation. + +TypeScript allows placing explicit `public`, `protected`, and `private` accessibility modifiers in front of class members. +The modifiers exist solely in the type system and just serve to describe who is allowed to access those members. + +Leaving off accessibility modifiers makes for less code to read and write. +Members are `public` by default. + +However, adding in explicit accessibility modifiers can be helpful in codebases with many classes for enforcing proper privacy of members. +Some developers also find it preferable for code readability to keep member publicity explicit. + +## Examples + +This rule aims to make code more readable and explicit about who can use +which properties. + +## Options + +### Configuring in a mixed JS/TS codebase + +If you are working on a codebase within which you lint non-TypeScript code (i.e. `.js`/`.mjs`/`.cjs`/`.jsx`), you should ensure that you should use [ESLint `overrides`](https://eslint.org/docs/user-guide/configuring#disabling-rules-only-for-a-group-of-files) to only enable the rule on `.ts`/`.mts`/`.cts`/`.tsx` files. If you don't, then you will get unfixable lint errors reported within `.js`/`.mjs`/`.cjs`/`.jsx` files. + +```jsonc +{ + "rules": { + // disable the rule for all files + "@typescript-eslint/explicit-member-accessibility": "off", + }, + "overrides": [ + { + // enable the rule specifically for TypeScript files + "files": ["*.ts", "*.mts", "*.cts", "*.tsx"], + "rules": { + "@typescript-eslint/explicit-member-accessibility": "error", + }, + }, + ], +} +``` + +### `accessibility` + +This rule in its default state requires no configuration and will enforce that every class member has an accessibility modifier. If you would like to allow for some implicit public members then you have the following options: + +```jsonc +{ + "accessibility": "explicit", + "overrides": { + "accessors": "explicit", + "constructors": "no-public", + "methods": "explicit", + "properties": "off", + "parameterProperties": "explicit", + }, +} +``` + +Note the above is an example of a possible configuration you could use - it is not the default configuration. + +The following patterns are considered incorrect code if no options are provided: + +```ts showPlaygroundButton +class Animal { + constructor(name) { + // No accessibility modifier + this.animalName = name; + } + animalName: string; // No accessibility modifier + get name(): string { + // No accessibility modifier + return this.animalName; + } + set name(value: string) { + // No accessibility modifier + this.animalName = value; + } + walk() { + // method + } +} +``` + +The following patterns are considered correct with the default options `{ accessibility: 'explicit' }`: + +```ts option='{ "accessibility": "explicit" }' showPlaygroundButton +class Animal { + public constructor( + public breed, + name, + ) { + // Parameter property and constructor + this.animalName = name; + } + private animalName: string; // Property + get name(): string { + // get accessor + return this.animalName; + } + set name(value: string) { + // set accessor + this.animalName = value; + } + public walk() { + // method + } +} +``` + +The following patterns are considered incorrect with the accessibility set to **no-public** `[{ accessibility: 'no-public' }]`: + +```ts option='{ "accessibility": "no-public" }' showPlaygroundButton +class Animal { + public constructor( + public breed, + name, + ) { + // Parameter property and constructor + this.animalName = name; + } + public animalName: string; // Property + public get name(): string { + // get accessor + return this.animalName; + } + public set name(value: string) { + // set accessor + this.animalName = value; + } + public walk() { + // method + } +} +``` + +The following patterns are considered correct with the accessibility set to **no-public** `[{ accessibility: 'no-public' }]`: + +```ts option='{ "accessibility": "no-public" }' showPlaygroundButton +class Animal { + constructor( + protected breed, + name, + ) { + // Parameter property and constructor + this.name = name; + } + private animalName: string; // Property + get name(): string { + // get accessor + return this.animalName; + } + private set name(value: string) { + // set accessor + this.animalName = value; + } + protected walk() { + // method + } +} +``` + +### `overrides` + +There are three ways in which an override can be used. + +- To disallow the use of public on a given member. +- To enforce explicit member accessibility when the root has allowed implicit public accessibility +- To disable any checks on given member type + +#### Disallow the use of public on a given member + +e.g. `[ { overrides: { constructors: 'no-public' } } ]` + +The following patterns are considered incorrect with the example override + +```ts option='{ "overrides": { "constructors": "no-public" } }' showPlaygroundButton +class Animal { + public constructor(protected animalName) {} + public get name() { + return this.animalName; + } +} +``` + +The following patterns are considered correct with the example override + +```ts option='{ "overrides": { "constructors": "no-public" } }' showPlaygroundButton +class Animal { + constructor(protected animalName) {} + public get name() { + return this.animalName; + } +} +``` + +#### Require explicit accessibility for a given member + +e.g. `[ { accessibility: 'no-public', overrides: { properties: 'explicit' } } ]` + +The following patterns are considered incorrect with the example override + +```ts option='{ "accessibility": "no-public", "overrides": { "properties": "explicit" } }' showPlaygroundButton +class Animal { + constructor(protected animalName) {} + get name() { + return this.animalName; + } + protected set name(value: string) { + this.animalName = value; + } + legs: number; + private hasFleas: boolean; +} +``` + +The following patterns are considered correct with the example override + +```ts option='{ "accessibility": "no-public", "overrides": { "properties": "explicit" } }' showPlaygroundButton +class Animal { + constructor(protected animalName) {} + get name() { + return this.animalName; + } + protected set name(value: string) { + this.animalName = value; + } + public legs: number; + private hasFleas: boolean; +} +``` + +e.g. `[ { accessibility: 'off', overrides: { parameterProperties: 'explicit' } } ]` + +The following code is considered incorrect with the example override + +```ts option='{ "accessibility": "off", "overrides": { "parameterProperties": "explicit" } }' showPlaygroundButton +class Animal { + constructor(readonly animalName: string) {} +} +``` + +The following code patterns are considered correct with the example override + +```ts option='{ "accessibility": "off", "overrides": { "parameterProperties": "explicit" } }' showPlaygroundButton +class Animal { + constructor(public readonly animalName: string) {} +} + +class Animal { + constructor(public animalName: string) {} +} + +class Animal { + constructor(animalName: string) {} +} +``` + +e.g. `[ { accessibility: 'off', overrides: { parameterProperties: 'no-public' } } ]` + +The following code is considered incorrect with the example override + +```ts option='{ "accessibility": "off", "overrides": { "parameterProperties": "no-public" } }' showPlaygroundButton +class Animal { + constructor(public readonly animalName: string) {} +} +``` + +The following code is considered correct with the example override + +```ts option='{ "accessibility": "off", "overrides": { "parameterProperties": "no-public" } }' showPlaygroundButton +class Animal { + constructor(public animalName: string) {} +} +``` + +#### Disable any checks on given member type + +e.g. `[{ overrides: { accessors : 'off' } } ]` + +As no checks on the overridden member type are performed all permutations of visibility are permitted for that member type + +The follow pattern is considered incorrect for the given configuration + +```ts option='{ "overrides": { "accessors" : "off" } }' showPlaygroundButton +class Animal { + constructor(protected animalName) {} + public get name() { + return this.animalName; + } + get legs() { + return this.legCount; + } +} +``` + +The following patterns are considered correct with the example override + +```ts option='{ "overrides": { "accessors" : "off" } }' showPlaygroundButton +class Animal { + public constructor(protected animalName) {} + public get name() { + return this.animalName; + } + get legs() { + return this.legCount; + } +} +``` + +### `ignoredMethodNames` + +If you want to ignore some specific methods, you can do it by specifying method names. Note that this option does not care for the context, and will ignore every method with these names, which could lead to it missing some cases. You should use this sparingly. +e.g. `[ { ignoredMethodNames: ['specificMethod', 'whateverMethod'] } ]` + +```ts option='{ "ignoredMethodNames": ["specificMethod", "whateverMethod"] }' showPlaygroundButton +class Animal { + get specificMethod() { + console.log('No error because you specified this method on option'); + } + get whateverMethod() { + console.log('No error because you specified this method on option'); + } + public get otherMethod() { + console.log('This method comply with this rule'); + } +} +``` + +## When Not To Use It + +If you think defaulting to public is a good default, then you should consider using the `no-public` setting. +If you want to mix implicit and explicit public members then you can disable this rule. + +However, keep in mind that inconsistent style can harm readability in a project. +We recommend picking a single option for this rule that works best for your project. + +## Further Reading + +- TypeScript [Accessibility Modifiers Handbook Docs](https://www.typescriptlang.org/docs/handbook/2/classes.html#member-visibility) diff --git a/node_modules/@typescript-eslint/eslint-plugin/docs/rules/explicit-module-boundary-types.mdx b/node_modules/@typescript-eslint/eslint-plugin/docs/rules/explicit-module-boundary-types.mdx new file mode 100644 index 000000000..7a19ab87c --- /dev/null +++ b/node_modules/@typescript-eslint/eslint-plugin/docs/rules/explicit-module-boundary-types.mdx @@ -0,0 +1,267 @@ +--- +description: "Require explicit return and argument types on exported functions' and classes' public class methods." +--- + +import Tabs from '@theme/Tabs'; +import TabItem from '@theme/TabItem'; + +> 🛑 This file is source code, not the primary documentation location! 🛑 +> +> See **https://typescript-eslint.io/rules/explicit-module-boundary-types** for documentation. + +Explicit types for function return values and arguments makes it clear to any calling code what is the module boundary's input and output. +Adding explicit type annotations for those types can help improve code readability. +It can also improve TypeScript type checking performance on larger codebases. + +## Examples + + + + +```ts +// Should indicate that no value is returned (void) +export function test() { + return; +} + +// Should indicate that a string is returned +export var arrowFn = () => 'test'; + +// All arguments should be typed +export var arrowFn = (arg): string => `test ${arg}`; +export var arrowFn = (arg: any): string => `test ${arg}`; + +export class Test { + // Should indicate that no value is returned (void) + method() { + return; + } +} +``` + + + + +```ts +// A function with no return value (void) +export function test(): void { + return; +} + +// A return value of type string +export var arrowFn = (): string => 'test'; + +// All arguments should be typed +export var arrowFn = (arg: string): string => `test ${arg}`; +export var arrowFn = (arg: unknown): string => `test ${arg}`; + +export class Test { + // A class method with no return value (void) + method(): void { + return; + } +} + +// The function does not apply because it is not an exported function. +function test() { + return; +} +``` + + + + +## Options + +### Configuring in a mixed JS/TS codebase + +If you are working on a codebase within which you lint non-TypeScript code (i.e. `.js`/`.mjs`/`.cjs`/`.jsx`), you should ensure that you should use [ESLint `overrides`](https://eslint.org/docs/user-guide/configuring#disabling-rules-only-for-a-group-of-files) to only enable the rule on `.ts`/`.mts`/`.cts`/`.tsx` files. If you don't, then you will get unfixable lint errors reported within `.js`/`.mjs`/`.cjs`/`.jsx` files. + +```jsonc +{ + "rules": { + // disable the rule for all files + "@typescript-eslint/explicit-module-boundary-types": "off", + }, + "overrides": [ + { + // enable the rule specifically for TypeScript files + "files": ["*.ts", "*.mts", "*.cts", "*.tsx"], + "rules": { + "@typescript-eslint/explicit-module-boundary-types": "error", + }, + }, + ], +} +``` + +### `allowArgumentsExplicitlyTypedAsAny` + +When this option is `true`, the rule ignores arguments that are explicitly typed as any. + + + + +```ts option='{ "allowArgumentsExplicitlyTypedAsAny": false }' +export const func = (value: any): number => value + 1; +``` + + + + +```ts option='{ "allowArgumentsExplicitlyTypedAsAny": true }' +export const func = (value: any): number => value + 1; +``` + + + + +### `allowDirectConstAssertionInArrowFunctions` + +When this option is `true`, the rule ignores return type annotations on body-less arrow functions that return an `as const` type assertion. + + + + +```ts option='{ "allowDirectConstAssertionInArrowFunctions": false }' +export const func = (value: number) => ({ type: 'X', value }); +export const foo = () => ({ + bar: true, +}); +export const bar = () => 1; +``` + + + + +```ts option='{ "allowDirectConstAssertionInArrowFunctions": true }' +export const func = (value: number) => ({ type: 'X', value }) as const; +export const foo = () => + ({ + bar: true, + }) as const; +export const bar = () => 1 as const; +``` + + + + +### `allowedNames` + +You may pass function/method names you would like this rule to ignore, like so: + +```json +{ + "@typescript-eslint/explicit-module-boundary-types": [ + "error", + { + "allowedNames": ["ignoredFunctionName", "ignoredMethodName"] + } + ] +} +``` + +### `allowHigherOrderFunctions` + +When this option is `true`, the rule ignores return type annotations on function, which is immediately returning another function expression. + + + + +```ts option='{ "allowHigherOrderFunctions": false }' +export const arrowFn = () => () => {}; + +export function fn() { + return function () {}; +} + +export function foo(outer: string) { + return function (inner: string) {}; +} +``` + + + + +```ts option='{ "allowHigherOrderFunctions": true }' +export const arrowFn = () => (): void => {}; + +export function fn() { + return function (): void {}; +} + +export function foo(outer: string) { + return function (inner: string): void {}; +} +``` + + + + +### `allowTypedFunctionExpressions` + +When this option is `true`, the rule ignores type annotations on the variable of a function expression. + + + + +```ts option='{ "allowTypedFunctionExpressions": false }' +export let arrowFn = () => 'test'; + +export let funcExpr = function () { + return 'test'; +}; + +export let objectProp = { + foo: () => 1, +}; + +export const foo = bar => {}; +``` + + + + +```ts option='{ "allowTypedFunctionExpressions": true }' +type FuncType = () => string; + +export let arrowFn: FuncType = () => 'test'; + +export let funcExpr: FuncType = function () { + return 'test'; +}; + +export let asTyped = (() => '') as () => string; +export let castTyped = <() => string>(() => ''); + +interface ObjectType { + foo(): number; +} +export let objectProp: ObjectType = { + foo: () => 1, +}; +export let objectPropAs = { + foo: () => 1, +} as ObjectType; +export let objectPropCast = { + foo: () => 1, +}; + +type FooType = (bar: string) => void; +export const foo: FooType = bar => {}; +``` + + + + +## When Not To Use It + +If your project is not used by downstream consumers that are sensitive to API types, you can disable this rule. + +## Further Reading + +- TypeScript [Functions](https://www.typescriptlang.org/docs/handbook/functions.html#function-types) + +## Related To + +- [explicit-function-return-type](./explicit-function-return-type.mdx) diff --git a/node_modules/@typescript-eslint/eslint-plugin/docs/rules/func-call-spacing.mdx b/node_modules/@typescript-eslint/eslint-plugin/docs/rules/func-call-spacing.mdx new file mode 100644 index 000000000..defc8d976 --- /dev/null +++ b/node_modules/@typescript-eslint/eslint-plugin/docs/rules/func-call-spacing.mdx @@ -0,0 +1,13 @@ +--- +description: 'Require or disallow spacing between function identifiers and their invocations.' +--- + +import Tabs from '@theme/Tabs'; +import TabItem from '@theme/TabItem'; + +> 🛑 This file is source code, not the primary documentation location! 🛑 +> +> See **https://typescript-eslint.io/rules/func-call-spacing** for documentation. + +This rule extends the base [`eslint/func-call-spacing`](https://eslint.org/docs/rules/func-call-spacing) rule. +It adds support for generic type parameters on function calls. diff --git a/node_modules/@typescript-eslint/eslint-plugin/docs/rules/indent.mdx b/node_modules/@typescript-eslint/eslint-plugin/docs/rules/indent.mdx new file mode 100644 index 000000000..cf7473598 --- /dev/null +++ b/node_modules/@typescript-eslint/eslint-plugin/docs/rules/indent.mdx @@ -0,0 +1,21 @@ +--- +description: 'Enforce consistent indentation.' +--- + +import Tabs from '@theme/Tabs'; +import TabItem from '@theme/TabItem'; + +> 🛑 This file is source code, not the primary documentation location! 🛑 +> +> See **https://typescript-eslint.io/rules/indent** for documentation. + +## Warning + +:::warning + +Please read [Issue #1824: Problems with the indent rule](https://github.com/typescript-eslint/typescript-eslint/issues/1824) before using this rule! + +::: + +This rule extends the base [`eslint/indent`](https://eslint.org/docs/rules/indent) rule. +It adds support for TypeScript nodes. diff --git a/node_modules/@typescript-eslint/eslint-plugin/docs/rules/init-declarations.mdx b/node_modules/@typescript-eslint/eslint-plugin/docs/rules/init-declarations.mdx new file mode 100644 index 000000000..911aeb18c --- /dev/null +++ b/node_modules/@typescript-eslint/eslint-plugin/docs/rules/init-declarations.mdx @@ -0,0 +1,13 @@ +--- +description: 'Require or disallow initialization in variable declarations.' +--- + +import Tabs from '@theme/Tabs'; +import TabItem from '@theme/TabItem'; + +> 🛑 This file is source code, not the primary documentation location! 🛑 +> +> See **https://typescript-eslint.io/rules/init-declarations** for documentation. + +This rule extends the base [`eslint/init-declarations`](https://eslint.org/docs/rules/init-declarations) rule. +It adds support for TypeScript's `declare` variables. diff --git a/node_modules/@typescript-eslint/eslint-plugin/docs/rules/key-spacing.mdx b/node_modules/@typescript-eslint/eslint-plugin/docs/rules/key-spacing.mdx new file mode 100644 index 000000000..da0ebae30 --- /dev/null +++ b/node_modules/@typescript-eslint/eslint-plugin/docs/rules/key-spacing.mdx @@ -0,0 +1,13 @@ +--- +description: 'Enforce consistent spacing between property names and type annotations in types and interfaces.' +--- + +import Tabs from '@theme/Tabs'; +import TabItem from '@theme/TabItem'; + +> 🛑 This file is source code, not the primary documentation location! 🛑 +> +> See **https://typescript-eslint.io/rules/key-spacing** for documentation. + +This rule extends the base [`eslint/key-spacing`](https://eslint.org/docs/rules/key-spacing) rule. +It adds support for type annotations on interfaces, classes and type literals properties. diff --git a/node_modules/@typescript-eslint/eslint-plugin/docs/rules/keyword-spacing.mdx b/node_modules/@typescript-eslint/eslint-plugin/docs/rules/keyword-spacing.mdx new file mode 100644 index 000000000..c092b46a8 --- /dev/null +++ b/node_modules/@typescript-eslint/eslint-plugin/docs/rules/keyword-spacing.mdx @@ -0,0 +1,13 @@ +--- +description: 'Enforce consistent spacing before and after keywords.' +--- + +import Tabs from '@theme/Tabs'; +import TabItem from '@theme/TabItem'; + +> 🛑 This file is source code, not the primary documentation location! 🛑 +> +> See **https://typescript-eslint.io/rules/keyword-spacing** for documentation. + +This rule extends the base [`eslint/keyword-spacing`](https://eslint.org/docs/rules/keyword-spacing) rule. +It adds support for generic type parameters on function calls. diff --git a/node_modules/@typescript-eslint/eslint-plugin/docs/rules/lines-around-comment.mdx b/node_modules/@typescript-eslint/eslint-plugin/docs/rules/lines-around-comment.mdx new file mode 100644 index 000000000..bf612ceaa --- /dev/null +++ b/node_modules/@typescript-eslint/eslint-plugin/docs/rules/lines-around-comment.mdx @@ -0,0 +1,28 @@ +--- +description: 'Require empty lines around comments.' +--- + +import Tabs from '@theme/Tabs'; +import TabItem from '@theme/TabItem'; + +> 🛑 This file is source code, not the primary documentation location! 🛑 +> +> See **https://typescript-eslint.io/rules/lines-around-comment** for documentation. + +This rule extends the base [`eslint/lines-around-comment`](https://eslint.org/docs/rules/lines-around-comment) rule. +It adds support for TypeScript syntax. + +See the [ESLint documentation](https://eslint.org/docs/rules/lines-around-comment) for more details on the `lines-around-comment` rule. + +## Options + +In addition to the options supported by the `lines-around-comment` rule in ESLint core, the rule adds the following options: + +- `allowEnumEnd: true` doesn't require a blank line after an enum body block end +- `allowEnumStart: true` doesn't require a blank line before an enum body block start +- `allowInterfaceEnd: true` doesn't require a blank line before an interface body block end +- `allowInterfaceStart: true` doesn't require a blank line after an interface body block start +- `allowModuleEnd: true` doesn't require a blank line before a module body block end +- `allowModuleStart: true` doesn't require a blank line after a module body block start +- `allowTypeEnd: true` doesn't require a blank line before a type literal block end +- `allowTypeStart: true` doesn't require a blank line after a type literal block start diff --git a/node_modules/@typescript-eslint/eslint-plugin/docs/rules/lines-between-class-members.mdx b/node_modules/@typescript-eslint/eslint-plugin/docs/rules/lines-between-class-members.mdx new file mode 100644 index 000000000..0112c47cb --- /dev/null +++ b/node_modules/@typescript-eslint/eslint-plugin/docs/rules/lines-between-class-members.mdx @@ -0,0 +1,56 @@ +--- +description: 'Require or disallow an empty line between class members.' +--- + +import Tabs from '@theme/Tabs'; +import TabItem from '@theme/TabItem'; + +> 🛑 This file is source code, not the primary documentation location! 🛑 +> +> See **https://typescript-eslint.io/rules/lines-between-class-members** for documentation. + +This rule extends the base [`eslint/lines-between-class-members`](https://eslint.org/docs/rules/lines-between-class-members) rule. +It adds support for ignoring overload methods in a class. + +## Options + +In addition to the options supported by the `lines-between-class-members` rule in ESLint core, the rule adds the following options: + +- Object option: + + - `"exceptAfterOverload": true` (default) - Skip checking empty lines after overload class members + - `"exceptAfterOverload": false` - **do not** skip checking empty lines after overload class members + +### `exceptAfterOverload: true` + +Examples of **correct** code for the `{ "exceptAfterOverload": true }` option: + +```ts option='"always", { "exceptAfterOverload": true }' showPlaygroundButton +class foo { + bar(a: string): void; + bar(a: string, b: string): void; + bar(a: string, b: string) {} + + baz() {} + + qux() {} +} +``` + +### `exceptAfterOverload: false` + +Examples of **correct** code for the `{ "exceptAfterOverload": false }` option: + +```ts option='"always", { "exceptAfterOverload": false }' showPlaygroundButton +class foo { + bar(a: string): void; + + bar(a: string, b: string): void; + + bar(a: string, b: string) {} + + baz() {} + + qux() {} +} +``` diff --git a/node_modules/@typescript-eslint/eslint-plugin/docs/rules/max-params.mdx b/node_modules/@typescript-eslint/eslint-plugin/docs/rules/max-params.mdx new file mode 100644 index 000000000..3e1d80bb1 --- /dev/null +++ b/node_modules/@typescript-eslint/eslint-plugin/docs/rules/max-params.mdx @@ -0,0 +1,13 @@ +--- +description: 'Enforce a maximum number of parameters in function definitions.' +--- + +import Tabs from '@theme/Tabs'; +import TabItem from '@theme/TabItem'; + +> 🛑 This file is source code, not the primary documentation location! 🛑 +> +> See **https://typescript-eslint.io/rules/max-params** for documentation. + +This rule extends the base [`eslint/max-params`](https://eslint.org/docs/rules/max-params) rule. +This version adds support for TypeScript `this` parameters so they won't be counted as a parameter. diff --git a/node_modules/@typescript-eslint/eslint-plugin/docs/rules/member-delimiter-style.mdx b/node_modules/@typescript-eslint/eslint-plugin/docs/rules/member-delimiter-style.mdx new file mode 100644 index 000000000..7e3c5547c --- /dev/null +++ b/node_modules/@typescript-eslint/eslint-plugin/docs/rules/member-delimiter-style.mdx @@ -0,0 +1,170 @@ +--- +description: 'Require a specific member delimiter style for interfaces and type literals.' +--- + +import Tabs from '@theme/Tabs'; +import TabItem from '@theme/TabItem'; + +> 🛑 This file is source code, not the primary documentation location! 🛑 +> +> See **https://typescript-eslint.io/rules/member-delimiter-style** for documentation. + +TypeScript allows three delimiters between members in interfaces and type aliases: + +{/* prettier-ignore */} +```ts +interface Foo { + // Semicolons (default, preferred in TypeScript): + name: string; + + // Commas (JSON-like): + name: string, + + // Line breaks (none): + name: string +} +``` + +For code readability, it's generally best to use the same style consistently in your codebase. + +This rule enforces keeping to one configurable code style. +It can also standardize the presence (or absence) of a delimiter in the last member of a construct, as well as a separate delimiter syntax for single line declarations. + +## Options + +Default config: + +```json +{ + "multiline": { + "delimiter": "semi", + "requireLast": true + }, + "singleline": { + "delimiter": "semi", + "requireLast": false + }, + "multilineDetection": "brackets" +} +``` + +`multiline` config only applies to multiline `interface`/`type` definitions. +`singleline` config only applies to single line `interface`/`type` definitions. +The two configs are entirely separate, and do not effect one another. + +`multilineDetection` determines what counts as multiline + +- `"brackets"` (default) any newlines in the type or interface make it multiline. +- `"last-member"` if the last member of the interface is on the same line as the last bracket, it is counted as a single line. + +### `delimiter` + +Accepts three values (or two for `singleline`): + +- `comma` - each member should be delimited with a comma (`,`). +- `semi` - each member should be delimited with a semicolon (`;`). +- `none` - each member should be delimited with nothing. + +:::note +`none` is not an option for `singleline` because having no delimiter between members on a single line is a syntax error in TS. +::: + +### `requireLast` + +Determines whether or not the last member in the `interface`/`type` should have a delimiter: + +- `true` - the last member **_must_** have a delimiter. +- `false` - the last member **_must not_** have a delimiter. + +### `overrides` + +Allows you to specify options specifically for either `interface`s or `type` definitions / inline `type`s. + +For example, to require commas for `type`s, and semicolons for multiline `interface`s: + +```json +{ + "multiline": { + "delimiter": "comma", + "requireLast": true + }, + "singleline": { + "delimiter": "comma", + "requireLast": true + }, + "overrides": { + "interface": { + "multiline": { + "delimiter": "semi", + "requireLast": true + } + } + } +} +``` + +## Examples + +Examples of code for this rule with the default config: + + + + +{/* prettier-ignore */} +```ts +// missing semicolon delimiter +interface Foo { + name: string + greet(): string +} + +// using incorrect delimiter +interface Bar { + name: string, + greet(): string, +} + +// missing last member delimiter +interface Baz { + name: string; + greet(): string +} + +// incorrect delimiter +type FooBar = { name: string, greet(): string } + +// last member should not have delimiter +type FooBar = { name: string; greet(): string; } +``` + + + + +{/* prettier-ignore */} +```ts +interface Foo { + name: string; + greet(): string; +} + +interface Foo { name: string } + +type Bar = { + name: string; + greet(): string; +} + +type Bar = { name: string } + +type FooBar = { name: string; greet(): string } +``` + + + + +## When Not To Use It + +If you specifically want to use both member delimiter kinds for stylistic reasons, or don't wish to enforce one style over the other, you can avoid this rule. + +However, keep in mind that inconsistent style can harm readability in a project. +We recommend picking a single option for this rule that works best for your project. diff --git a/node_modules/@typescript-eslint/eslint-plugin/docs/rules/member-ordering.mdx b/node_modules/@typescript-eslint/eslint-plugin/docs/rules/member-ordering.mdx new file mode 100644 index 000000000..82f8f84f9 --- /dev/null +++ b/node_modules/@typescript-eslint/eslint-plugin/docs/rules/member-ordering.mdx @@ -0,0 +1,1483 @@ +--- +description: 'Require a consistent member declaration order.' +--- + +import Tabs from '@theme/Tabs'; +import TabItem from '@theme/TabItem'; + +> 🛑 This file is source code, not the primary documentation location! 🛑 +> +> See **https://typescript-eslint.io/rules/member-ordering** for documentation. + +This rule aims to standardize the way classes, interfaces, and type literals are structured and ordered. +A consistent ordering of fields, methods and constructors can make code easier to read, navigate, and edit. + +:::note +This rule is _feature frozen_: it will no longer receive new features such as new options. +It still will accept bug and documentation fixes for its existing area of features. + +Stylistic rules that enforce naming and/or sorting conventions tend to grow incomprehensibly complex as increasingly obscure features are requested. +This rule has reached the limit of what is reasonable for the typescript-eslint project to maintain. +See [eslint-plugin: Feature freeze naming and sorting stylistic rules](https://github.com/typescript-eslint/typescript-eslint/issues/8792) for more information. +::: + +## Options + +```ts +interface Options { + default?: OrderConfig; + classes?: OrderConfig; + classExpressions?: OrderConfig; + interfaces?: OrderConfig; + typeLiterals?: OrderConfig; +} + +type OrderConfig = MemberType[] | SortedOrderConfig | 'never'; + +interface SortedOrderConfig { + memberTypes?: MemberType[] | 'never'; + optionalityOrder?: 'optional-first' | 'required-first'; + order?: + | 'alphabetically' + | 'alphabetically-case-insensitive' + | 'as-written' + | 'natural' + | 'natural-case-insensitive'; +} + +// See below for the more specific MemberType strings +type MemberType = string | string[]; +``` + +You can configure `OrderConfig` options for: + +- **`default`**: all constructs (used as a fallback) +- **`classes`**?: override ordering specifically for classes +- **`classExpressions`**?: override ordering specifically for class expressions +- **`interfaces`**?: override ordering specifically for interfaces +- **`typeLiterals`**?: override ordering specifically for type literals + +The `OrderConfig` settings for each kind of construct may configure sorting on up to three levels: + +- **`memberTypes`**: organizing on member type groups such as methods vs. properties +- **`optionalityOrder`**: whether to put all optional members first or all required members first +- **`order`**: organizing based on member names, such as alphabetically + +### Groups + +You can define many different groups based on different attributes of members. +The supported member attributes are, in order: + +- **Accessibility** (`'public' | 'protected' | 'private' | '#private'`) +- **Decoration** (`'decorated'`): Whether the member has an explicit accessibility decorator +- **Kind** (`'call-signature' | 'constructor' | 'field' | 'readonly-field' | 'get' | 'method' | 'set' | 'signature' | 'readonly-signature'`) + +Member attributes may be joined with a `'-'` to combine into more specific groups. +For example, `'public-field'` would come before `'private-field'`. + +### Orders + +The `order` value specifies what order members should be within a group. +It defaults to `as-written`, meaning any order is fine. +Other allowed values are: + +- `alphabetically`: Sorted in a-z alphabetical order, directly using string `<` comparison (so `B` comes before `a`) +- `alphabetically-case-insensitive`: Sorted in a-z alphabetical order, ignoring case (so `a` comes before `B`) +- `natural`: Same as `alphabetically`, but using [`natural-compare-lite`](https://github.com/litejs/natural-compare-lite) for more friendly sorting of numbers +- `natural-case-insensitive`: Same as `alphabetically-case-insensitive`, but using [`natural-compare-lite`](https://github.com/litejs/natural-compare-lite) for more friendly sorting of numbers + +### Default configuration + +The default configuration looks as follows: + +```jsonc +{ + "default": { + "memberTypes": [ + // Index signature + "signature", + "call-signature", + + // Fields + "public-static-field", + "protected-static-field", + "private-static-field", + "#private-static-field", + + "public-decorated-field", + "protected-decorated-field", + "private-decorated-field", + + "public-instance-field", + "protected-instance-field", + "private-instance-field", + "#private-instance-field", + + "public-abstract-field", + "protected-abstract-field", + + "public-field", + "protected-field", + "private-field", + "#private-field", + + "static-field", + "instance-field", + "abstract-field", + + "decorated-field", + + "field", + + // Static initialization + "static-initialization", + + // Constructors + "public-constructor", + "protected-constructor", + "private-constructor", + + "constructor", + + // Accessors + "public-static-accessor", + "protected-static-accessor", + "private-static-accessor", + "#private-static-accessor", + + "public-decorated-accessor", + "protected-decorated-accessor", + "private-decorated-accessor", + + "public-instance-accessor", + "protected-instance-accessor", + "private-instance-accessor", + "#private-instance-accessor", + + "public-abstract-accessor", + "protected-abstract-accessor", + + "public-accessor", + "protected-accessor", + "private-accessor", + "#private-accessor", + + "static-accessor", + "instance-accessor", + "abstract-accessor", + + "decorated-accessor", + + "accessor", + + // Getters + "public-static-get", + "protected-static-get", + "private-static-get", + "#private-static-get", + + "public-decorated-get", + "protected-decorated-get", + "private-decorated-get", + + "public-instance-get", + "protected-instance-get", + "private-instance-get", + "#private-instance-get", + + "public-abstract-get", + "protected-abstract-get", + + "public-get", + "protected-get", + "private-get", + "#private-get", + + "static-get", + "instance-get", + "abstract-get", + + "decorated-get", + + "get", + + // Setters + "public-static-set", + "protected-static-set", + "private-static-set", + "#private-static-set", + + "public-decorated-set", + "protected-decorated-set", + "private-decorated-set", + + "public-instance-set", + "protected-instance-set", + "private-instance-set", + "#private-instance-set", + + "public-abstract-set", + "protected-abstract-set", + + "public-set", + "protected-set", + "private-set", + "#private-set", + + "static-set", + "instance-set", + "abstract-set", + + "decorated-set", + + "set", + + // Methods + "public-static-method", + "protected-static-method", + "private-static-method", + "#private-static-method", + + "public-decorated-method", + "protected-decorated-method", + "private-decorated-method", + + "public-instance-method", + "protected-instance-method", + "private-instance-method", + "#private-instance-method", + + "public-abstract-method", + "protected-abstract-method", + + "public-method", + "protected-method", + "private-method", + "#private-method", + + "static-method", + "instance-method", + "abstract-method", + + "decorated-method", + + "method", + ], + }, +} +``` + +:::note +The default configuration contains member group types which contain other member types. +This is intentional to provide better error messages. +::: + +:::tip +By default, the members are not sorted. +If you want to sort them alphabetically, you have to provide a custom configuration. +::: + +## Examples + +### General Order on All Constructs + +This config specifies the order for all constructs. +It ignores member types other than signatures, methods, constructors, and fields. +It also ignores accessibility and scope. + +```jsonc +// .eslintrc.json +{ + "rules": { + "@typescript-eslint/member-ordering": [ + "error", + { "default": ["signature", "method", "constructor", "field"] }, + ], + }, +} +``` + + + + +```ts option='{ "default": ["signature", "method", "constructor", "field"] }' +interface Foo { + B: string; // -> field + + new (); // -> constructor + + A(): void; // -> method + + [Z: string]: any; // -> signature +} +``` + +```ts option='{ "default": ["signature", "method", "constructor", "field"] }' +type Foo = { + B: string; // -> field + + // no constructor + + A(): void; // -> method + + // no signature +}; +``` + +```ts option='{ "default": ["signature", "method", "constructor", "field"] }' +class Foo { + private C: string; // -> field + public D: string; // -> field + protected static E: string; // -> field + + constructor() {} // -> constructor + + public static A(): void {} // -> method + public B(): void {} // -> method + + [Z: string]: any; // -> signature +} +``` + +```ts option='{ "default": ["signature", "method", "constructor", "field"] }' +const Foo = class { + private C: string; // -> field + public D: string; // -> field + + constructor() {} // -> constructor + + public static A(): void {} // -> method + public B(): void {} // -> method + + [Z: string]: any; // -> signature + + protected static E: string; // -> field +}; +``` + + + + +```ts option='{ "default": ["signature", "method", "constructor", "field"] }' +interface Foo { + [Z: string]: any; // -> signature + + A(): void; // -> method + + new (); // -> constructor + + B: string; // -> field +} +``` + +```ts option='{ "default": ["signature", "method", "constructor", "field"] }' +type Foo = { + // no signature + + A(): void; // -> method + + // no constructor + + B: string; // -> field +}; +``` + +```ts option='{ "default": ["signature", "method", "constructor", "field"] }' +class Foo { + [Z: string]: any; // -> signature + + public static A(): void {} // -> method + public B(): void {} // -> method + + constructor() {} // -> constructor + + private C: string; // -> field + public D: string; // -> field + protected static E: string; // -> field +} +``` + +```ts option='{ "default": ["signature", "method", "constructor", "field"] }' +const Foo = class { + [Z: string]: any; // -> signature + + public static A(): void {} // -> method + public B(): void {} // -> method + + constructor() {} // -> constructor + + private C: string; // -> field + public D: string; // -> field + protected static E: string; // -> field +}; +``` + + + + +### Classes + +#### Public Instance Methods Before Public Static Fields + +This config specifies that public instance methods should come first before public static fields. +Everything else can be placed anywhere. +It doesn't apply to interfaces or type literals as accessibility and scope are not part of them. + +```jsonc +// .eslintrc.json +{ + "rules": { + "@typescript-eslint/member-ordering": [ + "error", + { "default": ["public-instance-method", "public-static-field"] }, + ], + }, +} +``` + + + + +```ts option='{ "default": ["public-instance-method", "public-static-field"] }' +class Foo { + private C: string; // (irrelevant) + + public D: string; // (irrelevant) + + public static E: string; // -> public static field + + constructor() {} // (irrelevant) + + public static A(): void {} // (irrelevant) + + [Z: string]: any; // (irrelevant) + + public B(): void {} // -> public instance method +} +``` + +```ts option='{ "default": ["public-instance-method", "public-static-field"] }' +const Foo = class { + private C: string; // (irrelevant) + + [Z: string]: any; // (irrelevant) + + public static E: string; // -> public static field + + public D: string; // (irrelevant) + + constructor() {} // (irrelevant) + + public static A(): void {} // (irrelevant) + + public B(): void {} // -> public instance method +}; +``` + + + + +```ts option='{ "default": ["public-instance-method", "public-static-field"] }' +class Foo { + public B(): void {} // -> public instance method + + private C: string; // (irrelevant) + + public D: string; // (irrelevant) + + public static E: string; // -> public static field + + constructor() {} // (irrelevant) + + public static A(): void {} // (irrelevant) + + [Z: string]: any; // (irrelevant) +} +``` + +```ts option='{ "default": ["public-instance-method", "public-static-field"] }' +const Foo = class { + public B(): void {} // -> public instance method + + private C: string; // (irrelevant) + + [Z: string]: any; // (irrelevant) + + public D: string; // (irrelevant) + + constructor() {} // (irrelevant) + + public static A(): void {} // (irrelevant) + + public static E: string; // -> public static field +}; +``` + + + + +#### Static Fields Before Instance Fields + +This config specifies that static fields should come before instance fields, with public static fields first. +It doesn't apply to interfaces or type literals as accessibility and scope are not part of them. + +```jsonc +{ + "rules": { + "@typescript-eslint/member-ordering": [ + "error", + { "default": ["public-static-field", "static-field", "instance-field"] }, + ], + }, +} +``` + + + + +```ts option='{ "default": ["public-static-field", "static-field", "instance-field"] }' +class Foo { + private E: string; // -> instance field + + private static B: string; // -> static field + protected static C: string; // -> static field + private static D: string; // -> static field + + public static A: string; // -> public static field + + [Z: string]: any; // (irrelevant) +} +``` + +```ts option='{ "default": ["public-static-field", "static-field", "instance-field"] }' +const foo = class { + public T(): void {} // method (irrelevant) + + private static B: string; // -> static field + + constructor() {} // constructor (irrelevant) + + private E: string; // -> instance field + + protected static C: string; // -> static field + private static D: string; // -> static field + + [Z: string]: any; // signature (irrelevant) + + public static A: string; // -> public static field +}; +``` + + + + +```ts option='{ "default": ["public-static-field", "static-field", "instance-field"] }' +class Foo { + public static A: string; // -> public static field + + private static B: string; // -> static field + protected static C: string; // -> static field + private static D: string; // -> static field + + private E: string; // -> instance field + + [Z: string]: any; // (irrelevant) +} +``` + +```ts option='{ "default": ["public-static-field", "static-field", "instance-field"] }' +const foo = class { + [Z: string]: any; // -> signature (irrelevant) + + public static A: string; // -> public static field + + constructor() {} // -> constructor (irrelevant) + + private static B: string; // -> static field + protected static C: string; // -> static field + private static D: string; // -> static field + + private E: string; // -> instance field + + public T(): void {} // -> method (irrelevant) +}; +``` + + + + +#### Class Declarations + +This config only specifies an order for classes: methods, then the constructor, then fields. +It does not apply to class expressions (use `classExpressions` for them). +Default settings will be used for class declarations and all other syntax constructs other than class declarations. + +```jsonc +// .eslintrc.json +{ + "rules": { + "@typescript-eslint/member-ordering": [ + "error", + { "classes": ["method", "constructor", "field"] }, + ], + }, +} +``` + + + + +```ts option='{ "classes": ["method", "constructor", "field"] }' +class Foo { + private C: string; // -> field + public D: string; // -> field + protected static E: string; // -> field + + constructor() {} // -> constructor + + public static A(): void {} // -> method + public B(): void {} // -> method +} +``` + + + + +```ts option='{ "classes": ["method", "constructor", "field"] }' +class Foo { + public static A(): void {} // -> method + public B(): void {} // -> method + + constructor() {} // -> constructor + + private C: string; // -> field + public D: string; // -> field + protected static E: string; // -> field +} +``` + + + + +#### Class Expressions + +This config only specifies an order for classes expressions: methods, then the constructor, then fields. +It does not apply to class declarations (use `classes` for them). +Default settings will be used for class declarations and all other syntax constructs other than class expressions. + +```jsonc +// .eslintrc.json +{ + "rules": { + "@typescript-eslint/member-ordering": [ + "error", + { "classExpressions": ["method", "constructor", "field"] }, + ], + }, +} +``` + + + + +```ts option='{ "classExpressions": ["method", "constructor", "field"] }' +const foo = class { + private C: string; // -> field + public D: string; // -> field + protected static E: string; // -> field + + constructor() {} // -> constructor + + public static A(): void {} // -> method + public B(): void {} // -> method +}; +``` + + + + +```ts option='{ "classExpressions": ["method", "constructor", "field"] }' +const foo = class { + public static A(): void {} // -> method + public B(): void {} // -> method + + constructor() {} // -> constructor + + private C: string; // -> field + public D: string; // -> field + protected static E: string; // -> field +}; +``` + + + + +### Interfaces + +This config only specifies an order for interfaces: signatures, then methods, then constructors, then fields. +It does not apply to type literals (use `typeLiterals` for them). +Default settings will be used for type literals and all other syntax constructs other than class expressions. + +:::note +These member types are the only ones allowed for `interfaces`. +::: + +```jsonc +// .eslintrc.json +{ + "rules": { + "@typescript-eslint/member-ordering": [ + "error", + { "interfaces": ["signature", "method", "constructor", "field"] }, + ], + }, +} +``` + + + + +```ts option='{ "interfaces": ["signature", "method", "constructor", "field"] }' +interface Foo { + B: string; // -> field + + new (); // -> constructor + + A(): void; // -> method + + [Z: string]: any; // -> signature +} +``` + + + + +```ts option='{ "interfaces": ["signature", "method", "constructor", "field"] }' +interface Foo { + [Z: string]: any; // -> signature + + A(): void; // -> method + + new (); // -> constructor + + B: string; // -> field +} +``` + + + + +### Type Literals + +This config only specifies an order for type literals: signatures, then methods, then constructors, then fields. +It does not apply to interfaces (use `interfaces` for them). +Default settings will be used for interfaces and all other syntax constructs other than class expressions. + +:::note +These member types are the only ones allowed for `typeLiterals`. +::: + +```jsonc +// .eslintrc.json +{ + "rules": { + "@typescript-eslint/member-ordering": [ + "error", + { "typeLiterals": ["signature", "method", "constructor", "field"] }, + ], + }, +} +``` + + + + +```ts option='{ "typeLiterals": ["signature", "method", "constructor", "field"] }' +type Foo = { + B: string; // -> field + + A(): void; // -> method + + new (); // -> constructor + + [Z: string]: any; // -> signature +}; +``` + + + + +```ts option='{ "typeLiterals": ["signature", "method", "constructor", "field"] }' +type Foo = { + [Z: string]: any; // -> signature + + A(): void; // -> method + + new (); // -> constructor + + B: string; // -> field +}; +``` + + + + +### Sorting Options + +#### Sorting Alphabetically Within Member Groups + +The default member order will be applied if `memberTypes` is not specified. +You can see the default order in [Default Configuration](#default-configuration). + +```jsonc +// .eslintrc.json +{ + "rules": { + "@typescript-eslint/member-ordering": [ + "error", + { + "default": { + "order": "alphabetically", + }, + }, + ], + }, +} +``` + + + + +```ts option='{"default":{"order":"alphabetically"}}' +interface Foo { + a: x; + B: x; + c: x; + + B(): void; + c(): void; + a(): void; +} +``` + + + + +```ts option='{"default":{"order":"alphabetically"}}' +interface Foo { + B: x; + a: x; + c: x; + + B(): void; + a(): void; + c(): void; +} +``` + + + + +#### Sorting Alphabetically Within Custom Member Groups + +This config specifies that within each custom `memberTypes` group, members are in an alphabetic case-sensitive order. + +```jsonc +// .eslintrc.json +{ + "rules": { + "@typescript-eslint/member-ordering": [ + "error", + { + "default": { + "memberTypes": ["method", "field"], + "order": "alphabetically", + }, + }, + ], + }, +} +``` + + + + +```ts option='{"default":{"memberTypes":["method","field"],"order":"alphabetically"}}' +interface Foo { + B(): void; + c(): void; + a(): void; + + a: x; + B: x; + c: x; +} +``` + + + + +```ts option='{"default":{"memberTypes":["method","field"],"order":"alphabetically"}}' +interface Foo { + B(): void; + a(): void; + c(): void; + + B: x; + a: x; + c: x; +} +``` + + + + +#### Sorting Alphabetically Case Insensitive Within Member Groups + +The default member order will be applied if `memberTypes` is not specified. +You can see the default order in [Default Configuration](#default-configuration). + +```jsonc +// .eslintrc.json +{ + "rules": { + "@typescript-eslint/member-ordering": [ + "error", + { + "default": { + "order": "alphabetically-case-insensitive", + }, + }, + ], + }, +} +``` + + + + +```ts option='{"default":{"order":"alphabetically-case-insensitive"}}' +interface Foo { + B: x; + a: x; + c: x; + + B(): void; + c(): void; + a(): void; +} +``` + + + + +```ts option='{"default":{"order":"alphabetically-case-insensitive"}}' +interface Foo { + a: x; + B: x; + c: x; + + a(): void; + B(): void; + c(): void; +} +``` + + + + +#### Sorting Alphabetically Ignoring Member Groups + +This config specifies that members are all sorted in an alphabetic case-sensitive order. +It ignores any member group types completely by specifying `"never"` for `memberTypes`. + +```jsonc +// .eslintrc.json +{ + "rules": { + "@typescript-eslint/member-ordering": [ + "error", + { "default": { "memberTypes": "never", "order": "alphabetically" } }, + ], + }, +} +``` + + + + +```ts option='{ "default": { "memberTypes": "never", "order": "alphabetically" } }' +interface Foo { + b(): void; + a: boolean; + + [a: string]: number; + new (): Bar; + (): Baz; +} +``` + + + + +```ts option='{ "default": { "memberTypes": "never", "order": "alphabetically" } }' +interface Foo { + [a: string]: number; + a: boolean; + b(): void; + + (): Baz; + new (): Bar; +} +``` + + + + +#### Sorting Optional Members First or Last + +The `optionalityOrder` option may be enabled to place all optional members in a group at the beginning or end of that group. + +This config places all optional members before all required members: + +```jsonc +// .eslintrc.json +{ + "rules": { + "@typescript-eslint/member-ordering": [ + "error", + { + "default": { + "optionalityOrder": "optional-first", + "order": "alphabetically", + }, + }, + ], + }, +} +``` + + + + +```ts option='{ "default": { "optionalityOrder": "optional-first", "order": "alphabetically" } }' +interface Foo { + a: boolean; + b?: number; + c: string; +} +``` + + + + +```ts option='{ "default": { "optionalityOrder": "optional-first", "order": "alphabetically" } }' +interface Foo { + b?: number; + a: boolean; + c: string; +} +``` + + + + +This config places all required members before all optional members: + +```jsonc +// .eslintrc.json +{ + "rules": { + "@typescript-eslint/member-ordering": [ + "error", + { + "default": { + "optionalityOrder": "required-first", + "order": "alphabetically", + }, + }, + ], + }, +} +``` + + + + +```ts option='{ "default": { "optionalityOrder": "required-first", "order": "alphabetically" } }' +interface Foo { + a: boolean; + b?: number; + c: string; +} +``` + + + + +```ts option='{ "default": { "optionalityOrder": "required-first", "order": "alphabetically" } }' +interface Foo { + a: boolean; + c: string; + b?: number; +} +``` + + + + +## All Supported Options + +### Member Types (Granular Form) + +There are multiple ways to specify the member types. +The most explicit and granular form is the following: + +```jsonc +[ + // Index signature + "signature", + "readonly-signature", + + // Fields + "public-static-field", + "public-static-readonly-field", + "protected-static-field", + "protected-static-readonly-field", + "private-static-field", + "private-static-readonly-field", + "#private-static-field", + "#private-static-readonly-field", + + "public-decorated-field", + "public-decorated-readonly-field", + "protected-decorated-field", + "protected-decorated-readonly-field", + "private-decorated-field", + "private-decorated-readonly-field", + + "public-instance-field", + "public-instance-readonly-field", + "protected-instance-field", + "protected-instance-readonly-field", + "private-instance-field", + "private-instance-readonly-field", + "#private-instance-field", + "#private-instance-readonly-field", + + "public-abstract-field", + "public-abstract-readonly-field", + "protected-abstract-field", + "protected-abstract-readonly-field", + + "public-field", + "public-readonly-field", + "protected-field", + "protected-readonly-field", + "private-field", + "private-readonly-field" + "#private-field", + "#private-readonly-field" + + "static-field", + "static-readonly-field", + "instance-field", + "instance-readonly-field" + "abstract-field", + "abstract-readonly-field", + + "decorated-field", + "decorated-readonly-field", + + "field", + "readonly-field", + + // Static initialization + "static-initialization", + + // Constructors + "public-constructor", + "protected-constructor", + "private-constructor", + + // Getters + "public-static-get", + "protected-static-get", + "private-static-get", + "#private-static-get", + + "public-decorated-get", + "protected-decorated-get", + "private-decorated-get", + + "public-instance-get", + "protected-instance-get", + "private-instance-get", + "#private-instance-get", + + "public-abstract-get", + "protected-abstract-get", + + "public-get", + "protected-get", + "private-get", + "#private-get", + + "static-get", + "instance-get", + "abstract-get", + + "decorated-get", + + "get", + + // Setters + "public-static-set", + "protected-static-set", + "private-static-set", + "#private-static-set", + + "public-decorated-set", + "protected-decorated-set", + "private-decorated-set", + + "public-instance-set", + "protected-instance-set", + "private-instance-set", + "#private-instance-set", + + "public-abstract-set", + "protected-abstract-set", + + "public-set", + "protected-set", + "private-set", + + "static-set", + "instance-set", + "abstract-set", + + "decorated-set", + + "set", + + // Methods + "public-static-method", + "protected-static-method", + "private-static-method", + "#private-static-method", + "public-decorated-method", + "protected-decorated-method", + "private-decorated-method", + "public-instance-method", + "protected-instance-method", + "private-instance-method", + "#private-instance-method", + "public-abstract-method", + "protected-abstract-method" +] +``` + +:::note +If you only specify some of the possible types, the non-specified ones can have any particular order. +This means that they can be placed before, within or after the specified types and the linter won't complain about it. +::: + +### Member Group Types (With Accessibility, Ignoring Scope) + +It is also possible to group member types by their accessibility (`static`, `instance`, `abstract`), ignoring their scope. + +```jsonc +[ + // Index signature + // No accessibility for index signature. + + // Fields + "public-field", // = ["public-static-field", "public-instance-field"] + "protected-field", // = ["protected-static-field", "protected-instance-field"] + "private-field", // = ["private-static-field", "private-instance-field"] + + // Static initialization + // No accessibility for static initialization. + + // Constructors + // Only the accessibility of constructors is configurable. See below. + + // Getters + "public-get", // = ["public-static-get", "public-instance-get"] + "protected-get", // = ["protected-static-get", "protected-instance-get"] + "private-get", // = ["private-static-get", "private-instance-get"] + + // Setters + "public-set", // = ["public-static-set", "public-instance-set"] + "protected-set", // = ["protected-static-set", "protected-instance-set"] + "private-set", // = ["private-static-set", "private-instance-set"] + + // Methods + "public-method", // = ["public-static-method", "public-instance-method"] + "protected-method", // = ["protected-static-method", "protected-instance-method"] + "private-method", // = ["private-static-method", "private-instance-method"] +] +``` + +### Member Group Types (With Accessibility and a Decorator) + +It is also possible to group methods or fields with a decorator separately, optionally specifying +their accessibility. + +```jsonc +[ + // Index signature + // No decorators for index signature. + + // Fields + "public-decorated-field", + "protected-decorated-field", + "private-decorated-field", + + "decorated-field", // = ["public-decorated-field", "protected-decorated-field", "private-decorated-field"] + + // Static initialization + // No decorators for static initialization. + + // Constructors + // There are no decorators for constructors. + + // Getters + "public-decorated-get", + "protected-decorated-get", + "private-decorated-get", + + "decorated-get", // = ["public-decorated-get", "protected-decorated-get", "private-decorated-get"] + + // Setters + "public-decorated-set", + "protected-decorated-set", + "private-decorated-set", + + "decorated-set", // = ["public-decorated-set", "protected-decorated-set", "private-decorated-set"] + + // Methods + "public-decorated-method", + "protected-decorated-method", + "private-decorated-method", + + "decorated-method", // = ["public-decorated-method", "protected-decorated-method", "private-decorated-method"] +] +``` + +### Member Group Types (With Scope, Ignoring Accessibility) + +Another option is to group the member types by their scope (`public`, `protected`, `private`), ignoring their accessibility. + +```jsonc +[ + // Index signature + // No scope for index signature. + + // Fields + "static-field", // = ["public-static-field", "protected-static-field", "private-static-field"] + "instance-field", // = ["public-instance-field", "protected-instance-field", "private-instance-field"] + "abstract-field", // = ["public-abstract-field", "protected-abstract-field"] + + // Static initialization + // No scope for static initialization. + + // Constructors + "constructor", // = ["public-constructor", "protected-constructor", "private-constructor"] + + // Getters + "static-get", // = ["public-static-get", "protected-static-get", "private-static-get"] + "instance-get", // = ["public-instance-get", "protected-instance-get", "private-instance-get"] + "abstract-get", // = ["public-abstract-get", "protected-abstract-get"] + + // Setters + "static-set", // = ["public-static-set", "protected-static-set", "private-static-set"] + "instance-set", // = ["public-instance-set", "protected-instance-set", "private-instance-set"] + "abstract-set", // = ["public-abstract-set", "protected-abstract-set"] + + // Methods + "static-method", // = ["public-static-method", "protected-static-method", "private-static-method"] + "instance-method", // = ["public-instance-method", "protected-instance-method", "private-instance-method"] + "abstract-method", // = ["public-abstract-method", "protected-abstract-method"] +] +``` + +### Member Group Types (With Scope and Accessibility) + +The third grouping option is to ignore both scope and accessibility. + +```jsonc +[ + // Index signature + // No grouping for index signature. + + // Fields + "field", // = ["public-static-field", "protected-static-field", "private-static-field", "public-instance-field", "protected-instance-field", "private-instance-field", + // "public-abstract-field", "protected-abstract-field"] + + // Static initialization + // No grouping for static initialization. + + // Constructors + // Only the accessibility of constructors is configurable. + + // Getters + "get", // = ["public-static-get", "protected-static-get", "private-static-get", "public-instance-get", "protected-instance-get", "private-instance-get", + // "public-abstract-get", "protected-abstract-get"] + + // Setters + "set", // = ["public-static-set", "protected-static-set", "private-static-set", "public-instance-set", "protected-instance-set", "private-instance-set", + // "public-abstract-set", "protected-abstract-set"] + + // Methods + "method", // = ["public-static-method", "protected-static-method", "private-static-method", "public-instance-method", "protected-instance-method", "private-instance-method", + // "public-abstract-method", "protected-abstract-method"] +] +``` + +### Member Group Types (Readonly Fields) + +It is possible to group fields by their `readonly` modifiers. + +```jsonc +[ + // Index signature + "readonly-signature", + "signature", + + // Fields + "readonly-field", // = ["public-static-readonly-field", "protected-static-readonly-field", "private-static-readonly-field", "public-instance-readonly-field", "protected-instance-readonly-field", "private-instance-readonly-field", "public-abstract-readonly-field", "protected-abstract-readonly-field"] + "field", // = ["public-static-field", "protected-static-field", "private-static-field", "public-instance-field", "protected-instance-field", "private-instance-field", "public-abstract-field", "protected-abstract-field"] +] +``` + +### Grouping Different Member Types at the Same Rank + +It is also possible to group different member types at the same rank. + +```jsonc +[ + // Index signature + "signature", + + // Fields + "field", + + // Static initialization + "static-initialization", + + // Constructors + "constructor", + + // Getters and Setters at the same rank + ["get", "set"], + + // Methods + "method", +] +``` + +## When Not To Use It + +If you don't care about the general order of your members, then you will not need this rule. diff --git a/node_modules/@typescript-eslint/eslint-plugin/docs/rules/method-signature-style.mdx b/node_modules/@typescript-eslint/eslint-plugin/docs/rules/method-signature-style.mdx new file mode 100644 index 000000000..0536bff80 --- /dev/null +++ b/node_modules/@typescript-eslint/eslint-plugin/docs/rules/method-signature-style.mdx @@ -0,0 +1,122 @@ +--- +description: 'Enforce using a particular method signature syntax.' +--- + +import Tabs from '@theme/Tabs'; +import TabItem from '@theme/TabItem'; + +> 🛑 This file is source code, not the primary documentation location! 🛑 +> +> See **https://typescript-eslint.io/rules/method-signature-style** for documentation. + +TypeScript provides two ways to define an object/interface function property: + +```ts +interface Example { + // method shorthand syntax + func(arg: string): number; + + // regular property with function type + func: (arg: string) => number; +} +``` + +The two are very similar; most of the time it doesn't matter which one you use. + +A good practice is to use the TypeScript's `strict` option (which implies `strictFunctionTypes`) which enables correct typechecking for function properties only (method signatures get old behavior). + +TypeScript FAQ: + +> A method and a function property of the same type behave differently. +> Methods are always bivariant in their argument, while function properties are contravariant in their argument under `strictFunctionTypes`. + +See the reasoning behind that in the [TypeScript PR for the compiler option](https://github.com/microsoft/TypeScript/pull/18654). + +## Options + +This rule accepts one string option: + +- `"property"`: Enforce using property signature for functions. Use this to enforce maximum correctness together with TypeScript's strict mode. +- `"method"`: Enforce using method signature for functions. Use this if you aren't using TypeScript's strict mode and prefer this style. + +The default is `"property"`. + +### `property` + +Examples of code with `property` option. + + + + +```ts option='"property"' +interface T1 { + func(arg: string): number; +} +type T2 = { + func(arg: boolean): void; +}; +interface T3 { + func(arg: number): void; + func(arg: string): void; + func(arg: boolean): void; +} +``` + + + + +```ts option='"property"' +interface T1 { + func: (arg: string) => number; +} +type T2 = { + func: (arg: boolean) => void; +}; +// this is equivalent to the overload +interface T3 { + func: ((arg: number) => void) & + ((arg: string) => void) & + ((arg: boolean) => void); +} +``` + + + + +### `method` + +Examples of code with `method` option. + + + + +```ts option='"method"' +interface T1 { + func: (arg: string) => number; +} +type T2 = { + func: (arg: boolean) => void; +}; +``` + + + + +```ts option='"method"' +interface T1 { + func(arg: string): number; +} +type T2 = { + func(arg: boolean): void; +}; +``` + + + + +## When Not To Use It + +If you don't want to enforce a particular style for object/interface function types, and/or if you don't use `strictFunctionTypes`, then you don't need this rule. + +However, keep in mind that inconsistent style can harm readability in a project. +We recommend picking a single option for this rule that works best for your project. diff --git a/node_modules/@typescript-eslint/eslint-plugin/docs/rules/naming-convention.mdx b/node_modules/@typescript-eslint/eslint-plugin/docs/rules/naming-convention.mdx new file mode 100644 index 000000000..2af87f4f7 --- /dev/null +++ b/node_modules/@typescript-eslint/eslint-plugin/docs/rules/naming-convention.mdx @@ -0,0 +1,739 @@ +--- +description: 'Enforce naming conventions for everything across a codebase.' +--- + +import Tabs from '@theme/Tabs'; +import TabItem from '@theme/TabItem'; + +> 🛑 This file is source code, not the primary documentation location! 🛑 +> +> See **https://typescript-eslint.io/rules/naming-convention** for documentation. + +Enforcing naming conventions helps keep the codebase consistent, and reduces overhead when thinking about how to name a variable. +Additionally, a well-designed style guide can help communicate intent, such as by enforcing all private properties begin with an `_`, and all global-level constants are written in `UPPER_CASE`. + +:::note +This rule is _feature frozen_: it will no longer receive new features such as new options. +It still will accept bug and documentation fixes for its existing area of features and to support new TypeScript versions. + +Stylistic rules that enforce naming and/or sorting conventions tend to grow incomprehensibly complex as increasingly obscure features are requested. +This rule has reached the limit of what is reasonable for the typescript-eslint project to maintain. +See [eslint-plugin: Feature freeze naming and sorting stylistic rules](https://github.com/typescript-eslint/typescript-eslint/issues/8792) for more information. +::: + +## Examples + +This rule allows you to enforce conventions for any identifier, using granular selectors to create a fine-grained style guide. + +:::note + +This rule only needs type information in specific cases, detailed below. + +::: + +## Options + +This rule accepts an array of objects, with each object describing a different naming convention. +Each property will be described in detail below. Also see the examples section below for illustrated examples. + +```ts +type Options = { + // format options + format: + | ( + | 'camelCase' + | 'strictCamelCase' + | 'PascalCase' + | 'StrictPascalCase' + | 'snake_case' + | 'UPPER_CASE' + )[] + | null; + custom?: { + regex: string; + match: boolean; + }; + leadingUnderscore?: + | 'forbid' + | 'require' + | 'requireDouble' + | 'allow' + | 'allowDouble' + | 'allowSingleOrDouble'; + trailingUnderscore?: + | 'forbid' + | 'require' + | 'requireDouble' + | 'allow' + | 'allowDouble' + | 'allowSingleOrDouble'; + prefix?: string[]; + suffix?: string[]; + + // selector options + selector: Selector | Selector[]; + filter?: + | string + | { + regex: string; + match: boolean; + }; + // the allowed values for these are dependent on the selector - see below + modifiers?: Modifiers[]; + types?: Types[]; +}[]; + +// the default config is similar to ESLint's camelcase rule but more strict +const defaultOptions: Options = [ + { + selector: 'default', + format: ['camelCase'], + leadingUnderscore: 'allow', + trailingUnderscore: 'allow', + }, + + { + selector: 'import', + format: ['camelCase', 'PascalCase'], + }, + + { + selector: 'variable', + format: ['camelCase', 'UPPER_CASE'], + leadingUnderscore: 'allow', + trailingUnderscore: 'allow', + }, + + { + selector: 'typeLike', + format: ['PascalCase'], + }, +]; +``` + +### Format Options + +Every single selector can have the same set of format options. +For information about how each selector is applied, see ["How does the rule evaluate a name's format?"](#how-does-the-rule-evaluate-a-names-format). + +#### `format` + +The `format` option defines the allowed formats for the identifier. This option accepts an array of the following values, and the identifier can match any of them: + +- `camelCase` - standard camelCase format - no underscores are allowed between characters, and consecutive capitals are allowed (i.e. both `myID` and `myId` are valid). +- `PascalCase` - same as `camelCase`, except the first character must be upper-case. +- `snake_case` - standard snake_case format - all characters must be lower-case, and underscores are allowed. +- `strictCamelCase` - same as `camelCase`, but consecutive capitals are not allowed (i.e. `myId` is valid, but `myID` is not). +- `StrictPascalCase` - same as `strictCamelCase`, except the first character must be upper-case. +- `UPPER_CASE` - same as `snake_case`, except all characters must be upper-case. + +Instead of an array, you may also pass `null`. This signifies "this selector shall not have its format checked". +This can be useful if you want to enforce no particular format for a specific selector, after applying a group selector. + +#### `custom` + +The `custom` option defines a custom regex that the identifier must (or must not) match. This option allows you to have a bit more finer-grained control over identifiers, letting you ban (or force) certain patterns and substrings. +Accepts an object with the following properties: + +- `match` - true if the identifier _must_ match the `regex`, false if the identifier _must not_ match the `regex`. +- `regex` - a string that is then passed into RegExp to create a new regular expression: `new RegExp(regex)` + +#### `filter` + +The `filter` option operates similar to `custom`, accepting the same shaped object, except that it controls if the rest of the configuration should or should not be applied to an identifier. + +You can use this to include or exclude specific identifiers from specific configurations. + +Accepts an object with the following properties: + +- `match` - true if the identifier _must_ match the `regex`, false if the identifier _must not_ match the `regex`. +- `regex` - a string that is then passed into RegExp to create a new regular expression: `new RegExp(regex)` + +Alternatively, `filter` accepts a regular expression (anything accepted into `new RegExp(filter)`). In this case, it's treated as if you had passed an object with the regex and `match: true`. + +#### `leadingUnderscore` / `trailingUnderscore` + +The `leadingUnderscore` / `trailingUnderscore` options control whether leading/trailing underscores are considered valid. Accepts one of the following values: + +- `allow` - existence of a single leading/trailing underscore is not explicitly enforced. +- `allowDouble` - existence of a double leading/trailing underscore is not explicitly enforced. +- `allowSingleOrDouble` - existence of a single or a double leading/trailing underscore is not explicitly enforced. +- `forbid` - a leading/trailing underscore is not allowed at all. +- `require` - a single leading/trailing underscore must be included. +- `requireDouble` - two leading/trailing underscores must be included. + +#### `prefix` / `suffix` + +The `prefix` / `suffix` options control which prefix/suffix strings must exist for the identifier. Accepts an array of strings. + +If these are provided, the identifier must start with one of the provided values. For example, if you provide `{ prefix: ['Class', 'IFace', 'Type'] }`, then the following names are valid: `ClassBar`, `IFaceFoo`, `TypeBaz`, but the name `Bang` is not valid, as it contains none of the prefixes. + +**Note:** As [documented above](#format-options), the prefix is trimmed before format is validated, therefore PascalCase must be used to allow variables such as `isEnabled` using the prefix `is`. + +### Selector Options + +- `selector` allows you to specify what types of identifiers to target. + - Accepts one or array of selectors to define an option block that applies to one or multiple selectors. + - For example, if you provide `{ selector: ['function', 'variable'] }`, then it will apply the same option to variable and function nodes. + - See [Allowed Selectors, Modifiers and Types](#allowed-selectors-modifiers-and-types) below for the complete list of allowed selectors. +- `modifiers` allows you to specify which modifiers to granularly apply to, such as the accessibility (`#private`/`private`/`protected`/`public`), or if the thing is `static`, etc. + - The name must match _all_ of the modifiers. + - For example, if you provide `{ modifiers: ['private','readonly','static'] }`, then it will only match something that is `private static readonly`, and something that is just `private` will not match. + - The following `modifiers` are allowed: + - `abstract`,`override`,`private`,`protected`,`readonly`,`static` - matches any member explicitly declared with the given modifier. + - `async` - matches any method, function, or function variable which is async via the `async` keyword (e.g. does not match functions that return promises without using `async` keyword) + - `const` - matches a variable declared as being `const` (`const x = 1`). + - `destructured` - matches a variable declared via an object destructuring pattern (`const {x, z = 2}`). + - Note that this does not match renamed destructured properties (`const {x: y, a: b = 2}`). + - `exported` - matches anything that is exported from the module. + - `global` - matches a variable/function declared in the top-level scope. + - `#private` - matches any member with a private identifier (an identifier that starts with `#`) + - `public` - matches any member that is either explicitly declared as `public`, or has no visibility modifier (i.e. implicitly public). + - `requiresQuotes` - matches any name that requires quotes as it is not a valid identifier (i.e. has a space, a dash, etc in it). + - `unused` - matches anything that is not used. +- `types` allows you to specify which types to match. This option supports simple, primitive types only (`array`,`boolean`,`function`,`number`,`string`). + - The name must match _one_ of the types. + - **_NOTE - Using this option will require that you lint with type information._** + - For example, this lets you do things like enforce that `boolean` variables are prefixed with a verb. + - The following `types` are allowed: + - `array` matches any type assignable to `Array | null | undefined` + - `boolean` matches any type assignable to `boolean | null | undefined` + - `function` matches any type assignable to `Function | null | undefined` + - `number` matches any type assignable to `number | null | undefined` + - `string` matches any type assignable to `string | null | undefined` + +The ordering of selectors does not matter. The implementation will automatically sort the selectors to ensure they match from most-specific to least specific. It will keep checking selectors in that order until it finds one that matches the name. See ["How does the rule automatically order selectors?"](#how-does-the-rule-automatically-order-selectors) + +#### Allowed Selectors, Modifiers and Types + +There are two types of selectors, individual selectors, and grouped selectors. + +##### Individual Selectors + +Individual Selectors match specific, well-defined sets. There is no overlap between each of the individual selectors. + +- `classicAccessor` - matches any accessor. It refers to the methods attached to `get` and `set` syntax. + - Allowed `modifiers`: `abstract`, `override`, `private`, `protected`, `public`, `requiresQuotes`, `static`. + - Allowed `types`: `array`, `boolean`, `function`, `number`, `string`. +- `autoAccessor` - matches any auto-accessor. An auto-accessor is just a class field starting with an `accessor` keyword. + - Allowed `modifiers`: `abstract`, `override`, `private`, `protected`, `public`, `requiresQuotes`, `static`. + - Allowed `types`: `array`, `boolean`, `function`, `number`, `string`. +- `class` - matches any class declaration. + - Allowed `modifiers`: `abstract`, `exported`, `unused`. + - Allowed `types`: none. +- `classMethod` - matches any class method. Also matches properties that have direct function expression or arrow function expression values. Does not match accessors. + - Allowed `modifiers`: `abstract`, `async`, `override`, `#private`, `private`, `protected`, `public`, `requiresQuotes`, `static`. + - Allowed `types`: none. +- `classProperty` - matches any class property. Does not match properties that have direct function expression or arrow function expression values. + - Allowed `modifiers`: `abstract`, `override`, `#private`, `private`, `protected`, `public`, `readonly`, `requiresQuotes`, `static`. + - Allowed `types`: `array`, `boolean`, `function`, `number`, `string`. +- `enum` - matches any enum declaration. + - Allowed `modifiers`: `exported`, `unused`. + - Allowed `types`: none. +- `enumMember` - matches any enum member. + - Allowed `modifiers`: `requiresQuotes`. + - Allowed `types`: none. +- `function` - matches any named function declaration or named function expression. + - Allowed `modifiers`: `async`, `exported`, `global`, `unused`. + - Allowed `types`: none. +- `import` - matches namespace imports and default imports (i.e. does not match named imports). + - Allowed `modifiers`: `default`, `namespace`. + - Allowed `types`: none. +- `interface` - matches any interface declaration. + - Allowed `modifiers`: `exported`, `unused`. + - Allowed `types`: none. +- `objectLiteralMethod` - matches any object literal method. Also matches properties that have direct function expression or arrow function expression values. Does not match accessors. + - Allowed `modifiers`: `async`, `public`, `requiresQuotes`. + - Allowed `types`: none. +- `objectLiteralProperty` - matches any object literal property. Does not match properties that have direct function expression or arrow function expression values. + - Allowed `modifiers`: `public`, `requiresQuotes`. + - Allowed `types`: `array`, `boolean`, `function`, `number`, `string`. +- `parameter` - matches any function parameter. Does not match parameter properties. + - Allowed `modifiers`: `destructured`, `unused`. + - Allowed `types`: `array`, `boolean`, `function`, `number`, `string`. +- `parameterProperty` - matches any parameter property. + - Allowed `modifiers`: `private`, `protected`, `public`, `readonly`. + - Allowed `types`: `array`, `boolean`, `function`, `number`, `string`. +- `typeAlias` - matches any type alias declaration. + - Allowed `modifiers`: `exported`, `unused`. + - Allowed `types`: none. +- `typeMethod` - matches any object type method. Also matches properties that have direct function expression or arrow function expression values. Does not match accessors. + - Allowed `modifiers`: `public`, `requiresQuotes`. + - Allowed `types`: none. +- `typeParameter` - matches any generic type parameter declaration. + - Allowed `modifiers`: `unused`. + - Allowed `types`: none. +- `typeProperty` - matches any object type property. Does not match properties that have direct function expression or arrow function expression values. + - Allowed `modifiers`: `public`, `readonly`, `requiresQuotes`. + - Allowed `types`: `array`, `boolean`, `function`, `number`, `string`. +- `variable` - matches any `const` / `let` / `var` variable name. + - Allowed `modifiers`: `async`, `const`, `destructured`, `exported`, `global`, `unused`. + - Allowed `types`: `array`, `boolean`, `function`, `number`, `string`. + +##### Group Selectors + +Group Selectors are provided for convenience, and essentially bundle up sets of individual selectors. + +- `default` - matches everything. + - Allowed `modifiers`: all modifiers. + - Allowed `types`: none. +- `accessor` - matches the same as `classicAccessor` and `autoAccessor`. + - Allowed `modifiers`: `abstract`, `override`, `private`, `protected`, `public`, `requiresQuotes`, `static`. + - Allowed `types`: `array`, `boolean`, `function`, `number`, `string`. +- `memberLike` - matches the same as `classicAccessor`, `autoAccessor`, `enumMember`, `method`, `parameterProperty`, `property`. + - Allowed `modifiers`: `abstract`, `async`, `override`, `#private`, `private`, `protected`, `public`, `readonly`, `requiresQuotes`, `static`. + - Allowed `types`: none. +- `method` - matches the same as `classMethod`, `objectLiteralMethod`, `typeMethod`. + - Allowed `modifiers`: `abstract`, `async`, `override`, `#private`, `private`, `protected`, `public`, `readonly`, `requiresQuotes`, `static`. + - Allowed `types`: none. +- `property` - matches the same as `classProperty`, `objectLiteralProperty`, `typeProperty`. + - Allowed `modifiers`: `abstract`, `async`, `override`, `#private`, `private`, `protected`, `public`, `readonly`, `requiresQuotes`, `static`. + - Allowed `types`: `array`, `boolean`, `function`, `number`, `string`. +- `typeLike` - matches the same as `class`, `enum`, `interface`, `typeAlias`, `typeParameter`. + - Allowed `modifiers`: `abstract`, `unused`. + - Allowed `types`: none. +- `variableLike` - matches the same as `function`, `parameter` and `variable`. + - Allowed `modifiers`: `async`, `unused`. + - Allowed `types`: none. + +## FAQ + +This is a big rule, and there's a lot of docs. Here are a few clarifications that people often ask about or figure out via trial-and-error. + +### How does the rule evaluate a selector? + +Each selector is checked in the following way: + +1. check the `filter` + 1. if `filter` is omitted → skip this step. + 2. if the name matches the `filter` → continue evaluating this selector. + 3. if the name does not match the `filter` → skip this selector and continue to the next selector. +2. check the `selector` + 1. if `selector` is one individual selector → the name's type must be of that type. + 2. if `selector` is a group selector → the name's type must be one of the grouped types. + 3. if `selector` is an array of selectors → apply the above for each selector in the array. +3. check the `types` + 1. if `types` is omitted → skip this step. + 2. if the name has a type in `types` → continue evaluating this selector. + 3. if the name does not have a type in `types` → skip this selector and continue to the next selector. + +A name is considered to pass the config if it: + +1. Matches one selector and passes all of that selector's format checks. +2. Matches no selectors. + +A name is considered to fail the config if it matches one selector and fails one that selector's format checks. + +### How does the rule automatically order selectors? + +Each identifier should match exactly one selector. It may match multiple group selectors - but only ever one selector. +With that in mind - the base sort order works out to be: + +1. Individual Selectors +2. Grouped Selectors +3. Default Selector + +Within each of these categories, some further sorting occurs based on what selector options are supplied: + +1. `filter` is given the highest priority above all else. +2. `types` +3. `modifiers` +4. everything else + +For example, if you provide the following config: + +```ts +[ + /* 1 */ { selector: 'default', format: ['camelCase'] }, + /* 2 */ { selector: 'variable', format: ['snake_case'] }, + /* 3 */ { selector: 'variable', types: ['boolean'], format: ['UPPER_CASE'] }, + /* 4 */ { selector: 'variableLike', format: ['PascalCase'] }, +]; +``` + +Then for the code `const x = 1`, the rule will validate the selectors in the following order: `3`, `2`, `4`, `1`. +To clearly spell it out: + +- (3) is tested first because it has `types` and is an individual selector. +- (2) is tested next because it is an individual selector. +- (4) is tested next as it is a grouped selector. +- (1) is tested last as it is the base default selector. + +Its worth noting that whilst this order is applied, all selectors may not run on a name. +This is explained in ["How does the rule evaluate a name's format?"](#how-does-the-rule-evaluate-a-names-format) + +### How does the rule evaluate a name's format? + +When the format of an identifier is checked, it is checked in the following order: + +1. validate leading underscore +1. validate trailing underscore +1. validate prefix +1. validate suffix +1. validate custom +1. validate format + +For steps 1-4, if the identifier matches the option, the matching part will be removed. +This is done so that you can apply formats like PascalCase without worrying about prefixes or underscores causing it to not match. + +One final note is that if the name were to become empty via this trimming process, it is considered to match all `format`s. An example of where this might be useful is for generic type parameters, where you want all names to be prefixed with `T`, but also want to allow for the single character `T` name. + +Here are some examples to help illustrate + +Name: `_IMyInterface` +Selector: + +```json +{ + "leadingUnderscore": "require", + "prefix": ["I"], + "format": ["UPPER_CASE", "StrictPascalCase"] +} +``` + +1. `name = _IMyInterface` +1. validate leading underscore + 1. config is provided + 1. check name → pass + 1. Trim underscore → `name = IMyInterface` +1. validate trailing underscore + 1. config is not provided → skip +1. validate prefix + 1. config is provided + 1. check name → pass + 1. Trim prefix → `name = MyInterface` +1. validate suffix + 1. config is not provided → skip +1. validate custom + 1. config is not provided → skip +1. validate format + 1. for each format... + 1. `format = 'UPPER_CASE'` + 1. check format → fail. + - Important to note that if you supply multiple formats - the name only needs to match _one_ of them! + 1. `format = 'StrictPascalCase'` + 1. check format → success. +1. **_success_** + +Name: `IMyInterface` +Selector: + +```json +{ + "format": ["StrictPascalCase"], + "trailingUnderscore": "allow", + "custom": { + "regex": "^I[A-Z]", + "match": false + } +} +``` + +1. `name = IMyInterface` +1. validate leading underscore + 1. config is not provided → skip +1. validate trailing underscore + 1. config is provided + 1. check name → pass + 1. Trim underscore → `name = IMyInterface` +1. validate prefix + 1. config is not provided → skip +1. validate suffix + 1. config is not provided → skip +1. validate custom + 1. config is provided + 1. `regex = new RegExp("^I[A-Z]")` + 1. `regex.test(name) === custom.match` + 1. **_fail_** → report and exit + +### What happens if I provide a `modifiers` to a Group Selector? + +Some group selectors accept `modifiers`. For the most part these will work exactly the same as with individual selectors. +There is one exception to this in that a modifier might not apply to all individual selectors covered by a group selector. + +For example - `memberLike` includes the `enumMember` selector, and it allows the `protected` modifier. +An `enumMember` can never ever be `protected`, which means that the following config will never match any `enumMember`: + +```json +{ + "selector": "memberLike", + "modifiers": ["protected"] +} +``` + +To help with matching, members that cannot specify an accessibility will always have the `public` modifier. This means that the following config will always match any `enumMember`: + +```json +{ + "selector": "memberLike", + "modifiers": ["public"] +} +``` + +## Examples + +### Enforce that all variables, functions and properties follow are camelCase + +```json +{ + "@typescript-eslint/naming-convention": [ + "error", + { "selector": "variableLike", "format": ["camelCase"] } + ] +} +``` + +### Enforce that private members are prefixed with an underscore + +```json +{ + "@typescript-eslint/naming-convention": [ + "error", + { + "selector": "memberLike", + "modifiers": ["private"], + "format": ["camelCase"], + "leadingUnderscore": "require" + } + ] +} +``` + +### Enforce that boolean variables are prefixed with an allowed verb + +**Note:** As [documented above](#format-options), the prefix is trimmed before format is validated, thus PascalCase must be used to allow variables such as `isEnabled`. + +```json +{ + "@typescript-eslint/naming-convention": [ + "error", + { + "selector": "variable", + "types": ["boolean"], + "format": ["PascalCase"], + "prefix": ["is", "should", "has", "can", "did", "will"] + } + ] +} +``` + +### Enforce that all variables are either in camelCase or UPPER_CASE + +```json +{ + "@typescript-eslint/naming-convention": [ + "error", + { + "selector": "variable", + "format": ["camelCase", "UPPER_CASE"] + } + ] +} +``` + +### Enforce that all const variables are in UPPER_CASE + +```json +{ + "@typescript-eslint/naming-convention": [ + "error", + { + "selector": "variable", + "modifiers": ["const"], + "format": ["UPPER_CASE"] + } + ] +} +``` + +### Enforce that type parameters (generics) are prefixed with `T` + +This allows you to emulate the old `generic-type-naming` rule. + +```json +{ + "@typescript-eslint/naming-convention": [ + "error", + { + "selector": "typeParameter", + "format": ["PascalCase"], + "prefix": ["T"] + } + ] +} +``` + +### Enforce that interface names do not begin with an `I` + +This allows you to emulate the old `interface-name-prefix` rule. + +```json +{ + "@typescript-eslint/naming-convention": [ + "error", + { + "selector": "interface", + "format": ["PascalCase"], + "custom": { + "regex": "^I[A-Z]", + "match": false + } + } + ] +} +``` + +### Enforce that variable and function names are in camelCase + +This allows you to lint multiple type with same pattern. + +```json +{ + "@typescript-eslint/naming-convention": [ + "error", + { + "selector": ["variable", "function"], + "format": ["camelCase"], + "leadingUnderscore": "allow" + } + ] +} +``` + +### Ignore properties that **_require_** quotes + +Sometimes you have to use a quoted name that breaks the convention (for example, HTTP headers). +If this is a common thing in your codebase, then you have a few options. + +If you simply want to allow all property names that require quotes, you can use the `requiresQuotes` modifier to match any property name that _requires_ quoting, and use `format: null` to ignore the name. + +```jsonc +{ + "@typescript-eslint/naming-convention": [ + "error", + { + "selector": [ + "classProperty", + "objectLiteralProperty", + "typeProperty", + "classMethod", + "objectLiteralMethod", + "typeMethod", + "accessor", + "enumMember", + ], + "format": null, + "modifiers": ["requiresQuotes"], + }, + ], +} +``` + +If you have a small and known list of exceptions, you can use the `filter` option to ignore these specific names only: + +```jsonc +{ + "@typescript-eslint/naming-convention": [ + "error", + { + "selector": "property", + "format": ["strictCamelCase"], + "filter": { + // you can expand this regex to add more allowed names + "regex": "^(Property-Name-One|Property-Name-Two)$", + "match": false, + }, + }, + ], +} +``` + +You can use the `filter` option to ignore names with specific characters: + +```jsonc +{ + "@typescript-eslint/naming-convention": [ + "error", + { + "selector": "property", + "format": ["strictCamelCase"], + "filter": { + // you can expand this regex as you find more cases that require quoting that you want to allow + "regex": "[- ]", + "match": false, + }, + }, + ], +} +``` + +Note that there is no way to ignore any name that is quoted - only names that are required to be quoted. +This is intentional - adding quotes around a name is not an escape hatch for proper naming. +If you want an escape hatch for a specific name - you should can use an [`eslint-disable` comment](https://eslint.org/docs/user-guide/configuring#disabling-rules-with-inline-comments). + +### Ignore destructured names + +Sometimes you might want to allow destructured properties to retain their original name, even if it breaks your naming convention. + +You can use the `destructured` modifier to match these names, and explicitly set `format: null` to apply no formatting: + +```jsonc +{ + "@typescript-eslint/naming-convention": [ + "error", + { + "selector": "variable", + "modifiers": ["destructured"], + "format": null, + }, + ], +} +``` + +### Enforce the codebase follows ESLint's `camelcase` conventions + +```json +{ + "camelcase": "off", + "@typescript-eslint/naming-convention": [ + "error", + { + "selector": "default", + "format": ["camelCase"] + }, + + { + "selector": "variable", + "format": ["camelCase", "UPPER_CASE"] + }, + { + "selector": "parameter", + "format": ["camelCase"], + "leadingUnderscore": "allow" + }, + + { + "selector": "memberLike", + "modifiers": ["private"], + "format": ["camelCase"], + "leadingUnderscore": "require" + }, + + { + "selector": "typeLike", + "format": ["PascalCase"] + } + ] +} +``` + +## When Not To Use It + +This rule can be very strict. +If you don't have strong needs for enforcing naming conventions, we recommend using it only to flag very egregious violations of your naming standards. +Consider documenting your naming conventions and enforcing them in code review if you have processes like that. + +If you do not want to enforce naming conventions for anything, you can disable this rule. + +However, keep in mind that inconsistent style can harm readability in a project. +We recommend that if you care about naming conventions, pick a single option for this rule that works best for your project. diff --git a/node_modules/@typescript-eslint/eslint-plugin/docs/rules/no-array-constructor.mdx b/node_modules/@typescript-eslint/eslint-plugin/docs/rules/no-array-constructor.mdx new file mode 100644 index 000000000..d23491863 --- /dev/null +++ b/node_modules/@typescript-eslint/eslint-plugin/docs/rules/no-array-constructor.mdx @@ -0,0 +1,35 @@ +--- +description: 'Disallow generic `Array` constructors.' +--- + +import Tabs from '@theme/Tabs'; +import TabItem from '@theme/TabItem'; + +> 🛑 This file is source code, not the primary documentation location! 🛑 +> +> See **https://typescript-eslint.io/rules/no-array-constructor** for documentation. + +This rule extends the base [`eslint/no-array-constructor`](https://eslint.org/docs/rules/no-array-constructor) rule. +It adds support for the generically typed `Array` constructor (`new Array()`). + + + + +```ts +Array(0, 1, 2); +new Array(0, 1, 2); +``` + + + + +```ts +Array(0, 1, 2); +new Array(x, y, z); + +Array(500); +new Array(someOtherArray.length); +``` + + + diff --git a/node_modules/@typescript-eslint/eslint-plugin/docs/rules/no-array-delete.mdx b/node_modules/@typescript-eslint/eslint-plugin/docs/rules/no-array-delete.mdx new file mode 100644 index 000000000..38e170fc5 --- /dev/null +++ b/node_modules/@typescript-eslint/eslint-plugin/docs/rules/no-array-delete.mdx @@ -0,0 +1,44 @@ +--- +description: 'Disallow using the `delete` operator on array values.' +--- + +import Tabs from '@theme/Tabs'; +import TabItem from '@theme/TabItem'; + +> 🛑 This file is source code, not the primary documentation location! 🛑 +> +> See **https://typescript-eslint.io/rules/no-array-delete** for documentation. + +When using the `delete` operator with an array value, the array's `length` property is not affected, +but the element at the specified index is removed and leaves an empty slot in the array. +This is likely to lead to unexpected behavior. As mentioned in the +[MDN documentation](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Operators/delete#deleting_array_elements), +the recommended way to remove an element from an array is by using the +[`Array#splice`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/splice) method. + +## Examples + + + + +```ts +declare const arr: number[]; + +delete arr[0]; +``` + + + + +```ts +declare const arr: number[]; + +arr.splice(0, 1); +``` + + + + +## When Not To Use It + +When you want to allow the delete operator with array expressions. diff --git a/node_modules/@typescript-eslint/eslint-plugin/docs/rules/no-base-to-string.mdx b/node_modules/@typescript-eslint/eslint-plugin/docs/rules/no-base-to-string.mdx new file mode 100644 index 000000000..5e6b531e4 --- /dev/null +++ b/node_modules/@typescript-eslint/eslint-plugin/docs/rules/no-base-to-string.mdx @@ -0,0 +1,94 @@ +--- +description: 'Require `.toString()` to only be called on objects which provide useful information when stringified.' +--- + +import Tabs from '@theme/Tabs'; +import TabItem from '@theme/TabItem'; + +> 🛑 This file is source code, not the primary documentation location! 🛑 +> +> See **https://typescript-eslint.io/rules/no-base-to-string** for documentation. + +JavaScript will call `toString()` on an object when it is converted to a string, such as when `+` adding to a string or in `${}` template literals. +The default Object `.toString()` returns `"[object Object]"`, which is often not what was intended. +This rule reports on stringified values that aren't primitives and don't define a more useful `.toString()` method. + +> Note that `Function` provides its own `.toString()` that returns the function's code. +> Functions are not flagged by this rule. + +## Examples + + + + +```ts +// Passing an object or class instance to string concatenation: +'' + {}; + +class MyClass {} +const value = new MyClass(); +value + ''; + +// Interpolation and manual .toString() calls too: +`Value: ${value}`; +({}).toString(); +``` + + + + +```ts +// These types all have useful .toString()s +'Text' + true; +`Value: ${123}`; +`Arrays too: ${[1, 2, 3]}`; +(() => {}).toString(); + +// Defining a custom .toString class is considered acceptable +class CustomToString { + toString() { + return 'Hello, world!'; + } +} +`Value: ${new CustomToString()}`; + +const literalWithToString = { + toString: () => 'Hello, world!', +}; + +`Value: ${literalWithToString}`; +``` + + + + +## Options + +### `ignoredTypeNames` + +A string array of type names to ignore, this is useful for types missing `toString()` (but actually has `toString()`). +There are some types missing `toString()` in old version TypeScript, like `RegExp`, `URL`, `URLSearchParams` etc. + +The following patterns are considered correct with the default options `{ ignoredTypeNames: ["RegExp"] }`: + +```ts option='{ "ignoredTypeNames": ["RegExp"] }' showPlaygroundButton +`${/regex/}`; +'' + /regex/; +/regex/.toString(); +let value = /regex/; +value.toString(); +let text = `${value}`; +``` + +## When Not To Use It + +If you don't mind a risk of `"[object Object]"` or incorrect type coercions in your values, then you will not need this rule. + +## Related To + +- [`restrict-plus-operands`](./restrict-plus-operands.mdx) +- [`restrict-template-expressions`](./restrict-template-expressions.mdx) + +## Further Reading + +- [`Object.prototype.toString()` MDN documentation](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object/toString) diff --git a/node_modules/@typescript-eslint/eslint-plugin/docs/rules/no-confusing-non-null-assertion.mdx b/node_modules/@typescript-eslint/eslint-plugin/docs/rules/no-confusing-non-null-assertion.mdx new file mode 100644 index 000000000..0ff48e14c --- /dev/null +++ b/node_modules/@typescript-eslint/eslint-plugin/docs/rules/no-confusing-non-null-assertion.mdx @@ -0,0 +1,62 @@ +--- +description: 'Disallow non-null assertion in locations that may be confusing.' +--- + +import Tabs from '@theme/Tabs'; +import TabItem from '@theme/TabItem'; + +> 🛑 This file is source code, not the primary documentation location! 🛑 +> +> See **https://typescript-eslint.io/rules/no-confusing-non-null-assertion** for documentation. + +Using a non-null assertion (`!`) next to an assign or equals check (`=` or `==` or `===`) creates code that is confusing as it looks similar to a not equals check (`!=` `!==`). + +```typescript +a! == b; // a non-null assertions(`!`) and an equals test(`==`) +a !== b; // not equals test(`!==`) +a! === b; // a non-null assertions(`!`) and an triple equals test(`===`) +``` + +This rule flags confusing `!` assertions and suggests either removing them or wrapping the asserted expression in `()` parenthesis. + +## Examples + + + + +```ts +interface Foo { + bar?: string; + num?: number; +} + +const foo: Foo = getFoo(); +const isEqualsBar = foo.bar! == 'hello'; +const isEqualsNum = 1 + foo.num! == 2; +``` + + + + +{/* prettier-ignore */} +```ts +interface Foo { + bar?: string; + num?: number; +} + +const foo: Foo = getFoo(); +const isEqualsBar = foo.bar == 'hello'; +const isEqualsNum = (1 + foo.num!) == 2; +``` + + + + +## When Not To Use It + +If you don't care about this confusion, then you will not need this rule. + +## Further Reading + +- [`Issue: Easy misunderstanding: "! ==="`](https://github.com/microsoft/TypeScript/issues/37837) in [TypeScript repo](https://github.com/microsoft/TypeScript) diff --git a/node_modules/@typescript-eslint/eslint-plugin/docs/rules/no-confusing-void-expression.mdx b/node_modules/@typescript-eslint/eslint-plugin/docs/rules/no-confusing-void-expression.mdx new file mode 100644 index 000000000..043b07521 --- /dev/null +++ b/node_modules/@typescript-eslint/eslint-plugin/docs/rules/no-confusing-void-expression.mdx @@ -0,0 +1,122 @@ +--- +description: 'Require expressions of type void to appear in statement position.' +--- + +import Tabs from '@theme/Tabs'; +import TabItem from '@theme/TabItem'; + +> 🛑 This file is source code, not the primary documentation location! 🛑 +> +> See **https://typescript-eslint.io/rules/no-confusing-void-expression** for documentation. + +`void` in TypeScript refers to a function return that is meant to be ignored. +Attempting to use a `void`-typed value, such as storing the result of a called function in a variable, is often a sign of a programmer error. +`void` can also be misleading for other developers even if used correctly. + +This rule prevents `void` type expressions from being used in misleading locations such as being assigned to a variable, provided as a function argument, or returned from a function. + +## Examples + + + + +```ts +// somebody forgot that `alert` doesn't return anything +const response = alert('Are you sure?'); +console.log(alert('Are you sure?')); + +// it's not obvious whether the chained promise will contain the response (fixable) +promise.then(value => window.postMessage(value)); + +// it looks like we are returning the result of `console.error` (fixable) +function doSomething() { + if (!somethingToDo) { + return console.error('Nothing to do!'); + } + + console.log('Doing a thing...'); +} +``` + + + + +```ts +// just a regular void function in a statement position +alert('Hello, world!'); + +// this function returns a boolean value so it's ok +const response = confirm('Are you sure?'); +console.log(confirm('Are you sure?')); + +// now it's obvious that `postMessage` doesn't return any response +promise.then(value => { + window.postMessage(value); +}); + +// now it's explicit that we want to log the error and return early +function doSomething() { + if (!somethingToDo) { + console.error('Nothing to do!'); + return; + } + + console.log('Doing a thing...'); +} + +// using logical expressions for their side effects is fine +cond && console.log('true'); +cond || console.error('false'); +cond ? console.log('true') : console.error('false'); +``` + + + + +## Options + +### `ignoreArrowShorthand` + +It might be undesirable to wrap every arrow function shorthand expression with braces. +Especially when using Prettier formatter, which spreads such code across 3 lines instead of 1. + +Examples of additional **correct** code with this option enabled: + +```ts option='{ "ignoreArrowShorthand": true }' showPlaygroundButton +promise.then(value => window.postMessage(value)); +``` + +### `ignoreVoidOperator` + +It might be preferable to only use some distinct syntax +to explicitly mark the confusing but valid usage of void expressions. +This option allows void expressions which are explicitly wrapped in the `void` operator. +This can help avoid confusion among other developers as long as they are made aware of this code style. + +This option also changes the automatic fixes for common cases to use the `void` operator. +It also enables a suggestion fix to wrap the void expression with `void` operator for every problem reported. + +Examples of additional **correct** code with this option enabled: + +```ts option='{ "ignoreVoidOperator": true }' showPlaygroundButton +// now it's obvious that we don't expect any response +promise.then(value => void window.postMessage(value)); + +// now it's explicit that we don't want to return anything +function doSomething() { + if (!somethingToDo) { + return void console.error('Nothing to do!'); + } + + console.log('Doing a thing...'); +} + +// we are sure that we want to always log `undefined` +console.log(void alert('Hello, world!')); +``` + +## When Not To Use It + +The return type of a function can be inspected by going to its definition or hovering over it in an IDE. +If you don't care about being explicit about the void type in actual code then don't use this rule. +Also, if you strongly prefer a concise coding style more strongly than any fear of `void`-related bugs then you can avoid this rule. diff --git a/node_modules/@typescript-eslint/eslint-plugin/docs/rules/no-dupe-class-members.mdx b/node_modules/@typescript-eslint/eslint-plugin/docs/rules/no-dupe-class-members.mdx new file mode 100644 index 000000000..804479b20 --- /dev/null +++ b/node_modules/@typescript-eslint/eslint-plugin/docs/rules/no-dupe-class-members.mdx @@ -0,0 +1,17 @@ +--- +description: 'Disallow duplicate class members.' +--- + +import Tabs from '@theme/Tabs'; +import TabItem from '@theme/TabItem'; + +> 🛑 This file is source code, not the primary documentation location! 🛑 +> +> See **https://typescript-eslint.io/rules/no-dupe-class-members** for documentation. + +import TypeScriptOverlap from '@site/src/components/TypeScriptOverlap'; + + + +This rule extends the base [`eslint/no-dupe-class-members`](https://eslint.org/docs/rules/no-dupe-class-members) rule. +It adds support for TypeScript's method overload definitions. diff --git a/node_modules/@typescript-eslint/eslint-plugin/docs/rules/no-duplicate-enum-values.mdx b/node_modules/@typescript-eslint/eslint-plugin/docs/rules/no-duplicate-enum-values.mdx new file mode 100644 index 000000000..65162a62a --- /dev/null +++ b/node_modules/@typescript-eslint/eslint-plugin/docs/rules/no-duplicate-enum-values.mdx @@ -0,0 +1,64 @@ +--- +description: 'Disallow duplicate enum member values.' +--- + +import Tabs from '@theme/Tabs'; +import TabItem from '@theme/TabItem'; + +> 🛑 This file is source code, not the primary documentation location! 🛑 +> +> See **https://typescript-eslint.io/rules/no-duplicate-enum-values** for documentation. + +Although TypeScript supports duplicate enum member values, people usually expect members to have unique values within the same enum. Duplicate values can lead to bugs that are hard to track down. + +## Examples + +This rule disallows defining an enum with multiple members initialized to the same value. + +> This rule only enforces on enum members initialized with string or number literals. +> Members without an initializer or initialized with an expression are not checked by this rule. + + + + +```ts +enum E { + A = 0, + B = 0, +} +``` + +```ts +enum E { + A = 'A', + B = 'A', +} +``` + + + + +```ts +enum E { + A = 0, + B = 1, +} +``` + +```ts +enum E { + A = 'A', + B = 'B', +} +``` + + + + +## When Not To Use It + +It can sometimes be useful to include duplicate enum members for very specific use cases. +For example, when renaming an enum member, it can sometimes be useful to keep the old name until a scheduled major breaking change. +You might consider using [ESLint disable comments](https://eslint.org/docs/latest/use/configure/rules#using-configuration-comments-1) for those specific situations instead of completely disabling this rule. + +In general, if your project intentionally duplicates enum member values, you can avoid this rule. diff --git a/node_modules/@typescript-eslint/eslint-plugin/docs/rules/no-duplicate-imports.mdx b/node_modules/@typescript-eslint/eslint-plugin/docs/rules/no-duplicate-imports.mdx new file mode 100644 index 000000000..ae1d957d5 --- /dev/null +++ b/node_modules/@typescript-eslint/eslint-plugin/docs/rules/no-duplicate-imports.mdx @@ -0,0 +1,13 @@ +:::danger Deprecated + +This rule has been deprecated in favour of the [`import/no-duplicates`](https://github.com/import-js/eslint-plugin-import/blob/HEAD/docs/rules/no-duplicates.md) rule. + +::: + + diff --git a/node_modules/@typescript-eslint/eslint-plugin/docs/rules/no-duplicate-type-constituents.mdx b/node_modules/@typescript-eslint/eslint-plugin/docs/rules/no-duplicate-type-constituents.mdx new file mode 100644 index 000000000..754d59087 --- /dev/null +++ b/node_modules/@typescript-eslint/eslint-plugin/docs/rules/no-duplicate-type-constituents.mdx @@ -0,0 +1,72 @@ +--- +description: 'Disallow duplicate constituents of union or intersection types.' +--- + +import Tabs from '@theme/Tabs'; +import TabItem from '@theme/TabItem'; + +> 🛑 This file is source code, not the primary documentation location! 🛑 +> +> See **https://typescript-eslint.io/rules/no-duplicate-type-constituents** for documentation. + +TypeScript supports types ("constituents") within union and intersection types being duplicates of each other. +However, developers typically expect each constituent to be unique within its intersection or union. +Duplicate values make the code overly verbose and generally reduce readability. + +This rule disallows duplicate union or intersection constituents. +We consider types to be duplicate if they evaluate to the same result in the type system. +For example, given `type A = string` and `type T = string | A`, this rule would flag that `A` is the same type as `string`. + + + + +```ts +type T1 = 'A' | 'A'; + +type T2 = A | A | B; + +type T3 = { a: string } & { a: string }; + +type T4 = [1, 2, 3] | [1, 2, 3]; + +type StringA = string; +type StringB = string; +type T5 = StringA | StringB; +``` + + + + +```ts +type T1 = 'A' | 'B'; + +type T2 = A | B | C; + +type T3 = { a: string } & { b: string }; + +type T4 = [1, 2, 3] | [1, 2, 3, 4]; + +type StringA = string; +type NumberB = number; +type T5 = StringA | NumberB; +``` + + + + +## Options + +### `ignoreIntersections` + +When set to true, duplicate checks on intersection type constituents are ignored. + +### `ignoreUnions` + +When set to true, duplicate checks on union type constituents are ignored. + +## When Not To Use It + +It can sometimes be useful for the sake of documentation to include aliases for the same type. +You might consider using [ESLint disable comments](https://eslint.org/docs/latest/use/configure/rules#using-configuration-comments-1) for those specific situations instead of completely disabling this rule. + +> In some of those cases, [branded types](https://basarat.gitbook.io/typescript/main-1/nominaltyping#using-interfaces) might be a type-safe way to represent the underlying data types. diff --git a/node_modules/@typescript-eslint/eslint-plugin/docs/rules/no-dynamic-delete.mdx b/node_modules/@typescript-eslint/eslint-plugin/docs/rules/no-dynamic-delete.mdx new file mode 100644 index 000000000..65542c903 --- /dev/null +++ b/node_modules/@typescript-eslint/eslint-plugin/docs/rules/no-dynamic-delete.mdx @@ -0,0 +1,59 @@ +--- +description: 'Disallow using the `delete` operator on computed key expressions.' +--- + +import Tabs from '@theme/Tabs'; +import TabItem from '@theme/TabItem'; + +> 🛑 This file is source code, not the primary documentation location! 🛑 +> +> See **https://typescript-eslint.io/rules/no-dynamic-delete** for documentation. + +Deleting dynamically computed keys can be dangerous and in some cases not well optimized. +Using the `delete` operator on keys that aren't runtime constants could be a sign that you're using the wrong data structures. +Using `Object`s with added and removed keys can cause occasional edge case bugs, such as if a key is named `"hasOwnProperty"`. + +> Consider using a `Map` or `Set` if you’re storing collections of objects. + +## Examples + + + + +```ts +// Can be replaced with the constant equivalents, such as container.aaa +delete container['aaa']; +delete container['Infinity']; + +// Dynamic, difficult-to-reason-about lookups +const name = 'name'; +delete container[name]; +delete container[name.toUpperCase()]; +``` + + + + +```ts +const container: { [i: string]: number } = { + /* ... */ +}; + +// Constant runtime lookups by string index +delete container.aaa; + +// Constants that must be accessed by [] +delete container[7]; +delete container['-Infinity']; +``` + + + + +## When Not To Use It + +When you know your keys are safe to delete, this rule can be unnecessary. +You might consider using [ESLint disable comments](https://eslint.org/docs/latest/use/configure/rules#using-configuration-comments-1) for those specific situations instead of completely disabling this rule. + +Do not consider this rule as performance advice before profiling your code's bottlenecks. +Even repeated minor performance slowdowns likely do not significantly affect your application's general perceived speed. diff --git a/node_modules/@typescript-eslint/eslint-plugin/docs/rules/no-empty-function.mdx b/node_modules/@typescript-eslint/eslint-plugin/docs/rules/no-empty-function.mdx new file mode 100644 index 000000000..9da88ae05 --- /dev/null +++ b/node_modules/@typescript-eslint/eslint-plugin/docs/rules/no-empty-function.mdx @@ -0,0 +1,95 @@ +--- +description: 'Disallow empty functions.' +--- + +import Tabs from '@theme/Tabs'; +import TabItem from '@theme/TabItem'; + +> 🛑 This file is source code, not the primary documentation location! 🛑 +> +> See **https://typescript-eslint.io/rules/no-empty-function** for documentation. + +This rule extends the base [`eslint/no-empty-function`](https://eslint.org/docs/rules/no-empty-function) rule. +It adds support for handling TypeScript specific code that would otherwise trigger the rule. + +One example of valid TypeScript specific code that would otherwise trigger the `no-empty-function` rule is the use of [parameter properties](https://www.typescriptlang.org/docs/handbook/classes.html#parameter-properties) in constructor functions. + +## Options + +This rule adds the following options: + +```ts +type AdditionalAllowOptionEntries = + | 'private-constructors' + | 'protected-constructors' + | 'decoratedFunctions' + | 'overrideMethods'; + +type AllowOptionEntries = + | BaseNoEmptyFunctionAllowOptionEntries + | AdditionalAllowOptionEntries; + +interface Options extends BaseNoEmptyFunctionOptions { + allow?: Array; +} +const defaultOptions: Options = { + ...baseNoEmptyFunctionDefaultOptions, + allow: [], +}; +``` + +### allow: `private-constructors` + +Examples of correct code for the `{ "allow": ["private-constructors"] }` option: + +```ts option='{ "allow": ["private-constructors"] }' showPlaygroundButton +class Foo { + private constructor() {} +} +``` + +### allow: `protected-constructors` + +Examples of correct code for the `{ "allow": ["protected-constructors"] }` option: + +```ts option='{ "allow": ["protected-constructors"] }' showPlaygroundButton +class Foo { + protected constructor() {} +} +``` + +### allow: `decoratedFunctions` + +Examples of correct code for the `{ "allow": ["decoratedFunctions"] }` option: + +```ts option='{ "allow": ["decoratedFunctions"] }' showPlaygroundButton +class Foo { + @decorator() + foo() {} +} +``` + +### allow: `overrideMethods` + +Examples of correct code for the `{ "allow": ["overrideMethods"] }` option: + +```ts option='{ "allow": ["overrideMethods"] }' showPlaygroundButton +abstract class Base { + protected greet(): void { + console.log('Hello!'); + } +} + +class Foo extends Base { + protected override greet(): void {} +} +``` + +## When Not To Use It + +If you are working with external APIs that require functions even if they do nothing, then you may want to avoid this rule. +You might consider using [ESLint disable comments](https://eslint.org/docs/latest/use/configure/rules#using-configuration-comments-1) for those specific situations instead of completely disabling this rule. + +Test code often violates this rule as well. +If your testing setup doesn't support "mock" or "spy" functions such as [`jest.fn()`](https://jestjs.io/docs/mock-functions), [`sinon.spy()`](https://sinonjs.org/releases/latest/spies), or [`vi.fn()`](https://vitest.dev/guide/mocking.html), you may wish to disable this rule in test files. +Again, if those cases aren't extremely common, you might consider using [ESLint disable comments](https://eslint.org/docs/latest/use/configure/rules#using-configuration-comments-1) for those specific situations instead of completely disabling this rule in test files. diff --git a/node_modules/@typescript-eslint/eslint-plugin/docs/rules/no-empty-interface.mdx b/node_modules/@typescript-eslint/eslint-plugin/docs/rules/no-empty-interface.mdx new file mode 100644 index 000000000..ad240237d --- /dev/null +++ b/node_modules/@typescript-eslint/eslint-plugin/docs/rules/no-empty-interface.mdx @@ -0,0 +1,63 @@ +--- +description: 'Disallow the declaration of empty interfaces.' +--- + +import Tabs from '@theme/Tabs'; +import TabItem from '@theme/TabItem'; + +> 🛑 This file is source code, not the primary documentation location! 🛑 +> +> See **https://typescript-eslint.io/rules/no-empty-interface** for documentation. + +An empty interface in TypeScript does very little: any non-nullable value is assignable to `{}`. +Using an empty interface is often a sign of programmer error, such as misunderstanding the concept of `{}` or forgetting to fill in fields. + +This rule aims to ensure that only meaningful interfaces are declared in the code. + +## Examples + + + + +```ts +// an empty interface +interface Foo {} + +// an interface with only one supertype (Bar === Foo) +interface Bar extends Foo {} + +// an interface with an empty list of supertypes +interface Baz {} +``` + + + + +```ts +// an interface with any number of members +interface Foo { + name: string; +} + +// same as above +interface Bar { + age: number; +} + +// an interface with more than one supertype +// in this case the interface can be used as a replacement of an intersection type. +interface Baz extends Foo, Bar {} +``` + + + + +## Options + +### `allowSingleExtends` + +`allowSingleExtends: true` will silence warnings about extending a single interface without adding additional members + +## When Not To Use It + +If you don't care about having empty/meaningless interfaces, then you will not need this rule. diff --git a/node_modules/@typescript-eslint/eslint-plugin/docs/rules/no-explicit-any.mdx b/node_modules/@typescript-eslint/eslint-plugin/docs/rules/no-explicit-any.mdx new file mode 100644 index 000000000..52f7108d1 --- /dev/null +++ b/node_modules/@typescript-eslint/eslint-plugin/docs/rules/no-explicit-any.mdx @@ -0,0 +1,174 @@ +--- +description: 'Disallow the `any` type.' +--- + +import Tabs from '@theme/Tabs'; +import TabItem from '@theme/TabItem'; + +> 🛑 This file is source code, not the primary documentation location! 🛑 +> +> See **https://typescript-eslint.io/rules/no-explicit-any** for documentation. + +The `any` type in TypeScript is a dangerous "escape hatch" from the type system. +Using `any` disables many type checking rules and is generally best used only as a last resort or when prototyping code. +This rule reports on explicit uses of the `any` keyword as a type annotation. + +Preferable alternatives to `any` include: + +- If the type is known, describing it in an `interface` or `type` +- If the type is not known, using the safer `unknown` type + +> TypeScript's `--noImplicitAny` compiler option prevents an implied `any`, but doesn't prevent `any` from being explicitly used the way this rule does. + +## Examples + + + + +```ts +const age: any = 'seventeen'; +``` + +```ts +const ages: any[] = ['seventeen']; +``` + +```ts +const ages: Array = ['seventeen']; +``` + +```ts +function greet(): any {} +``` + +```ts +function greet(): any[] {} +``` + +```ts +function greet(): Array {} +``` + +```ts +function greet(): Array> {} +``` + +```ts +function greet(param: Array): string {} +``` + +```ts +function greet(param: Array): Array {} +``` + + + + +```ts +const age: number = 17; +``` + +```ts +const ages: number[] = [17]; +``` + +```ts +const ages: Array = [17]; +``` + +```ts +function greet(): string {} +``` + +```ts +function greet(): string[] {} +``` + +```ts +function greet(): Array {} +``` + +```ts +function greet(): Array> {} +``` + +```ts +function greet(param: Array): string {} +``` + +```ts +function greet(param: Array): Array {} +``` + + + + +## Options + +### `fixToUnknown` + +By default, this rule will not provide automatic ESLint _fixes_: only opt-in _suggestions_. +Switching types to `unknown` is safer but is likely to cause additional type errors. + +Enabling `{ "fixToUnknown": true }` gives the rule an auto-fixer to replace `: any` with `: unknown`. + +### `ignoreRestArgs` + +A boolean to specify if arrays from the rest operator are considered okay. `false` by default. + +The examples below are **incorrect** when `{ignoreRestArgs: false}`, but **correct** when `{ignoreRestArgs: true}`. + +```ts option='{ "ignoreRestArgs": false }' showPlaygroundButton +function foo1(...args: any[]): void {} +function foo2(...args: readonly any[]): void {} +function foo3(...args: Array): void {} +function foo4(...args: ReadonlyArray): void {} + +declare function bar(...args: any[]): void; + +const baz = (...args: any[]) => {}; +const qux = function (...args: any[]) {}; + +type Quux = (...args: any[]) => void; +type Quuz = new (...args: any[]) => void; + +interface Grault { + (...args: any[]): void; +} +interface Corge { + new (...args: any[]): void; +} +interface Garply { + f(...args: any[]): void; +} +``` + +## When Not To Use It + +`any` is always a dangerous escape hatch. +Whenever possible, it is always safer to avoid it. +TypeScript's `unknown` is almost always preferable to `any`. + +However, there are occasional situations where it can be necessary to use `any`. +Most commonly: + +- If your project isn't fully onboarded to TypeScript yet, `any` can be temporarily used in places where types aren't yet known or representable +- If an external package doesn't yet have typings and you want to use `any` pending adding a `.d.ts` for it +- You're working with particularly complex or nuanced code that can't yet be represented in the TypeScript type system + +You might consider using [ESLint disable comments](https://eslint.org/docs/latest/use/configure/rules#using-configuration-comments-1) for those specific situations instead of completely disabling this rule. + +## Related To + +- [`no-unsafe-argument`](./no-unsafe-argument.mdx) +- [`no-unsafe-assignment`](./no-unsafe-assignment.mdx) +- [`no-unsafe-call`](./no-unsafe-call.mdx) +- [`no-unsafe-member-access`](./no-unsafe-member-access.mdx) +- [`no-unsafe-return`](./no-unsafe-return.mdx) + +## Further Reading + +- TypeScript [`any` type](https://www.typescriptlang.org/docs/handbook/2/everyday-types.html#any) +- TypeScript's [`unknown` type](https://www.typescriptlang.org/docs/handbook/2/functions.html#unknown) +- TypeScript [`any` type documentation](https://www.typescriptlang.org/docs/handbook/2/everyday-types.html#any) +- TypeScript [`unknown` type release notes](https://www.typescriptlang.org/docs/handbook/release-notes/typescript-3-0.html#new-unknown-top-type) diff --git a/node_modules/@typescript-eslint/eslint-plugin/docs/rules/no-extra-non-null-assertion.mdx b/node_modules/@typescript-eslint/eslint-plugin/docs/rules/no-extra-non-null-assertion.mdx new file mode 100644 index 000000000..5f108b7cd --- /dev/null +++ b/node_modules/@typescript-eslint/eslint-plugin/docs/rules/no-extra-non-null-assertion.mdx @@ -0,0 +1,60 @@ +--- +description: 'Disallow extra non-null assertions.' +--- + +import Tabs from '@theme/Tabs'; +import TabItem from '@theme/TabItem'; + +> 🛑 This file is source code, not the primary documentation location! 🛑 +> +> See **https://typescript-eslint.io/rules/no-extra-non-null-assertion** for documentation. + +The `!` non-null assertion operator in TypeScript is used to assert that a value's type does not include `null` or `undefined`. +Using the operator any more than once on a single value does nothing. + +## Examples + + + + +```ts +const foo: { bar: number } | null = null; +const bar = foo!!!.bar; +``` + +```ts +function foo(bar: number | undefined) { + const bar: number = bar!!!; +} +``` + +```ts +function foo(bar?: { n: number }) { + return bar!?.n; +} +``` + + + + +```ts +const foo: { bar: number } | null = null; +const bar = foo!.bar; +``` + +```ts +function foo(bar: number | undefined) { + const bar: number = bar!; +} +``` + +```ts +function foo(bar?: { n: number }) { + return bar?.n; +} +``` + + + + +{/* Intentionally Omitted: When Not To Use It */} diff --git a/node_modules/@typescript-eslint/eslint-plugin/docs/rules/no-extra-parens.mdx b/node_modules/@typescript-eslint/eslint-plugin/docs/rules/no-extra-parens.mdx new file mode 100644 index 000000000..4c56e6ecd --- /dev/null +++ b/node_modules/@typescript-eslint/eslint-plugin/docs/rules/no-extra-parens.mdx @@ -0,0 +1,13 @@ +--- +description: 'Disallow unnecessary parentheses.' +--- + +import Tabs from '@theme/Tabs'; +import TabItem from '@theme/TabItem'; + +> 🛑 This file is source code, not the primary documentation location! 🛑 +> +> See **https://typescript-eslint.io/rules/no-extra-parens** for documentation. + +This rule extends the base [`eslint/no-extra-parens`](https://eslint.org/docs/rules/no-extra-parens) rule. +It adds support for TypeScript type assertions. diff --git a/node_modules/@typescript-eslint/eslint-plugin/docs/rules/no-extra-semi.mdx b/node_modules/@typescript-eslint/eslint-plugin/docs/rules/no-extra-semi.mdx new file mode 100644 index 000000000..ec23c28ec --- /dev/null +++ b/node_modules/@typescript-eslint/eslint-plugin/docs/rules/no-extra-semi.mdx @@ -0,0 +1,15 @@ +--- +description: 'Disallow unnecessary semicolons.' +--- + +import Tabs from '@theme/Tabs'; +import TabItem from '@theme/TabItem'; + +> 🛑 This file is source code, not the primary documentation location! 🛑 +> +> See **https://typescript-eslint.io/rules/no-extra-semi** for documentation. + +This rule extends the base [`eslint/no-extra-semi`](https://eslint.org/docs/rules/no-extra-semi) rule. +It adds support for class properties. + +Note that this rule is classified as a "Suggestion" rule instead of a "Layout & Formatting" rule because [adding extra semi-colons actually changes the AST of the program](https://typescript-eslint.io/play/#ts=5.1.6&showAST=es&fileType=.ts&code=MYewdgzgLgBAHjAvDAjAbg0A&eslintrc=N4KABGBEBOCuA2BTAzpAXGUEKQHYHsBaRADwBdoBDQ5RAWwEt0p8AzVyAGnG0gAEyATwAOKAMbQGwssWTwGuMgHoCxclRr0mGSImjR80SDwC%2BIE0A&tsconfig=&tokens=false). With that said, modern TypeScript formatters will remove extra semi-colons automatically during the formatting process. Thus, if you [use a formatter](/troubleshooting/formatting), then enabling this rule is probably unnecessary. diff --git a/node_modules/@typescript-eslint/eslint-plugin/docs/rules/no-extraneous-class.mdx b/node_modules/@typescript-eslint/eslint-plugin/docs/rules/no-extraneous-class.mdx new file mode 100644 index 000000000..f368d5420 --- /dev/null +++ b/node_modules/@typescript-eslint/eslint-plugin/docs/rules/no-extraneous-class.mdx @@ -0,0 +1,323 @@ +--- +description: 'Disallow classes used as namespaces.' +--- + +import Tabs from '@theme/Tabs'; +import TabItem from '@theme/TabItem'; + +> 🛑 This file is source code, not the primary documentation location! 🛑 +> +> See **https://typescript-eslint.io/rules/no-extraneous-class** for documentation. + +This rule reports when a class has no non-static members, such as for a class used exclusively as a static namespace. + +Users who come from a [OOP](https://en.wikipedia.org/wiki/Object-oriented_programming) paradigm may wrap their utility functions in an extra class, instead of putting them at the top level of an ECMAScript module. +Doing so is generally unnecessary in JavaScript and TypeScript projects. + +- Wrapper classes add extra cognitive complexity to code without adding any structural improvements + - Whatever would be put on them, such as utility functions, are already organized by virtue of being in a module. + - As an alternative, you can `import * as ...` the module to get all of them in a single object. +- IDEs can't provide as good suggestions for static class or namespace imported properties when you start typing property names +- It's more difficult to statically analyze code for unused variables, etc. when they're all on the class (see: [Finding dead code (and dead types) in TypeScript](https://effectivetypescript.com/2020/10/20/tsprune)). + +This rule also reports classes that have only a constructor and no fields. +Those classes can generally be replaced with a standalone function. + +## Examples + + + + +```ts +class StaticConstants { + static readonly version = 42; + + static isProduction() { + return process.env.NODE_ENV === 'production'; + } +} + +class HelloWorldLogger { + constructor() { + console.log('Hello, world!'); + } +} +``` + + + + +```ts +export const version = 42; + +export function isProduction() { + return process.env.NODE_ENV === 'production'; +} + +function logHelloWorld() { + console.log('Hello, world!'); +} +``` + + + + +## Alternatives + +### Individual Exports (Recommended) + +Instead of using a static utility class we recommend you individually export the utilities from your module. + + + + +```ts +export class Utilities { + static util1() { + return Utilities.util3(); + } + + static util2() { + /* ... */ + } + + static util3() { + /* ... */ + } +} +``` + + + + +```ts +export function util1() { + return util3(); +} + +export function util2() { + /* ... */ +} + +export function util3() { + /* ... */ +} +``` + + + + +### Namespace Imports (Not Recommended) + +If you strongly prefer to have all constructs from a module available as properties of a single object, you can `import * as` the module. +This is known as a "namespace import". +Namespace imports are sometimes preferable because they keep all properties nested and don't need to be changed as you start or stop using various properties from the module. + +However, namespace imports are impacted by these downsides: + +- They also don't play as well with tree shaking in modern bundlers +- They require a name prefix before each property's usage + + + + +```ts +// utilities.ts +export class Utilities { + static sayHello() { + console.log('Hello, world!'); + } +} + +// consumers.ts +import { Utilities } from './utilities'; + +Utilities.sayHello(); +``` + + + + +```ts +// utilities.ts +export function sayHello() { + console.log('Hello, world!'); +} + +// consumers.ts +import * as utilities from './utilities'; + +utilities.sayHello(); +``` + + + + +```ts +// utilities.ts +export function sayHello() { + console.log('Hello, world!'); +} + +// consumers.ts +import { sayHello } from './utilities'; + +sayHello(); +``` + + + + +### Notes on Mutating Variables + +One case you need to be careful of is exporting mutable variables. +While class properties can be mutated externally, exported variables are always constant. +This means that importers can only ever read the first value they are assigned and cannot write to the variables. + +Needing to write to an exported variable is very rare and is generally considered a code smell. +If you do need it you can accomplish it using getter and setter functions: + + + + +```ts +export class Utilities { + static mutableCount = 1; + + static incrementCount() { + Utilities.mutableCount += 1; + } +} +``` + + + + +```ts +let mutableCount = 1; + +export function getMutableCount() { + return mutableField; +} + +export function incrementCount() { + mutableField += 1; +} +``` + + + + +## Options + +This rule normally bans classes that are empty (have no constructor or fields). +The rule's options each add an exemption for a specific type of class. + +### `allowConstructorOnly` + +`allowConstructorOnly` adds an exemption for classes that have only a constructor and no fields. + + + + +```ts option='{ "allowConstructorOnly": true }' +class NoFields {} +``` + + + + +```ts option='{ "allowConstructorOnly": true }' +class NoFields { + constructor() { + console.log('Hello, world!'); + } +} +``` + + + + +### `allowEmpty` + +The `allowEmpty` option adds an exemption for classes that are entirely empty. + + + + +```ts option='{ "allowEmpty": true }' +class NoFields { + constructor() { + console.log('Hello, world!'); + } +} +``` + + + + +```ts option='{ "allowEmpty": true }' +class NoFields {} +``` + + + + +### `allowStaticOnly` + +The `allowStaticOnly` option adds an exemption for classes that only contain static members. + +:::caution +We strongly recommend against the `allowStaticOnly` exemption. +It works against this rule's primary purpose of discouraging classes used only for static members. +::: + + + + +```ts option='{ "allowStaticOnly": true }' +class EmptyClass {} +``` + + + + +```ts option='{ "allowStaticOnly": true }' +class NotEmptyClass { + static version = 42; +} +``` + + + + +### `allowWithDecorator` + +The `allowWithDecorator` option adds an exemption for classes decorated with a `@` decorator. + + + + +```ts option='{ "allowWithDecorator": true }' +class Constants { + static readonly version = 42; +} +``` + + + + +```ts option='{ "allowWithDecorator": true }' +@logOnRead() +class Constants { + static readonly version = 42; +} +``` + + + + +## When Not To Use It + +If your project was set up before modern class and namespace practices, and you don't have the time to switch over, you might not be practically able to use this rule. +You might consider using [ESLint disable comments](https://eslint.org/docs/latest/use/configure/rules#using-configuration-comments-1) for those specific situations instead of completely disabling this rule. diff --git a/node_modules/@typescript-eslint/eslint-plugin/docs/rules/no-floating-promises.mdx b/node_modules/@typescript-eslint/eslint-plugin/docs/rules/no-floating-promises.mdx new file mode 100644 index 000000000..9ef3c8398 --- /dev/null +++ b/node_modules/@typescript-eslint/eslint-plugin/docs/rules/no-floating-promises.mdx @@ -0,0 +1,130 @@ +--- +description: 'Require Promise-like statements to be handled appropriately.' +--- + +import Tabs from '@theme/Tabs'; +import TabItem from '@theme/TabItem'; + +> 🛑 This file is source code, not the primary documentation location! 🛑 +> +> See **https://typescript-eslint.io/rules/no-floating-promises** for documentation. + +A "floating" Promise is one that is created without any code set up to handle any errors it might throw. +Floating Promises can cause several issues, such as improperly sequenced operations, ignored Promise rejections, and more. + +This rule reports when a Promise is created and not properly handled. +Valid ways of handling a Promise-valued statement include: + +- `await`ing it +- `return`ing it +- Calling its `.then()` with two arguments +- Calling its `.catch()` with one argument + +This rule also reports when an Array containing Promises is created and not properly handled. The main way to resolve this is by using one of the Promise concurrency methods to create a single Promise, then handling that according to the procedure above. These methods include: + +- `Promise.all()` +- `Promise.allSettled()` +- `Promise.any()` +- `Promise.race()` + +:::tip +`no-floating-promises` only detects unhandled Promise _statements_. +See [`no-misused-promises`](./no-misused-promises.mdx) for detecting code that provides Promises to _logical_ locations such as if statements. +::: + +## Examples + + + + +```ts +const promise = new Promise((resolve, reject) => resolve('value')); +promise; + +async function returnsPromise() { + return 'value'; +} +returnsPromise().then(() => {}); + +Promise.reject('value').catch(); + +Promise.reject('value').finally(); + +[1, 2, 3].map(async x => x + 1); +``` + + + + +```ts +const promise = new Promise((resolve, reject) => resolve('value')); +await promise; + +async function returnsPromise() { + return 'value'; +} +returnsPromise().then( + () => {}, + () => {}, +); + +Promise.reject('value').catch(() => {}); + +await Promise.reject('value').finally(() => {}); + +await Promise.all([1, 2, 3].map(async x => x + 1)); +``` + + + + +## Options + +### `ignoreVoid` + +This allows you to stop the rule reporting promises consumed with void operator. +This can be a good way to explicitly mark a promise as intentionally not awaited. + +Examples of **correct** code for this rule with `{ ignoreVoid: true }`: + +```ts option='{ "ignoreVoid": true }' showPlaygroundButton +async function returnsPromise() { + return 'value'; +} +void returnsPromise(); + +void Promise.reject('value'); +``` + +With this option set to `true`, and if you are using `no-void`, you should turn on the [`allowAsStatement`](https://eslint.org/docs/rules/no-void#allowasstatement) option. + +### `ignoreIIFE` + +This allows you to skip checking of async IIFEs (Immediately Invoked function Expressions). + +Examples of **correct** code for this rule with `{ ignoreIIFE: true }`: + +{/* prettier-ignore */} +```ts option='{ "ignoreIIFE": true }' showPlaygroundButton +await (async function () { + await res(1); +})(); + +(async function () { + await res(1); +})(); +``` + +## When Not To Use It + +This rule can be difficult to enable on large existing projects that set up many floating Promises. +Alternately, if you're not worried about crashes from floating or misused Promises -such as if you have global unhandled Promise handlers registered- then in some cases it may be safe to not use this rule. +You might consider using `void`s and/or [ESLint disable comments](https://eslint.org/docs/latest/use/configure/rules#using-configuration-comments-1) for those specific situations instead of completely disabling this rule. + +## Related To + +- [`no-misused-promises`](./no-misused-promises.mdx) + +## Further Reading + +- ["Using Promises" MDN documentation](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Guide/Using_promises). Note especially the sections on [Promise rejection events](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Guide/Using_promises#promise_rejection_events) and [Composition](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Guide/Using_promises#composition). diff --git a/node_modules/@typescript-eslint/eslint-plugin/docs/rules/no-for-in-array.mdx b/node_modules/@typescript-eslint/eslint-plugin/docs/rules/no-for-in-array.mdx new file mode 100644 index 000000000..d3a1b01da --- /dev/null +++ b/node_modules/@typescript-eslint/eslint-plugin/docs/rules/no-for-in-array.mdx @@ -0,0 +1,67 @@ +--- +description: 'Disallow iterating over an array with a for-in loop.' +--- + +import Tabs from '@theme/Tabs'; +import TabItem from '@theme/TabItem'; + +> 🛑 This file is source code, not the primary documentation location! 🛑 +> +> See **https://typescript-eslint.io/rules/no-for-in-array** for documentation. + +A for-in loop (`for (const i in o)`) iterates over the properties of an Object. +While it is legal to use for-in loops with array values, it is not common. There are several potential bugs with this: + +1. It iterates over all enumerable properties, including non-index ones and the entire prototype chain. For example, [`RegExp.prototype.exec`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/RegExp/exec) returns an array with additional properties, and `for-in` will iterate over them. Some libraries or even your own code may add additional methods to `Array.prototype` (either as polyfill or as custom methods), and if not done properly, they may be iterated over as well. +2. It skips holes in the array. While sparse arrays are rare and advised against, they are still possible and your code should be able to handle them. +3. The "index" is returned as a string, not a number. This can be caught by TypeScript, but can still lead to subtle bugs. + +You may have confused for-in with for-of, which iterates over the elements of the array. If you actually need the index, use a regular `for` loop or the `forEach` method. + +## Examples + + + + +```ts +declare const array: string[]; + +for (const i in array) { + console.log(array[i]); +} + +for (const i in array) { + console.log(i, array[i]); +} +``` + + + + +```ts +declare const array: string[]; + +for (const value of array) { + console.log(value); +} + +for (let i = 0; i < array.length; i += 1) { + console.log(i, array[i]); +} + +array.forEach((value, i) => { + console.log(i, value); +}); + +for (const [i, value] of array.entries()) { + console.log(i, value); +} +``` + + + + +## When Not To Use It + +If your project is a rare one that intentionally loops over string indices of arrays, you can turn off this rule. +You might consider using [ESLint disable comments](https://eslint.org/docs/latest/use/configure/rules#using-configuration-comments-1) for those specific situations instead of completely disabling this rule. diff --git a/node_modules/@typescript-eslint/eslint-plugin/docs/rules/no-implied-eval.mdx b/node_modules/@typescript-eslint/eslint-plugin/docs/rules/no-implied-eval.mdx new file mode 100644 index 000000000..5019008cb --- /dev/null +++ b/node_modules/@typescript-eslint/eslint-plugin/docs/rules/no-implied-eval.mdx @@ -0,0 +1,104 @@ +--- +description: 'Disallow the use of `eval()`-like methods.' +--- + +import Tabs from '@theme/Tabs'; +import TabItem from '@theme/TabItem'; + +> 🛑 This file is source code, not the primary documentation location! 🛑 +> +> See **https://typescript-eslint.io/rules/no-implied-eval** for documentation. + +It's considered a good practice to avoid using `eval()`. There are security and performance implications involved with doing so, which is why many linters recommend disallowing `eval()`. However, there are some other ways to pass a string and have it interpreted as JavaScript code that have similar concerns. + +The first is using `setTimeout()`, `setInterval()`, `setImmediate` or `execScript()` (Internet Explorer only), all of which can accept a string of code as their first argument + +```ts +setTimeout('alert(`Hi!`);', 100); +``` + +or using `new Function()` + +```ts +const fn = new Function('a', 'b', 'return a + b'); +``` + +This is considered an implied `eval()` because a string of code is +passed in to be interpreted. The same can be done with `setInterval()`, `setImmediate()` and `execScript()`. All interpret the JavaScript code in the global scope. + +The best practice is to avoid using `new Function()` or `execScript()` and always use a function for the first argument of `setTimeout()`, `setInterval()` and `setImmediate()`. + +## Examples + +This rule aims to eliminate implied `eval()` through the use of `new Function()`, `setTimeout()`, `setInterval()`, `setImmediate()` or `execScript()`. + + + + +```ts +setTimeout('alert(`Hi!`);', 100); + +setInterval('alert(`Hi!`);', 100); + +setImmediate('alert(`Hi!`)'); + +execScript('alert(`Hi!`)'); + +window.setTimeout('count = 5', 10); + +window.setInterval('foo = bar', 10); + +const fn = '() = {}'; +setTimeout(fn, 100); + +const fn = () => { + return 'x = 10'; +}; +setTimeout(fn(), 100); + +const fn = new Function('a', 'b', 'return a + b'); +``` + + + + +```ts +setTimeout(function () { + alert('Hi!'); +}, 100); + +setInterval(function () { + alert('Hi!'); +}, 100); + +setImmediate(function () { + alert('Hi!'); +}); + +execScript(function () { + alert('Hi!'); +}); + +const fn = () => {}; +setTimeout(fn, 100); + +const foo = { + fn: function () {}, +}; +setTimeout(foo.fn, 100); +setTimeout(foo.fn.bind(this), 100); + +class Foo { + static fn = () => {}; +} + +setTimeout(Foo.fn, 100); +``` + + + + +## When Not To Use It + +If your project is a rare one that needs to allow `new Function()` or `setTimeout()`, `setInterval()`, `setImmediate()` and `execScript()` with string arguments, then you can disable this rule. +You might consider using [ESLint disable comments](https://eslint.org/docs/latest/use/configure/rules#using-configuration-comments-1) for those specific situations instead of completely disabling this rule. diff --git a/node_modules/@typescript-eslint/eslint-plugin/docs/rules/no-import-type-side-effects.mdx b/node_modules/@typescript-eslint/eslint-plugin/docs/rules/no-import-type-side-effects.mdx new file mode 100644 index 000000000..f115b036a --- /dev/null +++ b/node_modules/@typescript-eslint/eslint-plugin/docs/rules/no-import-type-side-effects.mdx @@ -0,0 +1,80 @@ +--- +description: 'Enforce the use of top-level import type qualifier when an import only has specifiers with inline type qualifiers.' +--- + +import Tabs from '@theme/Tabs'; +import TabItem from '@theme/TabItem'; + +> 🛑 This file is source code, not the primary documentation location! 🛑 +> +> See **https://typescript-eslint.io/rules/no-import-type-side-effects** for documentation. + +The [`--verbatimModuleSyntax`](https://www.typescriptlang.org/tsconfig#verbatimModuleSyntax) compiler option causes TypeScript to do simple and predictable transpilation on import declarations. +Namely, it completely removes import declarations with a top-level `type` qualifier, and it removes any import specifiers with an inline `type` qualifier. + +The latter behavior does have one potentially surprising effect in that in certain cases TS can leave behind a "side effect" import at runtime: + +```ts +import { type A, type B } from 'mod'; + +// is transpiled to + +import {} from 'mod'; +// which is the same as +import 'mod'; +``` + +For the rare case of needing to import for side effects, this may be desirable - but for most cases you will not want to leave behind an unnecessary side effect import. + +## Examples + +This rule enforces that you use a top-level `type` qualifier for imports when it only imports specifiers with an inline `type` qualifier + + + + +```ts +import { type A } from 'mod'; +import { type A as AA } from 'mod'; +import { type A, type B } from 'mod'; +import { type A as AA, type B as BB } from 'mod'; +``` + + + + +```ts +import type { A } from 'mod'; +import type { A as AA } from 'mod'; +import type { A, B } from 'mod'; +import type { A as AA, B as BB } from 'mod'; + +import T from 'mod'; +import type T from 'mod'; + +import * as T from 'mod'; +import type * as T from 'mod'; + +import { T } from 'mod'; +import type { T } from 'mod'; +import { T, U } from 'mod'; +import type { T, U } from 'mod'; +import { type T, U } from 'mod'; +import { T, type U } from 'mod'; + +import type T, { U } from 'mod'; +import T, { type U } from 'mod'; +``` + + + + +## When Not To Use It + +If you're not using TypeScript 5.0's `verbatimModuleSyntax` option and your project is built with a bundler that manages import side effects for you, this rule may not be as useful for you. + +## Related To + +- [`consistent-type-imports`](./consistent-type-imports.mdx) +- [`import/consistent-type-specifier-style`](https://github.com/import-js/eslint-plugin-import/blob/main/docs/rules/consistent-type-specifier-style.md) +- [`import/no-duplicates` with `{"prefer-inline": true}`](https://github.com/import-js/eslint-plugin-import/blob/main/docs/rules/no-duplicates.md#inline-type-imports) diff --git a/node_modules/@typescript-eslint/eslint-plugin/docs/rules/no-inferrable-types.mdx b/node_modules/@typescript-eslint/eslint-plugin/docs/rules/no-inferrable-types.mdx new file mode 100644 index 000000000..ff21a3538 --- /dev/null +++ b/node_modules/@typescript-eslint/eslint-plugin/docs/rules/no-inferrable-types.mdx @@ -0,0 +1,107 @@ +--- +description: 'Disallow explicit type declarations for variables or parameters initialized to a number, string, or boolean.' +--- + +import Tabs from '@theme/Tabs'; +import TabItem from '@theme/TabItem'; + +> 🛑 This file is source code, not the primary documentation location! 🛑 +> +> See **https://typescript-eslint.io/rules/no-inferrable-types** for documentation. + +TypeScript is able to infer the types of parameters, properties, and variables from their default or initial values. +There is no need to use an explicit `:` type annotation on one of those constructs initialized to a boolean, number, or string. +Doing so adds unnecessary verbosity to code -making it harder to read- and in some cases can prevent TypeScript from inferring a more specific literal type (e.g. `10`) instead of the more general primitive type (e.g. `number`) + +## Examples + + + + +```ts +const a: bigint = 10n; +const a: bigint = BigInt(10); +const a: boolean = !0; +const a: boolean = Boolean(null); +const a: boolean = true; +const a: null = null; +const a: number = 10; +const a: number = Infinity; +const a: number = NaN; +const a: number = Number('1'); +const a: RegExp = /a/; +const a: RegExp = new RegExp('a'); +const a: string = `str`; +const a: string = String(1); +const a: symbol = Symbol('a'); +const a: undefined = undefined; +const a: undefined = void someValue; + +class Foo { + prop: number = 5; +} + +function fn(a: number = 5, b: boolean = true) {} +``` + + + + +```ts +const a = 10n; +const a = BigInt(10); +const a = !0; +const a = Boolean(null); +const a = true; +const a = null; +const a = 10; +const a = Infinity; +const a = NaN; +const a = Number('1'); +const a = /a/; +const a = new RegExp('a'); +const a = `str`; +const a = String(1); +const a = Symbol('a'); +const a = undefined; +const a = void someValue; + +class Foo { + prop = 5; +} + +function fn(a = 5, b = true) {} +``` + + + + +## Options + +### `ignoreParameters` + +When set to true, the following pattern is considered valid: + +```ts option='{ "ignoreParameters": true }' showPlaygroundButton +function foo(a: number = 5, b: boolean = true) { + // ... +} +``` + +### `ignoreProperties` + +When set to true, the following pattern is considered valid: + +```ts option='{ "ignoreProperties": true }' showPlaygroundButton +class Foo { + prop: number = 5; +} +``` + +## When Not To Use It + +If you strongly prefer to have explicit types regardless of whether they can be inferred, this rule may not be for you. + +## Further Reading + +- [TypeScript Inference](https://www.typescriptlang.org/docs/handbook/type-inference.html) diff --git a/node_modules/@typescript-eslint/eslint-plugin/docs/rules/no-invalid-this.mdx b/node_modules/@typescript-eslint/eslint-plugin/docs/rules/no-invalid-this.mdx new file mode 100644 index 000000000..518b93fcb --- /dev/null +++ b/node_modules/@typescript-eslint/eslint-plugin/docs/rules/no-invalid-this.mdx @@ -0,0 +1,17 @@ +--- +description: 'Disallow `this` keywords outside of classes or class-like objects.' +--- + +import Tabs from '@theme/Tabs'; +import TabItem from '@theme/TabItem'; + +> 🛑 This file is source code, not the primary documentation location! 🛑 +> +> See **https://typescript-eslint.io/rules/no-invalid-this** for documentation. + +import TypeScriptOverlap from '@site/src/components/TypeScriptOverlap'; + + + +This rule extends the base [`eslint/no-invalid-this`](https://eslint.org/docs/rules/no-invalid-this) rule. +It adds support for TypeScript's `this` parameters. diff --git a/node_modules/@typescript-eslint/eslint-plugin/docs/rules/no-invalid-void-type.mdx b/node_modules/@typescript-eslint/eslint-plugin/docs/rules/no-invalid-void-type.mdx new file mode 100644 index 000000000..d73d09512 --- /dev/null +++ b/node_modules/@typescript-eslint/eslint-plugin/docs/rules/no-invalid-void-type.mdx @@ -0,0 +1,118 @@ +--- +description: 'Disallow `void` type outside of generic or return types.' +--- + +import Tabs from '@theme/Tabs'; +import TabItem from '@theme/TabItem'; + +> 🛑 This file is source code, not the primary documentation location! 🛑 +> +> See **https://typescript-eslint.io/rules/no-invalid-void-type** for documentation. + +`void` in TypeScript refers to a function return that is meant to be ignored. +Attempting to use a `void` type outside of a return type or generic type argument is often a sign of programmer error. +`void` can also be misleading for other developers even if used correctly. + +> The `void` type means cannot be mixed with any other types, other than `never`, which accepts all types. +> If you think you need this then you probably want the `undefined` type instead. + +## Examples + + + + +```ts +type PossibleValues = string | number | void; +type MorePossibleValues = string | ((number & any) | (string | void)); + +function logSomething(thing: void) {} +function printArg(arg: T) {} + +logAndReturn(undefined); + +interface Interface { + lambda: () => void; + prop: void; +} + +class MyClass { + private readonly propName: void; +} +``` + + + + +```ts +type NoOp = () => void; + +function noop(): void {} + +let trulyUndefined = void 0; + +async function promiseMeSomething(): Promise {} + +type stillVoid = void | never; +``` + + + + +## Options + +### `allowInGenericTypeArguments` + +This option lets you control if `void` can be used as a valid value for generic type parameters. + +Alternatively, you can provide an array of strings which whitelist which types may accept `void` as a generic type parameter. + +Any types considered valid by this option will be considered valid as part of a union type with `void`. + +This option is `true` by default. + +The following patterns are considered warnings with `{ allowInGenericTypeArguments: false }`: + +```ts option='{ "allowInGenericTypeArguments": false }' showPlaygroundButton +logAndReturn(undefined); + +let voidPromise: Promise = new Promise(() => {}); +let voidMap: Map = new Map(); +``` + +The following patterns are considered warnings with `{ allowInGenericTypeArguments: ['Ex.Mx.Tx'] }`: + +```ts option='{ "allowInGenericTypeArguments": ["Ex.Mx.Tx"] }' showPlaygroundButton +logAndReturn(undefined); + +type NotAllowedVoid1 = Mx.Tx; +type NotAllowedVoid2 = Tx; +type NotAllowedVoid3 = Promise; +``` + +The following patterns are not considered warnings with `{ allowInGenericTypeArguments: ['Ex.Mx.Tx'] }`: + +```ts option='{ "allowInGenericTypeArguments": ["Ex.Mx.Tx"] }' showPlaygroundButton +type AllowedVoid = Ex.Mx.Tx; +type AllowedVoidUnion = void | Ex.Mx.Tx; +``` + +### `allowAsThisParameter` + +This option allows specifying a `this` parameter of a function to be `void` when set to `true`. +This pattern can be useful to explicitly label function types that do not use a `this` argument. [See the TypeScript docs for more information](https://www.typescriptlang.org/docs/handbook/functions.html#this-parameters-in-callbacks). + +This option is `false` by default. + +The following patterns are considered warnings with `{ allowAsThisParameter: false }` but valid with `{ allowAsThisParameter: true }`: + +```ts option='{ "allowAsThisParameter": false }' showPlaygroundButton +function doThing(this: void) {} +class Example { + static helper(this: void) {} + callback(this: void) {} +} +``` + +## When Not To Use It + +If you don't care about if `void` is used with other types, or in invalid places, then you don't need this rule. diff --git a/node_modules/@typescript-eslint/eslint-plugin/docs/rules/no-loop-func.mdx b/node_modules/@typescript-eslint/eslint-plugin/docs/rules/no-loop-func.mdx new file mode 100644 index 000000000..0eb9ff68c --- /dev/null +++ b/node_modules/@typescript-eslint/eslint-plugin/docs/rules/no-loop-func.mdx @@ -0,0 +1,13 @@ +--- +description: 'Disallow function declarations that contain unsafe references inside loop statements.' +--- + +import Tabs from '@theme/Tabs'; +import TabItem from '@theme/TabItem'; + +> 🛑 This file is source code, not the primary documentation location! 🛑 +> +> See **https://typescript-eslint.io/rules/no-loop-func** for documentation. + +This rule extends the base [`eslint/no-loop-func`](https://eslint.org/docs/rules/no-loop-func) rule. +It adds support for TypeScript types. diff --git a/node_modules/@typescript-eslint/eslint-plugin/docs/rules/no-loss-of-precision.mdx b/node_modules/@typescript-eslint/eslint-plugin/docs/rules/no-loss-of-precision.mdx new file mode 100644 index 000000000..07fb1f0de --- /dev/null +++ b/node_modules/@typescript-eslint/eslint-plugin/docs/rules/no-loss-of-precision.mdx @@ -0,0 +1,13 @@ +--- +description: 'Disallow literal numbers that lose precision.' +--- + +import Tabs from '@theme/Tabs'; +import TabItem from '@theme/TabItem'; + +> 🛑 This file is source code, not the primary documentation location! 🛑 +> +> See **https://typescript-eslint.io/rules/no-loss-of-precision** for documentation. + +This rule extends the base [`eslint/no-loss-of-precision`](https://eslint.org/docs/rules/no-loss-of-precision) rule. +It adds support for [numeric separators](https://github.com/tc39/proposal-numeric-separator). diff --git a/node_modules/@typescript-eslint/eslint-plugin/docs/rules/no-magic-numbers.mdx b/node_modules/@typescript-eslint/eslint-plugin/docs/rules/no-magic-numbers.mdx new file mode 100644 index 000000000..c8a205879 --- /dev/null +++ b/node_modules/@typescript-eslint/eslint-plugin/docs/rules/no-magic-numbers.mdx @@ -0,0 +1,122 @@ +--- +description: 'Disallow magic numbers.' +--- + +import Tabs from '@theme/Tabs'; +import TabItem from '@theme/TabItem'; + +> 🛑 This file is source code, not the primary documentation location! 🛑 +> +> See **https://typescript-eslint.io/rules/no-magic-numbers** for documentation. + +This rule extends the base [`eslint/no-magic-numbers`](https://eslint.org/docs/rules/no-magic-numbers) rule. +It adds support for: + +- numeric literal types (`type T = 1`), +- `enum` members (`enum Foo { bar = 1 }`), +- `readonly` class properties (`class Foo { readonly bar = 1 }`). + +## Options + +This rule adds the following options: + +```ts +interface Options extends BaseNoMagicNumbersOptions { + ignoreEnums?: boolean; + ignoreNumericLiteralTypes?: boolean; + ignoreReadonlyClassProperties?: boolean; + ignoreTypeIndexes?: boolean; +} + +const defaultOptions: Options = { + ...baseNoMagicNumbersDefaultOptions, + ignoreEnums: false, + ignoreNumericLiteralTypes: false, + ignoreReadonlyClassProperties: false, + ignoreTypeIndexes: false, +}; +``` + +### `ignoreEnums` + +A boolean to specify if enums used in TypeScript are considered okay. `false` by default. + +Examples of **incorrect** code for the `{ "ignoreEnums": false }` option: + +```ts option='{ "ignoreEnums": false }' showPlaygroundButton +enum foo { + SECOND = 1000, +} +``` + +Examples of **correct** code for the `{ "ignoreEnums": true }` option: + +```ts option='{ "ignoreEnums": true }' showPlaygroundButton +enum foo { + SECOND = 1000, +} +``` + +### `ignoreNumericLiteralTypes` + +A boolean to specify if numbers used in TypeScript numeric literal types are considered okay. `false` by default. + +Examples of **incorrect** code for the `{ "ignoreNumericLiteralTypes": false }` option: + +```ts option='{ "ignoreNumericLiteralTypes": false }' showPlaygroundButton +type SmallPrimes = 2 | 3 | 5 | 7 | 11; +``` + +Examples of **correct** code for the `{ "ignoreNumericLiteralTypes": true }` option: + +```ts option='{ "ignoreNumericLiteralTypes": true }' showPlaygroundButton +type SmallPrimes = 2 | 3 | 5 | 7 | 11; +``` + +### `ignoreReadonlyClassProperties` + +Examples of **incorrect** code for the `{ "ignoreReadonlyClassProperties": false }` option: + +```ts option='{ "ignoreReadonlyClassProperties": false }' showPlaygroundButton +class Foo { + readonly A = 1; + readonly B = 2; + public static readonly C = 1; + static readonly D = 1; +} +``` + +Examples of **correct** code for the `{ "ignoreReadonlyClassProperties": true }` option: + +```ts option='{ "ignoreReadonlyClassProperties": true }' showPlaygroundButton +class Foo { + readonly A = 1; + readonly B = 2; + public static readonly C = 1; + static readonly D = 1; +} +``` + +### `ignoreTypeIndexes` + +A boolean to specify if numbers used to index types are okay. `false` by default. + +Examples of **incorrect** code for the `{ "ignoreTypeIndexes": false }` option: + +```ts option='{ "ignoreTypeIndexes": false }' showPlaygroundButton +type Foo = Bar[0]; +type Baz = Parameters[2]; +``` + +Examples of **correct** code for the `{ "ignoreTypeIndexes": true }` option: + +```ts option='{ "ignoreTypeIndexes": true }' showPlaygroundButton +type Foo = Bar[0]; +type Baz = Parameters[2]; +``` + +## When Not To Use It + +If your project frequently deals with constant numbers and you don't wish to take up extra space to declare them, this rule might not be for you. +We recommend at least using descriptive comments and/or names to describe constants. +You might consider using [ESLint disable comments](https://eslint.org/docs/latest/use/configure/rules#using-configuration-comments-1) instead of completely disabling this rule. diff --git a/node_modules/@typescript-eslint/eslint-plugin/docs/rules/no-meaningless-void-operator.mdx b/node_modules/@typescript-eslint/eslint-plugin/docs/rules/no-meaningless-void-operator.mdx new file mode 100644 index 000000000..905c70618 --- /dev/null +++ b/node_modules/@typescript-eslint/eslint-plugin/docs/rules/no-meaningless-void-operator.mdx @@ -0,0 +1,61 @@ +--- +description: 'Disallow the `void` operator except when used to discard a value.' +--- + +import Tabs from '@theme/Tabs'; +import TabItem from '@theme/TabItem'; + +> 🛑 This file is source code, not the primary documentation location! 🛑 +> +> See **https://typescript-eslint.io/rules/no-meaningless-void-operator** for documentation. + +`void` in TypeScript refers to a function return that is meant to be ignored. +The `void` operator is a useful tool to convey the programmer's intent to discard a value. +For example, it is recommended as one way of suppressing [`@typescript-eslint/no-floating-promises`](./no-floating-promises.mdx) instead of adding `.catch()` to a promise. + +This rule helps an authors catch API changes where previously a value was being discarded at a call site, but the callee changed so it no longer returns a value. +When combined with [no-unused-expressions](https://eslint.org/docs/rules/no-unused-expressions), it also helps _readers_ of the code by ensuring consistency: a statement that looks like `void foo();` is **always** discarding a return value, and a statement that looks like `foo();` is **never** discarding a return value. +This rule reports on any `void` operator whose argument is already of type `void` or `undefined`. + +## Examples + +## Examples + + + + +```ts +void (() => {})(); + +function foo() {} +void foo(); +``` + + + + +```ts +(() => {})(); + +function foo() {} +foo(); // nothing to discard + +function bar(x: number) { + void x; // discarding a number + return 2; +} +void bar(1); // discarding a number +``` + + + + +## Options + +### `checkNever` + +`checkNever: true` will suggest removing `void` when the argument has type `never`. + +## When Not To Use It + +If you don't mind extra `void`s in your project, you can avoid this rule. diff --git a/node_modules/@typescript-eslint/eslint-plugin/docs/rules/no-misused-new.mdx b/node_modules/@typescript-eslint/eslint-plugin/docs/rules/no-misused-new.mdx new file mode 100644 index 000000000..e1e02c42a --- /dev/null +++ b/node_modules/@typescript-eslint/eslint-plugin/docs/rules/no-misused-new.mdx @@ -0,0 +1,53 @@ +--- +description: 'Enforce valid definition of `new` and `constructor`.' +--- + +import Tabs from '@theme/Tabs'; +import TabItem from '@theme/TabItem'; + +> 🛑 This file is source code, not the primary documentation location! 🛑 +> +> See **https://typescript-eslint.io/rules/no-misused-new** for documentation. + +JavaScript classes may define a `constructor` method that runs when a class instance is newly created. +TypeScript allows interfaces that describe a static class object to define a `new()` method (though this is rarely used in real world code). +Developers new to JavaScript classes and/or TypeScript interfaces may sometimes confuse when to use `constructor` or `new`. + +This rule reports when a class defines a method named `new` or an interface defines a method named `constructor`. + +## Examples + + + + +```ts +declare class C { + new(): C; +} + +interface I { + new (): I; + constructor(): void; +} +``` + + + + +```ts +declare class C { + constructor(); +} + +interface I { + new (): C; +} +``` + + + + +## When Not To Use It + +If you intentionally want a class with a `new` method, and you're confident nobody working in your code will mistake it with a constructor, you might not want this rule. +You might consider using [ESLint disable comments](https://eslint.org/docs/latest/use/configure/rules#using-configuration-comments-1) for those specific situations instead of completely disabling this rule. diff --git a/node_modules/@typescript-eslint/eslint-plugin/docs/rules/no-misused-promises.mdx b/node_modules/@typescript-eslint/eslint-plugin/docs/rules/no-misused-promises.mdx new file mode 100644 index 000000000..ff044b712 --- /dev/null +++ b/node_modules/@typescript-eslint/eslint-plugin/docs/rules/no-misused-promises.mdx @@ -0,0 +1,254 @@ +--- +description: 'Disallow Promises in places not designed to handle them.' +--- + +import Tabs from '@theme/Tabs'; +import TabItem from '@theme/TabItem'; + +> 🛑 This file is source code, not the primary documentation location! 🛑 +> +> See **https://typescript-eslint.io/rules/no-misused-promises** for documentation. + +This rule forbids providing Promises to logical locations such as if statements in places where the TypeScript compiler allows them but they are not handled properly. +These situations can often arise due to a missing `await` keyword or just a misunderstanding of the way async +functions are handled/awaited. + +:::tip +`no-misused-promises` only detects code that provides Promises to incorrect _logical_ locations. +See [`no-floating-promises`](./no-floating-promises.mdx) for detecting unhandled Promise _statements_. +::: + +## Options + +### `checksConditionals` + +If you don't want to check conditionals, you can configure the rule with `"checksConditionals": false`: + +```json +{ + "@typescript-eslint/no-misused-promises": [ + "error", + { + "checksConditionals": false + } + ] +} +``` + +Doing so prevents the rule from looking at code like `if (somePromise)`. + +Examples of code for this rule with `checksConditionals: true`: + +## Examples + + + + +```ts option='{ "checksConditionals": true }' +const promise = Promise.resolve('value'); + +if (promise) { + // Do something +} + +const val = promise ? 123 : 456; + +while (promise) { + // Do something +} +``` + + + + +```ts option='{ "checksConditionals": true }' +const promise = Promise.resolve('value'); + +// Always `await` the Promise in a conditional +if (await promise) { + // Do something +} + +const val = (await promise) ? 123 : 456; + +while (await promise) { + // Do something +} +``` + + + + +### `checksVoidReturn` + +Likewise, if you don't want to check functions that return promises where a void return is +expected, your configuration will look like this: + +```json +{ + "@typescript-eslint/no-misused-promises": [ + "error", + { + "checksVoidReturn": false + } + ] +} +``` + +You can disable selective parts of the `checksVoidReturn` option by providing an object that disables specific checks. +The following options are supported: + +- `arguments`: Disables checking an asynchronous function passed as argument where the parameter type expects a function that returns `void` +- `attributes`: Disables checking an asynchronous function passed as a JSX attribute expected to be a function that returns `void` +- `properties`: Disables checking an asynchronous function passed as an object property expected to be a function that returns `void` +- `returns`: Disables checking an asynchronous function returned in a function whose return type is a function that returns `void` +- `variables`: Disables checking an asynchronous function used as a variable whose return type is a function that returns `void` + +For example, if you don't mind that passing a `() => Promise` to a `() => void` parameter or JSX attribute can lead to a floating unhandled Promise: + +```json +{ + "@typescript-eslint/no-misused-promises": [ + "error", + { + "checksVoidReturn": { + "arguments": false, + "attributes": false + } + } + ] +} +``` + +Examples of code for this rule with `checksVoidReturn: true`: + + + + +```ts option='{ "checksVoidReturn": true }' +[1, 2, 3].forEach(async value => { + await doSomething(value); +}); + +new Promise(async (resolve, reject) => { + await doSomething(); + resolve(); +}); + +const eventEmitter = new EventEmitter(); +eventEmitter.on('some-event', async () => { + synchronousCall(); + await doSomething(); + otherSynchronousCall(); +}); +``` + + + + +```ts option='{ "checksVoidReturn": true }' +// for-of puts `await` in outer context +for (const value of [1, 2, 3]) { + await doSomething(value); +} + +// If outer context is not `async`, handle error explicitly +Promise.all( + [1, 2, 3].map(async value => { + await doSomething(value); + }), +).catch(handleError); + +// Use an async IIFE wrapper +new Promise((resolve, reject) => { + // combine with `void` keyword to tell `no-floating-promises` rule to ignore unhandled rejection + void (async () => { + await doSomething(); + resolve(); + })(); +}); + +// Name the async wrapper to call it later +const eventEmitter = new EventEmitter(); +eventEmitter.on('some-event', () => { + const handler = async () => { + await doSomething(); + otherSynchronousCall(); + }; + + try { + synchronousCall(); + } catch (err) { + handleSpecificError(err); + } + + handler().catch(handleError); +}); +``` + + + + +### `checksSpreads` + +If you don't want to check object spreads, you can add this configuration: + +```json +{ + "@typescript-eslint/no-misused-promises": [ + "error", + { + "checksSpreads": false + } + ] +} +``` + +Examples of code for this rule with `checksSpreads: true`: + + + + +```ts option='{ "checksSpreads": true }' +const getData = () => someAsyncOperation({ myArg: 'foo' }); + +return { foo: 42, ...getData() }; + +const getData2 = async () => { + await someAsyncOperation({ myArg: 'foo' }); +}; + +return { foo: 42, ...getData2() }; +``` + + + + +```ts option='{ "checksSpreads": true }' +const getData = () => someAsyncOperation({ myArg: 'foo' }); + +return { foo: 42, ...(await getData()) }; + +const getData2 = async () => { + await someAsyncOperation({ myArg: 'foo' }); +}; + +return { foo: 42, ...(await getData2()) }; +``` + + + + +## When Not To Use It + +This rule can be difficult to enable on large existing projects that set up many misused Promises. +Alternately, if you're not worried about crashes from floating or misused Promises -such as if you have global unhandled Promise handlers registered- then in some cases it may be safe to not use this rule. +You might consider using [ESLint disable comments](https://eslint.org/docs/latest/use/configure/rules#using-configuration-comments-1) for those specific situations instead of completely disabling this rule. + +## Further Reading + +- [TypeScript void function assignability](https://github.com/Microsoft/TypeScript/wiki/FAQ#why-are-functions-returning-non-void-assignable-to-function-returning-void) + +## Related To + +- [`no-floating-promises`](./no-floating-promises.mdx) diff --git a/node_modules/@typescript-eslint/eslint-plugin/docs/rules/no-mixed-enums.mdx b/node_modules/@typescript-eslint/eslint-plugin/docs/rules/no-mixed-enums.mdx new file mode 100644 index 000000000..5e1683360 --- /dev/null +++ b/node_modules/@typescript-eslint/eslint-plugin/docs/rules/no-mixed-enums.mdx @@ -0,0 +1,96 @@ +--- +description: 'Disallow enums from having both number and string members.' +--- + +import Tabs from '@theme/Tabs'; +import TabItem from '@theme/TabItem'; + +> 🛑 This file is source code, not the primary documentation location! 🛑 +> +> See **https://typescript-eslint.io/rules/no-mixed-enums** for documentation. + +TypeScript enums are allowed to assign numeric or string values to their members. +Most enums contain either all numbers or all strings, but in theory you can mix-and-match within the same enum. +Mixing enum member types is generally considered confusing and a bad practice. + +## Examples + + + + +```ts +enum Status { + Unknown, + Closed = 1, + Open = 'open', +} +``` + + + + +```ts +enum Status { + Unknown = 0, + Closed = 1, + Open = 2, +} +``` + + + + +```ts +enum Status { + Unknown, + Closed, + Open, +} +``` + + + + +```ts +enum Status { + Unknown = 'unknown', + Closed = 'closed', + Open = 'open', +} +``` + + + + +## Iteration Pitfalls of Mixed Enum Member Values + +Enum values may be iterated over using `Object.entries`/`Object.keys`/`Object.values`. + +If all enum members are strings, the number of items will match the number of enum members: + +```ts +enum Status { + Closed = 'closed', + Open = 'open', +} + +// ['closed', 'open'] +Object.values(Status); +``` + +But if the enum contains members that are initialized with numbers -including implicitly initialized numbers— then iteration over that enum will include those numbers as well: + +```ts +enum Status { + Unknown, + Closed = 1, + Open = 'open', +} + +// ["Unknown", "Closed", 0, 1, "open"] +Object.values(Status); +``` + +## When Not To Use It + +If you don't mind the confusion of mixed enum member values and don't iterate over enums, you can safely disable this rule. diff --git a/node_modules/@typescript-eslint/eslint-plugin/docs/rules/no-namespace.mdx b/node_modules/@typescript-eslint/eslint-plugin/docs/rules/no-namespace.mdx new file mode 100644 index 000000000..3d4f14fe9 --- /dev/null +++ b/node_modules/@typescript-eslint/eslint-plugin/docs/rules/no-namespace.mdx @@ -0,0 +1,142 @@ +--- +description: 'Disallow TypeScript namespaces.' +--- + +import Tabs from '@theme/Tabs'; +import TabItem from '@theme/TabItem'; + +> 🛑 This file is source code, not the primary documentation location! 🛑 +> +> See **https://typescript-eslint.io/rules/no-namespace** for documentation. + +TypeScript historically allowed a form of code organization called "custom modules" (`module Example {}`), later renamed to "namespaces" (`namespace Example`). +Namespaces are an outdated way to organize TypeScript code. +ES2015 module syntax is now preferred (`import`/`export`). + +> This rule does not report on the use of TypeScript module declarations to describe external APIs (`declare module 'foo' {}`). + +## Examples + +Examples of code with the default options: + + + + +```ts +module foo {} +namespace foo {} + +declare module foo {} +declare namespace foo {} +``` + + + + +```ts +declare module 'foo' {} + +// anything inside a d.ts file +``` + + + + +## Options + +### `allowDeclarations` + +Examples of code with the `{ "allowDeclarations": true }` option: + + + + +```ts option='{ "allowDeclarations": true }' +module foo {} +namespace foo {} +``` + + + + +```ts option='{ "allowDeclarations": true }' +declare module 'foo' {} +declare module foo {} +declare namespace foo {} + +declare global { + namespace foo {} +} + +declare module foo { + namespace foo {} +} +``` + + + + +Examples of code for the `{ "allowDeclarations": false }` option: + + + + +```ts option='{ "allowDeclarations": false }' +module foo {} +namespace foo {} +declare module foo {} +declare namespace foo {} +``` + + + + +```ts option='{ "allowDeclarations": false }' +declare module 'foo' {} +``` + + + + +### `allowDefinitionFiles` + +Examples of code for the `{ "allowDefinitionFiles": true }` option: + + + + +```ts option='{ "allowDefinitionFiles": true }' +// if outside a d.ts file +module foo {} +namespace foo {} + +// if outside a d.ts file and allowDeclarations = false +module foo {} +namespace foo {} +declare module foo {} +declare namespace foo {} +``` + + + + +```ts option='{ "allowDefinitionFiles": true }' +declare module 'foo' {} + +// anything inside a d.ts file +``` + + + + +## When Not To Use It + +If your project was architected before modern modules and namespaces, it may be difficult to migrate off of namespaces. +In that case you may not be able to use this rule for parts of your project. +You might consider using [ESLint disable comments](https://eslint.org/docs/latest/use/configure/rules#using-configuration-comments-1) for those specific situations instead of completely disabling this rule. + +## Further Reading + +- [Modules](https://www.typescriptlang.org/docs/handbook/modules.html) +- [Namespaces](https://www.typescriptlang.org/docs/handbook/namespaces.html) +- [Namespaces and Modules](https://www.typescriptlang.org/docs/handbook/namespaces-and-modules.html) diff --git a/node_modules/@typescript-eslint/eslint-plugin/docs/rules/no-non-null-asserted-nullish-coalescing.mdx b/node_modules/@typescript-eslint/eslint-plugin/docs/rules/no-non-null-asserted-nullish-coalescing.mdx new file mode 100644 index 000000000..3c66cdc77 --- /dev/null +++ b/node_modules/@typescript-eslint/eslint-plugin/docs/rules/no-non-null-asserted-nullish-coalescing.mdx @@ -0,0 +1,60 @@ +--- +description: 'Disallow non-null assertions in the left operand of a nullish coalescing operator.' +--- + +import Tabs from '@theme/Tabs'; +import TabItem from '@theme/TabItem'; + +> 🛑 This file is source code, not the primary documentation location! 🛑 +> +> See **https://typescript-eslint.io/rules/no-non-null-asserted-nullish-coalescing** for documentation. + +The `??` nullish coalescing runtime operator allows providing a default value when dealing with `null` or `undefined`. +Using a `!` non-null assertion type operator in the left operand of a nullish coalescing operator is redundant, and likely a sign of programmer error or confusion over the two operators. + +## Examples + + + + +```ts +foo! ?? bar; +foo.bazz! ?? bar; +foo!.bazz! ?? bar; +foo()! ?? bar; + +let x!: string; +x! ?? ''; + +let x: string; +x = foo(); +x! ?? ''; +``` + + + + +```ts +foo ?? bar; +foo ?? bar!; +foo!.bazz ?? bar; +foo!.bazz ?? bar!; +foo() ?? bar; + +// This is considered correct code because there's no way for the user to satisfy it. +let x: string; +x! ?? ''; +``` + + + + +## When Not To Use It + +If your project's types don't yet fully describe whether certain values may be nullable, such as if you're transitioning to `strictNullChecks`, this rule might create many false reports. +You might consider using [ESLint disable comments](https://eslint.org/docs/latest/use/configure/rules#using-configuration-comments-1) for those specific situations instead of completely disabling this rule. + +## Further Reading + +- [TypeScript 3.7 Release Notes](https://www.typescriptlang.org/docs/handbook/release-notes/typescript-3-7.html) +- [Nullish Coalescing Proposal](https://github.com/tc39/proposal-nullish-coalescing) diff --git a/node_modules/@typescript-eslint/eslint-plugin/docs/rules/no-non-null-asserted-optional-chain.mdx b/node_modules/@typescript-eslint/eslint-plugin/docs/rules/no-non-null-asserted-optional-chain.mdx new file mode 100644 index 000000000..0a46583e7 --- /dev/null +++ b/node_modules/@typescript-eslint/eslint-plugin/docs/rules/no-non-null-asserted-optional-chain.mdx @@ -0,0 +1,46 @@ +--- +description: 'Disallow non-null assertions after an optional chain expression.' +--- + +import Tabs from '@theme/Tabs'; +import TabItem from '@theme/TabItem'; + +> 🛑 This file is source code, not the primary documentation location! 🛑 +> +> See **https://typescript-eslint.io/rules/no-non-null-asserted-optional-chain** for documentation. + +`?.` optional chain expressions provide `undefined` if an object is `null` or `undefined`. +Using a `!` non-null assertion to assert the result of an `?.` optional chain expression is non-nullable is likely wrong. + +> Most of the time, either the object was not nullable and did not need the `?.` for its property lookup, or the `!` is incorrect and introducing a type safety hole. + +## Examples + + + + +```ts +foo?.bar!; +foo?.bar()!; +``` + + + + +```ts +foo?.bar; +foo?.bar(); +``` + + + + +## When Not To Use It + +If your project's types don't yet fully describe whether certain values may be nullable, such as if you're transitioning to `strictNullChecks`, this rule might create many false reports. +You might consider using [ESLint disable comments](https://eslint.org/docs/latest/use/configure/rules#using-configuration-comments-1) for those specific situations instead of completely disabling this rule. + +## Further Reading + +- [TypeScript 3.7 Release Notes](https://www.typescriptlang.org/docs/handbook/release-notes/typescript-3-7.html) +- [Optional Chaining Proposal](https://github.com/tc39/proposal-optional-chaining/) diff --git a/node_modules/@typescript-eslint/eslint-plugin/docs/rules/no-non-null-assertion.mdx b/node_modules/@typescript-eslint/eslint-plugin/docs/rules/no-non-null-assertion.mdx new file mode 100644 index 000000000..b97063319 --- /dev/null +++ b/node_modules/@typescript-eslint/eslint-plugin/docs/rules/no-non-null-assertion.mdx @@ -0,0 +1,48 @@ +--- +description: 'Disallow non-null assertions using the `!` postfix operator.' +--- + +import Tabs from '@theme/Tabs'; +import TabItem from '@theme/TabItem'; + +> 🛑 This file is source code, not the primary documentation location! 🛑 +> +> See **https://typescript-eslint.io/rules/no-non-null-assertion** for documentation. + +TypeScript's `!` non-null assertion operator asserts to the type system that an expression is non-nullable, as in not `null` or `undefined`. +Using assertions to tell the type system new information is often a sign that code is not fully type-safe. +It's generally better to structure program logic so that TypeScript understands when values may be nullable. + +## Examples + + + + +```ts +interface Example { + property?: string; +} + +declare const example: Example; +const includesBaz = example.property!.includes('baz'); +``` + + + + +```ts +interface Example { + property?: string; +} + +declare const example: Example; +const includesBaz = example.property?.includes('baz') ?? false; +``` + + + + +## When Not To Use It + +If your project's types don't yet fully describe whether certain values may be nullable, such as if you're transitioning to `strictNullChecks`, this rule might create many false reports. +You might consider using [ESLint disable comments](https://eslint.org/docs/latest/use/configure/rules#using-configuration-comments-1) for those specific situations instead of completely disabling this rule. diff --git a/node_modules/@typescript-eslint/eslint-plugin/docs/rules/no-parameter-properties.mdx b/node_modules/@typescript-eslint/eslint-plugin/docs/rules/no-parameter-properties.mdx new file mode 100644 index 000000000..65c94db1d --- /dev/null +++ b/node_modules/@typescript-eslint/eslint-plugin/docs/rules/no-parameter-properties.mdx @@ -0,0 +1,12 @@ +:::danger Deprecated + +This rule has been deprecated in favour of the [`parameter-properties`](https://typescript-eslint.io/rules/parameter-properties/) rule. + +::: + + diff --git a/node_modules/@typescript-eslint/eslint-plugin/docs/rules/no-redeclare.mdx b/node_modules/@typescript-eslint/eslint-plugin/docs/rules/no-redeclare.mdx new file mode 100644 index 000000000..8c896acb2 --- /dev/null +++ b/node_modules/@typescript-eslint/eslint-plugin/docs/rules/no-redeclare.mdx @@ -0,0 +1,78 @@ +--- +description: 'Disallow variable redeclaration.' +--- + +import Tabs from '@theme/Tabs'; +import TabItem from '@theme/TabItem'; + +> 🛑 This file is source code, not the primary documentation location! 🛑 +> +> See **https://typescript-eslint.io/rules/no-redeclare** for documentation. + +import TypeScriptOverlap from '@site/src/components/TypeScriptOverlap'; + + + +This rule extends the base [`eslint/no-redeclare`](https://eslint.org/docs/rules/no-redeclare) rule. +It adds support for TypeScript function overloads, and declaration merging. + +## Options + +This rule adds the following options: + +```ts +interface Options extends BaseNoRedeclareOptions { + ignoreDeclarationMerge?: boolean; +} + +const defaultOptions: Options = { + ...baseNoRedeclareDefaultOptions, + ignoreDeclarationMerge: true, +}; +``` + +### `ignoreDeclarationMerge` + +When set to `true`, the rule will ignore declaration merges between the following sets: + +- interface + interface +- namespace + namespace +- class + interface +- class + namespace +- class + interface + namespace +- function + namespace +- enum + namespace + +Examples of **correct** code with `{ ignoreDeclarationMerge: true }`: + +```ts option='{ "ignoreDeclarationMerge": true }' showPlaygroundButton +interface A { + prop1: 1; +} +interface A { + prop2: 2; +} + +namespace Foo { + export const a = 1; +} +namespace Foo { + export const b = 2; +} + +class Bar {} +namespace Bar {} + +function Baz() {} +namespace Baz {} +``` + +**Note:** Even with this option set to true, this rule will report if you name a type and a variable the same name. **_This is intentional_**. +Declaring a variable and a type and a variable the same is usually an accident, and it can lead to hard-to-understand code. +If you have a rare case where you're intentionally naming a type the same name as a variable, use a disable comment. For example: + +```ts option='{ "ignoreDeclarationMerge": true }' showPlaygroundButton +type something = string; +// eslint-disable-next-line @typescript-eslint/no-redeclare -- intentionally naming the variable the same as the type +const something = 2; +``` diff --git a/node_modules/@typescript-eslint/eslint-plugin/docs/rules/no-redundant-type-constituents.mdx b/node_modules/@typescript-eslint/eslint-plugin/docs/rules/no-redundant-type-constituents.mdx new file mode 100644 index 000000000..4a4d7d34c --- /dev/null +++ b/node_modules/@typescript-eslint/eslint-plugin/docs/rules/no-redundant-type-constituents.mdx @@ -0,0 +1,98 @@ +--- +description: 'Disallow members of unions and intersections that do nothing or override type information.' +--- + +import Tabs from '@theme/Tabs'; +import TabItem from '@theme/TabItem'; + +> 🛑 This file is source code, not the primary documentation location! 🛑 +> +> See **https://typescript-eslint.io/rules/no-redundant-type-constituents** for documentation. + +Some types can override some other types ("constituents") in a union or intersection and/or be overridden by some other types. +TypeScript's set theory of types includes cases where a constituent type might be useless in the parent union or intersection. + +Within `|` unions: + +- `any` and `unknown` "override" all other union members +- `never` is dropped from unions in any position except when in a return type position +- primitive types such as `string` "override" any of their literal types such as `""` + +Within `&` intersections: + +- `any` and `never` "override" all other intersection members +- `unknown` is dropped from intersections +- literal types "override" any primitive types in an intersection +- literal types such as `""` "override" any of their primitive types such as `string` + +## Examples + + + + +```ts +type UnionAny = any | 'foo'; +type UnionUnknown = unknown | 'foo'; +type UnionNever = never | 'foo'; + +type UnionBooleanLiteral = boolean | false; +type UnionNumberLiteral = number | 1; +type UnionStringLiteral = string | 'foo'; + +type IntersectionAny = any & 'foo'; +type IntersectionUnknown = string & unknown; +type IntersectionNever = string | never; + +type IntersectionBooleanLiteral = boolean & false; +type IntersectionNumberLiteral = number & 1; +type IntersectionStringLiteral = string & 'foo'; +``` + + + + +```ts +type UnionAny = any; +type UnionUnknown = unknown; +type UnionNever = never; + +type UnionBooleanLiteral = boolean; +type UnionNumberLiteral = number; +type UnionStringLiteral = string; + +type IntersectionAny = any; +type IntersectionUnknown = string; +type IntersectionNever = string; + +type IntersectionBooleanLiteral = false; +type IntersectionNumberLiteral = 1; +type IntersectionStringLiteral = 'foo'; +``` + + + + +## Limitations + +This rule plays it safe and only works with bottom types, top types, and comparing literal types to primitive types. + +## When Not To Use It + +Some projects choose to occasionally intentionally include a redundant type constituent for documentation purposes. +For example, the following code includes `string` in a union even though the `unknown` makes it redundant: + +```ts +/** + * Normally a string name, but sometimes arbitrary unknown data. + */ +type NameOrOther = string | unknown; +``` + +If you strongly feel a preference for these unnecessary type constituents, this rule might not be for you. + +## Further Reading + +- [Union Types](https://www.typescriptlang.org/docs/handbook/2/everyday-types.html#union-types) +- [Intersection Types](https://www.typescriptlang.org/docs/handbook/2/objects.html#intersection-types) +- [Bottom Types](https://en.wikipedia.org/wiki/Bottom_type) +- [Top Types](https://en.wikipedia.org/wiki/Top_type) diff --git a/node_modules/@typescript-eslint/eslint-plugin/docs/rules/no-require-imports.mdx b/node_modules/@typescript-eslint/eslint-plugin/docs/rules/no-require-imports.mdx new file mode 100644 index 000000000..5af39f233 --- /dev/null +++ b/node_modules/@typescript-eslint/eslint-plugin/docs/rules/no-require-imports.mdx @@ -0,0 +1,69 @@ +--- +description: 'Disallow invocation of `require()`.' +--- + +import Tabs from '@theme/Tabs'; +import TabItem from '@theme/TabItem'; + +> 🛑 This file is source code, not the primary documentation location! 🛑 +> +> See **https://typescript-eslint.io/rules/no-require-imports** for documentation. + +Prefer the newer ES6-style imports over `require()`. + +## Examples + + + + +```ts +const lib1 = require('lib1'); +const { lib2 } = require('lib2'); +import lib3 = require('lib3'); +``` + + + + +```ts +import * as lib1 from 'lib1'; +import { lib2 } from 'lib2'; +import * as lib3 from 'lib3'; +``` + + + + +## Options + +### `allow` + +A array of strings. These strings will be compiled into regular expressions with the `u` flag and be used to test against the imported path. A common use case is to allow importing `package.json`. This is because `package.json` commonly lives outside of the TS root directory, so statically importing it would lead to root directory conflicts, especially with `resolveJsonModule` enabled. You can also use it to allow importing any JSON if your environment doesn't support JSON modules, or use it for other cases where `import` statements cannot work. + +With `{allow: ['/package\\.json$']}`: + + + + +```ts option='{ "allow": ["/package.json$"] }' +console.log(require('../data.json').version); +``` + + + + +```ts option='{ "allow": ["/package.json$"] }' +console.log(require('../package.json').version); +``` + + + + +## When Not To Use It + +If your project frequently uses older CommonJS `require`s, then this rule might not be applicable to you. +If only a subset of your project uses `require`s then you might consider using [ESLint disable comments](https://eslint.org/docs/latest/use/configure/rules#using-configuration-comments-1) for those specific situations instead of completely disabling this rule. + +## Related To + +- [`no-var-requires`](./no-var-requires.mdx) diff --git a/node_modules/@typescript-eslint/eslint-plugin/docs/rules/no-restricted-imports.mdx b/node_modules/@typescript-eslint/eslint-plugin/docs/rules/no-restricted-imports.mdx new file mode 100644 index 000000000..d74494d41 --- /dev/null +++ b/node_modules/@typescript-eslint/eslint-plugin/docs/rules/no-restricted-imports.mdx @@ -0,0 +1,77 @@ +--- +description: 'Disallow specified modules when loaded by `import`.' +--- + +import Tabs from '@theme/Tabs'; +import TabItem from '@theme/TabItem'; + +> 🛑 This file is source code, not the primary documentation location! 🛑 +> +> See **https://typescript-eslint.io/rules/no-restricted-imports** for documentation. + +This rule extends the base [`eslint/no-restricted-imports`](https://eslint.org/docs/rules/no-restricted-imports) rule. It adds support for the type import (`import type X from "..."`, `import { type X } from "..."`) and `import x = require("...")` syntaxes. + +## Options + +This rule adds the following options: + +### `allowTypeImports` + +(default: `false`) + +You can specify this option for a specific path or pattern as follows: + +```jsonc +{ + "rules": { + "@typescript-eslint/no-restricted-imports": [ + "error", + { + "paths": [ + { + "name": "import-foo", + "message": "Please use import-bar instead.", + "allowTypeImports": true, + }, + { + "name": "import-baz", + "message": "Please use import-quux instead.", + "allowTypeImports": true, + }, + ], + }, + ], + }, +} +``` + +When set to `true`, the rule will allow [Type-Only Imports](https://www.typescriptlang.org/docs/handbook/release-notes/typescript-3-8.html#type-only-imports-and-export). + +Examples of code with the above config: + + + + +```ts option='{"paths":[{"name":"import-foo","message":"Please use import-bar instead.","allowTypeImports":true},{"name":"import-baz","message":"Please use import-quux instead.","allowTypeImports":true}]}' +import foo from 'import-foo'; +export { Foo } from 'import-foo'; + +import baz from 'import-baz'; +export { Baz } from 'import-baz'; +``` + + + + +```ts option='{"paths":[{"name":"import-foo","message":"Please use import-bar instead.","allowTypeImports":true},{"name":"import-baz","message":"Please use import-quux instead.","allowTypeImports":true}]}' +import { foo } from 'other-module'; + +import type foo from 'import-foo'; +export type { Foo } from 'import-foo'; + +import type baz from 'import-baz'; +export type { Baz } from 'import-baz'; +``` + + + diff --git a/node_modules/@typescript-eslint/eslint-plugin/docs/rules/no-shadow.mdx b/node_modules/@typescript-eslint/eslint-plugin/docs/rules/no-shadow.mdx new file mode 100644 index 000000000..2e9328907 --- /dev/null +++ b/node_modules/@typescript-eslint/eslint-plugin/docs/rules/no-shadow.mdx @@ -0,0 +1,108 @@ +--- +description: 'Disallow variable declarations from shadowing variables declared in the outer scope.' +--- + +import Tabs from '@theme/Tabs'; +import TabItem from '@theme/TabItem'; + +> 🛑 This file is source code, not the primary documentation location! 🛑 +> +> See **https://typescript-eslint.io/rules/no-shadow** for documentation. + +This rule extends the base [`eslint/no-shadow`](https://eslint.org/docs/rules/no-shadow) rule. +It adds support for TypeScript's `this` parameters and global augmentation, and adds options for TypeScript features. + +## Options + +This rule adds the following options: + +```ts +interface Options extends BaseNoShadowOptions { + ignoreTypeValueShadow?: boolean; + ignoreFunctionTypeParameterNameValueShadow?: boolean; +} + +const defaultOptions: Options = { + ...baseNoShadowDefaultOptions, + ignoreTypeValueShadow: true, + ignoreFunctionTypeParameterNameValueShadow: true, +}; +``` + +### `ignoreTypeValueShadow` + +When set to `true`, the rule will ignore the case when you name a type the same as a variable. This is generally safe because you cannot use variables in type locations without a `typeof` operator, so there's little risk of confusion. + +Examples of **correct** code with `{ ignoreTypeValueShadow: true }`: + +```ts option='{ "ignoreTypeValueShadow": true }' showPlaygroundButton +type Foo = number; +interface Bar { + prop: number; +} + +function f() { + const Foo = 1; + const Bar = 'test'; +} +``` + +:::note + +_Shadowing_ specifically refers to two identical identifiers that are in different, nested scopes. This is different from _redeclaration_, which is when two identical identifiers are in the same scope. Redeclaration is covered by the [`no-redeclare`](./no-redeclare.mdx) rule instead. + +::: + +### `ignoreFunctionTypeParameterNameValueShadow` + +When set to `true`, the rule will ignore the case when you name a parameter in a function type the same as a variable. + +Each of a function type's arguments creates a value variable within the scope of the function type. This is done so that you can reference the type later using the `typeof` operator: + +```ts +type Func = (test: string) => typeof test; + +declare const fn: Func; +const result = fn('str'); // typeof result === string +``` + +This means that function type arguments shadow value variable names in parent scopes: + +```ts +let test = 1; +type TestType = typeof test; // === number +type Func = (test: string) => typeof test; // this "test" references the argument, not the variable + +declare const fn: Func; +const result = fn('str'); // typeof result === string +``` + +If you do not use the `typeof` operator in a function type return type position, you can safely turn this option on. + +Examples of **correct** code with `{ ignoreFunctionTypeParameterNameValueShadow: true }`: + +```ts option='{ "ignoreFunctionTypeParameterNameValueShadow": true }' showPlaygroundButton +const test = 1; +type Func = (test: string) => typeof test; +``` + +## FAQ + +### Why does the rule report on enum members that share the same name as a variable in a parent scope? + +Reporting on this case isn't a bug - it is completely intentional and correct reporting! The rule reports due to a relatively unknown feature of enums - enum members create a variable within the enum scope so that they can be referenced within the enum without a qualifier. + +To illustrate this with an example: + +```ts +const A = 2; +enum Test { + A = 1, + B = A, +} + +console.log(Test.B); +// what should be logged? +``` + +Naively looking at the above code, it might look like the log should output `2`, because the outer variable `A`'s value is `2` - however, the code instead outputs `1`, which is the value of `Test.A`. This is because the unqualified code `B = A` is equivalent to the fully-qualified code `B = Test.A`. Due to this behavior, the enum member has **shadowed** the outer variable declaration. diff --git a/node_modules/@typescript-eslint/eslint-plugin/docs/rules/no-this-alias.mdx b/node_modules/@typescript-eslint/eslint-plugin/docs/rules/no-this-alias.mdx new file mode 100644 index 000000000..af07e4353 --- /dev/null +++ b/node_modules/@typescript-eslint/eslint-plugin/docs/rules/no-this-alias.mdx @@ -0,0 +1,120 @@ +--- +description: 'Disallow aliasing `this`.' +--- + +import Tabs from '@theme/Tabs'; +import TabItem from '@theme/TabItem'; + +> 🛑 This file is source code, not the primary documentation location! 🛑 +> +> See **https://typescript-eslint.io/rules/no-this-alias** for documentation. + +Assigning a variable to `this` instead of properly using arrow lambdas may be a symptom of pre-ES6 practices +or not managing scope well. + +## Examples + + + + +```ts +const self = this; + +setTimeout(function () { + self.doWork(); +}); +``` + + + + +```ts +setTimeout(() => { + this.doWork(); +}); +``` + + + + +## Options + +### `allowDestructuring` + +It can sometimes be useful to destructure properties from a class instance, such as retrieving multiple properties from the instance in one of its methods. +`allowDestructuring` allows those destructures and is `true` by default. +You can explicitly disallow them by setting `allowDestructuring` to `false`. + +Examples of code for the `{ "allowDestructuring": false }` option: + + + + +```ts option='{ "allowDestructuring": false }' +class ComponentLike { + props: unknown; + state: unknown; + + render() { + const { props, state } = this; + + console.log(props); + console.log(state); + } +} +``` + + + + +```ts option='{ "allowDestructuring": false }' +class ComponentLike { + props: unknown; + state: unknown; + + render() { + console.log(this.props); + console.log(this.state); + } +} +``` + + + + +### `allowedNames` + +`no-this-alias` can alternately be used to allow only a specific list of names as `this` aliases. +We recommend against this except as a transitory step towards fixing all rule violations. + +Examples of code for the `{ "allowedNames": ["self"] }` option: + + + + +```ts option='{ "allowedNames": ["self"] }' +class Example { + method() { + const that = this; + } +} +``` + + + + +```ts option='{ "allowedNames": ["self"] }' +class Example { + method() { + const self = this; + } +} +``` + + + + +## When Not To Use It + +If your project is structured in a way that it needs to assign `this` to variables, this rule is likely not for you. +If only a subset of your project assigns `this` to variables then you might consider using [ESLint disable comments](https://eslint.org/docs/latest/use/configure/rules#using-configuration-comments-1) for those specific situations instead of completely disabling this rule. diff --git a/node_modules/@typescript-eslint/eslint-plugin/docs/rules/no-throw-literal.mdx b/node_modules/@typescript-eslint/eslint-plugin/docs/rules/no-throw-literal.mdx new file mode 100644 index 000000000..d5919b3bd --- /dev/null +++ b/node_modules/@typescript-eslint/eslint-plugin/docs/rules/no-throw-literal.mdx @@ -0,0 +1,25 @@ +--- +description: 'Disallow throwing literals as exceptions.' +--- + +import Tabs from '@theme/Tabs'; +import TabItem from '@theme/TabItem'; + +> 🛑 This file is source code, not the primary documentation location! 🛑 +> +> See **https://typescript-eslint.io/rules/no-throw-literal** for documentation. + +It is considered good practice to only `throw` the `Error` object itself or an object using the `Error` object as base objects for user-defined exceptions. +The fundamental benefit of `Error` objects is that they automatically keep track of where they were built and originated. + +This rule restricts what can be thrown as an exception. + +:::warning +This rule is being renamed to [`only-throw-error`](./only-throw-error.mdx). +When it was first created, it only prevented literals from being thrown (hence the name), but it has now been expanded to only allow expressions which have a possibility of being an `Error` object. +With the `allowThrowingAny` and `allowThrowingUnknown` options, it can be configured to only allow throwing values which are guaranteed to be an instance of `Error`. + +The current name `no-throw-literal` will be removed in a future major version of typescript-eslint. +::: + +{/* Intentionally Omitted: When Not To Use It */} diff --git a/node_modules/@typescript-eslint/eslint-plugin/docs/rules/no-type-alias.mdx b/node_modules/@typescript-eslint/eslint-plugin/docs/rules/no-type-alias.mdx new file mode 100644 index 000000000..64822ea75 --- /dev/null +++ b/node_modules/@typescript-eslint/eslint-plugin/docs/rules/no-type-alias.mdx @@ -0,0 +1,626 @@ +--- +description: 'Disallow type aliases.' +--- + +import Tabs from '@theme/Tabs'; +import TabItem from '@theme/TabItem'; + +> 🛑 This file is source code, not the primary documentation location! 🛑 +> +> See **https://typescript-eslint.io/rules/no-type-alias** for documentation. + +:::danger Deprecated + +This rule has been deprecated in favour of the [`@typescript-eslint/consistent-type-definitions`](./consistent-type-definitions.mdx) rule. +TypeScript type aliases are a commonly necessary language feature; banning it altogether is oftentimes counterproductive. + +::: + +:::note + +If you want to ban certain classifications of type aliases, consider using [`no-restricted-syntax`](https://eslint.org/docs/latest/rules/no-restricted-syntax). +See [Troubleshooting & FAQs](/troubleshooting#how-can-i-ban-specific-language-feature). + +::: + +In TypeScript, type aliases serve three purposes: + +- Aliasing other types so that we can refer to them using a simpler name. + +```ts +// this... +type Person = { + firstName: string; + lastName: string; + age: number; +}; + +function addPerson(person: Person) { + // ... +} + +// is easier to read than this... +function addPerson(person: { + firstName: string; + lastName: string; + age: number; +}) { + // ... +} +``` + +- Act sort of like an interface, providing a set of methods and properties that must exist + in the objects implementing the type. + +```ts +type Person = { + firstName: string; + lastName: string; + age: number; + walk: () => void; + talk: () => void; +}; + +// you know person will have 3 properties and 2 methods, +// because the structure has already been defined. +var person: Person = { + // ... +}; + +// so we can be sure that this will work +person.walk(); +``` + +- Act like mapping tools between types to allow quick modifications. + +```ts +type Immutable = { readonly [P in keyof T]: T[P] }; + +type Person = { + name: string; + age: number; +}; + +type ImmutablePerson = Immutable; + +var person: ImmutablePerson = { name: 'John', age: 30 }; +person.name = 'Brad'; // error, readonly property +``` + +When aliasing, the type alias does not create a new type, it just creates a new name +to refer to the original type. So aliasing primitives and other simple types, tuples, unions +or intersections can some times be redundant. + +```ts +// this doesn't make much sense +type myString = string; +``` + +On the other hand, using a type alias as an interface can limit your ability to: + +- Reuse your code: interfaces can be extended or implemented by other types. Type aliases cannot. +- Debug your code: interfaces create a new name, so is easy to identify the base type of an object + while debugging the application. + +Finally, mapping types is an advanced technique and leaving it open can quickly become a pain point +in your application. + +## Examples + +This rule disallows the use of type aliases in favor of interfaces +and simplified types (primitives, tuples, unions, intersections, etc). + +## Options + +### `allowAliases` + +This applies to primitive types and reference types. + +The setting accepts the following values: + +- `"always"` or `"never"` to active or deactivate the feature. +- `"in-unions"`, allows aliasing in union statements, e.g. `type Foo = string | string[];` +- `"in-intersections"`, allows aliasing in intersection statements, e.g. `type Foo = string & string[];` +- `"in-unions-and-intersections"`, allows aliasing in union and/or intersection statements. + +Examples of **correct** code for the `{ "allowAliases": "always" }` options: + +```ts option='{ "allowAliases": "always" }' showPlaygroundButton +// primitives +type Foo = 'a'; + +type Foo = 'a' | 'b'; + +type Foo = string; + +type Foo = string | string[]; + +type Foo = string & string[]; + +type Foo = `foo-${number}`; + +// reference types +interface Bar {} +class Baz implements Bar {} + +type Foo = Bar; + +type Foo = Bar | Baz; + +type Foo = Bar & Baz; +``` + +Examples of **incorrect** code for the `{ "allowAliases": "in-unions" }` option: + +```ts option='{ "allowAliases": "in-unions" }' showPlaygroundButton +// primitives +type Foo = 'a'; + +type Foo = string; + +type Foo = string & string[]; + +type Foo = `foo-${number}`; + +// reference types +interface Bar {} +class Baz implements Bar {} + +type Foo = Bar; + +type Foo = Bar & Baz; +``` + +Examples of **correct** code for the `{ "allowAliases": "in-unions" }` option: + +```ts option='{ "allowAliases": "in-unions" }' showPlaygroundButton +// primitives +type Foo = 'a' | 'b'; + +type Foo = string | string[]; + +type Foo = `a-${number}` | `b-${number}`; + +// reference types +interface Bar {} +class Baz implements Bar {} + +type Foo = Bar | Baz; +``` + +Examples of **incorrect** code for the `{ "allowAliases": "in-intersections" }` option: + +```ts option='{ "allowAliases": "in-intersections" }' showPlaygroundButton +// primitives +type Foo = 'a'; + +type Foo = 'a' | 'b'; + +type Foo = string; + +type Foo = string | string[]; + +type Foo = `a-${number}` | `b-${number}`; + +// reference types +interface Bar {} +class Baz implements Bar {} + +type Foo = Bar; + +type Foo = Bar | Baz; +``` + +Examples of **correct** code for the `{ "allowAliases": "in-intersections" }` option: + +```ts option='{ "allowAliases": "in-intersections" }' showPlaygroundButton +// primitives +type Foo = string & string[]; + +type Foo = `a-${number}` & `b-${number}`; + +// reference types +interface Bar {} +class Baz implements Bar {} + +type Foo = Bar & Baz; +``` + +Examples of **incorrect** code for the `{ "allowAliases": "in-unions-and-intersections" }` option: + +```ts option='{ "allowAliases": "in-unions-and-intersections" }' showPlaygroundButton +// primitives +type Foo = 'a'; + +type Foo = string; + +type Foo = `foo-${number}`; + +// reference types +interface Bar {} +class Baz implements Bar {} + +type Foo = Bar; +``` + +Examples of **correct** code for the `{ "allowAliases": "in-unions-and-intersections" }` option: + +```ts option='{ "allowAliases": "in-unions-and-intersections" }' showPlaygroundButton +// primitives +type Foo = 'a' | 'b'; + +type Foo = string | string[]; + +type Foo = string & string[]; + +type Foo = `a-${number}` & `b-${number}`; + +type Foo = `a-${number}` | `b-${number}`; + +// reference types +interface Bar {} +class Baz implements Bar {} + +type Foo = Bar | Baz; + +type Foo = Bar & Baz; +``` + +### `allowCallbacks` + +This applies to function types. + +The setting accepts the following values: + +- `"always"` or `"never"` to active or deactivate the feature. + +Examples of **correct** code for the `{ "allowCallbacks": "always" }` option: + +```ts option='{ "allowCallbacks": "always" }' showPlaygroundButton +type Foo = () => void; + +type Foo = (name: string) => string; + +class Person {} + +type Foo = (name: string, age: number) => string | Person; + +type Foo = (name: string, age: number) => string & Person; +``` + +### `allowConditionalTypes` + +This applies to conditional types. + +Examples of **correct** code for the `{ "allowConditionalTypes": "always" }` option: + +```ts option='{ "allowConditionalTypes": "always" }' showPlaygroundButton +type Foo = T extends number ? number : null; +``` + +### `allowConstructors` + +This applies to constructor types. + +The setting accepts the following values: + +- `"always"` or `"never"` to active or deactivate the feature. + +Examples of **correct** code for the `{ "allowConstructors": "always" }` option: + +```ts option='{ "allowConstructors": "always" }' showPlaygroundButton +type Foo = new () => void; +``` + +### `allowLiterals` + +This applies to literal types (`type Foo = { ... }`). + +The setting accepts the following options: + +- `"always"` or `"never"` to active or deactivate the feature. +- `"in-unions"`, allows literals in union statements, e.g. `type Foo = string | string[];` +- `"in-intersections"`, allows literals in intersection statements, e.g. `type Foo = string & string[];` +- `"in-unions-and-intersections"`, allows literals in union and/or intersection statements. + +Examples of **correct** code for the `{ "allowLiterals": "always" }` options: + +```ts option='{ "allowLiterals": "always" }' showPlaygroundButton +type Foo = {}; + +type Foo = { + name: string; + age: number; +}; + +type Foo = { + name: string; + age: number; + walk: (miles: number) => void; +}; + +type Foo = { name: string } | { age: number }; + +type Foo = { name: string } & { age: number }; +``` + +Examples of **incorrect** code for the `{ "allowLiterals": "in-unions" }` option: + +```ts option='{ "allowLiterals": "in-unions" }' showPlaygroundButton +type Foo = {}; + +type Foo = { + name: string; + age: number; +}; + +type Foo = { + name: string; + age: number; + walk: (miles: number) => void; +}; + +type Foo = { name: string } & { age: number }; +``` + +Examples of **correct** code for the `{ "allowLiterals": "in-unions" }` option: + +```ts option='{ "allowLiterals": "in-unions" }' showPlaygroundButton +type Foo = { name: string } | { age: number }; +``` + +Examples of **incorrect** code for the `{ "allowLiterals": "in-intersections" }` option: + +```ts option='{ "allowLiterals": "in-intersections" }' showPlaygroundButton +type Foo = {}; + +type Foo = { + name: string; + age: number; +}; + +type Foo = { + name: string; + age: number; + walk: (miles: number) => void; +}; + +type Foo = { name: string } | { age: number }; +``` + +Examples of **correct** code for the `{ "allowLiterals": "in-intersections" }` option: + +```ts option='{ "allowLiterals": "in-intersections" }' showPlaygroundButton +type Foo = { name: string } & { age: number }; +``` + +Examples of **incorrect** code for the `{ "allowLiterals": "in-unions-and-intersections" }` option: + +```ts option='{ "allowLiterals": "in-unions-and-intersections" }' showPlaygroundButton +type Foo = {}; + +type Foo = { + name: string; + age: number; +}; + +type Foo = { + name: string; + age: number; + walk: (miles: number) => void; +}; +``` + +Examples of **correct** code for the `{ "allowLiterals": "in-unions-and-intersections" }` option: + +```ts option='{ "allowLiterals": "in-unions-and-intersections" }' showPlaygroundButton +type Foo = { name: string } | { age: number }; + +type Foo = { name: string } & { age: number }; +``` + +### `allowMappedTypes` + +This applies to literal types. + +The setting accepts the following values: + +- `"always"` or `"never"` to active or deactivate the feature. +- `"in-unions"`, allows aliasing in union statements, e.g. `type Foo = string | string[];` +- `"in-intersections"`, allows aliasing in intersection statements, e.g. `type Foo = string & string[];` +- `"in-unions-and-intersections"`, allows aliasing in union and/or intersection statements. + +Examples of **correct** code for the `{ "allowMappedTypes": "always" }` options: + +```ts option='{ "allowMappedTypes": "always" }' showPlaygroundButton +type Foo = { readonly [P in keyof T]: T[P] }; + +type Foo = { [P in keyof T]?: T[P] }; + +type Foo = + | { readonly [P in keyof T]: T[P] } + | { readonly [P in keyof U]: U[P] }; + +type Foo = { [P in keyof T]?: T[P] } | { [P in keyof U]?: U[P] }; + +type Foo = { readonly [P in keyof T]: T[P] } & { + readonly [P in keyof U]: U[P]; +}; + +type Foo = { [P in keyof T]?: T[P] } & { [P in keyof U]?: U[P] }; +``` + +Examples of **incorrect** code for the `{ "allowMappedTypes": "in-unions" }` option: + +```ts option='{ "allowMappedTypes": "in-unions" }' showPlaygroundButton +type Foo = { readonly [P in keyof T]: T[P] }; + +type Foo = { [P in keyof T]?: T[P] }; + +type Foo = { readonly [P in keyof T]: T[P] } & { + readonly [P in keyof U]: U[P]; +}; + +type Foo = { [P in keyof T]?: T[P] } & { [P in keyof U]?: U[P] }; +``` + +Examples of **correct** code for the `{ "allowMappedTypes": "in-unions" }` option: + +```ts option='{ "allowMappedTypes": "in-unions" }' showPlaygroundButton +type Foo = + | { readonly [P in keyof T]: T[P] } + | { readonly [P in keyof U]: U[P] }; + +type Foo = { [P in keyof T]?: T[P] } | { [P in keyof U]?: U[P] }; +``` + +Examples of **incorrect** code for the `{ "allowMappedTypes": "in-intersections" }` option: + +```ts option='{ "allowMappedTypes": "in-intersections" }' showPlaygroundButton +type Foo = { readonly [P in keyof T]: T[P] }; + +type Foo = { [P in keyof T]?: T[P] }; + +type Foo = + | { readonly [P in keyof T]: T[P] } + | { readonly [P in keyof U]: U[P] }; + +type Foo = { [P in keyof T]?: T[P] } | { [P in keyof U]?: U[P] }; +``` + +Examples of **correct** code for the `{ "allowMappedTypes": "in-intersections" }` option: + +```ts option='{ "allowMappedTypes": "in-intersections" }' showPlaygroundButton +type Foo = { readonly [P in keyof T]: T[P] } & { + readonly [P in keyof U]: U[P]; +}; + +type Foo = { [P in keyof T]?: T[P] } & { [P in keyof U]?: U[P] }; +``` + +Examples of **incorrect** code for the `{ "allowMappedTypes": "in-unions-and-intersections" }` option: + +```ts option='{ "allowMappedTypes": "in-unions-and-intersections" }' showPlaygroundButton +type Foo = { readonly [P in keyof T]: T[P] }; + +type Foo = { [P in keyof T]?: T[P] }; +``` + +Examples of **correct** code for the `{ "allowMappedTypes": "in-unions-and-intersections" }` option: + +```ts option='{ "allowMappedTypes": "in-unions-and-intersections" }' showPlaygroundButton +type Foo = + | { readonly [P in keyof T]: T[P] } + | { readonly [P in keyof U]: U[P] }; + +type Foo = { [P in keyof T]?: T[P] } | { [P in keyof U]?: U[P] }; + +type Foo = { readonly [P in keyof T]: T[P] } & { + readonly [P in keyof U]: U[P]; +}; + +type Foo = { [P in keyof T]?: T[P] } & { [P in keyof U]?: U[P] }; +``` + +### `allowTupleTypes` + +This applies to tuple types (`type Foo = [number]`). + +The setting accepts the following options: + +- `"always"` or `"never"` to active or deactivate the feature. +- `"in-unions"`, allows tuples in union statements, e.g. `type Foo = [string] | [string, string];` +- `"in-intersections"`, allows tuples in intersection statements, e.g. `type Foo = [string] & [string, string];` +- `"in-unions-and-intersections"`, allows tuples in union and/or intersection statements. + +Examples of **correct** code for the `{ "allowTupleTypes": "always" }` options: + +```ts option='{ "allowTupleTypes": "always" }' showPlaygroundButton +type Foo = [number]; + +type Foo = [number] | [number, number]; + +type Foo = [number] & [number, number]; + +type Foo = [number] | ([number, number] & [string, string]); +``` + +Examples of **incorrect** code for the `{ "allowTupleTypes": "in-unions" }` option: + +```ts option='{ "allowTupleTypes": "in-unions" }' showPlaygroundButton +type Foo = [number]; + +type Foo = [number] & [number, number]; + +type Foo = [string] & [number]; +``` + +Examples of **correct** code for the `{ "allowTupleTypes": "in-unions" }` option: + +```ts option='{ "allowTupleTypes": "in-unions" }' showPlaygroundButton +type Foo = [number] | [number, number]; + +type Foo = [string] | [number]; +``` + +Examples of **incorrect** code for the `{ "allowTupleTypes": "in-intersections" }` option: + +```ts option='{ "allowTupleTypes": "in-intersections" }' showPlaygroundButton +type Foo = [number]; + +type Foo = [number] | [number, number]; + +type Foo = [string] | [number]; +``` + +Examples of **correct** code for the `{ "allowTupleTypes": "in-intersections" }` option: + +```ts option='{ "allowTupleTypes": "in-intersections" }' showPlaygroundButton +type Foo = [number] & [number, number]; + +type Foo = [string] & [number]; +``` + +Examples of **incorrect** code for the `{ "allowTupleTypes": "in-unions-and-intersections" }` option: + +```ts option='{ "allowTupleTypes": "in-unions-and-intersections" }' showPlaygroundButton +type Foo = [number]; + +type Foo = [string]; +``` + +Examples of **correct** code for the `{ "allowTupleTypes": "in-unions-and-intersections" }` option: + +```ts option='{ "allowTupleTypes": "in-unions-and-intersections" }' showPlaygroundButton +type Foo = [number] & [number, number]; + +type Foo = [string] | [number]; +``` + +### `allowGenerics` + +This applies to generic types, including TypeScript provided global utility types (`type Foo = Record`). + +The setting accepts the following options: + +- `"always"` or `"never"` to active or deactivate the feature. + +Examples of **correct** code for the `{ "allowGenerics": "always" }` options: + +```ts option='{ "allowGenerics": "always" }' showPlaygroundButton +type Foo = Bar; + +type Foo = Record; + +type Foo = Readonly; + +type Foo = Partial; + +type Foo = Omit; +``` + +{/* Intentionally Omitted: When Not To Use It */} + +## Further Reading + +- [Advanced Types](https://www.typescriptlang.org/docs/handbook/advanced-types.html) diff --git a/node_modules/@typescript-eslint/eslint-plugin/docs/rules/no-unnecessary-boolean-literal-compare.mdx b/node_modules/@typescript-eslint/eslint-plugin/docs/rules/no-unnecessary-boolean-literal-compare.mdx new file mode 100644 index 000000000..51c13eecb --- /dev/null +++ b/node_modules/@typescript-eslint/eslint-plugin/docs/rules/no-unnecessary-boolean-literal-compare.mdx @@ -0,0 +1,145 @@ +--- +description: 'Disallow unnecessary equality comparisons against boolean literals.' +--- + +import Tabs from '@theme/Tabs'; +import TabItem from '@theme/TabItem'; + +> 🛑 This file is source code, not the primary documentation location! 🛑 +> +> See **https://typescript-eslint.io/rules/no-unnecessary-boolean-literal-compare** for documentation. + +Comparing boolean values to boolean literals is unnecessary: those comparisons result in the same booleans. +Using the boolean values directly, or via a unary negation (`!value`), is more concise and clearer. + +This rule ensures that you do not include unnecessary comparisons with boolean literals. +A comparison is considered unnecessary if it checks a boolean literal against any variable with just the `boolean` type. +A comparison is **_not_** considered unnecessary if the type is a union of booleans (`string | boolean`, `SomeObject | boolean`, etc.). + +## Examples + +:::note +Throughout this page, only strict equality (`===` and `!==`) are used in the examples. +However, the implementation of the rule does not distinguish between strict and loose equality. +Any example below that uses `===` would be treated the same way if `==` was used, and `!==` would be treated the same way if `!=` was used. +::: + + + + +```ts +declare const someCondition: boolean; +if (someCondition === true) { +} +``` + + + + +```ts +declare const someCondition: boolean; +if (someCondition) { +} + +declare const someObjectBoolean: boolean | Record; +if (someObjectBoolean === true) { +} + +declare const someStringBoolean: boolean | string; +if (someStringBoolean === true) { +} +``` + + + + +## Options + +This rule always checks comparisons between a boolean variable and a boolean +literal. Comparisons between nullable boolean variables and boolean literals +are **not** checked by default. + +### `allowComparingNullableBooleansToTrue` + +Examples of code for this rule with `{ allowComparingNullableBooleansToTrue: false }`: + + + + +```ts option='{ "allowComparingNullableBooleansToTrue": false }' +declare const someUndefinedCondition: boolean | undefined; +if (someUndefinedCondition === true) { +} + +declare const someNullCondition: boolean | null; +if (someNullCondition !== true) { +} +``` + + + + +```ts option='{ "allowComparingNullableBooleansToTrue": false }' +declare const someUndefinedCondition: boolean | undefined; +if (someUndefinedCondition) { +} + +declare const someNullCondition: boolean | null; +if (!someNullCondition) { +} +``` + + + + +### `allowComparingNullableBooleansToFalse` + +Examples of code for this rule with `{ allowComparingNullableBooleansToFalse: false }`: + + + + +```ts option='{ "allowComparingNullableBooleansToFalse": false }' +declare const someUndefinedCondition: boolean | undefined; +if (someUndefinedCondition === false) { +} + +declare const someNullCondition: boolean | null; +if (someNullCondition !== false) { +} +``` + + + + +```ts option='{ "allowComparingNullableBooleansToFalse": false }' +declare const someUndefinedCondition: boolean | undefined; +if (!(someUndefinedCondition ?? true)) { +} + +declare const someNullCondition: boolean | null; +if (someNullCondition ?? true) { +} +``` + + + + +## Fixer + +| Comparison | Fixer Output | Notes | +| :----------------------------: | ------------------------------- | ----------------------------------------------------------------------------------- | +| `booleanVar === true` | `booleanVar` | | +| `booleanVar !== true` | `!booleanVar` | | +| `booleanVar === false` | `!booleanVar` | | +| `booleanVar !== false` | `booleanVar` | | +| `nullableBooleanVar === true` | `nullableBooleanVar` | Only checked/fixed if the `allowComparingNullableBooleansToTrue` option is `false` | +| `nullableBooleanVar !== true` | `!nullableBooleanVar` | Only checked/fixed if the `allowComparingNullableBooleansToTrue` option is `false` | +| `nullableBooleanVar === false` | `!(nullableBooleanVar ?? true)` | Only checked/fixed if the `allowComparingNullableBooleansToFalse` option is `false` | +| `nullableBooleanVar !== false` | `nullableBooleanVar ?? true` | Only checked/fixed if the `allowComparingNullableBooleansToFalse` option is `false` | + +## When Not To Use It + +Do not use this rule when `strictNullChecks` is disabled. +ESLint is not able to distinguish between `false` and `undefined` or `null` values. +This can cause unintended code changes when using autofix. diff --git a/node_modules/@typescript-eslint/eslint-plugin/docs/rules/no-unnecessary-condition.mdx b/node_modules/@typescript-eslint/eslint-plugin/docs/rules/no-unnecessary-condition.mdx new file mode 100644 index 000000000..9124bbd46 --- /dev/null +++ b/node_modules/@typescript-eslint/eslint-plugin/docs/rules/no-unnecessary-condition.mdx @@ -0,0 +1,125 @@ +--- +description: 'Disallow conditionals where the type is always truthy or always falsy.' +--- + +import Tabs from '@theme/Tabs'; +import TabItem from '@theme/TabItem'; + +> 🛑 This file is source code, not the primary documentation location! 🛑 +> +> See **https://typescript-eslint.io/rules/no-unnecessary-condition** for documentation. + +Any expression being used as a condition must be able to evaluate as truthy or falsy in order to be considered "necessary". +Conversely, any expression that always evaluates to truthy or always evaluates to falsy, as determined by the type of the expression, is considered unnecessary and will be flagged by this rule. + +The following expressions are checked: + +- Arguments to the `&&`, `||` and `?:` (ternary) operators +- Conditions for `if`, `for`, `while`, and `do-while` statements +- Base values of optional chain expressions + +## Examples + + + + +```ts +function head(items: T[]) { + // items can never be nullable, so this is unnecessary + if (items) { + return items[0].toUpperCase(); + } +} + +function foo(arg: 'bar' | 'baz') { + // arg is never nullable or empty string, so this is unnecessary + if (arg) { + } +} + +function bar(arg: string) { + // arg can never be nullish, so ?. is unnecessary + return arg?.length; +} + +// Checks array predicate return types, where possible +[ + [1, 2], + [3, 4], +].filter(t => t); // number[] is always truthy +``` + + + + +```ts +function head(items: T[]) { + // Necessary, since items.length might be 0 + if (items.length) { + return items[0].toUpperCase(); + } +} + +function foo(arg: string) { + // Necessary, since foo might be ''. + if (arg) { + } +} + +function bar(arg?: string | null) { + // Necessary, since arg might be nullish + return arg?.length; +} + +[0, 1, 2, 3].filter(t => t); // number can be truthy or falsy +``` + + + + +## Options + +### `allowConstantLoopConditions` + +Example of correct code for `{ allowConstantLoopConditions: true }`: + +```ts option='{ "allowConstantLoopConditions": true }' showPlaygroundButton +while (true) {} +for (; true; ) {} +do {} while (true); +``` + +### `allowRuleToRunWithoutStrictNullChecksIKnowWhatIAmDoing` + +If this is set to `false`, then the rule will error on every file whose `tsconfig.json` does _not_ have the `strictNullChecks` compiler option (or `strict`) set to `true`. + +Without `strictNullChecks`, TypeScript essentially erases `undefined` and `null` from the types. This means when this rule inspects the types from a variable, **it will not be able to tell that the variable might be `null` or `undefined`**, which essentially makes this rule useless. + +You should be using `strictNullChecks` to ensure complete type-safety in your codebase. + +If for some reason you cannot turn on `strictNullChecks`, but still want to use this rule - you can use this option to allow it - but know that the behavior of this rule is _undefined_ with the compiler option turned off. We will not accept bug reports if you are using this option. + +## When Not To Use It + +If your project is not accurately typed, such as if it's in the process of being converted to TypeScript or is susceptible to [trade-offs in control flow analysis](https://github.com/Microsoft/TypeScript/issues/9998), it may be difficult to enable this rule for particularly non-type-safe areas of code. +You might consider using [ESLint disable comments](https://eslint.org/docs/latest/use/configure/rules#using-configuration-comments-1) for those specific situations instead of completely disabling this rule. + +This rule has a known edge case of triggering on conditions that were modified within function calls (as side effects). +It is due to limitations of TypeScript's type narrowing. +See [#9998](https://github.com/microsoft/TypeScript/issues/9998) for details. +We recommend using a [type assertion](https://www.typescriptlang.org/docs/handbook/2/everyday-types.html#type-assertions) in those cases. + +```ts +let condition = false as boolean; + +const f = () => (condition = true); +f(); + +if (condition) { +} +``` + +## Related To + +- ESLint: [no-constant-condition](https://eslint.org/docs/rules/no-constant-condition) - `no-unnecessary-condition` is essentially a stronger version of `no-constant-condition`, but requires type information. +- [strict-boolean-expressions](./strict-boolean-expressions.mdx) - a more opinionated version of `no-unnecessary-condition`. `strict-boolean-expressions` enforces a specific code style, while `no-unnecessary-condition` is about correctness. diff --git a/node_modules/@typescript-eslint/eslint-plugin/docs/rules/no-unnecessary-qualifier.mdx b/node_modules/@typescript-eslint/eslint-plugin/docs/rules/no-unnecessary-qualifier.mdx new file mode 100644 index 000000000..aaf5edb8f --- /dev/null +++ b/node_modules/@typescript-eslint/eslint-plugin/docs/rules/no-unnecessary-qualifier.mdx @@ -0,0 +1,57 @@ +--- +description: 'Disallow unnecessary namespace qualifiers.' +--- + +import Tabs from '@theme/Tabs'; +import TabItem from '@theme/TabItem'; + +> 🛑 This file is source code, not the primary documentation location! 🛑 +> +> See **https://typescript-eslint.io/rules/no-unnecessary-qualifier** for documentation. + +Members of TypeScript enums and namespaces are generally retrieved as qualified property lookups: e.g. `Enum.member`. +However, when accessed within their parent enum or namespace, the qualifier is unnecessary: e.g. just `member` instead of `Enum.member`. +This rule reports when an enum or namespace qualifier is unnecessary. + +## Examples + + + + +```ts +enum A { + B, + C = A.B, +} +``` + +```ts +namespace A { + export type B = number; + const x: A.B = 3; +} +``` + + + + +```ts +enum A { + B, + C = B, +} +``` + +```ts +namespace A { + export type B = number; + const x: B = 3; +} +``` + + + + +## When Not To Use It + +If you explicitly prefer to use fully qualified names, such as for explicitness, then you don't need to use this rule. diff --git a/node_modules/@typescript-eslint/eslint-plugin/docs/rules/no-unnecessary-type-arguments.mdx b/node_modules/@typescript-eslint/eslint-plugin/docs/rules/no-unnecessary-type-arguments.mdx new file mode 100644 index 000000000..875b4f479 --- /dev/null +++ b/node_modules/@typescript-eslint/eslint-plugin/docs/rules/no-unnecessary-type-arguments.mdx @@ -0,0 +1,85 @@ +--- +description: 'Disallow type arguments that are equal to the default.' +--- + +import Tabs from '@theme/Tabs'; +import TabItem from '@theme/TabItem'; + +> 🛑 This file is source code, not the primary documentation location! 🛑 +> +> See **https://typescript-eslint.io/rules/no-unnecessary-type-arguments** for documentation. + +Type parameters in TypeScript may specify a default value. +For example: + +```ts +function f(/* ... */) { + // ... +} +``` + +It is redundant to provide an explicit type parameter equal to that default: e.g. calling `f(...)`. +This rule reports when an explicitly specified type argument is the default for that type parameter. + +## Examples + + + + +```ts +function f() {} +f(); +``` + +```ts +function g() {} +g(); +``` + +```ts +class C {} +new C(); + +class D extends C {} +``` + +```ts +interface I {} +class Impl implements I {} +``` + + + + +```ts +function f() {} +f(); +f(); +``` + +```ts +function g() {} +g(); +g(); +``` + +```ts +class C {} +new C(); +new C(); + +class D extends C {} +class D extends C {} +``` + +```ts +interface I {} +class Impl implements I {} +``` + + + + +## When Not To Use It + +If you prefer explicitly specifying type parameters even when they are equal to the default, you can skip this rule. diff --git a/node_modules/@typescript-eslint/eslint-plugin/docs/rules/no-unnecessary-type-assertion.mdx b/node_modules/@typescript-eslint/eslint-plugin/docs/rules/no-unnecessary-type-assertion.mdx new file mode 100644 index 000000000..4c34f32ca --- /dev/null +++ b/node_modules/@typescript-eslint/eslint-plugin/docs/rules/no-unnecessary-type-assertion.mdx @@ -0,0 +1,87 @@ +--- +description: 'Disallow type assertions that do not change the type of an expression.' +--- + +import Tabs from '@theme/Tabs'; +import TabItem from '@theme/TabItem'; + +> 🛑 This file is source code, not the primary documentation location! 🛑 +> +> See **https://typescript-eslint.io/rules/no-unnecessary-type-assertion** for documentation. + +TypeScript can be told an expression is a different type than expected using `as` type assertions. +Leaving `as` assertions in the codebase increases visual clutter and harms code readability, so it's generally best practice to remove them if they don't change the type of an expression. +This rule reports when a type assertion does not change the type of an expression. + +## Examples + + + + +```ts +const foo = 3; +const bar = foo!; +``` + +```ts +const foo = (3 + 5); +``` + +```ts +type Foo = number; +const foo = (3 + 5); +``` + +```ts +type Foo = number; +const foo = (3 + 5) as Foo; +``` + +```ts +const foo = 'foo' as const; +``` + +```ts +function foo(x: number): number { + return x!; // unnecessary non-null +} +``` + + + + +```ts +const foo = 3; +``` + +```ts +const foo = 3 as number; +``` + +```ts +let foo = 'foo' as const; +``` + +```ts +function foo(x: number | undefined): number { + return x!; +} +``` + + + + +## Options + +### `typesToIgnore` + +With `@typescript-eslint/no-unnecessary-type-assertion: ["error", { typesToIgnore: ['Foo'] }]`, the following is **correct** code: + +```ts option='{ "typesToIgnore": ["Foo"] }' showPlaygroundButton +type Foo = 3; +const foo: Foo = 3; +``` + +## When Not To Use It + +If you don't care about having no-op type assertions in your code, then you can turn off this rule. diff --git a/node_modules/@typescript-eslint/eslint-plugin/docs/rules/no-unnecessary-type-constraint.mdx b/node_modules/@typescript-eslint/eslint-plugin/docs/rules/no-unnecessary-type-constraint.mdx new file mode 100644 index 000000000..ba52d4b9e --- /dev/null +++ b/node_modules/@typescript-eslint/eslint-plugin/docs/rules/no-unnecessary-type-constraint.mdx @@ -0,0 +1,61 @@ +--- +description: 'Disallow unnecessary constraints on generic types.' +--- + +import Tabs from '@theme/Tabs'; +import TabItem from '@theme/TabItem'; + +> 🛑 This file is source code, not the primary documentation location! 🛑 +> +> See **https://typescript-eslint.io/rules/no-unnecessary-type-constraint** for documentation. + +Generic type parameters (``) in TypeScript may be "constrained" with an [`extends` keyword](https://www.typescriptlang.org/docs/handbook/generics.html#generic-constraints). +When no `extends` is provided, type parameters default a constraint to `unknown`. +It is therefore redundant to `extend` from `any` or `unknown`. + +## Examples + + + + +```ts +interface FooAny {} + +interface FooUnknown {} + +type BarAny = {}; + +type BarUnknown = {}; + +class BazAny { + quxAny() {} +} + +const QuuxAny = () => {}; + +function QuuzAny() {} +``` + + + + +```ts +interface Foo {} + +type Bar = {}; + +class Baz { + qux() {} +} + +const Quux = () => {}; + +function Quuz() {} +``` + + + + +## When Not To Use It + +If you don't care about the specific styles of your type constraints, or never use them in the first place, then you will not need this rule. diff --git a/node_modules/@typescript-eslint/eslint-plugin/docs/rules/no-unsafe-argument.mdx b/node_modules/@typescript-eslint/eslint-plugin/docs/rules/no-unsafe-argument.mdx new file mode 100644 index 000000000..a86575008 --- /dev/null +++ b/node_modules/@typescript-eslint/eslint-plugin/docs/rules/no-unsafe-argument.mdx @@ -0,0 +1,97 @@ +--- +description: 'Disallow calling a function with a value with type `any`.' +--- + +import Tabs from '@theme/Tabs'; +import TabItem from '@theme/TabItem'; + +> 🛑 This file is source code, not the primary documentation location! 🛑 +> +> See **https://typescript-eslint.io/rules/no-unsafe-argument** for documentation. + +The `any` type in TypeScript is a dangerous "escape hatch" from the type system. +Using `any` disables many type checking rules and is generally best used only as a last resort or when prototyping code. + +Despite your best intentions, the `any` type can sometimes leak into your codebase. +Calling a function with an `any` typed argument creates a potential safety hole and source of bugs. + +This rule disallows calling a function with `any` in its arguments. +That includes spreading arrays or tuples with `any` typed elements as function arguments. + +This rule also compares generic type argument types to ensure you don't pass an unsafe `any` in a generic position to a receiver that's expecting a specific type. +For example, it will error if you pass `Set` as an argument to a parameter declared as `Set`. + +## Examples + + + + +```ts +declare function foo(arg1: string, arg2: number, arg3: string): void; + +const anyTyped = 1 as any; + +foo(...anyTyped); +foo(anyTyped, 1, 'a'); + +const anyArray: any[] = []; +foo(...anyArray); + +const tuple1 = ['a', anyTyped, 'b'] as const; +foo(...tuple1); + +const tuple2 = [1] as const; +foo('a', ...tuple, anyTyped); + +declare function bar(arg1: string, arg2: number, ...rest: string[]): void; +const x = [1, 2] as [number, ...number[]]; +foo('a', ...x, anyTyped); + +declare function baz(arg1: Set, arg2: Map): void; +foo(new Set(), new Map()); +``` + + + + +```ts +declare function foo(arg1: string, arg2: number, arg3: string): void; + +foo('a', 1, 'b'); + +const tuple1 = ['a', 1, 'b'] as const; +foo(...tuple1); + +declare function bar(arg1: string, arg2: number, ...rest: string[]): void; +const array: string[] = ['a']; +bar('a', 1, ...array); + +declare function baz(arg1: Set, arg2: Map): void; +foo(new Set(), new Map()); +``` + + + + +There are cases where the rule allows passing an argument of `any` to `unknown`. + +Example of `any` to `unknown` assignment that are allowed: + +```ts showPlaygroundButton +declare function foo(arg1: unknown, arg2: Set, arg3: unknown[]): void; +foo(1 as any, new Set(), [] as any[]); +``` + +## When Not To Use It + +If your codebase has many existing `any`s or areas of unsafe code, it may be difficult to enable this rule. +It may be easier to skip the `no-unsafe-*` rules pending increasing type safety in unsafe areas of your project. +You might consider using [ESLint disable comments](https://eslint.org/docs/latest/use/configure/rules#using-configuration-comments-1) for those specific situations instead of completely disabling this rule. + +## Related To + +- [`no-explicit-any`](./no-explicit-any.mdx) +- [`no-unsafe-assignment`](./no-unsafe-assignment.mdx) +- [`no-unsafe-call`](./no-unsafe-call.mdx) +- [`no-unsafe-member-access`](./no-unsafe-member-access.mdx) +- [`no-unsafe-return`](./no-unsafe-return.mdx) diff --git a/node_modules/@typescript-eslint/eslint-plugin/docs/rules/no-unsafe-assignment.mdx b/node_modules/@typescript-eslint/eslint-plugin/docs/rules/no-unsafe-assignment.mdx new file mode 100644 index 000000000..84a1d0ee4 --- /dev/null +++ b/node_modules/@typescript-eslint/eslint-plugin/docs/rules/no-unsafe-assignment.mdx @@ -0,0 +1,100 @@ +--- +description: 'Disallow assigning a value with type `any` to variables and properties.' +--- + +import Tabs from '@theme/Tabs'; +import TabItem from '@theme/TabItem'; + +> 🛑 This file is source code, not the primary documentation location! 🛑 +> +> See **https://typescript-eslint.io/rules/no-unsafe-assignment** for documentation. + +The `any` type in TypeScript is a dangerous "escape hatch" from the type system. +Using `any` disables many type checking rules and is generally best used only as a last resort or when prototyping code. + +Despite your best intentions, the `any` type can sometimes leak into your codebase. +Assigning an `any` typed value to a variable can be hard to pick up on, particularly if it leaks in from an external library. + +This rule disallows assigning `any` to a variable, and assigning `any[]` to an array destructuring. + +This rule also compares generic type argument types to ensure you don't pass an unsafe `any` in a generic position to a receiver that's expecting a specific type. +For example, it will error if you assign `Set` to a variable declared as `Set`. + +## Examples + + + + +```ts +const x = 1 as any, + y = 1 as any; +const [x] = 1 as any; +const [x] = [] as any[]; +const [x] = [1 as any]; +[x] = [1] as [any]; + +function foo(a = 1 as any) {} +class Foo { + constructor(private a = 1 as any) {} +} +class Foo { + private a = 1 as any; +} + +// generic position examples +const x: Set = new Set(); +const x: Map = new Map(); +const x: Set = new Set(); +const x: Set>> = new Set>>(); +``` + + + + +```ts +const x = 1, + y = 1; +const [x] = [1]; +[x] = [1] as [number]; + +function foo(a = 1) {} +class Foo { + constructor(private a = 1) {} +} +class Foo { + private a = 1; +} + +// generic position examples +const x: Set = new Set(); +const x: Map = new Map(); +const x: Set = new Set(); +const x: Set>> = new Set>>(); +``` + + + + +There are cases where the rule allows assignment of `any` to `unknown`. + +Example of `any` to `unknown` assignment that are allowed: + +```ts showPlaygroundButton +const x: unknown = y as any; +const x: unknown[] = y as any[]; +const x: Set = y as Set; +``` + +## When Not To Use It + +If your codebase has many existing `any`s or areas of unsafe code, it may be difficult to enable this rule. +It may be easier to skip the `no-unsafe-*` rules pending increasing type safety in unsafe areas of your project. +You might consider using [ESLint disable comments](https://eslint.org/docs/latest/use/configure/rules#using-configuration-comments-1) for those specific situations instead of completely disabling this rule. + +## Related To + +- [`no-explicit-any`](./no-explicit-any.mdx) +- [`no-unsafe-argument`](./no-unsafe-argument.mdx) +- [`no-unsafe-call`](./no-unsafe-call.mdx) +- [`no-unsafe-member-access`](./no-unsafe-member-access.mdx) +- [`no-unsafe-return`](./no-unsafe-return.mdx) diff --git a/node_modules/@typescript-eslint/eslint-plugin/docs/rules/no-unsafe-call.mdx b/node_modules/@typescript-eslint/eslint-plugin/docs/rules/no-unsafe-call.mdx new file mode 100644 index 000000000..3e56c1e0f --- /dev/null +++ b/node_modules/@typescript-eslint/eslint-plugin/docs/rules/no-unsafe-call.mdx @@ -0,0 +1,74 @@ +--- +description: 'Disallow calling a value with type `any`.' +--- + +import Tabs from '@theme/Tabs'; +import TabItem from '@theme/TabItem'; + +> 🛑 This file is source code, not the primary documentation location! 🛑 +> +> See **https://typescript-eslint.io/rules/no-unsafe-call** for documentation. + +The `any` type in TypeScript is a dangerous "escape hatch" from the type system. +Using `any` disables many type checking rules and is generally best used only as a last resort or when prototyping code. + +Despite your best intentions, the `any` type can sometimes leak into your codebase. +Calling an `any`-typed value as a function creates a potential type safety hole and source of bugs in your codebase. + +This rule disallows calling any value that is typed as `any`. + +## Examples + + + + +```ts +declare const anyVar: any; +declare const nestedAny: { prop: any }; + +anyVar(); +anyVar.a.b(); + +nestedAny.prop(); +nestedAny.prop['a'](); + +new anyVar(); +new nestedAny.prop(); + +anyVar`foo`; +nestedAny.prop`foo`; +``` + + + + +```ts +declare const typedVar: () => void; +declare const typedNested: { prop: { a: () => void } }; + +typedVar(); +typedNested.prop.a(); + +(() => {})(); + +new Map(); + +String.raw`foo`; +``` + + + + +## When Not To Use It + +If your codebase has many existing `any`s or areas of unsafe code, it may be difficult to enable this rule. +It may be easier to skip the `no-unsafe-*` rules pending increasing type safety in unsafe areas of your project. +You might consider using [ESLint disable comments](https://eslint.org/docs/latest/use/configure/rules#using-configuration-comments-1) for those specific situations instead of completely disabling this rule. + +## Related To + +- [`no-explicit-any`](./no-explicit-any.mdx) +- [`no-unsafe-argument`](./no-unsafe-argument.mdx) +- [`no-unsafe-assignment`](./no-unsafe-assignment.mdx) +- [`no-unsafe-member-access`](./no-unsafe-member-access.mdx) +- [`no-unsafe-return`](./no-unsafe-return.mdx) diff --git a/node_modules/@typescript-eslint/eslint-plugin/docs/rules/no-unsafe-declaration-merging.mdx b/node_modules/@typescript-eslint/eslint-plugin/docs/rules/no-unsafe-declaration-merging.mdx new file mode 100644 index 000000000..d03605f91 --- /dev/null +++ b/node_modules/@typescript-eslint/eslint-plugin/docs/rules/no-unsafe-declaration-merging.mdx @@ -0,0 +1,65 @@ +--- +description: 'Disallow unsafe declaration merging.' +--- + +import Tabs from '@theme/Tabs'; +import TabItem from '@theme/TabItem'; + +> 🛑 This file is source code, not the primary documentation location! 🛑 +> +> See **https://typescript-eslint.io/rules/no-unsafe-declaration-merging** for documentation. + +TypeScript's "declaration merging" supports merging separate declarations with the same name. + +Declaration merging between classes and interfaces is unsafe. +The TypeScript compiler doesn't check whether properties are initialized, which can cause lead to TypeScript not detecting code that will cause runtime errors. + +```ts +interface Foo { + nums: number[]; +} + +class Foo {} + +const foo = new Foo(); + +foo.nums.push(1); // Runtime Error: Cannot read properties of undefined. +``` + +## Examples + + + + +```ts +interface Foo {} + +class Foo {} +``` + + + + +```ts +interface Foo {} +class Bar implements Foo {} + +namespace Baz {} +namespace Baz {} +enum Baz {} + +namespace Qux {} +function Qux() {} +``` + + + + +## When Not To Use It + +If your project intentionally defines classes and interfaces with unsafe declaration merging patterns, this rule might not be for you. +You might consider using [ESLint disable comments](https://eslint.org/docs/latest/use/configure/rules#using-configuration-comments-1) for those specific situations instead of completely disabling this rule. + +## Further Reading + +- [Declaration Merging](https://www.typescriptlang.org/docs/handbook/declaration-merging.html) diff --git a/node_modules/@typescript-eslint/eslint-plugin/docs/rules/no-unsafe-enum-comparison.mdx b/node_modules/@typescript-eslint/eslint-plugin/docs/rules/no-unsafe-enum-comparison.mdx new file mode 100644 index 000000000..7988317b5 --- /dev/null +++ b/node_modules/@typescript-eslint/eslint-plugin/docs/rules/no-unsafe-enum-comparison.mdx @@ -0,0 +1,86 @@ +--- +description: 'Disallow comparing an enum value with a non-enum value.' +--- + +import Tabs from '@theme/Tabs'; +import TabItem from '@theme/TabItem'; + +> 🛑 This file is source code, not the primary documentation location! 🛑 +> +> See **https://typescript-eslint.io/rules/no-unsafe-enum-comparison** for documentation. + +The TypeScript compiler can be surprisingly lenient when working with enums. String enums are widely considered to be safer than number enums, but even string enums have some pitfalls. For example, it is allowed to compare enum values against literals: + +```ts +enum Vegetable { + Asparagus = 'asparagus', +} + +declare const vegetable: Vegetable; + +vegetable === 'asparagus'; // No error +``` + +The above code snippet should instead be written as `vegetable === Vegetable.Asparagus`. Allowing literals in comparisons subverts the point of using enums in the first place. By enforcing comparisons with properly typed enums: + +- It makes a codebase more resilient to enum members changing values. +- It allows for code IDEs to use the "Rename Symbol" feature to quickly rename an enum. +- It aligns code to the proper enum semantics of referring to them by name and treating their values as implementation details. + +## Examples + + + + +```ts +enum Fruit { + Apple, +} + +declare let fruit: Fruit; + +fruit === 0; +``` + +```ts +enum Vegetable { + Asparagus = 'asparagus', +} + +declare let vegetable: Vegetable; + +vegetable === 'asparagus'; +``` + + + + +```ts +enum Fruit { + Apple, +} + +declare let fruit: Fruit; + +fruit === Fruit.Apple; +``` + +```ts +enum Vegetable { + Asparagus = 'asparagus', +} + +declare let vegetable: Vegetable; + +vegetable === Vegetable.Asparagus; +``` + + + + +## When Not To Use It + +If you don't mind number and/or literal string constants being compared against enums, you likely don't need this rule. + +Separately, in the rare case of relying on an third party enums that are only imported as `type`s, it may be difficult to adhere to this rule. +You might consider using [ESLint disable comments](https://eslint.org/docs/latest/use/configure/rules#using-configuration-comments-1) for those specific situations instead of completely disabling this rule. diff --git a/node_modules/@typescript-eslint/eslint-plugin/docs/rules/no-unsafe-member-access.mdx b/node_modules/@typescript-eslint/eslint-plugin/docs/rules/no-unsafe-member-access.mdx new file mode 100644 index 000000000..4b41fb56b --- /dev/null +++ b/node_modules/@typescript-eslint/eslint-plugin/docs/rules/no-unsafe-member-access.mdx @@ -0,0 +1,80 @@ +--- +description: 'Disallow member access on a value with type `any`.' +--- + +import Tabs from '@theme/Tabs'; +import TabItem from '@theme/TabItem'; + +> 🛑 This file is source code, not the primary documentation location! 🛑 +> +> See **https://typescript-eslint.io/rules/no-unsafe-member-access** for documentation. + +The `any` type in TypeScript is a dangerous "escape hatch" from the type system. +Using `any` disables many type checking rules and is generally best used only as a last resort or when prototyping code. + +Despite your best intentions, the `any` type can sometimes leak into your codebase. +Accessing a member of an `any`-typed value creates a potential type safety hole and source of bugs in your codebase. + +This rule disallows member access on any variable that is typed as `any`. + +## Examples + + + + +```ts +declare const anyVar: any; +declare const nestedAny: { prop: any }; + +anyVar.a; +anyVar.a.b; +anyVar['a']; +anyVar['a']['b']; + +nestedAny.prop.a; +nestedAny.prop['a']; + +const key = 'a'; +nestedAny.prop[key]; + +// Using an any to access a member is unsafe +const arr = [1, 2, 3]; +arr[anyVar]; +nestedAny[anyVar]; +``` + + + + +```ts +declare const properlyTyped: { prop: { a: string } }; + +properlyTyped.prop.a; +properlyTyped.prop['a']; + +const key = 'a'; +properlyTyped.prop[key]; + +const arr = [1, 2, 3]; +arr[1]; +let idx = 1; +arr[idx]; +arr[idx++]; +``` + + + + +## When Not To Use It + +If your codebase has many existing `any`s or areas of unsafe code, it may be difficult to enable this rule. +It may be easier to skip the `no-unsafe-*` rules pending increasing type safety in unsafe areas of your project. +You might consider using [ESLint disable comments](https://eslint.org/docs/latest/use/configure/rules#using-configuration-comments-1) for those specific situations instead of completely disabling this rule. + +## Related To + +- [`no-explicit-any`](./no-explicit-any.mdx) +- [`no-unsafe-argument`](./no-unsafe-argument.mdx) +- [`no-unsafe-assignment`](./no-unsafe-assignment.mdx) +- [`no-unsafe-call`](./no-unsafe-call.mdx) +- [`no-unsafe-return`](./no-unsafe-return.mdx) diff --git a/node_modules/@typescript-eslint/eslint-plugin/docs/rules/no-unsafe-return.mdx b/node_modules/@typescript-eslint/eslint-plugin/docs/rules/no-unsafe-return.mdx new file mode 100644 index 000000000..c5ca28700 --- /dev/null +++ b/node_modules/@typescript-eslint/eslint-plugin/docs/rules/no-unsafe-return.mdx @@ -0,0 +1,117 @@ +--- +description: 'Disallow returning a value with type `any` from a function.' +--- + +import Tabs from '@theme/Tabs'; +import TabItem from '@theme/TabItem'; + +> 🛑 This file is source code, not the primary documentation location! 🛑 +> +> See **https://typescript-eslint.io/rules/no-unsafe-return** for documentation. + +The `any` type in TypeScript is a dangerous "escape hatch" from the type system. +Using `any` disables many type checking rules and is generally best used only as a last resort or when prototyping code. + +Despite your best intentions, the `any` type can sometimes leak into your codebase. +Returning an an `any`-typed value from a function creates a potential type safety hole and source of bugs in your codebase. + +This rule disallows returning `any` or `any[]` from a function. + +This rule also compares generic type argument types to ensure you don't return an unsafe `any` in a generic position to a function that's expecting a specific type. +For example, it will error if you return `Set` from a function declared as returning `Set`. + +## Examples + + + + +```ts +function foo1() { + return 1 as any; +} +function foo2() { + return Object.create(null); +} +const foo3 = () => { + return 1 as any; +}; +const foo4 = () => Object.create(null); + +function foo5() { + return [] as any[]; +} +function foo6() { + return [] as Array; +} +function foo7() { + return [] as readonly any[]; +} +function foo8() { + return [] as Readonly; +} +const foo9 = () => { + return [] as any[]; +}; +const foo10 = () => [] as any[]; + +const foo11 = (): string[] => [1, 2, 3] as any[]; + +// generic position examples +function assignability1(): Set { + return new Set([1]); +} +type TAssign = () => Set; +const assignability2: TAssign = () => new Set([true]); +``` + + + + +```ts +function foo1() { + return 1; +} +function foo2() { + return Object.create(null) as Record; +} + +const foo3 = () => []; +const foo4 = () => ['a']; + +function assignability1(): Set { + return new Set(['foo']); +} +type TAssign = () => Set; +const assignability2: TAssign = () => new Set(['foo']); +``` + + + + +There are cases where the rule allows to return `any` to `unknown`. + +Examples of `any` to `unknown` return that are allowed: + +```ts showPlaygroundButton +function foo1(): unknown { + return JSON.parse(singleObjString); // Return type for JSON.parse is any. +} + +function foo2(): unknown[] { + return [] as any[]; +} +``` + +## When Not To Use It + +If your codebase has many existing `any`s or areas of unsafe code, it may be difficult to enable this rule. +It may be easier to skip the `no-unsafe-*` rules pending increasing type safety in unsafe areas of your project. +You might consider using [ESLint disable comments](https://eslint.org/docs/latest/use/configure/rules#using-configuration-comments-1) for those specific situations instead of completely disabling this rule. + +## Related To + +- [`no-explicit-any`](./no-explicit-any.mdx) +- [`no-unsafe-argument`](./no-unsafe-argument.mdx) +- [`no-unsafe-assignment`](./no-unsafe-assignment.mdx) +- [`no-unsafe-call`](./no-unsafe-call.mdx) +- [`no-unsafe-member-access`](./no-unsafe-member-access.mdx) diff --git a/node_modules/@typescript-eslint/eslint-plugin/docs/rules/no-unsafe-unary-minus.mdx b/node_modules/@typescript-eslint/eslint-plugin/docs/rules/no-unsafe-unary-minus.mdx new file mode 100644 index 000000000..307914ef3 --- /dev/null +++ b/node_modules/@typescript-eslint/eslint-plugin/docs/rules/no-unsafe-unary-minus.mdx @@ -0,0 +1,60 @@ +--- +description: 'Require unary negation to take a number.' +--- + +import Tabs from '@theme/Tabs'; +import TabItem from '@theme/TabItem'; + +> 🛑 This file is source code, not the primary documentation location! 🛑 +> +> See **https://typescript-eslint.io/rules/no-unsafe-unary-minus** for documentation. + +TypeScript does not prevent you from putting a minus sign before things other than numbers: + +```ts +const s = 'hello'; +const x = -s; // x is NaN +``` + +This rule restricts the unary `-` operator to `number | bigint`. + +## Examples + + + + +```ts +declare const a: string; +-a; + +declare const b: {}; +-b; +``` + + + + +```ts +-42; +-42n; + +declare const a: number; +-a; + +declare const b: number; +-b; + +declare const c: number | bigint; +-c; + +declare const d: any; +-d; + +declare const e: 1 | 2; +-e; +``` + + + + +{/* Intentionally Omitted: When Not To Use It */} diff --git a/node_modules/@typescript-eslint/eslint-plugin/docs/rules/no-unused-expressions.mdx b/node_modules/@typescript-eslint/eslint-plugin/docs/rules/no-unused-expressions.mdx new file mode 100644 index 000000000..2f0805ba8 --- /dev/null +++ b/node_modules/@typescript-eslint/eslint-plugin/docs/rules/no-unused-expressions.mdx @@ -0,0 +1,13 @@ +--- +description: 'Disallow unused expressions.' +--- + +import Tabs from '@theme/Tabs'; +import TabItem from '@theme/TabItem'; + +> 🛑 This file is source code, not the primary documentation location! 🛑 +> +> See **https://typescript-eslint.io/rules/no-unused-expressions** for documentation. + +This rule extends the base [`eslint/no-unused-expressions`](https://eslint.org/docs/rules/no-unused-expressions) rule. +It adds support for optional call expressions `x?.()`, and directive in module declarations. diff --git a/node_modules/@typescript-eslint/eslint-plugin/docs/rules/no-unused-vars.mdx b/node_modules/@typescript-eslint/eslint-plugin/docs/rules/no-unused-vars.mdx new file mode 100644 index 000000000..3a65df4f2 --- /dev/null +++ b/node_modules/@typescript-eslint/eslint-plugin/docs/rules/no-unused-vars.mdx @@ -0,0 +1,49 @@ +--- +description: 'Disallow unused variables.' +--- + +import Tabs from '@theme/Tabs'; +import TabItem from '@theme/TabItem'; + +> 🛑 This file is source code, not the primary documentation location! 🛑 +> +> See **https://typescript-eslint.io/rules/no-unused-vars** for documentation. + +This rule extends the base [`eslint/no-unused-vars`](https://eslint.org/docs/rules/no-unused-vars) rule. +It adds support for TypeScript features, such as types. + +## Benefits Over TypeScript + +TypeScript provides [`noUnusedLocals`](https://www.typescriptlang.org/tsconfig#noUnusedLocals) and [`noUnusedParameters`](https://www.typescriptlang.org/tsconfig#noUnusedParameters) compiler options that can report errors on unused local variables or parameters, respectively. +Those compiler options can be convenient to use if you don't want to set up ESLint and typescript-eslint. +However: + +- These lint rules are more configurable than TypeScript's compiler options. + - For example, the [`varsIgnorePattern` option](https://eslint.org/docs/latest/rules/no-unused-vars#varsignorepattern) can customize what names are always allowed to be exempted. TypeScript hardcodes its exemptions to names starting with `_`. + If you would like to emulate the TypeScript style of exempting names starting with `_`, you can use this configuration (this includes errors as well): + ```json + { + "rules": { + "@typescript-eslint/no-unused-vars": [ + "error", + { + "args": "all", + "argsIgnorePattern": "^_", + "caughtErrors": "all", + "caughtErrorsIgnorePattern": "^_", + "destructuredArrayIgnorePattern": "^_", + "varsIgnorePattern": "^_", + "ignoreRestSiblings": true + } + ] + } + } + ``` +- [ESLint can be configured](https://eslint.org/docs/latest/use/configure/rules) within lines, files, and folders. TypeScript compiler options are linked to their TSConfig file. +- Many projects configure TypeScript's reported errors to block builds more aggressively than ESLint complaints. Blocking builds on unused variables can be inconvenient. + +We generally recommend using `@typescript-eslint/no-unused-vars` to flag unused locals and parameters instead of TypeScript. + +:::tip +Editors such as VS Code will still generally "grey out" unused variables even if `noUnusedLocals` and `noUnusedParameters` are not enabled in a project. +::: diff --git a/node_modules/@typescript-eslint/eslint-plugin/docs/rules/no-use-before-define.mdx b/node_modules/@typescript-eslint/eslint-plugin/docs/rules/no-use-before-define.mdx new file mode 100644 index 000000000..9b4318744 --- /dev/null +++ b/node_modules/@typescript-eslint/eslint-plugin/docs/rules/no-use-before-define.mdx @@ -0,0 +1,93 @@ +--- +description: 'Disallow the use of variables before they are defined.' +--- + +import Tabs from '@theme/Tabs'; +import TabItem from '@theme/TabItem'; + +> 🛑 This file is source code, not the primary documentation location! 🛑 +> +> See **https://typescript-eslint.io/rules/no-use-before-define** for documentation. + +This rule extends the base [`eslint/no-use-before-define`](https://eslint.org/docs/rules/no-use-before-define) rule. +It adds support for `type`, `interface` and `enum` declarations. + +## Options + +This rule adds the following options: + +```ts +interface Options extends BaseNoUseBeforeDefineOptions { + enums?: boolean; + typedefs?: boolean; + ignoreTypeReferences?: boolean; +} + +const defaultOptions: Options = { + ...baseNoUseBeforeDefineDefaultOptions, + enums: true, + typedefs: true, + ignoreTypeReferences: true, +}; +``` + +### `enums` + +If this is `true`, this rule warns every reference to a enum before the enum declaration. +If this is `false`, this rule will ignore references to enums, when the reference is in a child scope. + +Examples of code for the `{ "enums": true }` option: + + + + +```ts option='{ "enums": true }' +const x = Foo.FOO; + +enum Foo { + FOO, +} +``` + + + + +```ts option='{ "enums": false }' +function foo() { + return Foo.FOO; +} + +enum Foo { + FOO, +} +``` + + + + +### `typedefs` + +If this is `true`, this rule warns every reference to a type before the type declaration. +If this is `false`, this rule will ignore references to types. + +Examples of **correct** code for the `{ "typedefs": false }` option: + +```ts option='{ "typedefs": false }' showPlaygroundButton +let myVar: StringOrNumber; +type StringOrNumber = string | number; +``` + +### `ignoreTypeReferences` + +If this is `true`, this rule ignores all type references, such as in type annotations and assertions. +If this is `false`, this will will check all type references. + +Examples of **correct** code for the `{ "ignoreTypeReferences": true }` option: + +```ts option='{ "ignoreTypeReferences": true }' showPlaygroundButton +let var1: StringOrNumber; +type StringOrNumber = string | number; + +let var2: Enum; +enum Enum {} +``` diff --git a/node_modules/@typescript-eslint/eslint-plugin/docs/rules/no-useless-constructor.mdx b/node_modules/@typescript-eslint/eslint-plugin/docs/rules/no-useless-constructor.mdx new file mode 100644 index 000000000..4003fefc2 --- /dev/null +++ b/node_modules/@typescript-eslint/eslint-plugin/docs/rules/no-useless-constructor.mdx @@ -0,0 +1,22 @@ +--- +description: 'Disallow unnecessary constructors.' +--- + +import Tabs from '@theme/Tabs'; +import TabItem from '@theme/TabItem'; + +> 🛑 This file is source code, not the primary documentation location! 🛑 +> +> See **https://typescript-eslint.io/rules/no-useless-constructor** for documentation. + +This rule extends the base [`eslint/no-useless-constructor`](https://eslint.org/docs/rules/no-useless-constructor) rule. +It adds support for: + +- constructors marked as `protected` / `private` (i.e. marking a constructor as non-public), +- `public` constructors when there is no superclass, +- constructors with only parameter properties. + +### Caveat + +This lint rule will report on constructors whose sole purpose is to change visibility of a parent constructor. +See [discussion on this rule's lack of type information](https://github.com/typescript-eslint/typescript-eslint/issues/3820#issuecomment-917821240) for context. diff --git a/node_modules/@typescript-eslint/eslint-plugin/docs/rules/no-useless-empty-export.mdx b/node_modules/@typescript-eslint/eslint-plugin/docs/rules/no-useless-empty-export.mdx new file mode 100644 index 000000000..27d66d9d0 --- /dev/null +++ b/node_modules/@typescript-eslint/eslint-plugin/docs/rules/no-useless-empty-export.mdx @@ -0,0 +1,53 @@ +--- +description: "Disallow empty exports that don't change anything in a module file." +--- + +import Tabs from '@theme/Tabs'; +import TabItem from '@theme/TabItem'; + +> 🛑 This file is source code, not the primary documentation location! 🛑 +> +> See **https://typescript-eslint.io/rules/no-useless-empty-export** for documentation. + +An empty `export {}` statement is sometimes useful in TypeScript code to turn a file that would otherwise be a script file into a module file. +Per the [TypeScript Handbook Modules page](https://www.typescriptlang.org/docs/handbook/modules.html): + +> In TypeScript, just as in ECMAScript 2015, any file containing a top-level import or export is considered a module. +> Conversely, a file without any top-level import or export declarations is treated as a script whose contents are available in the global scope (and therefore to modules as well). + +However, an `export {}` statement does nothing if there are any other top-level import or export statements in a file. + +This rule reports an `export {}` that doesn't do anything in a file already using ES modules. + +## Examples + + + + +```ts +export const value = 'Hello, world!'; +export {}; +``` + +```ts +import 'some-other-module'; +export {}; +``` + + + + +```ts +export const value = 'Hello, world!'; +``` + +```ts +import 'some-other-module'; +``` + + + + +## When Not To Use It + +If you don't mind an empty `export {}` at the bottom of files, you likely don't need this rule. diff --git a/node_modules/@typescript-eslint/eslint-plugin/docs/rules/no-useless-template-literals.mdx b/node_modules/@typescript-eslint/eslint-plugin/docs/rules/no-useless-template-literals.mdx new file mode 100644 index 000000000..b229a4b1f --- /dev/null +++ b/node_modules/@typescript-eslint/eslint-plugin/docs/rules/no-useless-template-literals.mdx @@ -0,0 +1,61 @@ +--- +description: 'Disallow unnecessary template literals.' +--- + +import Tabs from '@theme/Tabs'; +import TabItem from '@theme/TabItem'; + +> 🛑 This file is source code, not the primary documentation location! 🛑 +> +> See **https://typescript-eslint.io/rules/no-useless-template-literals** for documentation. + +This rule reports template literals that can be simplified to a normal string literal. + +## Examples + + + + +```ts +const ab1 = `${'a'}${'b'}`; +const ab2 = `a${'b'}`; + +const stringWithNumber = `${'1 + 1 = '}${2}`; + +const stringWithBoolean = `${'true is '}${true}`; + +const text = 'a'; +const wrappedText = `${text}`; + +declare const intersectionWithString: string & { _brand: 'test-brand' }; +const wrappedIntersection = `${intersectionWithString}`; +``` + + + + +```ts +const ab1 = 'ab'; +const ab2 = 'ab'; + +const stringWithNumber = `1 + 1 = 2`; + +const stringWithBoolean = `true is true`; + +const text = 'a'; +const wrappedText = text; + +declare const intersectionWithString: string & { _brand: 'test-brand' }; +const wrappedIntersection = intersectionWithString; +``` + + + + +## When Not To Use It + +When you want to allow string expressions inside template literals. + +## Related To + +- [`restrict-template-expressions`](./restrict-template-expressions.mdx) diff --git a/node_modules/@typescript-eslint/eslint-plugin/docs/rules/no-var-requires.mdx b/node_modules/@typescript-eslint/eslint-plugin/docs/rules/no-var-requires.mdx new file mode 100644 index 000000000..e71c2e17c --- /dev/null +++ b/node_modules/@typescript-eslint/eslint-plugin/docs/rules/no-var-requires.mdx @@ -0,0 +1,69 @@ +--- +description: 'Disallow `require` statements except in import statements.' +--- + +import Tabs from '@theme/Tabs'; +import TabItem from '@theme/TabItem'; + +> 🛑 This file is source code, not the primary documentation location! 🛑 +> +> See **https://typescript-eslint.io/rules/no-var-requires** for documentation. + +In other words, the use of forms such as `var foo = require("foo")` are banned. Instead use ES6 style imports or `import foo = require("foo")` imports. + +## Examples + + + + +```ts +var foo = require('foo'); +const foo = require('foo'); +let foo = require('foo'); +``` + + + + +```ts +import foo = require('foo'); +require('foo'); +import foo from 'foo'; +``` + + + + +## Options + +### `allow` + +A array of strings. These strings will be compiled into regular expressions with the `u` flag and be used to test against the imported path. A common use case is to allow importing `package.json`. This is because `package.json` commonly lives outside of the TS root directory, so statically importing it would lead to root directory conflicts, especially with `resolveJsonModule` enabled. You can also use it to allow importing any JSON if your environment doesn't support JSON modules, or use it for other cases where `import` statements cannot work. + +With `{allow: ['/package\\.json$']}`: + + + + +```ts option='{ "allow": ["/package.json$"] }' +const foo = require('../data.json'); +``` + + + + +```ts option='{ "allow": ["/package.json$"] }' +const foo = require('../package.json'); +``` + + + + +## When Not To Use It + +If your project frequently uses older CommonJS `require`s, then this rule might not be applicable to you. +If only a subset of your project uses `require`s then you might consider using [ESLint disable comments](https://eslint.org/docs/latest/use/configure/rules#using-configuration-comments-1) for those specific situations instead of completely disabling this rule. + +## Related To + +- [`no-require-imports`](./no-require-imports.mdx) diff --git a/node_modules/@typescript-eslint/eslint-plugin/docs/rules/non-nullable-type-assertion-style.mdx b/node_modules/@typescript-eslint/eslint-plugin/docs/rules/non-nullable-type-assertion-style.mdx new file mode 100644 index 000000000..cbb1dc0fa --- /dev/null +++ b/node_modules/@typescript-eslint/eslint-plugin/docs/rules/non-nullable-type-assertion-style.mdx @@ -0,0 +1,47 @@ +--- +description: 'Enforce non-null assertions over explicit type casts.' +--- + +import Tabs from '@theme/Tabs'; +import TabItem from '@theme/TabItem'; + +> 🛑 This file is source code, not the primary documentation location! 🛑 +> +> See **https://typescript-eslint.io/rules/non-nullable-type-assertion-style** for documentation. + +There are two common ways to assert to TypeScript that a value is its type without `null` or `undefined`: + +- `!`: Non-null assertion +- `as`: Traditional type assertion with a coincidentally equivalent type + +`!` non-null assertions are generally preferred for requiring less code and being harder to fall out of sync as types change. +This rule reports when an `as` cast is doing the same job as a `!` would, and suggests fixing the code to be an `!`. + +## Examples + + + + +```ts +const maybe: string | undefined = Math.random() > 0.5 ? '' : undefined; + +const definitely = maybe as string; +const alsoDefinitely = maybe; +``` + + + + +```ts +const maybe: string | undefined = Math.random() > 0.5 ? '' : undefined; + +const definitely = maybe!; +const alsoDefinitely = maybe!; +``` + + + + +## When Not To Use It + +If you don't mind having unnecessarily verbose type assertions, you can avoid this rule. diff --git a/node_modules/@typescript-eslint/eslint-plugin/docs/rules/object-curly-spacing.mdx b/node_modules/@typescript-eslint/eslint-plugin/docs/rules/object-curly-spacing.mdx new file mode 100644 index 000000000..af82a39f9 --- /dev/null +++ b/node_modules/@typescript-eslint/eslint-plugin/docs/rules/object-curly-spacing.mdx @@ -0,0 +1,13 @@ +--- +description: 'Enforce consistent spacing inside braces.' +--- + +import Tabs from '@theme/Tabs'; +import TabItem from '@theme/TabItem'; + +> 🛑 This file is source code, not the primary documentation location! 🛑 +> +> See **https://typescript-eslint.io/rules/object-curly-spacing** for documentation. + +This rule extends the base [`eslint/object-curly-spacing`](https://eslint.org/docs/rules/object-curly-spacing) rule. +It adds support for TypeScript's object types. diff --git a/node_modules/@typescript-eslint/eslint-plugin/docs/rules/only-throw-error.mdx b/node_modules/@typescript-eslint/eslint-plugin/docs/rules/only-throw-error.mdx new file mode 100644 index 000000000..cd27f8cc4 --- /dev/null +++ b/node_modules/@typescript-eslint/eslint-plugin/docs/rules/only-throw-error.mdx @@ -0,0 +1,115 @@ +--- +description: 'Disallow throwing non-`Error` values as exceptions.' +--- + +import Tabs from '@theme/Tabs'; +import TabItem from '@theme/TabItem'; + +> 🛑 This file is source code, not the primary documentation location! 🛑 +> +> See **https://typescript-eslint.io/rules/only-throw-error** for documentation. + +It is considered good practice to only `throw` the `Error` object itself or an object using the `Error` object as base objects for user-defined exceptions. +The fundamental benefit of `Error` objects is that they automatically keep track of where they were built and originated. + +This rule restricts what can be thrown as an exception. + +## Examples + +This rule is aimed at maintaining consistency when throwing exception by disallowing to throw literals and other expressions which cannot possibly be an `Error` object. + + + + +```ts +throw 'error'; + +throw 0; + +throw undefined; + +throw null; + +const err = new Error(); +throw 'an ' + err; + +const err = new Error(); +throw `${err}`; + +const err = ''; +throw err; + +function getError() { + return ''; +} +throw getError(); + +const foo = { + bar: '', +}; +throw foo.bar; +``` + + + + +```ts +throw new Error(); + +throw new Error('error'); + +const e = new Error('error'); +throw e; + +try { + throw new Error('error'); +} catch (e) { + throw e; +} + +const err = new Error(); +throw err; + +function getError() { + return new Error(); +} +throw getError(); + +const foo = { + bar: new Error(), +}; +throw foo.bar; + +class CustomError extends Error { + // ... +} +throw new CustomError(); +``` + + + + +## Options + +This rule adds the following options: + +```ts +interface Options { + /** + * Whether to always allow throwing values typed as `any`. + */ + allowThrowingAny?: boolean; + + /** + * Whether to always allow throwing values typed as `unknown`. + */ + allowThrowingUnknown?: boolean; +} + +const defaultOptions: Options = { + allowThrowingAny: false, + allowThrowingUnknown: false, +}; +``` + +{/* Intentionally Omitted: When Not To Use It */} diff --git a/node_modules/@typescript-eslint/eslint-plugin/docs/rules/padding-line-between-statements.mdx b/node_modules/@typescript-eslint/eslint-plugin/docs/rules/padding-line-between-statements.mdx new file mode 100644 index 000000000..e1bf63657 --- /dev/null +++ b/node_modules/@typescript-eslint/eslint-plugin/docs/rules/padding-line-between-statements.mdx @@ -0,0 +1,36 @@ +--- +description: 'Require or disallow padding lines between statements.' +--- + +import Tabs from '@theme/Tabs'; +import TabItem from '@theme/TabItem'; + +> 🛑 This file is source code, not the primary documentation location! 🛑 +> +> See **https://typescript-eslint.io/rules/padding-line-between-statements** for documentation. + +This rule extends the base [`eslint/padding-line-between-statements`](https://eslint.org/docs/rules/padding-line-between-statements) rule. +It adds support for TypeScript constructs such as `interface` and `type`. + +## Options + +In addition to options provided by ESLint, `interface` and `type` can be used as statement types. + +For example, to add blank lines before interfaces and type definitions: + +```jsonc +{ + // Example - Add blank lines before interface and type definitions. + "padding-line-between-statements": "off", + "@typescript-eslint/padding-line-between-statements": [ + "error", + { + "blankLine": "always", + "prev": "*", + "next": ["interface", "type"], + }, + ], +} +``` + +**Note:** ESLint `cjs-export` and `cjs-import` statement types are renamed to `exports` and `require` respectively. diff --git a/node_modules/@typescript-eslint/eslint-plugin/docs/rules/parameter-properties.mdx b/node_modules/@typescript-eslint/eslint-plugin/docs/rules/parameter-properties.mdx new file mode 100644 index 000000000..b9915dd65 --- /dev/null +++ b/node_modules/@typescript-eslint/eslint-plugin/docs/rules/parameter-properties.mdx @@ -0,0 +1,518 @@ +--- +description: 'Require or disallow parameter properties in class constructors.' +--- + +import Tabs from '@theme/Tabs'; +import TabItem from '@theme/TabItem'; + +> 🛑 This file is source code, not the primary documentation location! 🛑 +> +> See **https://typescript-eslint.io/rules/parameter-properties** for documentation. + +TypeScript includes a "parameter properties" shorthand for declaring a class constructor parameter and class property in one location. +Parameter properties can be confusing to those new to TypeScript as they are less explicit than other ways of declaring and initializing class members. + +This rule can be configured to always disallow the use of parameter properties or enforce their usage when possible. + +## Options + +This rule, in its default state, does not require any argument and would completely disallow the use of parameter properties. +It may take an options object containing either or both of: + +- `"allow"`: allowing certain kinds of properties to be ignored +- `"prefer"`: either `"class-property"` _(default)_ or `"parameter-property"` + +### `allow` + +If you would like to ignore certain kinds of properties then you may pass an object containing `"allow"` as an array of any of the following options: + +- `allow`, an array containing one or more of the allowed modifiers. Valid values are: + - `readonly`, allows **readonly** parameter properties. + - `private`, allows **private** parameter properties. + - `protected`, allows **protected** parameter properties. + - `public`, allows **public** parameter properties. + - `private readonly`, allows **private readonly** parameter properties. + - `protected readonly`, allows **protected readonly** parameter properties. + - `public readonly`, allows **public readonly** parameter properties. + +For example, to ignore `public` properties: + +```json +{ + "@typescript-eslint/parameter-properties": [ + true, + { + "allow": ["public"] + } + ] +} +``` + +### `prefer` + +By default, the rule prefers class property (`"class-property"`). +You can switch it to instead preferring parameter property with (`"parameter-property"`). + +In `"parameter-property"` mode, the rule will issue a report when: + +- A class property and constructor parameter have the same name and type +- The constructor parameter is assigned to the class property at the beginning of the constructor + +### default + +Examples of code for this rule with no options at all: + + + + +```ts +class Foo { + constructor(readonly name: string) {} +} + +class Foo { + constructor(private name: string) {} +} + +class Foo { + constructor(protected name: string) {} +} + +class Foo { + constructor(public name: string) {} +} + +class Foo { + constructor(private readonly name: string) {} +} + +class Foo { + constructor(protected readonly name: string) {} +} + +class Foo { + constructor(public readonly name: string) {} +} +``` + + + + +```ts +class Foo { + constructor(name: string) {} +} +``` + + + + +### readonly + +Examples of code for the `{ "allow": ["readonly"] }` options: + + + + +```ts option='{ "allow": ["readonly"] }' +class Foo { + constructor(private name: string) {} +} + +class Foo { + constructor(protected name: string) {} +} + +class Foo { + constructor(public name: string) {} +} + +class Foo { + constructor(private readonly name: string) {} +} + +class Foo { + constructor(protected readonly name: string) {} +} + +class Foo { + constructor(public readonly name: string) {} +} +``` + + + + +```ts option='{ "allow": ["readonly"] }' +class Foo { + constructor(name: string) {} +} + +class Foo { + constructor(readonly name: string) {} +} +``` + + + + +### private + +Examples of code for the `{ "allow": ["private"] }` options: + + + + +```ts option='{ "allow": ["private"] }' +class Foo { + constructor(readonly name: string) {} +} + +class Foo { + constructor(protected name: string) {} +} + +class Foo { + constructor(public name: string) {} +} + +class Foo { + constructor(private readonly name: string) {} +} + +class Foo { + constructor(protected readonly name: string) {} +} + +class Foo { + constructor(public readonly name: string) {} +} +``` + + + + +```ts option='{ "allow": ["private"] }' +class Foo { + constructor(name: string) {} +} + +class Foo { + constructor(private name: string) {} +} +``` + + + + +### protected + +Examples of code for the `{ "allow": ["protected"] }` options: + + + + +```ts option='{ "allow": ["protected"] }' +class Foo { + constructor(readonly name: string) {} +} + +class Foo { + constructor(private name: string) {} +} + +class Foo { + constructor(public name: string) {} +} + +class Foo { + constructor(private readonly name: string) {} +} + +class Foo { + constructor(protected readonly name: string) {} +} + +class Foo { + constructor(public readonly name: string) {} +} +``` + + + + +```ts option='{ "allow": ["protected"] }' +class Foo { + constructor(name: string) {} +} + +class Foo { + constructor(protected name: string) {} +} +``` + + + + +### public + +Examples of code for the `{ "allow": ["public"] }` options: + + + + +```ts option='{ "allow": ["public"] }' +class Foo { + constructor(readonly name: string) {} +} + +class Foo { + constructor(private name: string) {} +} + +class Foo { + constructor(protected name: string) {} +} + +class Foo { + constructor(private readonly name: string) {} +} + +class Foo { + constructor(protected readonly name: string) {} +} + +class Foo { + constructor(public readonly name: string) {} +} +``` + + + + +```ts option='{ "allow": ["public"] }' +class Foo { + constructor(name: string) {} +} + +class Foo { + constructor(public name: string) {} +} +``` + + + + +### private readonly + +Examples of code for the `{ "allow": ["private readonly"] }` options: + + + + +```ts option='{ "allow": ["private readonly"] }' +class Foo { + constructor(readonly name: string) {} +} + +class Foo { + constructor(private name: string) {} +} + +class Foo { + constructor(protected name: string) {} +} + +class Foo { + constructor(public name: string) {} +} + +class Foo { + constructor(protected readonly name: string) {} +} + +class Foo { + constructor(public readonly name: string) {} +} +``` + + + + +```ts option='{ "allow": ["private readonly"] }' +class Foo { + constructor(name: string) {} +} + +class Foo { + constructor(private readonly name: string) {} +} +``` + + + + +### protected readonly + +Examples of code for the `{ "allow": ["protected readonly"] }` options: + + + + +```ts option='{ "allow": ["protected readonly"] }' +class Foo { + constructor(readonly name: string) {} +} + +class Foo { + constructor(private name: string) {} +} + +class Foo { + constructor(protected name: string) {} +} + +class Foo { + constructor(public name: string) {} +} + +class Foo { + constructor(private readonly name: string) {} +} + +class Foo { + constructor(public readonly name: string) {} +} +``` + + + + +```ts option='{ "allow": ["protected readonly"] }' +class Foo { + constructor(name: string) {} +} + +class Foo { + constructor(protected readonly name: string) {} +} +``` + + + + +### public readonly + +Examples of code for the `{ "allow": ["public readonly"] }` options: + + + + +```ts option='{ "allow": ["public readonly"] }' +class Foo { + constructor(readonly name: string) {} +} + +class Foo { + constructor(private name: string) {} +} + +class Foo { + constructor(protected name: string) {} +} + +class Foo { + constructor(public name: string) {} +} + +class Foo { + constructor(private readonly name: string) {} +} + +class Foo { + constructor(protected readonly name: string) {} +} +``` + + + + +```ts option='{ "allow": ["public readonly"] }' +class Foo { + constructor(name: string) {} +} + +class Foo { + constructor(public readonly name: string) {} +} +``` + + + + +### `"parameter-property"` + +Examples of code for the `{ "prefer": "parameter-property" }` option: + + + + +```ts option='{ "prefer": "parameter-property" }' +class Foo { + private name: string; + constructor(name: string) { + this.name = name; + } +} + +class Foo { + public readonly name: string; + constructor(name: string) { + this.name = name; + } +} + +class Foo { + constructor(name: string) { + this.name = name; + } + name: string; +} +``` + + + + +```ts option='{ "prefer": "parameter-property" }' +class Foo { + private differentName: string; + constructor(name: string) { + this.differentName = name; + } +} + +class Foo { + private differentType: number | undefined; + constructor(differentType: number) { + this.differentType = differentType; + } +} + +class Foo { + protected logicInConstructor: string; + constructor(logicInConstructor: string) { + console.log('Hello, world!'); + this.logicInConstructor = logicInConstructor; + } +} +``` + + + + +## When Not To Use It + +If you don't care about which style of parameter properties in constructors is used in your classes, then you will not need this rule. + +However, keep in mind that inconsistent style can harm readability in a project. +We recommend picking a single option for this rule that works best for your project. diff --git a/node_modules/@typescript-eslint/eslint-plugin/docs/rules/prefer-as-const.mdx b/node_modules/@typescript-eslint/eslint-plugin/docs/rules/prefer-as-const.mdx new file mode 100644 index 000000000..e7237661d --- /dev/null +++ b/node_modules/@typescript-eslint/eslint-plugin/docs/rules/prefer-as-const.mdx @@ -0,0 +1,51 @@ +--- +description: 'Enforce the use of `as const` over literal type.' +--- + +import Tabs from '@theme/Tabs'; +import TabItem from '@theme/TabItem'; + +> 🛑 This file is source code, not the primary documentation location! 🛑 +> +> See **https://typescript-eslint.io/rules/prefer-as-const** for documentation. + +There are two common ways to tell TypeScript that a literal value should be interpreted as its literal type (e.g. `2`) rather than general primitive type (e.g. `number`); + +- `as const`: telling TypeScript to infer the literal type automatically +- `as` with the literal type: explicitly telling the literal type to TypeScript + +`as const` is generally preferred, as it doesn't require re-typing the literal value. +This rule reports when an `as` with an explicit literal type can be replaced with an `as const`. + +## Examples + + + + +```ts +let bar: 2 = 2; +let foo = <'bar'>'bar'; +let foo = { bar: 'baz' as 'baz' }; +``` + + + + +```ts +let foo = 'bar'; +let foo = 'bar' as const; +let foo: 'bar' = 'bar' as const; +let bar = 'bar' as string; +let foo = 'bar'; +let foo = { bar: 'baz' }; +``` + + + + +## When Not To Use It + +If you don't care about which style of literals assertions is used in your code, then you will not need this rule. + +However, keep in mind that inconsistent style can harm readability in a project. +We recommend picking a single option for this rule that works best for your project. diff --git a/node_modules/@typescript-eslint/eslint-plugin/docs/rules/prefer-destructuring.mdx b/node_modules/@typescript-eslint/eslint-plugin/docs/rules/prefer-destructuring.mdx new file mode 100644 index 000000000..411e376b7 --- /dev/null +++ b/node_modules/@typescript-eslint/eslint-plugin/docs/rules/prefer-destructuring.mdx @@ -0,0 +1,102 @@ +--- +description: 'Require destructuring from arrays and/or objects.' +--- + +import Tabs from '@theme/Tabs'; +import TabItem from '@theme/TabItem'; + +> 🛑 This file is source code, not the primary documentation location! 🛑 +> +> See **https://typescript-eslint.io/rules/prefer-destructuring** for documentation. + +## Examples + +This rule extends the base [`eslint/prefer-destructuring`](https://eslint.org/docs/latest/rules/prefer-destructuring) rule. +It adds support for TypeScript's type annotations in variable declarations. + + + + + +```ts +const x: string = obj.x; // This is incorrect and the auto fixer provides following untyped fix. +// const { x } = obj; +``` + + + + +```ts +const x: string = obj.x; // This is correct by default. You can also forbid this by an option. +``` + + + + +And it infers binding patterns more accurately thanks to the type checker. + + + + +```ts +const x = ['a']; +const y = x[0]; +``` + + + + +```ts +const x = { 0: 'a' }; +const y = x[0]; +``` + +It is correct when `enforceForRenamedProperties` is not true. +Valid destructuring syntax is renamed style like `{ 0: y } = x` rather than `[y] = x` because `x` is not iterable. + + + + +## Options + +This rule adds the following options: + +```ts +type Options = [ + BasePreferDestructuringOptions[0], + BasePreferDestructuringOptions[1] & { + enforceForDeclarationWithTypeAnnotation?: boolean; + }, +]; + +const defaultOptions: Options = [ + basePreferDestructuringDefaultOptions[0], + { + ...basePreferDestructuringDefaultOptions[1], + enforceForDeclarationWithTypeAnnotation: false, + }, +]; +``` + +### `enforceForDeclarationWithTypeAnnotation` + +When set to `true`, type annotated variable declarations are enforced to use destructuring assignment. + +Examples with `{ enforceForDeclarationWithTypeAnnotation: true }`: + + + + +```ts option='{ "object": true }, { "enforceForDeclarationWithTypeAnnotation": true }' +const x: string = obj.x; +``` + + + + +```ts option='{ "object": true }, { "enforceForDeclarationWithTypeAnnotation": true }' +const { x }: { x: string } = obj; +``` + + + diff --git a/node_modules/@typescript-eslint/eslint-plugin/docs/rules/prefer-enum-initializers.mdx b/node_modules/@typescript-eslint/eslint-plugin/docs/rules/prefer-enum-initializers.mdx new file mode 100644 index 000000000..1c208ed40 --- /dev/null +++ b/node_modules/@typescript-eslint/eslint-plugin/docs/rules/prefer-enum-initializers.mdx @@ -0,0 +1,68 @@ +--- +description: 'Require each enum member value to be explicitly initialized.' +--- + +import Tabs from '@theme/Tabs'; +import TabItem from '@theme/TabItem'; + +> 🛑 This file is source code, not the primary documentation location! 🛑 +> +> See **https://typescript-eslint.io/rules/prefer-enum-initializers** for documentation. + +TypeScript `enum`s are a practical way to organize semantically related constant values. +Members of `enum`s that don't have explicit values are by default given sequentially increasing numbers. + +In projects where the value of `enum` members are important, allowing implicit values for enums can cause bugs if `enum`s are modified over time. + +This rule recommends having each `enum` member value explicitly initialized. + +## Examples + + + + +```ts +enum Status { + Open = 1, + Close, +} + +enum Direction { + Up, + Down, +} + +enum Color { + Red, + Green = 'Green', + Blue = 'Blue', +} +``` + + + + +```ts +enum Status { + Open = 'Open', + Close = 'Close', +} + +enum Direction { + Up = 1, + Down = 2, +} + +enum Color { + Red = 'Red', + Green = 'Green', + Blue = 'Blue', +} +``` + + + + +## When Not To Use It + +If you don't care about `enum`s having implicit values you can safely disable this rule. diff --git a/node_modules/@typescript-eslint/eslint-plugin/docs/rules/prefer-find.mdx b/node_modules/@typescript-eslint/eslint-plugin/docs/rules/prefer-find.mdx new file mode 100644 index 000000000..66089f555 --- /dev/null +++ b/node_modules/@typescript-eslint/eslint-plugin/docs/rules/prefer-find.mdx @@ -0,0 +1,45 @@ +--- +description: 'Enforce the use of Array.prototype.find() over Array.prototype.filter() followed by [0] when looking for a single result.' +--- + +import Tabs from '@theme/Tabs'; +import TabItem from '@theme/TabItem'; + +> 🛑 This file is source code, not the primary documentation location! 🛑 +> +> See **https://typescript-eslint.io/rules/prefer-find** for documentation. + +When searching for the first item in an array matching a condition, it may be tempting to use code like `arr.filter(x => x > 0)[0]`. +However, it is simpler to use [Array.prototype.find()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/find) instead, `arr.find(x => x > 0)`, which also returns the first entry matching a condition. +Because the `.find()` only needs to execute the callback until it finds a match, it's also more efficient. + +:::info + +Beware the difference in short-circuiting behavior between the approaches. +`.find()` will only execute the callback on array elements until it finds a match, whereas `.filter()` executes the callback for all array elements. +Therefore, when fixing errors from this rule, be sure that your `.filter()` callbacks do not have side effects. + +::: + + + + +```ts +[1, 2, 3].filter(x => x > 1)[0]; + +[1, 2, 3].filter(x => x > 1).at(0); +``` + + + + +```ts +[1, 2, 3].find(x => x > 1); +``` + + + + +## When Not To Use It + +If you intentionally use patterns like `.filter(callback)[0]` to execute side effects in `callback` on all array elements, you will want to avoid this rule. diff --git a/node_modules/@typescript-eslint/eslint-plugin/docs/rules/prefer-for-of.mdx b/node_modules/@typescript-eslint/eslint-plugin/docs/rules/prefer-for-of.mdx new file mode 100644 index 000000000..0399c781d --- /dev/null +++ b/node_modules/@typescript-eslint/eslint-plugin/docs/rules/prefer-for-of.mdx @@ -0,0 +1,50 @@ +--- +description: 'Enforce the use of `for-of` loop over the standard `for` loop where possible.' +--- + +import Tabs from '@theme/Tabs'; +import TabItem from '@theme/TabItem'; + +> 🛑 This file is source code, not the primary documentation location! 🛑 +> +> See **https://typescript-eslint.io/rules/prefer-for-of** for documentation. + +Many developers default to writing `for (let i = 0; i < ...` loops to iterate over arrays. +However, in many of those arrays, the loop iterator variable (e.g. `i`) is only used to access the respective element of the array. +In those cases, a `for-of` loop is easier to read and write. + +This rule recommends a for-of loop when the loop index is only used to read from an array that is being iterated. + +## Examples + + + + +```ts +declare const array: string[]; + +for (let i = 0; i < array.length; i++) { + console.log(array[i]); +} +``` + + + + +```ts +declare const array: string[]; + +for (const x of array) { + console.log(x); +} + +for (let i = 0; i < array.length; i++) { + // i is used, so for-of could not be used. + console.log(i, array[i]); +} +``` + + + + +{/* Intentionally Omitted: When Not To Use It */} diff --git a/node_modules/@typescript-eslint/eslint-plugin/docs/rules/prefer-function-type.mdx b/node_modules/@typescript-eslint/eslint-plugin/docs/rules/prefer-function-type.mdx new file mode 100644 index 000000000..e6a698843 --- /dev/null +++ b/node_modules/@typescript-eslint/eslint-plugin/docs/rules/prefer-function-type.mdx @@ -0,0 +1,98 @@ +--- +description: 'Enforce using function types instead of interfaces with call signatures.' +--- + +import Tabs from '@theme/Tabs'; +import TabItem from '@theme/TabItem'; + +> 🛑 This file is source code, not the primary documentation location! 🛑 +> +> See **https://typescript-eslint.io/rules/prefer-function-type** for documentation. + +TypeScript allows for two common ways to declare a type for a function: + +- Function type: `() => string` +- Object type with a signature: `{ (): string }` + +The function type form is generally preferred when possible for being more succinct. + +This rule suggests using a function type instead of an interface or object type literal with a single call signature. + +## Examples + + + + +```ts +interface Example { + (): string; +} +``` + +```ts +function foo(example: { (): number }): number { + return example(); +} +``` + +```ts +interface ReturnsSelf { + // returns the function itself, not the `this` argument. + (arg: string): this; +} +``` + + + + +```ts +type Example = () => string; +``` + +```ts +function foo(example: () => number): number { + return bar(); +} +``` + +```ts +// returns the function itself, not the `this` argument. +type ReturnsSelf = (arg: string) => ReturnsSelf; +``` + +```ts +function foo(bar: { (): string; baz: number }): string { + return bar(); +} +``` + +```ts +interface Foo { + bar: string; +} +interface Bar extends Foo { + (): void; +} +``` + +```ts +// multiple call signatures (overloads) is allowed: +interface Overloaded { + (data: string): number; + (id: number): string; +} +// this is equivelent to Overloaded interface. +type Intersection = ((data: string) => number) & ((id: number) => string); +``` + + + + +## When Not To Use It + +If you specifically want to use an interface or type literal with a single call signature for stylistic reasons, you can avoid this rule. + +This rule has a known edge case of sometimes triggering on global augmentations such as `interface Function`. +These edge cases are rare and often symptomatic of odd code. +We recommend you use an [inline ESLint disable comment](https://eslint.org/docs/latest/use/configure/rules#using-configuration-comments-1). +See [#454](https://github.com/typescript-eslint/typescript-eslint/issues/454) for details. diff --git a/node_modules/@typescript-eslint/eslint-plugin/docs/rules/prefer-includes.mdx b/node_modules/@typescript-eslint/eslint-plugin/docs/rules/prefer-includes.mdx new file mode 100644 index 000000000..eb79a9258 --- /dev/null +++ b/node_modules/@typescript-eslint/eslint-plugin/docs/rules/prefer-includes.mdx @@ -0,0 +1,81 @@ +--- +description: 'Enforce `includes` method over `indexOf` method.' +--- + +import Tabs from '@theme/Tabs'; +import TabItem from '@theme/TabItem'; + +> 🛑 This file is source code, not the primary documentation location! 🛑 +> +> See **https://typescript-eslint.io/rules/prefer-includes** for documentation. + +Prior to ES2015, `Array#indexOf` and `String#indexOf` comparisons against `-1` were the standard ways to check whether a value exists in an array or string, respectively. +Alternatives that are easier to read and write now exist: ES2015 added `String#includes` and ES2016 added `Array#includes`. + +This rule reports when an `.indexOf` call can be replaced with an `.includes`. +Additionally, this rule reports the tests of simple regular expressions in favor of `String#includes`. + +> This rule will report on any receiver object of an `indexOf` method call that has an `includes` method where the two methods have the same parameters. +> Matching types include: `String`, `Array`, `ReadonlyArray`, and typed arrays. + +## Examples + + + + +```ts +const str: string; +const array: any[]; +const readonlyArray: ReadonlyArray; +const typedArray: UInt8Array; +const maybe: string; +const userDefined: { + indexOf(x: any): number; + includes(x: any): boolean; +}; + +str.indexOf(value) !== -1; +array.indexOf(value) !== -1; +readonlyArray.indexOf(value) === -1; +typedArray.indexOf(value) > -1; +maybe?.indexOf('') !== -1; +userDefined.indexOf(value) >= 0; + +/example/.test(str); +``` + + + + +```ts +const str: string; +const array: any[]; +const readonlyArray: ReadonlyArray; +const typedArray: UInt8Array; +const maybe: string; +const userDefined: { + indexOf(x: any): number; + includes(x: any): boolean; +}; + +str.includes(value); +array.includes(value); +!readonlyArray.includes(value); +typedArray.includes(value); +maybe?.includes(''); +userDefined.includes(value); + +str.includes('example'); + +// The two methods have different parameters. +declare const mismatchExample: { + indexOf(x: unknown, fromIndex?: number): number; + includes(x: unknown): boolean; +}; +mismatchExample.indexOf(value) >= 0; +``` + + + + +{/* Intentionally Omitted: When Not To Use It */} diff --git a/node_modules/@typescript-eslint/eslint-plugin/docs/rules/prefer-literal-enum-member.mdx b/node_modules/@typescript-eslint/eslint-plugin/docs/rules/prefer-literal-enum-member.mdx new file mode 100644 index 000000000..a2088d0d1 --- /dev/null +++ b/node_modules/@typescript-eslint/eslint-plugin/docs/rules/prefer-literal-enum-member.mdx @@ -0,0 +1,110 @@ +--- +description: 'Require all enum members to be literal values.' +--- + +import Tabs from '@theme/Tabs'; +import TabItem from '@theme/TabItem'; + +> 🛑 This file is source code, not the primary documentation location! 🛑 +> +> See **https://typescript-eslint.io/rules/prefer-literal-enum-member** for documentation. + +TypeScript allows the value of an enum member to be many different kinds of valid JavaScript expressions. +However, because enums create their own scope whereby each enum member becomes a variable in that scope, developers are often surprised at the resultant values. +For example: + +```ts +const imOutside = 2; +const b = 2; +enum Foo { + outer = imOutside, + a = 1, + b = a, + c = b, + // does c == Foo.b == Foo.c == 1? + // or does c == b == 2? +} +``` + +> The answer is that `Foo.c` will be `1` at runtime [[TypeScript playground](https://www.typescriptlang.org/play/#src=const%20imOutside%20%3D%202%3B%0D%0Aconst%20b%20%3D%202%3B%0D%0Aenum%20Foo%20%7B%0D%0A%20%20%20%20outer%20%3D%20imOutside%2C%0D%0A%20%20%20%20a%20%3D%201%2C%0D%0A%20%20%20%20b%20%3D%20a%2C%0D%0A%20%20%20%20c%20%3D%20b%2C%0D%0A%20%20%20%20%2F%2F%20does%20c%20%3D%3D%20Foo.b%20%3D%3D%20Foo.c%20%3D%3D%201%3F%0D%0A%20%20%20%20%2F%2F%20or%20does%20c%20%3D%3D%20b%20%3D%3D%202%3F%0D%0A%7D)]. + +Therefore, it's often better to prevent unexpected results in code by requiring the use of literal values as enum members. +This rule reports when an enum member is given a value that is not a literal. + +## Examples + + + + +```ts +const str = 'Test'; +enum Invalid { + A = str, // Variable assignment + B = {}, // Object assignment + C = `A template literal string`, // Template literal + D = new Set(1, 2, 3), // Constructor in assignment + E = 2 + 2, // Expression assignment +} +``` + + + + +```ts +enum Valid { + A, + B = 'TestStr', // A regular string + C = 4, // A number + D = null, + E = /some_regex/, +} +``` + + + + +## Options + +### `allowBitwiseExpressions` + +When set to `true` will allow you to use bitwise expressions in enum initializer (default: `false`). + +Examples of code for the `{ "allowBitwiseExpressions": true }` option: + + + + +```ts option='{ "allowBitwiseExpressions": true }' +const x = 1; +enum Foo { + A = x << 0, + B = x >> 0, + C = x >>> 0, + D = x | 0, + E = x & 0, + F = x ^ 0, + G = ~x, +} +``` + + + + +```ts option='{ "allowBitwiseExpressions": true }' +enum Foo { + A = 1 << 0, + B = 1 >> 0, + C = 1 >>> 0, + D = 1 | 0, + E = 1 & 0, + F = 1 ^ 0, + G = ~1, +} +``` + + + + +## When Not To Use It + +If you want use anything other than simple literals as an enum value, this rule might not be for you. diff --git a/node_modules/@typescript-eslint/eslint-plugin/docs/rules/prefer-namespace-keyword.mdx b/node_modules/@typescript-eslint/eslint-plugin/docs/rules/prefer-namespace-keyword.mdx new file mode 100644 index 000000000..02dc46282 --- /dev/null +++ b/node_modules/@typescript-eslint/eslint-plugin/docs/rules/prefer-namespace-keyword.mdx @@ -0,0 +1,51 @@ +--- +description: 'Require using `namespace` keyword over `module` keyword to declare custom TypeScript modules.' +--- + +import Tabs from '@theme/Tabs'; +import TabItem from '@theme/TabItem'; + +> 🛑 This file is source code, not the primary documentation location! 🛑 +> +> See **https://typescript-eslint.io/rules/prefer-namespace-keyword** for documentation. + +TypeScript historically allowed a form of code organization called "custom modules" (`module Example {}`), later renamed to "namespaces" (`namespace Example`). + +Namespaces are an outdated way to organize TypeScript code. +ES2015 module syntax is now preferred (`import`/`export`). + +For projects still using custom modules / namespaces, it's preferred to refer to them as namespaces. +This rule reports when the `module` keyword is used instead of `namespace`. + +> This rule does not report on the use of TypeScript module declarations to describe external APIs (`declare module 'foo' {}`). + +## Examples + + + + +```ts +module Example {} +``` + + + + +```ts +namespace Example {} + +declare module 'foo' {} +``` + + + + +## When Not To Use It + +If you are not using TypeScript's older `module`/`namespace` keywords, then you will not need this rule. + +## Further Reading + +- [Modules](https://www.typescriptlang.org/docs/handbook/modules.html) +- [Namespaces](https://www.typescriptlang.org/docs/handbook/namespaces.html) +- [Namespaces and Modules](https://www.typescriptlang.org/docs/handbook/namespaces-and-modules.html) diff --git a/node_modules/@typescript-eslint/eslint-plugin/docs/rules/prefer-nullish-coalescing.mdx b/node_modules/@typescript-eslint/eslint-plugin/docs/rules/prefer-nullish-coalescing.mdx new file mode 100644 index 000000000..3215b83dc --- /dev/null +++ b/node_modules/@typescript-eslint/eslint-plugin/docs/rules/prefer-nullish-coalescing.mdx @@ -0,0 +1,190 @@ +--- +description: 'Enforce using the nullish coalescing operator instead of logical assignments or chaining.' +--- + +import Tabs from '@theme/Tabs'; +import TabItem from '@theme/TabItem'; + +> 🛑 This file is source code, not the primary documentation location! 🛑 +> +> See **https://typescript-eslint.io/rules/prefer-nullish-coalescing** for documentation. + +The `??` nullish coalescing runtime operator allows providing a default value when dealing with `null` or `undefined`. +Because the nullish coalescing operator _only_ coalesces when the original value is `null` or `undefined`, it is much safer than relying upon logical OR operator chaining `||`, which coalesces on any _falsy_ value. + +This rule reports when you may consider replacing: + +- An `||` operator with `??` +- An `||=` operator with `??=` + +:::caution +This rule will not work as expected if [`strictNullChecks`](https://www.typescriptlang.org/tsconfig#strictNullChecks) is not enabled. +::: + +## Options + +### `ignoreTernaryTests` + +Setting this option to `true` will cause the rule to ignore any ternary expressions that could be simplified by using the nullish coalescing operator. This is set to `false` by default. + +Incorrect code for `ignoreTernaryTests: false`, and correct code for `ignoreTernaryTests: true`: + +```ts option='{ "ignoreTernaryTests": false }' showPlaygroundButton +const foo: any = 'bar'; +foo !== undefined && foo !== null ? foo : 'a string'; +foo === undefined || foo === null ? 'a string' : foo; +foo == undefined ? 'a string' : foo; +foo == null ? 'a string' : foo; + +const foo: string | undefined = 'bar'; +foo !== undefined ? foo : 'a string'; +foo === undefined ? 'a string' : foo; + +const foo: string | null = 'bar'; +foo !== null ? foo : 'a string'; +foo === null ? 'a string' : foo; +``` + +Correct code for `ignoreTernaryTests: false`: + +```ts option='{ "ignoreTernaryTests": false }' showPlaygroundButton +const foo: any = 'bar'; +foo ?? 'a string'; +foo ?? 'a string'; +foo ?? 'a string'; +foo ?? 'a string'; + +const foo: string | undefined = 'bar'; +foo ?? 'a string'; +foo ?? 'a string'; + +const foo: string | null = 'bar'; +foo ?? 'a string'; +foo ?? 'a string'; +``` + +### `ignoreConditionalTests` + +Setting this option to `true` will cause the rule to ignore any cases that are located within a conditional test. This is set to `false` by default. + +Generally expressions within conditional tests intentionally use the falsy fallthrough behavior of the logical or operator, meaning that fixing the operator to the nullish coalesce operator could cause bugs. + +If you're looking to enforce stricter conditional tests, you should consider using the `strict-boolean-expressions` rule. + +Incorrect code for `ignoreConditionalTests: false`, and correct code for `ignoreConditionalTests: true`: + +```ts option='{ "ignoreConditionalTests": false }' showPlaygroundButton +declare const a: string | null; +declare const b: string | null; + +if (a || b) { +} +if ((a ||= b)) { +} +while (a || b) {} +while ((a ||= b)) {} +do {} while (a || b); +for (let i = 0; a || b; i += 1) {} +a || b ? true : false; +``` + +Correct code for `ignoreConditionalTests: false`: + +```ts option='{ "ignoreConditionalTests": false }' showPlaygroundButton +declare const a: string | null; +declare const b: string | null; + +if (a ?? b) { +} +if ((a ??= b)) { +} +while (a ?? b) {} +while ((a ??= b)) {} +do {} while (a ?? b); +for (let i = 0; a ?? b; i += 1) {} +a ?? b ? true : false; +``` + +### `ignoreMixedLogicalExpressions` + +Setting this option to `true` will cause the rule to ignore any logical or expressions that are part of a mixed logical expression (with `&&`). This is set to `false` by default. + +Generally expressions within mixed logical expressions intentionally use the falsy fallthrough behavior of the logical or operator, meaning that fixing the operator to the nullish coalesce operator could cause bugs. + +If you're looking to enforce stricter conditional tests, you should consider using the `strict-boolean-expressions` rule. + +Incorrect code for `ignoreMixedLogicalExpressions: false`, and correct code for `ignoreMixedLogicalExpressions: true`: + +```ts option='{ "ignoreMixedLogicalExpressions": false }' showPlaygroundButton +declare const a: string | null; +declare const b: string | null; +declare const c: string | null; +declare const d: string | null; + +a || (b && c); +a ||= b && c; +(a && b) || c || d; +a || (b && c) || d; +a || (b && c && d); +``` + +Correct code for `ignoreMixedLogicalExpressions: false`: + +```ts option='{ "ignoreMixedLogicalExpressions": false }' showPlaygroundButton +declare const a: string | null; +declare const b: string | null; +declare const c: string | null; +declare const d: string | null; + +a ?? (b && c); +a ??= b && c; +(a && b) ?? c ?? d; +a ?? (b && c) ?? d; +a ?? (b && c && d); +``` + +**_NOTE:_** Errors for this specific case will be presented as suggestions (see below), instead of fixes. This is because it is not always safe to automatically convert `||` to `??` within a mixed logical expression, as we cannot tell the intended precedence of the operator. Note that by design, `??` requires parentheses when used with `&&` or `||` in the same expression. + +### `ignorePrimitives` + +If you would like to ignore expressions containing operands of certain primitive types that can be falsy then you may pass an object containing a boolean value for each primitive: + +- `string: true`, ignores `null` or `undefined` unions with `string` (default: false). +- `number: true`, ignores `null` or `undefined` unions with `number` (default: false). +- `bigint: true`, ignores `null` or `undefined` unions with `bigint` (default: false). +- `boolean: true`, ignores `null` or `undefined` unions with `boolean` (default: false). + +Incorrect code for `ignorePrimitives: { string: false }`, and correct code for `ignorePrimitives: { string: true }`: + +```ts option='{ "ignorePrimitives": { "string": true } }' showPlaygroundButton +const foo: string | undefined = 'bar'; +foo || 'a string'; +``` + +Correct code for both `ignorePrimitives: { string: false }` and `ignorePrimitives: { string: true }`: + +```ts option='{ "ignorePrimitives": { "string": true } }' showPlaygroundButton +const foo: string | undefined = 'bar'; +foo ?? 'a string'; +``` + +Also, if you would like to ignore all primitives types, you can set `ignorePrimitives: true`. It is equivalent to `ignorePrimitives: { string: true, number: true, bigint: true, boolean: true }`. + +### `allowRuleToRunWithoutStrictNullChecksIKnowWhatIAmDoing` + +If this is set to `false`, then the rule will error on every file whose `tsconfig.json` does _not_ have the `strictNullChecks` compiler option (or `strict`) set to `true`. + +Without `strictNullChecks`, TypeScript essentially erases `undefined` and `null` from the types. This means when this rule inspects the types from a variable, **it will not be able to tell that the variable might be `null` or `undefined`**, which essentially makes this rule useless. + +You should be using `strictNullChecks` to ensure complete type-safety in your codebase. + +If for some reason you cannot turn on `strictNullChecks`, but still want to use this rule - you can use this option to allow it - but know that the behavior of this rule is _undefined_ with the compiler option turned off. We will not accept bug reports if you are using this option. + +## When Not To Use It + +If you are not using TypeScript 3.7 (or greater), then you will not be able to use this rule, as the operator is not supported. + +## Further Reading + +- [TypeScript 3.7 Release Notes](https://www.typescriptlang.org/docs/handbook/release-notes/typescript-3-7.html) +- [Nullish Coalescing Operator Proposal](https://github.com/tc39/proposal-nullish-coalescing/) diff --git a/node_modules/@typescript-eslint/eslint-plugin/docs/rules/prefer-optional-chain.mdx b/node_modules/@typescript-eslint/eslint-plugin/docs/rules/prefer-optional-chain.mdx new file mode 100644 index 000000000..ee7aa6abf --- /dev/null +++ b/node_modules/@typescript-eslint/eslint-plugin/docs/rules/prefer-optional-chain.mdx @@ -0,0 +1,295 @@ +--- +description: 'Enforce using concise optional chain expressions instead of chained logical ands, negated logical ors, or empty objects.' +--- + +import Tabs from '@theme/Tabs'; +import TabItem from '@theme/TabItem'; + +> 🛑 This file is source code, not the primary documentation location! 🛑 +> +> See **https://typescript-eslint.io/rules/prefer-optional-chain** for documentation. + +`?.` optional chain expressions provide `undefined` if an object is `null` or `undefined`. +Because the optional chain operator _only_ chains when the property value is `null` or `undefined`, it is much safer than relying upon logical AND operator chaining `&&`; which chains on any _truthy_ value. +It is also often less code to use `?.` optional chaining than `&&` truthiness checks. + +This rule reports on code where an `&&` operator can be safely replaced with `?.` optional chaining. + +## Examples + + + + +```ts +foo && foo.a && foo.a.b && foo.a.b.c; +foo && foo['a'] && foo['a'].b && foo['a'].b.c; +foo && foo.a && foo.a.b && foo.a.b.method && foo.a.b.method(); + +// With empty objects +(((foo || {}).a || {}).b || {}).c; +(((foo || {})['a'] || {}).b || {}).c; + +// With negated `or`s +!foo || !foo.bar; +!foo || !foo[bar]; +!foo || !foo.bar || !foo.bar.baz || !foo.bar.baz(); + +// this rule also supports converting chained strict nullish checks: +foo && + foo.a != null && + foo.a.b !== null && + foo.a.b.c != undefined && + foo.a.b.c.d !== undefined && + foo.a.b.c.d.e; +``` + + + + +```ts +foo?.a?.b?.c; +foo?.['a']?.b?.c; +foo?.a?.b?.method?.(); + +foo?.a?.b?.c?.d?.e; + +!foo?.bar; +!foo?.[bar]; +!foo?.bar?.baz?.(); +``` + + + + +## Options + +In the context of the descriptions below a "loose boolean" operand is any operand that implicitly coerces the value to a boolean. +Specifically the argument of the not operator (`!loose`) or a bare value in a logical expression (`loose && looser`). + +### `allowPotentiallyUnsafeFixesThatModifyTheReturnTypeIKnowWhatImDoing` + +When this option is `true`, the rule will provide an auto-fixer for cases where the return type of the expression would change. For example for the expression `!foo || foo.bar` the return type of the expression is `true | T`, however for the equivalent optional chain `foo?.bar` the return type of the expression is `undefined | T`. Thus changing the code from a logical expression to an optional chain expression has altered the type of the expression. + +In some cases this distinction _may_ matter - which is why these fixers are considered unsafe - they may break the build! For example in the following code: + +```ts option='{ "allowPotentiallyUnsafeFixesThatModifyTheReturnTypeIKnowWhatImDoing": true }' showPlaygroundButton +declare const foo: { bar: boolean } | null | undefined; +declare function acceptsBoolean(arg: boolean): void; + +// ✅ typechecks succesfully as the expression only returns `boolean` +acceptsBoolean(foo != null && foo.bar); + +// ❌ typechecks UNSUCCESSFULLY as the expression returns `boolean | undefined` +acceptsBoolean(foo?.bar); +``` + +This style of code isn't super common - which means having this option set to `true` _should_ be safe in most codebases. However we default it to `false` due to its unsafe nature. We have provided this option for convenience because it increases the autofix cases covered by the rule. If you set option to `true` the onus is entirely on you and your team to ensure that each fix is correct and safe and that it does not break the build. + +When this option is `false` unsafe cases will have suggestion fixers provided instead of auto-fixers - meaning you can manually apply the fix using your IDE tooling. + +### `checkAny` + +When this option is `true` the rule will check operands that are typed as `any` when inspecting "loose boolean" operands. + + + + + +```ts option='{ "checkAny": true }' +declare const thing: any; + +thing && thing.toString(); +``` + + + + +```ts option='{ "checkAny": false }' +declare const thing: any; + +thing && thing.toString(); +``` + + + + +### `checkUnknown` + +When this option is `true` the rule will check operands that are typed as `unknown` when inspecting "loose boolean" operands. + + + + + +```ts option='{ "checkUnknown": true }' +declare const thing: unknown; + +thing && thing.toString(); +``` + + + + +```ts option='{ "checkUnknown": false }' +declare const thing: unknown; + +thing && thing.toString(); +``` + + + + +### `checkString` + +When this option is `true` the rule will check operands that are typed as `string` when inspecting "loose boolean" operands. + + + + + +```ts option='{ "checkString": true }' +declare const thing: string; + +thing && thing.toString(); +``` + + + + +```ts option='{ "checkString": false }' +declare const thing: string; + +thing && thing.toString(); +``` + + + + +### `checkNumber` + +When this option is `true` the rule will check operands that are typed as `number` when inspecting "loose boolean" operands. + + + + + +```ts option='{ "checkNumber": true }' +declare const thing: number; + +thing && thing.toString(); +``` + + + + +```ts option='{ "checkNumber": false }' +declare const thing: number; + +thing && thing.toString(); +``` + + + + +### `checkBoolean` + +When this option is `true` the rule will check operands that are typed as `boolean` when inspecting "loose boolean" operands. + +:::note + +This rule intentionally ignores the following case: + +```ts +declare const x: false | { a: string }; +x && x.a; +!x || x.a; +``` + +The boolean expression narrows out the non-nullish falsy cases - so converting the chain to `x?.a` would introduce a type error. + +::: + + + + + +```ts option='{ "checkBoolean": true }' +declare const thing: true; + +thing && thing.toString(); +``` + + + + +```ts option='{ "checkBoolean": false }' +declare const thing: true; + +thing && thing.toString(); +``` + + + + +### `checkBigInt` + +When this option is `true` the rule will check operands that are typed as `bigint` when inspecting "loose boolean" operands. + + + + + +```ts option='{ "checkBigInt": true }' +declare const thing: bigint; + +thing && thing.toString(); +``` + + + + +```ts option='{ "checkBigInt": false }' +declare const thing: bigint; + +thing && thing.toString(); +``` + + + + +### `requireNullish` + +When this option is `true` the rule will skip operands that are not typed with `null` and/or `undefined` when inspecting "loose boolean" operands. + + + + + +```ts option='{ "requireNullish": true }' +declare const thing1: string | null; +thing1 && thing1.toString(); +``` + + + + +```ts option='{ "requireNullish": true }' +declare const thing1: string | null; +thing1?.toString(); + +declare const thing2: string; +thing2 && thing2.toString(); +``` + + + + +## When Not To Use It + +If your project is not accurately typed, such as if it's in the process of being converted to TypeScript or is susceptible to [trade-offs in control flow analysis](https://github.com/Microsoft/TypeScript/issues/9998), it may be difficult to enable this rule for particularly non-type-safe areas of code. +You might consider using [ESLint disable comments](https://eslint.org/docs/latest/use/configure/rules#using-configuration-comments-1) for those specific situations instead of completely disabling this rule. + +## Further Reading + +- [TypeScript 3.7 Release Notes](https://www.typescriptlang.org/docs/handbook/release-notes/typescript-3-7.html) +- [Optional Chaining Proposal](https://github.com/tc39/proposal-optional-chaining/) diff --git a/node_modules/@typescript-eslint/eslint-plugin/docs/rules/prefer-promise-reject-errors.mdx b/node_modules/@typescript-eslint/eslint-plugin/docs/rules/prefer-promise-reject-errors.mdx new file mode 100644 index 000000000..3a5f34dd9 --- /dev/null +++ b/node_modules/@typescript-eslint/eslint-plugin/docs/rules/prefer-promise-reject-errors.mdx @@ -0,0 +1,56 @@ +--- +description: 'Require using Error objects as Promise rejection reasons.' +--- + +import Tabs from '@theme/Tabs'; +import TabItem from '@theme/TabItem'; + +> 🛑 This file is source code, not the primary documentation location! 🛑 +> +> See **https://typescript-eslint.io/rules/prefer-promise-reject-errors** for documentation. + +This rule extends the base [`eslint/prefer-promise-reject-errors`](https://eslint.org/docs/rules/prefer-promise-reject-errors) rule. +It uses type information to enforce that `Promise`s are only rejected with `Error` objects. + +## Examples + + + + +```ts +Promise.reject('error'); + +const err = new Error(); +Promise.reject('an ' + err); + +new Promise((resolve, reject) => reject('error')); + +new Promise((resolve, reject) => { + const err = new Error(); + reject('an ' + err); +}); +``` + + + + +```ts +Promise.reject(new Error()); + +class CustomError extends Error { + // ... +} +Promise.reject(new CustomError()); + +new Promise((resolve, reject) => reject(new Error())); + +new Promise((resolve, reject) => { + class CustomError extends Error { + // ... + } + return reject(new CustomError()); +}); +``` + + + diff --git a/node_modules/@typescript-eslint/eslint-plugin/docs/rules/prefer-readonly-parameter-types.mdx b/node_modules/@typescript-eslint/eslint-plugin/docs/rules/prefer-readonly-parameter-types.mdx new file mode 100644 index 000000000..196b63ba9 --- /dev/null +++ b/node_modules/@typescript-eslint/eslint-plugin/docs/rules/prefer-readonly-parameter-types.mdx @@ -0,0 +1,403 @@ +--- +description: 'Require function parameters to be typed as `readonly` to prevent accidental mutation of inputs.' +--- + +import Tabs from '@theme/Tabs'; +import TabItem from '@theme/TabItem'; + +> 🛑 This file is source code, not the primary documentation location! 🛑 +> +> See **https://typescript-eslint.io/rules/prefer-readonly-parameter-types** for documentation. + +Mutating function arguments can lead to confusing, hard to debug behavior. +Whilst it's easy to implicitly remember to not modify function arguments, explicitly typing arguments as readonly provides clear contract to consumers. +This contract makes it easier for a consumer to reason about if a function has side-effects. + +This rule allows you to enforce that function parameters resolve to readonly types. +A type is considered readonly if: + +- it is a primitive type (`string`, `number`, `boolean`, `symbol`, or an enum), +- it is a function signature type, +- it is a readonly array type whose element type is considered readonly. +- it is a readonly tuple type whose elements are all considered readonly. +- it is an object type whose properties are all marked as readonly, and whose values are all considered readonly. + +## Examples + + + + +```ts +function array1(arg: string[]) {} // array is not readonly +function array2(arg: readonly string[][]) {} // array element is not readonly +function array3(arg: [string, number]) {} // tuple is not readonly +function array4(arg: readonly [string[], number]) {} // tuple element is not readonly +// the above examples work the same if you use ReadonlyArray instead + +function object1(arg: { prop: string }) {} // property is not readonly +function object2(arg: { readonly prop: string; prop2: string }) {} // not all properties are readonly +function object3(arg: { readonly prop: { prop2: string } }) {} // nested property is not readonly +// the above examples work the same if you use Readonly instead + +interface CustomArrayType extends ReadonlyArray { + prop: string; // note: this property is mutable +} +function custom1(arg: CustomArrayType) {} + +interface CustomFunction { + (): void; + prop: string; // note: this property is mutable +} +function custom2(arg: CustomFunction) {} + +function union(arg: string[] | ReadonlyArray) {} // not all types are readonly + +// rule also checks function types +interface Foo { + (arg: string[]): void; +} +interface Foo { + new (arg: string[]): void; +} +const x = { foo(arg: string[]): void {} }; +function foo(arg: string[]); +type Foo = (arg: string[]) => void; +interface Foo { + foo(arg: string[]): void; +} +``` + + + + +```ts +function array1(arg: readonly string[]) {} +function array2(arg: readonly (readonly string[])[]) {} +function array3(arg: readonly [string, number]) {} +function array4(arg: readonly [readonly string[], number]) {} +// the above examples work the same if you use ReadonlyArray instead + +function object1(arg: { readonly prop: string }) {} +function object2(arg: { readonly prop: string; readonly prop2: string }) {} +function object3(arg: { readonly prop: { readonly prop2: string } }) {} +// the above examples work the same if you use Readonly instead + +interface CustomArrayType extends ReadonlyArray { + readonly prop: string; +} +function custom1(arg: Readonly) {} +// interfaces that extend the array types are not considered arrays, and thus must be made readonly. + +interface CustomFunction { + (): void; + readonly prop: string; +} +function custom2(arg: CustomFunction) {} + +function union(arg: readonly string[] | ReadonlyArray) {} + +function primitive1(arg: string) {} +function primitive2(arg: number) {} +function primitive3(arg: boolean) {} +function primitive4(arg: unknown) {} +function primitive5(arg: null) {} +function primitive6(arg: undefined) {} +function primitive7(arg: any) {} +function primitive8(arg: never) {} +function primitive9(arg: string | number | undefined) {} + +function fnSig(arg: () => void) {} + +enum Foo { + a, + b, +} +function enumArg(arg: Foo) {} + +function symb1(arg: symbol) {} +const customSymbol = Symbol('a'); +function symb2(arg: typeof customSymbol) {} + +// function types +interface Foo { + (arg: readonly string[]): void; +} +interface Foo { + new (arg: readonly string[]): void; +} +const x = { foo(arg: readonly string[]): void {} }; +function foo(arg: readonly string[]); +type Foo = (arg: readonly string[]) => void; +interface Foo { + foo(arg: readonly string[]): void; +} +``` + + + + +## Options + +### `allow` + +Some complex types cannot easily be made readonly, for example the `HTMLElement` type or the `JQueryStatic` type from `@types/jquery`. This option allows you to globally disable reporting of such types. + +Each item must be one of: + +- A type defined in a file (`{from: "file", name: "Foo", path: "src/foo-file.ts"}` with `path` being an optional path relative to the project root directory) +- A type from the default library (`{from: "lib", name: "Foo"}`) +- A type from a package (`{from: "package", name: "Foo", package: "foo-lib"}`, this also works for types defined in a typings package). + +Additionally, a type may be defined just as a simple string, which then matches the type independently of its origin. + +Examples of code for this rule with: + +```json +{ + "allow": [ + "$", + { "from": "file", "name": "Foo" }, + { "from": "lib", "name": "HTMLElement" }, + { "from": "package", "name": "Bar", "package": "bar-lib" } + ] +} +``` + + + + +```ts option='{"allow":["$",{"from":"file","name":"Foo"},{"from":"lib","name":"HTMLElement"},{"from":"package","name":"Bar","package":"bar-lib"}]}' +interface ThisIsMutable { + prop: string; +} + +interface Wrapper { + sub: ThisIsMutable; +} + +interface WrapperWithOther { + readonly sub: Foo; + otherProp: string; +} + +// Incorrect because ThisIsMutable is not readonly +function fn1(arg: ThisIsMutable) {} + +// Incorrect because Wrapper.sub is not readonly +function fn2(arg: Wrapper) {} + +// Incorrect because WrapperWithOther.otherProp is not readonly and not in the allowlist +function fn3(arg: WrapperWithOther) {} +``` + +```ts option='{"allow":["$",{"from":"file","name":"Foo"},{"from":"lib","name":"HTMLElement"},{"from":"package","name":"Bar","package":"bar-lib"}]}' +import { Foo } from 'some-lib'; +import { Bar } from 'incorrect-lib'; + +interface HTMLElement { + prop: string; +} + +// Incorrect because Foo is not a local type +function fn1(arg: Foo) {} + +// Incorrect because HTMLElement is not from the default library +function fn2(arg: HTMLElement) {} + +// Incorrect because Bar is not from "bar-lib" +function fn3(arg: Bar) {} +``` + + + + +```ts option='{"allow":["$",{"from":"file","name":"Foo"},{"from":"lib","name":"HTMLElement"},{"from":"package","name":"Bar","package":"bar-lib"}]}' +interface Foo { + prop: string; +} + +interface Wrapper { + readonly sub: Foo; + readonly otherProp: string; +} + +// Works because Foo is allowed +function fn1(arg: Foo) {} + +// Works even when Foo is nested somewhere in the type, with other properties still being checked +function fn2(arg: Wrapper) {} +``` + +```ts option='{"allow":["$",{"from":"file","name":"Foo"},{"from":"lib","name":"HTMLElement"},{"from":"package","name":"Bar","package":"bar-lib"}]}' +import { Bar } from 'bar-lib'; + +interface Foo { + prop: string; +} + +// Works because Foo is a local type +function fn1(arg: Foo) {} + +// Works because HTMLElement is from the default library +function fn2(arg: HTMLElement) {} + +// Works because Bar is from "bar-lib" +function fn3(arg: Bar) {} +``` + +```ts option='{"allow":["$",{"from":"file","name":"Foo"},{"from":"lib","name":"HTMLElement"},{"from":"package","name":"Bar","package":"bar-lib"}]}' +import { Foo } from './foo'; + +// Works because Foo is still a local type - it has to be in the same package +function fn(arg: Foo) {} +``` + + + + +### `checkParameterProperties` + +This option allows you to enable or disable the checking of parameter properties. +Because parameter properties create properties on the class, it may be undesirable to force them to be readonly. + +Examples of code for this rule with `{checkParameterProperties: true}`: + + + + +```ts option='{ "checkParameterProperties": true }' +class Foo { + constructor(private paramProp: string[]) {} +} +``` + + + + +```ts option='{ "checkParameterProperties": true }' +class Foo { + constructor(private paramProp: readonly string[]) {} +} +``` + + + + +Examples of **correct** code for this rule with `{checkParameterProperties: false}`: + +```ts option='{ "checkParameterProperties": false }' showPlaygroundButton +class Foo { + constructor( + private paramProp1: string[], + private paramProp2: readonly string[], + ) {} +} +``` + +### `ignoreInferredTypes` + +This option allows you to ignore parameters which don't explicitly specify a type. This may be desirable in cases where an external dependency specifies a callback with mutable parameters, and manually annotating the callback's parameters is undesirable. + +Examples of code for this rule with `{ignoreInferredTypes: true}`: + + + + +```ts option='{ "ignoreInferredTypes": true }' skipValidation +import { acceptsCallback, CallbackOptions } from 'external-dependency'; + +acceptsCallback((options: CallbackOptions) => {}); +``` + +
                                  +external-dependency.d.ts + +```ts option='{ "ignoreInferredTypes": true }' +export interface CallbackOptions { + prop: string; +} +type Callback = (options: CallbackOptions) => void; +type AcceptsCallback = (callback: Callback) => void; + +export const acceptsCallback: AcceptsCallback; +``` + +
                                  + +
                                  + + +```ts option='{ "ignoreInferredTypes": true }' +import { acceptsCallback } from 'external-dependency'; + +acceptsCallback(options => {}); +``` + +
                                  +external-dependency.d.ts + +```ts option='{ "ignoreInferredTypes": true }' skipValidation +export interface CallbackOptions { + prop: string; +} +type Callback = (options: CallbackOptions) => void; +type AcceptsCallback = (callback: Callback) => void; + +export const acceptsCallback: AcceptsCallback; +``` + +
                                  + +
                                  +
                                  + +### `treatMethodsAsReadonly` + +This option allows you to treat all mutable methods as though they were readonly. This may be desirable when you are never reassigning methods. + +Examples of code for this rule with `{treatMethodsAsReadonly: false}`: + + + + +```ts option='{ "treatMethodsAsReadonly": false }' +type MyType = { + readonly prop: string; + method(): string; // note: this method is mutable +}; +function foo(arg: MyType) {} +``` + + + + +```ts option='{ "treatMethodsAsReadonly": false }' +type MyType = Readonly<{ + prop: string; + method(): string; +}>; +function foo(arg: MyType) {} + +type MyOtherType = { + readonly prop: string; + readonly method: () => string; +}; +function bar(arg: MyOtherType) {} +``` + + + + +Examples of **correct** code for this rule with `{treatMethodsAsReadonly: true}`: + +```ts option='{ "treatMethodsAsReadonly": true }' showPlaygroundButton +type MyType = { + readonly prop: string; + method(): string; // note: this method is mutable +}; +function foo(arg: MyType) {} +``` + +## When Not To Use It + +If your project does not attempt to enforce strong immutability guarantees of parameters, you can avoid this rule. diff --git a/node_modules/@typescript-eslint/eslint-plugin/docs/rules/prefer-readonly.mdx b/node_modules/@typescript-eslint/eslint-plugin/docs/rules/prefer-readonly.mdx new file mode 100644 index 000000000..a3fe49e03 --- /dev/null +++ b/node_modules/@typescript-eslint/eslint-plugin/docs/rules/prefer-readonly.mdx @@ -0,0 +1,111 @@ +--- +description: "Require private members to be marked as `readonly` if they're never modified outside of the constructor." +--- + +import Tabs from '@theme/Tabs'; +import TabItem from '@theme/TabItem'; + +> 🛑 This file is source code, not the primary documentation location! 🛑 +> +> See **https://typescript-eslint.io/rules/prefer-readonly** for documentation. + +Private member variables (whether using the `private` modifier or private `#` fields) are never permitted to be modified outside of their declaring class. +If that class never modifies their value, they may safely be marked as `readonly`. + +This rule reports on private members are marked as `readonly` if they're never modified outside of the constructor. + +## Examples + + + + +```ts +class Container { + // These member variables could be marked as readonly + private neverModifiedMember = true; + private onlyModifiedInConstructor: number; + #neverModifiedPrivateField = 3; + + public constructor( + onlyModifiedInConstructor: number, + // Private parameter properties can also be marked as readonly + private neverModifiedParameter: string, + ) { + this.onlyModifiedInConstructor = onlyModifiedInConstructor; + } +} +``` + + + + +```ts +class Container { + // Public members might be modified externally + public publicMember: boolean; + + // Protected members might be modified by child classes + protected protectedMember: number; + + // This is modified later on by the class + private modifiedLater = 'unchanged'; + + public mutate() { + this.modifiedLater = 'mutated'; + } + + // This is modified later on by the class + #modifiedLaterPrivateField = 'unchanged'; + + public mutatePrivateField() { + this.#modifiedLaterPrivateField = 'mutated'; + } +} +``` + + + + +## Options + +### `onlyInlineLambdas` + +You may pass `"onlyInlineLambdas": true` as a rule option within an object to restrict checking only to members immediately assigned a lambda value. + +```jsonc +{ + "@typescript-eslint/prefer-readonly": [ + "error", + { "onlyInlineLambdas": true }, + ], +} +``` + +Example of code for the `{ "onlyInlineLambdas": true }` options: + + + + +```ts option='{ "onlyInlineLambdas": true }' +class Container { + private onClick = () => { + /* ... */ + }; +} +``` + + + + +```ts option='{ "onlyInlineLambdas": true }' +class Container { + private neverModifiedPrivate = 'unchanged'; +} +``` + + + + +## When Not To Use It + +If you aren't trying to enforce strong immutability guarantees, this rule may be too restrictive for your project. diff --git a/node_modules/@typescript-eslint/eslint-plugin/docs/rules/prefer-reduce-type-parameter.mdx b/node_modules/@typescript-eslint/eslint-plugin/docs/rules/prefer-reduce-type-parameter.mdx new file mode 100644 index 000000000..eff53ee96 --- /dev/null +++ b/node_modules/@typescript-eslint/eslint-plugin/docs/rules/prefer-reduce-type-parameter.mdx @@ -0,0 +1,66 @@ +--- +description: 'Enforce using type parameter when calling `Array#reduce` instead of casting.' +--- + +import Tabs from '@theme/Tabs'; +import TabItem from '@theme/TabItem'; + +> 🛑 This file is source code, not the primary documentation location! 🛑 +> +> See **https://typescript-eslint.io/rules/prefer-reduce-type-parameter** for documentation. + +It's common to call `Array#reduce` with a generic type, such as an array or object, as the initial value. +Since these values are empty, their types are not usable: + +- `[]` has type `never[]`, which can't have items pushed into it as nothing is type `never` +- `{}` has type `{}`, which doesn't have an index signature and so can't have properties added to it + +A common solution to this problem is to use an `as` assertion on the initial value. +While this will work, it's not the most optimal solution as type assertions have subtle effects on the underlying types that can allow bugs to slip in. + +A better solution is to pass the type in as a generic type argument to `Array#reduce` explicitly. +This means that TypeScript doesn't have to try to infer the type, and avoids the common pitfalls that come with casting. + +This rule looks for calls to `Array#reduce`, and reports if an initial value is being passed & asserted. +It will suggest instead pass the asserted type to `Array#reduce` as a generic type argument. + +## Examples + + + + +```ts +[1, 2, 3].reduce((arr, num) => arr.concat(num * 2), [] as number[]); + +['a', 'b'].reduce( + (accum, name) => ({ + ...accum, + [name]: true, + }), + {} as Record, +); +``` + + + + +```ts +[1, 2, 3].reduce((arr, num) => arr.concat(num * 2), []); + +['a', 'b'].reduce>( + (accum, name) => ({ + ...accum, + [name]: true, + }), + {}, +); +``` + + + + +## When Not To Use It + +This rule can sometimes be difficult to work around when creating objects using a `.reduce`. +See [[prefer-reduce-type-parameter] unfixable reporting #3440](https://github.com/typescript-eslint/typescript-eslint/issues/3440) for more details. +You might consider using [ESLint disable comments](https://eslint.org/docs/latest/use/configure/rules#using-configuration-comments-1) for those specific situations instead of completely disabling this rule. diff --git a/node_modules/@typescript-eslint/eslint-plugin/docs/rules/prefer-regexp-exec.mdx b/node_modules/@typescript-eslint/eslint-plugin/docs/rules/prefer-regexp-exec.mdx new file mode 100644 index 000000000..1536638f2 --- /dev/null +++ b/node_modules/@typescript-eslint/eslint-plugin/docs/rules/prefer-regexp-exec.mdx @@ -0,0 +1,52 @@ +--- +description: 'Enforce `RegExp#exec` over `String#match` if no global flag is provided.' +--- + +import Tabs from '@theme/Tabs'; +import TabItem from '@theme/TabItem'; + +> 🛑 This file is source code, not the primary documentation location! 🛑 +> +> See **https://typescript-eslint.io/rules/prefer-regexp-exec** for documentation. + +`String#match` is defined to work the same as `RegExp#exec` when the regular expression does not include the `g` flag. +Keeping to consistently using one of the two can help improve code readability. + +This rule reports when a `String#match` call can be replaced with an equivalent `RegExp#exec`. + +> `RegExp#exec` may also be slightly faster than `String#match`; this is the reason to choose it as the preferred usage. + +## Examples + + + + +```ts +'something'.match(/thing/); + +'some things are just things'.match(/thing/); + +const text = 'something'; +const search = /thing/; +text.match(search); +``` + + + + +```ts +/thing/.exec('something'); + +'some things are just things'.match(/thing/g); + +const text = 'something'; +const search = /thing/; +search.exec(text); +``` + + + + +## When Not To Use It + +If you prefer consistent use of `String#match` for both with `g` flag and without it, you can turn this rule off. diff --git a/node_modules/@typescript-eslint/eslint-plugin/docs/rules/prefer-return-this-type.mdx b/node_modules/@typescript-eslint/eslint-plugin/docs/rules/prefer-return-this-type.mdx new file mode 100644 index 000000000..1c45bf8c2 --- /dev/null +++ b/node_modules/@typescript-eslint/eslint-plugin/docs/rules/prefer-return-this-type.mdx @@ -0,0 +1,93 @@ +--- +description: 'Enforce that `this` is used when only `this` type is returned.' +--- + +import Tabs from '@theme/Tabs'; +import TabItem from '@theme/TabItem'; + +> 🛑 This file is source code, not the primary documentation location! 🛑 +> +> See **https://typescript-eslint.io/rules/prefer-return-this-type** for documentation. + +[Method chaining](https://en.wikipedia.org/wiki/Method_chaining) is a common pattern in OOP languages and TypeScript provides a special [polymorphic `this` type](https://www.typescriptlang.org/docs/handbook/2/classes.html#this-types) to facilitate it. +Class methods that explicitly declare a return type of the class name instead of `this` make it harder for extending classes to call that method: the returned object will be typed as the base class, not the derived class. + +This rule reports when a class method declares a return type of that class name instead of `this`. + +```ts +class Animal { + eat(): Animal { + // ~~~~~~ + // Either removing this type annotation or replacing + // it with `this` would remove the type error below. + console.log("I'm moving!"); + return this; + } +} + +class Cat extends Animal { + meow(): Cat { + console.log('Meow~'); + return this; + } +} + +const cat = new Cat(); +cat.eat().meow(); +// ~~~~ +// Error: Property 'meow' does not exist on type 'Animal'. +// because `eat` returns `Animal` and not all animals meow. +``` + +## Examples + + + + +```ts +class Foo { + f1(): Foo { + return this; + } + f2 = (): Foo => { + return this; + }; + f3(): Foo | undefined { + return Math.random() > 0.5 ? this : undefined; + } +} +``` + + + + +```ts +class Foo { + f1(): this { + return this; + } + f2() { + return this; + } + f3 = (): this => { + return this; + }; + f4 = () => { + return this; + }; +} + +class Base {} +class Derived extends Base { + f(): Base { + return this; + } +} +``` + + + + +## When Not To Use It + +If you don't use method chaining or explicit return values, you can safely turn this rule off. diff --git a/node_modules/@typescript-eslint/eslint-plugin/docs/rules/prefer-string-starts-ends-with.mdx b/node_modules/@typescript-eslint/eslint-plugin/docs/rules/prefer-string-starts-ends-with.mdx new file mode 100644 index 000000000..cae79c266 --- /dev/null +++ b/node_modules/@typescript-eslint/eslint-plugin/docs/rules/prefer-string-starts-ends-with.mdx @@ -0,0 +1,82 @@ +--- +description: 'Enforce using `String#startsWith` and `String#endsWith` over other equivalent methods of checking substrings.' +--- + +import Tabs from '@theme/Tabs'; +import TabItem from '@theme/TabItem'; + +> 🛑 This file is source code, not the primary documentation location! 🛑 +> +> See **https://typescript-eslint.io/rules/prefer-string-starts-ends-with** for documentation. + +There are multiple ways to verify if a string starts or ends with a specific string, such as `foo.indexOf('bar') === 0`. +As of ES2015, the most common way in JavaScript is to use `String#startsWith` and `String#endsWith`. +Keeping to those methods consistently helps with code readability. + +This rule reports when a string method can be replaced safely with `String#startsWith` or `String#endsWith`. + +## Examples + + + + +```ts +declare const foo: string; + +// starts with +foo[0] === 'b'; +foo.charAt(0) === 'b'; +foo.indexOf('bar') === 0; +foo.slice(0, 3) === 'bar'; +foo.substring(0, 3) === 'bar'; +foo.match(/^bar/) != null; +/^bar/.test(foo); + +// ends with +foo[foo.length - 1] === 'b'; +foo.charAt(foo.length - 1) === 'b'; +foo.lastIndexOf('bar') === foo.length - 3; +foo.slice(-3) === 'bar'; +foo.substring(foo.length - 3) === 'bar'; +foo.match(/bar$/) != null; +/bar$/.test(foo); +``` + + + + +```ts +declare const foo: string; + +// starts with +foo.startsWith('bar'); + +// ends with +foo.endsWith('bar'); +``` + + + + +## Options + +### `allowSingleElementEquality` + +If switched to `'always'`, the rule will allow equality checks against the first or last character in a string. +This can be preferable in projects that don't deal with special character encodings and prefer a more succinct style. + +The following code is considered incorrect by default, but is allowed with `allowSingleElementEquality: 'always'`: + +```ts option='{ "allowSingleElementEquality": "always" }' showPlaygroundButton +declare const text: string; + +text[0] === 'a'; +text[0] === text[0].toUpperCase(); +text[0] === text[1]; +text[text.length - 1] === 'b'; +``` + +## When Not To Use It + +If you don't mind which style of string checking is used, you can turn this rule off safely. +However, keep in mind that inconsistent style can harm readability in a project. diff --git a/node_modules/@typescript-eslint/eslint-plugin/docs/rules/prefer-ts-expect-error.mdx b/node_modules/@typescript-eslint/eslint-plugin/docs/rules/prefer-ts-expect-error.mdx new file mode 100644 index 000000000..17ade4921 --- /dev/null +++ b/node_modules/@typescript-eslint/eslint-plugin/docs/rules/prefer-ts-expect-error.mdx @@ -0,0 +1,76 @@ +--- +description: 'Enforce using `@ts-expect-error` over `@ts-ignore`.' +--- + +import Tabs from '@theme/Tabs'; +import TabItem from '@theme/TabItem'; + +> 🛑 This file is source code, not the primary documentation location! 🛑 +> +> See **https://typescript-eslint.io/rules/prefer-ts-expect-error** for documentation. + +TypeScript allows you to suppress all errors on a line by placing a comment starting with `@ts-ignore` or `@ts-expect-error` immediately before the erroring line. +The two directives work the same, except `@ts-expect-error` causes a type error if placed before a line that's not erroring in the first place. + +This means it's easy for `@ts-ignore`s to be forgotten about, and remain in code even after the error they were suppressing is fixed. +This is dangerous, as if a new error arises on that line it'll be suppressed by the forgotten about `@ts-ignore`, and so be missed. + +## Examples + +This rule reports any usage of `@ts-ignore`, including a fixer to replace with `@ts-expect-error`. + + + + +```ts +// @ts-ignore +const str: string = 1; + +/** + * Explaining comment + * + * @ts-ignore */ +const multiLine: number = 'value'; + +/** @ts-ignore */ +const block: string = 1; + +const isOptionEnabled = (key: string): boolean => { + // @ts-ignore: if key isn't in globalOptions it'll be undefined which is false + return !!globalOptions[key]; +}; +``` + + + + +```ts +// @ts-expect-error +const str: string = 1; + +/** + * Explaining comment + * + * @ts-expect-error */ +const multiLine: number = 'value'; + +/** @ts-expect-error */ +const block: string = 1; + +const isOptionEnabled = (key: string): boolean => { + // @ts-expect-error: if key isn't in globalOptions it'll be undefined which is false + return !!globalOptions[key]; +}; +``` + + + + +## When Not To Use It + +If you are compiling against multiple versions of TypeScript and using `@ts-ignore` to ignore version-specific type errors, this rule might get in your way. +You might consider using [ESLint disable comments](https://eslint.org/docs/latest/use/configure/rules#using-configuration-comments-1) for those specific situations instead of completely disabling this rule. + +## Further Reading + +- [Original Implementing PR](https://github.com/microsoft/TypeScript/pull/36014) diff --git a/node_modules/@typescript-eslint/eslint-plugin/docs/rules/promise-function-async.mdx b/node_modules/@typescript-eslint/eslint-plugin/docs/rules/promise-function-async.mdx new file mode 100644 index 000000000..bb506ad08 --- /dev/null +++ b/node_modules/@typescript-eslint/eslint-plugin/docs/rules/promise-function-async.mdx @@ -0,0 +1,144 @@ +--- +description: 'Require any function or method that returns a Promise to be marked async.' +--- + +import Tabs from '@theme/Tabs'; +import TabItem from '@theme/TabItem'; + +> 🛑 This file is source code, not the primary documentation location! 🛑 +> +> See **https://typescript-eslint.io/rules/promise-function-async** for documentation. + +Ensures that each function is only capable of: + +- returning a rejected promise, or +- throwing an Error object. + +In contrast, non-`async`, `Promise`-returning functions are technically capable of either. +Code that handles the results of those functions will often need to handle both cases, which can get complex. +This rule's practice removes a requirement for creating code to handle both cases. + +> When functions return unions of `Promise` and non-`Promise` types implicitly, it is usually a mistake—this rule flags those cases. If it is intentional, make the return type explicitly to allow the rule to pass. + +## Examples + +Examples of code for this rule + + + + +```ts +const arrowFunctionReturnsPromise = () => Promise.resolve('value'); + +function functionReturnsPromise() { + return Promise.resolve('value'); +} + +function functionReturnsUnionWithPromiseImplicitly(p: boolean) { + return p ? 'value' : Promise.resolve('value'); +} +``` + + + + +```ts +const arrowFunctionReturnsPromise = async () => Promise.resolve('value'); + +async function functionReturnsPromise() { + return Promise.resolve('value'); +} + +// An explicit return type that is not Promise means this function cannot be made async, so it is ignored by the rule +function functionReturnsUnionWithPromiseExplicitly( + p: boolean, +): string | Promise { + return p ? 'value' : Promise.resolve('value'); +} + +async function functionReturnsUnionWithPromiseImplicitly(p: boolean) { + return p ? 'value' : Promise.resolve('value'); +} +``` + + + + +## Options + +### `allowAny` + +Whether to ignore functions that return `any` and `unknown`. +If you want additional safety, consider turning this option off, as it makes the rule less able to catch incorrect Promise behaviors. + +Examples of code with `{ "allowAny": false }`: + + + + +```ts option='{ "allowAny": false }' +const returnsAny = () => ({}) as any; +``` + + + + +```ts option='{ "allowAny": false }' +const returnsAny = async () => ({}) as any; +``` + + + + +### `allowedPromiseNames` + +For projects that use constructs other than the global built-in `Promise` for asynchronous code. +This option allows specifying string names of classes or interfaces that cause a function to be checked as well. + +Examples of code with `{ "allowedPromiseNames": ["Bluebird"] }`: + + + + +```ts option='{ "allowedPromiseNames": ["Bluebird"] }' +class Bluebird {} + +const returnsBluebird = () => new Bluebird(() => {}); +``` + + + + +```ts option='{ "allowedPromiseNames": ["Bluebird"] }' +class Bluebird {} + +const returnsBluebird = async () => new Bluebird(() => {}); +``` + + + + +### `checkArrowFunctions` + +Whether to check arrow functions. +`true` by default, but can be set to `false` to ignore them. + +### `checkFunctionDeclarations` + +Whether to check standalone function declarations. +`true` by default, but can be set to `false` to ignore them. + +### `checkFunctionExpressions` + +Whether to check inline function expressions. +`true` by default, but can be set to `false` to ignore them. + +### `checkMethodDeclarations` + +Whether to check methods on classes and object literals +`true` by default, but can be set to `false` to ignore them. + +## When Not To Use It + +This rule can be difficult to enable on projects that use APIs which require functions to always be `async`. +You might consider using [ESLint disable comments](https://eslint.org/docs/latest/use/configure/rules#using-configuration-comments-1) along with filing issues on your dependencies for those specific situations instead of completely disabling this rule. diff --git a/node_modules/@typescript-eslint/eslint-plugin/docs/rules/quotes.mdx b/node_modules/@typescript-eslint/eslint-plugin/docs/rules/quotes.mdx new file mode 100644 index 000000000..800bb2b24 --- /dev/null +++ b/node_modules/@typescript-eslint/eslint-plugin/docs/rules/quotes.mdx @@ -0,0 +1,13 @@ +--- +description: 'Enforce the consistent use of either backticks, double, or single quotes.' +--- + +import Tabs from '@theme/Tabs'; +import TabItem from '@theme/TabItem'; + +> 🛑 This file is source code, not the primary documentation location! 🛑 +> +> See **https://typescript-eslint.io/rules/quotes** for documentation. + +This rule extends the base [`eslint/quotes`](https://eslint.org/docs/rules/quotes) rule. +It adds support for TypeScript features which allow quoted names, but not backtick quoted names. diff --git a/node_modules/@typescript-eslint/eslint-plugin/docs/rules/require-array-sort-compare.mdx b/node_modules/@typescript-eslint/eslint-plugin/docs/rules/require-array-sort-compare.mdx new file mode 100644 index 000000000..5c23955cc --- /dev/null +++ b/node_modules/@typescript-eslint/eslint-plugin/docs/rules/require-array-sort-compare.mdx @@ -0,0 +1,87 @@ +--- +description: 'Require `Array#sort` and `Array#toSorted` calls to always provide a `compareFunction`.' +--- + +import Tabs from '@theme/Tabs'; +import TabItem from '@theme/TabItem'; + +> 🛑 This file is source code, not the primary documentation location! 🛑 +> +> See **https://typescript-eslint.io/rules/require-array-sort-compare** for documentation. + +When called without a compare function, `Array#sort()` and `Array#toSorted()` converts all non-undefined array elements into strings and then compares said strings based off their UTF-16 code units [[ECMA specification](https://www.ecma-international.org/ecma-262/9.0/#sec-sortcompare)]. + +The result is that elements are sorted alphabetically, regardless of their type. +For example, when sorting numbers, this results in a "10 before 2" order: + +```ts +[1, 2, 3, 10, 20, 30].sort(); //→ [1, 10, 2, 20, 3, 30] +``` + +This rule reports on any call to the sort methods that do not provide a `compare` argument. + +## Examples + +This rule aims to ensure all calls of the native sort methods provide a `compareFunction`, while ignoring calls to user-defined methods. + + + + +```ts +const array: any[]; +const stringArray: string[]; + +array.sort(); + +// String arrays should be sorted using `String#localeCompare`. +stringArray.sort(); +``` + + + + +```ts +const array: any[]; +const userDefinedType: { sort(): void }; + +array.sort((a, b) => a - b); +array.sort((a, b) => a.localeCompare(b)); + +userDefinedType.sort(); +``` + + + + +## Options + +### `ignoreStringArrays` + +Examples of code for this rule with `{ ignoreStringArrays: true }`: + + + + +```ts option='{ "ignoreStringArrays": true }' +const one = 1; +const two = 2; +const three = 3; +[one, two, three].sort(); +``` + + + + +```ts option='{ "ignoreStringArrays": true }' +const one = '1'; +const two = '2'; +const three = '3'; +[one, two, three].sort(); +``` + + + + +## When Not To Use It + +If you intentionally want your arrays to be always sorted in a string-like manner, you can turn this rule off safely. diff --git a/node_modules/@typescript-eslint/eslint-plugin/docs/rules/require-await.mdx b/node_modules/@typescript-eslint/eslint-plugin/docs/rules/require-await.mdx new file mode 100644 index 000000000..a600d9198 --- /dev/null +++ b/node_modules/@typescript-eslint/eslint-plugin/docs/rules/require-await.mdx @@ -0,0 +1,25 @@ +--- +description: 'Disallow async functions which have no `await` expression.' +--- + +import Tabs from '@theme/Tabs'; +import TabItem from '@theme/TabItem'; + +> 🛑 This file is source code, not the primary documentation location! 🛑 +> +> See **https://typescript-eslint.io/rules/require-await** for documentation. + +This rule extends the base [`eslint/require-await`](https://eslint.org/docs/rules/require-await) rule. +It uses type information to add support for `async` functions that return a `Promise`. + +## Examples + +Examples of **correct** code for this rule: + +```ts +async function returnsPromise1() { + return Promise.resolve(1); +} + +const returnsPromise2 = () => returnsPromise1(); +``` diff --git a/node_modules/@typescript-eslint/eslint-plugin/docs/rules/restrict-plus-operands.mdx b/node_modules/@typescript-eslint/eslint-plugin/docs/rules/restrict-plus-operands.mdx new file mode 100644 index 000000000..c96c8aa12 --- /dev/null +++ b/node_modules/@typescript-eslint/eslint-plugin/docs/rules/restrict-plus-operands.mdx @@ -0,0 +1,232 @@ +--- +description: 'Require both operands of addition to be the same type and be `bigint`, `number`, or `string`.' +--- + +import Tabs from '@theme/Tabs'; +import TabItem from '@theme/TabItem'; + +> 🛑 This file is source code, not the primary documentation location! 🛑 +> +> See **https://typescript-eslint.io/rules/restrict-plus-operands** for documentation. + +TypeScript allows `+` adding together two values of any type(s). +However, adding values that are not the same type and/or are not the same primitive type is often a sign of programmer error. + +This rule reports when a `+` operation combines two values of different types, or a type that is not `bigint`, `number`, or `string`. + +## Examples + + + + +```ts +let foo = 1n + 1; +let fn = (a: string, b: never) => a + b; +``` + + + + +```ts +let foo = 1n + 1n; +let fn = (a: string, b: string) => a + b; +``` + + + + +## Options + +:::caution +We generally recommend against using these options, as they limit which varieties of incorrect `+` usage can be checked. +This in turn severely limits the validation that the rule can do to ensure that resulting strings and numbers are correct. + +Safer alternatives to using the `allow*` options include: + +- Using variadic forms of logging APIs to avoid needing to `+` values. + ```ts + // Remove this line + console.log('The result is ' + true); + // Add this line + console.log('The result is', true); + ``` +- Using `.toFixed()` to coerce numbers to well-formed string representations: + ```ts + const number = 1.123456789; + const result = 'The number is ' + number.toFixed(2); + // result === 'The number is 1.12' + ``` +- Calling `.toString()` on other types to mark explicit and intentional string coercion: + ```ts + const arg = '11'; + const regex = /[0-9]/; + const result = + 'The result of ' + + regex.toString() + + '.test("' + + arg + + '") is ' + + regex.test(arg).toString(); + // result === 'The result of /[0-9]/.test("11") is true' + ``` + +::: + +### `allowAny` + +Examples of code for this rule with `{ allowAny: true }`: + + + + +```ts option='{ "allowAny": true }' +let fn = (a: number, b: []) => a + b; +let fn = (a: string, b: []) => a + b; +``` + + + + +```ts option='{ "allowAny": true }' +let fn = (a: number, b: any) => a + b; +let fn = (a: string, b: any) => a + b; +``` + + + + +### `allowBoolean` + +Examples of code for this rule with `{ allowBoolean: true }`: + + + + +```ts option='{ "allowBoolean": true }' +let fn = (a: number, b: unknown) => a + b; +let fn = (a: string, b: unknown) => a + b; +``` + + + + +```ts option='{ "allowBoolean": true }' +let fn = (a: number, b: boolean) => a + b; +let fn = (a: string, b: boolean) => a + b; +``` + + + + +### `allowNullish` + +Examples of code for this rule with `{ allowNullish: true }`: + + + + +```ts option='{ "allowNullish": true }' +let fn = (a: number, b: unknown) => a + b; +let fn = (a: number, b: never) => a + b; +let fn = (a: string, b: unknown) => a + b; +let fn = (a: string, b: never) => a + b; +``` + + + + +```ts option='{ "allowNullish": true }' +let fn = (a: number, b: undefined) => a + b; +let fn = (a: number, b: null) => a + b; +let fn = (a: string, b: undefined) => a + b; +let fn = (a: string, b: null) => a + b; +``` + + + + +### `allowNumberAndString` + +Examples of code for this rule with `{ allowNumberAndString: true }`: + + + + +```ts option='{ "allowNumberAndString": true }' +let fn = (a: number, b: unknown) => a + b; +let fn = (a: number, b: never) => a + b; +``` + + + + +```ts option='{ "allowNumberAndString": true }' +let fn = (a: number, b: string) => a + b; +let fn = (a: number, b: number | string) => a + b; +``` + + + + +### `allowRegExp` + +Examples of code for this rule with `{ allowRegExp: true }`: + + + + +```ts option='{ "allowRegExp": true }' +let fn = (a: number, b: RegExp) => a + b; +``` + + + + +```ts option='{ "allowRegExp": true }' +let fn = (a: string, b: RegExp) => a + b; +``` + + + + +### `skipCompoundAssignments` + +Examples of code for this rule with `{ skipCompoundAssignments: false }`: + + + + +```ts option='{ "skipCompoundAssignments": false }' +let foo: bigint = 0n; +foo += 1; + +let bar: number[] = [1]; +bar += 1; +``` + + + + +```ts option='{ "skipCompoundAssignments": false }' +let foo: bigint = 0n; +foo += 1n; + +let bar: number = 1; +bar += 1; +``` + + + + +## When Not To Use It + +If you don't mind a risk of `"[object Object]"` or incorrect type coercions in your values, then you will not need this rule. + +## Related To + +- [`no-base-to-string`](./no-base-to-string.mdx) +- [`restrict-template-expressions`](./restrict-template-expressions.mdx) + +## Further Reading + +- [`Object.prototype.toString()` MDN documentation](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object/toString) diff --git a/node_modules/@typescript-eslint/eslint-plugin/docs/rules/restrict-template-expressions.mdx b/node_modules/@typescript-eslint/eslint-plugin/docs/rules/restrict-template-expressions.mdx new file mode 100644 index 000000000..3cf40a6e8 --- /dev/null +++ b/node_modules/@typescript-eslint/eslint-plugin/docs/rules/restrict-template-expressions.mdx @@ -0,0 +1,136 @@ +--- +description: 'Enforce template literal expressions to be of `string` type.' +--- + +import Tabs from '@theme/Tabs'; +import TabItem from '@theme/TabItem'; + +> 🛑 This file is source code, not the primary documentation location! 🛑 +> +> See **https://typescript-eslint.io/rules/restrict-template-expressions** for documentation. + +JavaScript automatically [converts an object to a string](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String#string_coercion) in a string context, such as when concatenating it with a string using `+` or embedding it in a template literal using `${}`. +The default `toString()` method of objects returns `"[object Object]"`, which is often not what was intended. +This rule reports on values used in a template literal string that aren't strings, optionally allowing other data types that provide useful stringification results. + +:::note + +The default settings of this rule intentionally do not allow objects with a custom `toString()` method to be used in template literals, because the stringification result may not be user-friendly. + +For example, arrays have a custom [`toString()`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/toString) method, which only calls `join()` internally, which joins the array elements with commas. This means that (1) array elements are not necessarily stringified to useful results (2) the commas don't have spaces after them, making the result not user-friendly. The best way to format arrays is to use [`Intl.ListFormat`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Intl/ListFormat), which even supports adding the "and" conjunction where necessary. +You must explicitly call `object.toString()` if you want to use this object in a template literal, or turn on the `allowArray` option to specifically allow arrays. +The [`no-base-to-string`](./no-base-to-string.mdx) rule can be used to guard this case against producing `"[object Object]"` by accident. + +::: + +## Examples + + + + +```ts +const arg1 = [1, 2]; +const msg1 = `arg1 = ${arg1}`; + +const arg2 = { name: 'Foo' }; +const msg2 = `arg2 = ${arg2 || null}`; +``` + + + + +```ts +const arg = 'foo'; +const msg1 = `arg = ${arg}`; +const msg2 = `arg = ${arg || 'default'}`; + +const stringWithKindProp: string & { _kind?: 'MyString' } = 'foo'; +const msg3 = `stringWithKindProp = ${stringWithKindProp}`; +``` + + + + +## Options + +### `allowNumber` + +Examples of additional **correct** code for this rule with `{ allowNumber: true }`: + +```ts option='{ "allowNumber": true }' showPlaygroundButton +const arg = 123; +const msg1 = `arg = ${arg}`; +const msg2 = `arg = ${arg || 'zero'}`; +``` + +This option controls both numbers and BigInts. + +### `allowBoolean` + +Examples of additional **correct** code for this rule with `{ allowBoolean: true }`: + +```ts option='{ "allowBoolean": true }' showPlaygroundButton +const arg = true; +const msg1 = `arg = ${arg}`; +const msg2 = `arg = ${arg || 'not truthy'}`; +``` + +### `allowAny` + +Examples of additional **correct** code for this rule with `{ allowAny: true }`: + +```ts option='{ "allowAny": true }' showPlaygroundButton +const user = JSON.parse('{ "name": "foo" }'); +const msg1 = `arg = ${user.name}`; +const msg2 = `arg = ${user.name || 'the user with no name'}`; +``` + +### `allowNullish` + +Examples of additional **correct** code for this rule with `{ allowNullish: true }`: + +```ts option='{ "allowNullish": true }' showPlaygroundButton +const arg = condition ? 'ok' : null; +const msg1 = `arg = ${arg}`; +``` + +### `allowRegExp` + +Examples of additional **correct** code for this rule with `{ allowRegExp: true }`: + +```ts option='{ "allowRegExp": true }' showPlaygroundButton +const arg = new RegExp('foo'); +const msg1 = `arg = ${arg}`; +``` + +```ts option='{ "allowRegExp": true }' showPlaygroundButton +const arg = /foo/; +const msg1 = `arg = ${arg}`; +``` + +### `allowNever` + +Examples of additional **correct** code for this rule with `{ allowNever: true }`: + +```ts option='{ "allowNever": true }' showPlaygroundButton +const arg = 'something'; +const msg1 = typeof arg === 'string' ? arg : `arg = ${arg}`; +``` + +### `allowArray` + +Examples of additional **correct** code for this rule with `{ allowArray: true }`: + +```ts option='{ "allowArray": true }' showPlaygroundButton +const arg = ['foo', 'bar']; +const msg1 = `arg = ${arg}`; +``` + +## When Not To Use It + +If you're not worried about incorrectly stringifying non-string values in template literals, then you likely don't need this rule. + +## Related To + +- [`no-base-to-string`](./no-base-to-string.mdx) +- [`restrict-plus-operands`](./restrict-plus-operands.mdx) diff --git a/node_modules/@typescript-eslint/eslint-plugin/docs/rules/return-await.mdx b/node_modules/@typescript-eslint/eslint-plugin/docs/rules/return-await.mdx new file mode 100644 index 000000000..3e0599dc1 --- /dev/null +++ b/node_modules/@typescript-eslint/eslint-plugin/docs/rules/return-await.mdx @@ -0,0 +1,228 @@ +--- +description: 'Enforce consistent returning of awaited values.' +--- + +import Tabs from '@theme/Tabs'; +import TabItem from '@theme/TabItem'; + +> 🛑 This file is source code, not the primary documentation location! 🛑 +> +> See **https://typescript-eslint.io/rules/return-await** for documentation. + +Returning an awaited promise can make sense for better stack trace information as well as for consistent error handling (returned promises will not be caught in an async function try/catch). + +This rule builds on top of the [`eslint/no-return-await`](https://eslint.org/docs/rules/no-return-await) rule. +It expands upon the base rule to add support for optionally requiring `return await` in certain cases. + +The extended rule is named `return-await` instead of `no-return-await` because the extended rule can enforce the positive or the negative. Additionally, while the core rule is now deprecated, the extended rule is still useful in many contexts. + +## Options + +```ts +type Options = 'in-try-catch' | 'always' | 'never'; + +const defaultOptions: Options = 'in-try-catch'; +``` + +### `in-try-catch` + +Requires that a returned promise must be `await`ed in `try-catch-finally` blocks, and disallows it elsewhere. +Specifically: + +- if you `return` a promise within a `try`, then it must be `await`ed. +- if you `return` a promise within a `catch`, and there **_is no_** `finally`, then it **_must not_** be `await`ed. +- if you `return` a promise within a `catch`, and there **_is a_** `finally`, then it **_must_** be `await`ed. +- if you `return` a promise within a `finally`, then it **_must not_** be `await`ed. + +Examples of code with `in-try-catch`: + + + + +```ts option='"in-try-catch"' +async function invalidInTryCatch1() { + try { + return Promise.resolve('try'); + } catch (e) {} +} + +async function invalidInTryCatch2() { + try { + throw new Error('error'); + } catch (e) { + return await Promise.resolve('catch'); + } +} + +async function invalidInTryCatch3() { + try { + throw new Error('error'); + } catch (e) { + return Promise.resolve('catch'); + } finally { + console.log('cleanup'); + } +} + +async function invalidInTryCatch4() { + try { + throw new Error('error'); + } catch (e) { + throw new Error('error2'); + } finally { + return await Promise.resolve('finally'); + } +} + +async function invalidInTryCatch5() { + return await Promise.resolve('try'); +} + +async function invalidInTryCatch6() { + return await 'value'; +} +``` + + + + +```ts option='"in-try-catch"' +async function validInTryCatch1() { + try { + return await Promise.resolve('try'); + } catch (e) {} +} + +async function validInTryCatch2() { + try { + throw new Error('error'); + } catch (e) { + return Promise.resolve('catch'); + } +} + +async function validInTryCatch3() { + try { + throw new Error('error'); + } catch (e) { + return await Promise.resolve('catch'); + } finally { + console.log('cleanup'); + } +} + +async function validInTryCatch4() { + try { + throw new Error('error'); + } catch (e) { + throw new Error('error2'); + } finally { + return Promise.resolve('finally'); + } +} + +async function validInTryCatch5() { + return Promise.resolve('try'); +} + +async function validInTryCatch6() { + return 'value'; +} +``` + + + + +### `always` + +Requires that all returned promises are `await`ed. + +Examples of code with `always`: + + + + +```ts option='"always"' +async function invalidAlways1() { + try { + return Promise.resolve('try'); + } catch (e) {} +} + +async function invalidAlways2() { + return Promise.resolve('try'); +} + +async function invalidAlways3() { + return await 'value'; +} +``` + + + + +```ts option='"always"' +async function validAlways1() { + try { + return await Promise.resolve('try'); + } catch (e) {} +} + +async function validAlways2() { + return await Promise.resolve('try'); +} + +async function validAlways3() { + return 'value'; +} +``` + + + + +### `never` + +Disallows all `await`ing any returned promises. + +Examples of code with `never`: + + + + +```ts option='"never"' +async function invalidNever1() { + try { + return await Promise.resolve('try'); + } catch (e) {} +} + +async function invalidNever2() { + return await Promise.resolve('try'); +} + +async function invalidNever3() { + return await 'value'; +} +``` + + + + +```ts option='"never"' +async function validNever1() { + try { + return Promise.resolve('try'); + } catch (e) {} +} + +async function validNever2() { + return Promise.resolve('try'); +} + +async function validNever3() { + return 'value'; +} +``` + + + diff --git a/node_modules/@typescript-eslint/eslint-plugin/docs/rules/semi.mdx b/node_modules/@typescript-eslint/eslint-plugin/docs/rules/semi.mdx new file mode 100644 index 000000000..a0cd3e365 --- /dev/null +++ b/node_modules/@typescript-eslint/eslint-plugin/docs/rules/semi.mdx @@ -0,0 +1,15 @@ +--- +description: 'Require or disallow semicolons instead of ASI.' +--- + +import Tabs from '@theme/Tabs'; +import TabItem from '@theme/TabItem'; + +> 🛑 This file is source code, not the primary documentation location! 🛑 +> +> See **https://typescript-eslint.io/rules/semi** for documentation. + +This rule extends the base [`eslint/semi`](https://eslint.org/docs/rules/semi) rule. +It adds support for TypeScript features that require semicolons. + +See also the [`@typescript-eslint/member-delimiter-style`](member-delimiter-style.mdx) rule, which allows you to specify the delimiter for `type` and `interface` members. diff --git a/node_modules/@typescript-eslint/eslint-plugin/docs/rules/sort-type-constituents.mdx b/node_modules/@typescript-eslint/eslint-plugin/docs/rules/sort-type-constituents.mdx new file mode 100644 index 000000000..1f83c0e77 --- /dev/null +++ b/node_modules/@typescript-eslint/eslint-plugin/docs/rules/sort-type-constituents.mdx @@ -0,0 +1,187 @@ +--- +description: 'Enforce constituents of a type union/intersection to be sorted alphabetically.' +--- + +import Tabs from '@theme/Tabs'; +import TabItem from '@theme/TabItem'; + +> 🛑 This file is source code, not the primary documentation location! 🛑 +> +> See **https://typescript-eslint.io/rules/sort-type-constituents** for documentation. + +Sorting union (`|`) and intersection (`&`) types can help: + +- keep your codebase standardized +- find repeated types +- reduce diff churn + +This rule reports on any types that aren't sorted alphabetically. + +> Types are sorted case-insensitively and treating numbers like a human would, falling back to character code sorting in case of ties. + +:::note +This rule is _feature frozen_: it will no longer receive new features such as new options. +It still will accept bug and documentation fixes for its existing area of features. + +Stylistic rules that enforce naming and/or sorting conventions tend to grow incomprehensibly complex as increasingly obscure features are requested. +This rule has reached the limit of what is reasonable for the typescript-eslint project to maintain. +See [eslint-plugin: Feature freeze naming and sorting stylistic rules](https://github.com/typescript-eslint/typescript-eslint/issues/8792) for more information. +::: + +## Examples + + + + +```ts +type T1 = B | A; + +type T2 = { b: string } & { a: string }; + +type T3 = [1, 2, 4] & [1, 2, 3]; + +type T4 = + | [1, 2, 4] + | [1, 2, 3] + | { b: string } + | { a: string } + | (() => void) + | (() => string) + | 'b' + | 'a' + | 'b' + | 'a' + | readonly string[] + | readonly number[] + | string[] + | number[] + | B + | A + | string + | any; +``` + + + + +```ts +type T1 = A | B; + +type T2 = { a: string } & { b: string }; + +type T3 = [1, 2, 3] & [1, 2, 4]; + +type T4 = + | A + | B + | number[] + | string[] + | any + | string + | readonly number[] + | readonly string[] + | 'a' + | 'a' + | 'b' + | 'b' + | (() => string) + | (() => void) + | { a: string } + | { b: string } + | [1, 2, 3] + | [1, 2, 4]; +``` + + + + +## Options + +### `checkIntersections` + +Whether to check intersection types (`&`). + +Examples of code with `{ "checkIntersections": true }` (the default): + + + + +```ts option='{ "checkIntersections": true }' +type ExampleIntersection = B & A; +``` + + + + +```ts option='{ "checkIntersections": true }' +type ExampleIntersection = A & B; +``` + + + + +### `checkUnions` + +Whether to check union types (`|`). + +Examples of code with `{ "checkUnions": true }` (the default): + + + + +```ts option='{ "checkUnions": true }' +type ExampleUnion = B | A; +``` + + + + +```ts option='{ "checkUnions": true }' +type ExampleUnion = A | B; +``` + + + + +### `groupOrder` + +Each constituent of the type is placed into a group, and then the rule sorts alphabetically within each group. +The ordering of groups is determined by this option. + +- `conditional` - Conditional types (`A extends B ? C : D`) +- `function` - Function and constructor types (`() => void`, `new () => type`) +- `import` - Import types (`import('path')`) +- `intersection` - Intersection types (`A & B`) +- `keyword` - Keyword types (`any`, `string`, etc) +- `literal` - Literal types (`1`, `'b'`, `true`, etc) +- `named` - Named types (`A`, `A['prop']`, `B[]`, `Array`) +- `object` - Object types (`{ a: string }`, `{ [key: string]: number }`) +- `operator` - Operator types (`keyof A`, `typeof B`, `readonly C[]`) +- `tuple` - Tuple types (`[A, B, C]`) +- `union` - Union types (`A | B`) +- `nullish` - `null` and `undefined` + +For example, configuring the rule with `{ "groupOrder": ["literal", "nullish" ]}`: + + + + +```ts option='{ "groupOrder": ["literal", "nullish" ]}' +type ExampleGroup = null | 123; +``` + + + + +```ts option='{ "groupOrder": ["literal", "nullish" ]}' +type ExampleGroup = 123 | null; +``` + + + + +## When Not To Use It + +This rule is purely a stylistic rule for maintaining consistency in your project. +You can turn it off if you don't want to keep a consistent, predictable order for intersection and union types. +However, keep in mind that inconsistent style can harm readability in a project. diff --git a/node_modules/@typescript-eslint/eslint-plugin/docs/rules/space-before-blocks.mdx b/node_modules/@typescript-eslint/eslint-plugin/docs/rules/space-before-blocks.mdx new file mode 100644 index 000000000..84f6cf93e --- /dev/null +++ b/node_modules/@typescript-eslint/eslint-plugin/docs/rules/space-before-blocks.mdx @@ -0,0 +1,49 @@ +--- +description: 'Enforce consistent spacing before blocks.' +--- + +import Tabs from '@theme/Tabs'; +import TabItem from '@theme/TabItem'; + +> 🛑 This file is source code, not the primary documentation location! 🛑 +> +> See **https://typescript-eslint.io/rules/space-before-blocks** for documentation. + +This rule extends the base [`eslint/space-before-blocks`](https://eslint.org/docs/rules/space-before-blocks) rule. +It adds support for interfaces and enums. + + + + +{/* prettier-ignore */} +```ts +enum Breakpoint{ + Large, + Medium, +} + +interface State{ + currentBreakpoint: Breakpoint; +} +``` + + + + +```ts +enum Breakpoint { + Large, + Medium, +} + +interface State { + currentBreakpoint: Breakpoint; +} +``` + + + + +## Options + +In case a more specific options object is passed these blocks will follow `classes` configuration option. diff --git a/node_modules/@typescript-eslint/eslint-plugin/docs/rules/space-before-function-paren.mdx b/node_modules/@typescript-eslint/eslint-plugin/docs/rules/space-before-function-paren.mdx new file mode 100644 index 000000000..8fd3e915b --- /dev/null +++ b/node_modules/@typescript-eslint/eslint-plugin/docs/rules/space-before-function-paren.mdx @@ -0,0 +1,13 @@ +--- +description: 'Enforce consistent spacing before function parenthesis.' +--- + +import Tabs from '@theme/Tabs'; +import TabItem from '@theme/TabItem'; + +> 🛑 This file is source code, not the primary documentation location! 🛑 +> +> See **https://typescript-eslint.io/rules/space-before-function-paren** for documentation. + +This rule extends the base [`eslint/space-before-function-paren`](https://eslint.org/docs/rules/space-before-function-paren) rule. +It adds support for generic type parameters on function calls. diff --git a/node_modules/@typescript-eslint/eslint-plugin/docs/rules/space-infix-ops.mdx b/node_modules/@typescript-eslint/eslint-plugin/docs/rules/space-infix-ops.mdx new file mode 100644 index 000000000..6293ca22e --- /dev/null +++ b/node_modules/@typescript-eslint/eslint-plugin/docs/rules/space-infix-ops.mdx @@ -0,0 +1,19 @@ +--- +description: 'Require spacing around infix operators.' +--- + +import Tabs from '@theme/Tabs'; +import TabItem from '@theme/TabItem'; + +> 🛑 This file is source code, not the primary documentation location! 🛑 +> +> See **https://typescript-eslint.io/rules/space-infix-ops** for documentation. + +This rule extends the base [`eslint/space-infix-ops`](https://eslint.org/docs/rules/space-infix-ops) rule. +It adds support for enum members. + +```ts +enum MyEnum { + KEY = 'value', +} +``` diff --git a/node_modules/@typescript-eslint/eslint-plugin/docs/rules/strict-boolean-expressions.mdx b/node_modules/@typescript-eslint/eslint-plugin/docs/rules/strict-boolean-expressions.mdx new file mode 100644 index 000000000..ab7653a5c --- /dev/null +++ b/node_modules/@typescript-eslint/eslint-plugin/docs/rules/strict-boolean-expressions.mdx @@ -0,0 +1,190 @@ +--- +description: 'Disallow certain types in boolean expressions.' +--- + +import Tabs from '@theme/Tabs'; +import TabItem from '@theme/TabItem'; + +> 🛑 This file is source code, not the primary documentation location! 🛑 +> +> See **https://typescript-eslint.io/rules/strict-boolean-expressions** for documentation. + +Forbids usage of non-boolean types in expressions where a boolean is expected. +`boolean` and `never` types are always allowed. +Additional types which are considered safe in a boolean context can be configured via options. + +The following nodes are considered boolean expressions and their type is checked: + +- Argument to the logical negation operator (`!arg`). +- The condition in a conditional expression (`cond ? x : y`). +- Conditions for `if`, `for`, `while`, and `do-while` statements. +- Operands of logical binary operators (`lhs || rhs` and `lhs && rhs`). + - Right-hand side operand is ignored when it's not a descendant of another boolean expression. + This is to allow usage of boolean operators for their short-circuiting behavior. + +## Examples + + + + +```ts +// nullable numbers are considered unsafe by default +let num: number | undefined = 0; +if (num) { + console.log('num is defined'); +} + +// nullable strings are considered unsafe by default +let str: string | null = null; +if (!str) { + console.log('str is empty'); +} + +// nullable booleans are considered unsafe by default +function foo(bool?: boolean) { + if (bool) { + bar(); + } +} + +// `any`, unconstrained generics and unions of more than one primitive type are disallowed +const foo = (arg: T) => (arg ? 1 : 0); + +// always-truthy and always-falsy types are disallowed +let obj = {}; +while (obj) { + obj = getObj(); +} +``` + + + + +```tsx +// nullable values should be checked explicitly against null or undefined +let num: number | undefined = 0; +if (num != null) { + console.log('num is defined'); +} + +let str: string | null = null; +if (str != null && !str) { + console.log('str is empty'); +} + +function foo(bool?: boolean) { + if (bool ?? false) { + bar(); + } +} + +// `any` types should be cast to boolean explicitly +const foo = (arg: any) => (Boolean(arg) ? 1 : 0); +``` + + + + +## Options + +### `allowString` + +Allows `string` in a boolean context. +This is safe because strings have only one falsy value (`""`). +Set this to `false` if you prefer the explicit `str != ""` or `str.length > 0` style. + +### `allowNumber` + +Allows `number` in a boolean context. +This is safe because numbers have only two falsy values (`0` and `NaN`). +Set this to `false` if you prefer the explicit `num != 0` and `!Number.isNaN(num)` style. + +### `allowNullableObject` + +Allows `object | function | symbol | null | undefined` in a boolean context. +This is safe because objects, functions and symbols don't have falsy values. +Set this to `false` if you prefer the explicit `obj != null` style. + +### `allowNullableBoolean` + +Allows `boolean | null | undefined` in a boolean context. +This is unsafe because nullable booleans can be either `false` or nullish. +Set this to `false` if you want to enforce explicit `bool ?? false` or `bool ?? true` style. +Set this to `true` if you don't mind implicitly treating false the same as a nullish value. + +### `allowNullableString` + +Allows `string | null | undefined` in a boolean context. +This is unsafe because nullable strings can be either an empty string or nullish. +Set this to `true` if you don't mind implicitly treating an empty string the same as a nullish value. + +### `allowNullableNumber` + +Allows `number | null | undefined` in a boolean context. +This is unsafe because nullable numbers can be either a falsy number or nullish. +Set this to `true` if you don't mind implicitly treating zero or NaN the same as a nullish value. + +### `allowNullableEnum` + +Allows `enum | null | undefined` in a boolean context. +This is unsafe because nullable enums can be either a falsy number or nullish. +Set this to `true` if you don't mind implicitly treating an enum whose value is zero the same as a nullish value. + +### `allowAny` + +Allows `any` in a boolean context. +This is unsafe for obvious reasons. +Set this to `true` at your own risk. + +### `allowRuleToRunWithoutStrictNullChecksIKnowWhatIAmDoing` + +If this is set to `false`, then the rule will error on every file whose `tsconfig.json` does _not_ have the `strictNullChecks` compiler option (or `strict`) set to `true`. + +Without `strictNullChecks`, TypeScript essentially erases `undefined` and `null` from the types. This means when this rule inspects the types from a variable, **it will not be able to tell that the variable might be `null` or `undefined`**, which essentially makes this rule a lot less useful. + +You should be using `strictNullChecks` to ensure complete type-safety in your codebase. + +If for some reason you cannot turn on `strictNullChecks`, but still want to use this rule - you can use this option to allow it - but know that the behavior of this rule is _undefined_ with the compiler option turned off. We will not accept bug reports if you are using this option. + +## Fixes and Suggestions + +This rule provides following fixes and suggestions for particular types in boolean context: + +- `boolean` - Always allowed - no fix needed. +- `string` - (when `allowString` is `false`) - Provides following suggestions: + - Change condition to check string's length (`str` → `str.length > 0`) + - Change condition to check for empty string (`str` → `str !== ""`) + - Explicitly cast value to a boolean (`str` → `Boolean(str)`) +- `number` - (when `allowNumber` is `false`): + - For `array.length` - Provides **autofix**: + - Change condition to check for 0 (`array.length` → `array.length > 0`) + - For other number values - Provides following suggestions: + - Change condition to check for 0 (`num` → `num !== 0`) + - Change condition to check for NaN (`num` → `!Number.isNaN(num)`) + - Explicitly cast value to a boolean (`num` → `Boolean(num)`) +- `object | null | undefined` - (when `allowNullableObject` is `false`) - Provides **autofix**: + - Change condition to check for null/undefined (`maybeObj` → `maybeObj != null`) +- `boolean | null | undefined` - Provides following suggestions: + - Explicitly treat nullish value the same as false (`maybeBool` → `maybeBool ?? false`) + - Change condition to check for true/false (`maybeBool` → `maybeBool === true`) +- `string | null | undefined` - Provides following suggestions: + - Change condition to check for null/undefined (`maybeStr` → `maybeStr != null`) + - Explicitly treat nullish value the same as an empty string (`maybeStr` → `maybeStr ?? ""`) + - Explicitly cast value to a boolean (`maybeStr` → `Boolean(maybeStr)`) +- `number | null | undefined` - Provides following suggestions: + - Change condition to check for null/undefined (`maybeNum` → `maybeNum != null`) + - Explicitly treat nullish value the same as 0 (`maybeNum` → `maybeNum ?? 0`) + - Explicitly cast value to a boolean (`maybeNum` → `Boolean(maybeNum)`) +- `any` and `unknown` - Provides following suggestions: + - Explicitly cast value to a boolean (`value` → `Boolean(value)`) + +## When Not To Use It + +If your project isn't likely to experience bugs from falsy non-boolean values being used in logical conditions, you can skip enabling this rule. + +Otherwise, this rule can be quite strict around requiring exact comparisons in logical checks. +If you prefer more succinct checks over more precise boolean logic, this rule might not be for you. + +## Related To + +- [no-unnecessary-condition](./no-unnecessary-condition.mdx) - Similar rule which reports always-truthy and always-falsy values in conditions diff --git a/node_modules/@typescript-eslint/eslint-plugin/docs/rules/switch-exhaustiveness-check.mdx b/node_modules/@typescript-eslint/eslint-plugin/docs/rules/switch-exhaustiveness-check.mdx new file mode 100644 index 000000000..f629d8ee5 --- /dev/null +++ b/node_modules/@typescript-eslint/eslint-plugin/docs/rules/switch-exhaustiveness-check.mdx @@ -0,0 +1,230 @@ +--- +description: 'Require switch-case statements to be exhaustive.' +--- + +import Tabs from '@theme/Tabs'; +import TabItem from '@theme/TabItem'; + +> 🛑 This file is source code, not the primary documentation location! 🛑 +> +> See **https://typescript-eslint.io/rules/switch-exhaustiveness-check** for documentation. + +When working with union types or enums in TypeScript, it's common to want to write a `switch` statement intended to contain a `case` for each possible type in the union or the enum. +However, if the union type or the enum changes, it's easy to forget to modify the cases to account for any new types. + +This rule reports when a `switch` statement over a value typed as a union of literals or as an enum is missing a case for any of those literal types and does not have a `default` clause. + +## Options + +### `allowDefaultCaseForExhaustiveSwitch` + +Defaults to true. If set to false, this rule will also report when a `switch` statement has a case for everything in a union and _also_ contains a `default` case. Thus, by setting this option to false, the rule becomes stricter. + +When a `switch` statement over a union type is exhaustive, a final `default` case would be a form of dead code. +Additionally, if a new value is added to the union type, a `default` would prevent the `switch-exhaustiveness-check` rule from reporting on the new case not being handled in the `switch` statement. + +#### `allowDefaultCaseForExhaustiveSwitch` Caveats + +It can sometimes be useful to include a redundant `default` case on an exhaustive `switch` statement if it's possible for values to have types not represented by the union type. +For example, in applications that can have version mismatches between clients and servers, it's possible for a server running a newer software version to send a value not recognized by the client's older typings. + +If your project has a small number of intentionally redundant `default` cases, you might want to use an [inline ESLint disable comment](https://eslint.org/docs/latest/use/configure/rules#using-configuration-comments-1) for each of them. + +If your project has many intentionally redundant `default` cases, you may want to disable `allowDefaultCaseForExhaustiveSwitch` and use the [`default-case` core ESLint rule](https://eslint.org/docs/latest/rules/default-case) along with [a `satisfies never` check](https://www.typescriptlang.org/play?#code/C4TwDgpgBAYgTgVwJbCgXigcgIZjAGwkygB8sAjbAO2u0wG4AoRgMwSoGNgkB7KqBAGcI8ZMAAULRCgBcsacACUcwcDhIqAcygBvRlCiCA7ig4ALKJIWLd+g1A7ZhWXASJy99+3AjAEcfhw8QgApZA4iJi8AX2YvR2dMShoaTA87Lx8-AIpaGjCkCIYMqFiSgBMIFmwEfGB0rwMpMUNsbkEWJAhBKCoIADcIOCjGrP9A9gBrKh4jKgKikYNY5cZYoA). + +### `requireDefaultForNonUnion` + +Defaults to false. If set to true, this rule will also report when a `switch` statement switches over a non-union type (like a `number` or `string`, for example) and that `switch` statement does not have a `default` case. Thus, by setting this option to true, the rule becomes stricter. + +This is generally desirable so that `number` and `string` switches will be subject to the same exhaustive checks that your other switches are. + +Examples of additional **incorrect** code for this rule with `{ requireDefaultForNonUnion: true }`: + +```ts option='{ "requireDefaultForNonUnion": true }' showPlaygroundButton +const value: number = Math.floor(Math.random() * 3); + +switch (value) { + case 0: + return 0; + case 1: + return 1; +} +``` + +Since `value` is a non-union type it requires the switch case to have a default clause only with `requireDefaultForNonUnion` enabled. + +## Examples + +When the switch doesn't have exhaustive cases, either filling them all out or adding a default will correct the rule's complaint. + +Here are some examples of code working with a union of literals: + + + + +```ts +type Day = + | 'Monday' + | 'Tuesday' + | 'Wednesday' + | 'Thursday' + | 'Friday' + | 'Saturday' + | 'Sunday'; + +declare const day: Day; +let result = 0; + +switch (day) { + case 'Monday': + result = 1; + break; +} +``` + + + + +```ts +type Day = + | 'Monday' + | 'Tuesday' + | 'Wednesday' + | 'Thursday' + | 'Friday' + | 'Saturday' + | 'Sunday'; + +declare const day: Day; +let result = 0; + +switch (day) { + case 'Monday': + result = 1; + break; + case 'Tuesday': + result = 2; + break; + case 'Wednesday': + result = 3; + break; + case 'Thursday': + result = 4; + break; + case 'Friday': + result = 5; + break; + case 'Saturday': + result = 6; + break; + case 'Sunday': + result = 7; + break; +} +``` + + + + +```ts +type Day = + | 'Monday' + | 'Tuesday' + | 'Wednesday' + | 'Thursday' + | 'Friday' + | 'Saturday' + | 'Sunday'; + +declare const day: Day; +let result = 0; + +switch (day) { + case 'Monday': + result = 1; + break; + default: + result = 42; +} +``` + + + + +Likewise, here are some examples of code working with an enum: + + + + +```ts +enum Fruit { + Apple, + Banana, + Cherry, +} + +declare const fruit: Fruit; + +switch (fruit) { + case Fruit.Apple: + console.log('an apple'); + break; +} +``` + + + + +```ts +enum Fruit { + Apple, + Banana, + Cherry, +} + +declare const fruit: Fruit; + +switch (fruit) { + case Fruit.Apple: + console.log('an apple'); + break; + + case Fruit.Banana: + console.log('a banana'); + break; + + case Fruit.Cherry: + console.log('a cherry'); + break; +} +``` + + + + +```ts +enum Fruit { + Apple, + Banana, + Cherry, +} + +declare const fruit: Fruit; + +switch (fruit) { + case Fruit.Apple: + console.log('an apple'); + break; + + default: + console.log('a fruit'); + break; +} +``` + + + + +## When Not To Use It + +If you don't frequently `switch` over union types or enums with many parts, or intentionally wish to leave out some parts, this rule may not be for you. diff --git a/node_modules/@typescript-eslint/eslint-plugin/docs/rules/triple-slash-reference.mdx b/node_modules/@typescript-eslint/eslint-plugin/docs/rules/triple-slash-reference.mdx new file mode 100644 index 000000000..43a043671 --- /dev/null +++ b/node_modules/@typescript-eslint/eslint-plugin/docs/rules/triple-slash-reference.mdx @@ -0,0 +1,123 @@ +--- +description: 'Disallow certain triple slash directives in favor of ES6-style import declarations.' +--- + +import Tabs from '@theme/Tabs'; +import TabItem from '@theme/TabItem'; + +> 🛑 This file is source code, not the primary documentation location! 🛑 +> +> See **https://typescript-eslint.io/rules/triple-slash-reference** for documentation. + +TypeScript's `///` triple-slash references are a way to indicate that types from another module are available in a file. +Use of triple-slash reference type directives is generally discouraged in favor of ECMAScript Module `import`s. +This rule reports on the use of `/// `, `/// `, or `/// ` directives. + +## Options + +Any number of the three kinds of references can be specified as an option. +Specifying `'always'` disables this lint rule for that kind of reference. + +### `lib` + +When set to `'never'`, bans `/// ` and enforces using an `import` instead: + + + + +```ts option='{ "lib": "never" }' +/// + +globalThis.value; +``` + + + + +```ts option='{ "lib": "never" }' +import { value } from 'code'; +``` + + + + +### `path` + +When set to `'never'`, bans `/// ` and enforces using an `import` instead: + + + + +```ts option='{ "path": "never" }' +/// + +globalThis.value; +``` + + + + +```ts option='{ "path": "never" }' +import { value } from 'code'; +``` + + + + +### `types` + +When set to `'never'`, bans `/// ` and enforces using an `import` instead: + + + + +```ts option='{ "types": "never" }' +/// + +globalThis.value; +``` + + + + +```ts option='{ "types": "never" }' +import { value } from 'code'; +``` + + + + +The `types` option may alternately be given a `"prefer-import"` value. +Doing so indicates the rule should only report if there is already an `import` from the same location: + + + + +```ts option='{ "types": "prefer-import" }' +/// + +import { valueA } from 'code'; + +globalThis.valueB; +``` + + + + +```ts option='{ "types": "prefer-import" }' +import { valueA, valueB } from 'code'; +``` + + + + +## When Not To Use It + +Most modern TypeScript projects generally use `import` statements to bring in types. +It's rare to need a `///` triple-slash reference outside of auto-generated code. +If your project is a rare one with one of those use cases, this rule might not be for you. +You might consider using [ESLint disable comments](https://eslint.org/docs/latest/use/configure/rules#using-configuration-comments-1) for those specific situations instead of completely disabling this rule. + +## When Not To Use It + +If you want to use all flavors of triple slash reference directives. diff --git a/node_modules/@typescript-eslint/eslint-plugin/docs/rules/type-annotation-spacing.mdx b/node_modules/@typescript-eslint/eslint-plugin/docs/rules/type-annotation-spacing.mdx new file mode 100644 index 000000000..423dc90da --- /dev/null +++ b/node_modules/@typescript-eslint/eslint-plugin/docs/rules/type-annotation-spacing.mdx @@ -0,0 +1,335 @@ +--- +description: 'Require consistent spacing around type annotations.' +--- + +import Tabs from '@theme/Tabs'; +import TabItem from '@theme/TabItem'; + +> 🛑 This file is source code, not the primary documentation location! 🛑 +> +> See **https://typescript-eslint.io/rules/type-annotation-spacing** for documentation. + +Spacing around type annotations improves readability of the code. Although the most commonly used style guideline for type annotations in TypeScript prescribes adding a space after the colon, but not before it, it is subjective to the preferences of a project. For example: + +{/* prettier-ignore */} +```ts +// with space after, but not before (default if no option is specified) +let foo: string = "bar"; + +// with no spaces +let foo:string = "bar"; + +// with space before and after +let foo : string = "bar"; + +// with space before, but not after +let foo :string = "bar"; + +// with spaces before and after the fat arrow (default if no option is specified) +type Foo = (string: name) => string; + +// with no spaces between the fat arrow +type Foo = (string: name)=>string; + +// with space after, but not before the fat arrow +type Foo = (string: name)=> string; + +// with space before, but not after the fat arrow +type Foo = (string: name) =>string; +``` + +## Examples + +This rule aims to enforce specific spacing patterns around type annotations and function types in type literals. + + + + +{/* prettier-ignore */} +```ts +let foo:string = "bar"; +let foo :string = "bar"; +let foo : string = "bar"; + +function foo():string {} +function foo() :string {} +function foo() : string {} + +class Foo { + name:string; +} + +class Foo { + name :string; +} + +class Foo { + name : string; +} + +type Foo = ()=>{}; +type Foo = () =>{}; +type Foo = ()=> {}; +``` + + + + +{/* prettier-ignore */} +```ts +let foo: string = "bar"; + +function foo(): string {} + +class Foo { + name: string; +} + +type Foo = () => {}; +``` + + + + +## Options + +### after + +```json +{ "before": false, "after": true } +``` + + + + +{/* prettier-ignore */} +```ts option='{ "before": false, "after": true }' +let foo:string = "bar"; +let foo :string = "bar"; +let foo : string = "bar"; + +function foo():string {} +function foo() :string {} +function foo() : string {} + +class Foo { + name:string; +} + +class Foo { + name :string; +} + +class Foo { + name : string; +} + +type Foo = ()=>{}; +type Foo = () =>{}; +type Foo = () => {}; +``` + + + + +{/* prettier-ignore */} +```ts option='{ "before": false, "after": true }' +let foo: string = "bar"; + +function foo(): string {} + +class Foo { + name: string; +} + +type Foo = ()=> {}; +``` + + + + +### before + +```json +{ "before": true, "after": true } +``` + + + + +{/* prettier-ignore */} +```ts option='{ "before": true, "after": true }' +let foo: string = "bar"; +let foo:string = "bar"; +let foo :string = "bar"; + +function foo(): string {} +function foo():string {} +function foo() :string {} + +class Foo { + name: string; +} + +class Foo { + name:string; +} + +class Foo { + name :string; +} + +type Foo = ()=>{}; +type Foo = () =>{}; +type Foo = ()=> {}; +``` + + + + +{/* prettier-ignore */} +```ts option='{ "before": true, "after": true }' +let foo : string = "bar"; + +function foo() : string {} + +class Foo { + name : string; +} + +type Foo = () => {}; +``` + + + + +### overrides - colon + +```json +{ + "before": false, + "after": false, + "overrides": { "colon": { "before": true, "after": true } } +} +``` + + + + +{/* prettier-ignore */} +```ts option='{"before":false,"after":false,"overrides":{"colon":{"before":true,"after":true}}}' +let foo: string = "bar"; +let foo:string = "bar"; +let foo :string = "bar"; + +function foo(): string {} +function foo():string {} +function foo() :string {} + +class Foo { + name: string; +} + +class Foo { + name:string; +} + +class Foo { + name :string; +} + +type Foo = () =>{}; +type Foo = ()=> {}; +type Foo = () => {}; +``` + + + + +{/* prettier-ignore */} +```ts option='{"before":false,"after":false,"overrides":{"colon":{"before":true,"after":true}}}' +let foo : string = "bar"; + +function foo() : string {} + +class Foo { + name : string; +} + +type Foo = { + name : (name : string)=>string; +} + +type Foo = ()=>{}; +``` + + + + +### overrides - arrow + +```json +{ + "before": false, + "after": false, + "overrides": { "arrow": { "before": true, "after": true } } +} +``` + + + + +{/* prettier-ignore */} +```ts option='{"before":false,"after":false,"overrides":{"arrow":{"before":true,"after":true}}}' +let foo: string = "bar"; +let foo : string = "bar"; +let foo :string = "bar"; + +function foo(): string {} +function foo():string {} +function foo() :string {} + +class Foo { + name: string; +} + +class Foo { + name : string; +} + +class Foo { + name :string; +} + +type Foo = ()=>{}; +type Foo = () =>{}; +type Foo = ()=> {}; +``` + + + + +{/* prettier-ignore */} +```ts option='{"before":false,"after":false,"overrides":{"arrow":{"before":true,"after":true}}}' +let foo:string = "bar"; + +function foo():string {} + +class Foo { + name:string; +} + +type Foo = () => {}; +``` + + + + +## When Not To Use It + +If you don't want to enforce spacing for your type annotations, you can safely turn this rule off. + +## Further Reading + +- [TypeScript Type System](https://basarat.gitbooks.io/typescript/docs/types/type-system.html) +- [Type Inference](https://www.typescriptlang.org/docs/handbook/type-inference.html) diff --git a/node_modules/@typescript-eslint/eslint-plugin/docs/rules/typedef.mdx b/node_modules/@typescript-eslint/eslint-plugin/docs/rules/typedef.mdx new file mode 100644 index 000000000..cfbe5fa1a --- /dev/null +++ b/node_modules/@typescript-eslint/eslint-plugin/docs/rules/typedef.mdx @@ -0,0 +1,347 @@ +--- +description: 'Require type annotations in certain places.' +--- + +import Tabs from '@theme/Tabs'; +import TabItem from '@theme/TabItem'; + +> 🛑 This file is source code, not the primary documentation location! 🛑 +> +> See **https://typescript-eslint.io/rules/typedef** for documentation. + +TypeScript cannot always infer types for all places in code. +Some locations require type annotations for their types to be inferred. + +This rule can enforce type annotations in locations regardless of whether they're required. +This is typically used to maintain consistency for element types that sometimes require them. + +```ts +class ContainsText { + // There must be a type annotation here to infer the type + delayedText: string; + + // `typedef` requires a type annotation here to maintain consistency + immediateTextExplicit: string = 'text'; + + // This is still a string type because of its initial value + immediateTextImplicit = 'text'; +} +``` + +> To enforce type definitions existing on call signatures, use [`explicit-function-return-type`](./explicit-function-return-type.mdx), or [`explicit-module-boundary-types`](./explicit-module-boundary-types.mdx). + +:::caution + +Requiring type annotations unnecessarily can be cumbersome to maintain and generally reduces code readability. +TypeScript is often better at inferring types than easily written type annotations would allow. + +**Instead of enabling `typedef`, it is generally recommended to use the `--noImplicitAny` and `--strictPropertyInitialization` compiler options to enforce type annotations only when useful.** + +::: + +## Options + +For example, with the following configuration: + +```json +{ + "rules": { + "@typescript-eslint/typedef": [ + "error", + { + "arrowParameter": true, + "variableDeclaration": true + } + ] + } +} +``` + +- Type annotations on arrow function parameters are required +- Type annotations on variables are required + +### `arrayDestructuring` + +Whether to enforce type annotations on variables declared using array destructuring. + +Examples of code with `{ "arrayDestructuring": true }`: + + + + +```ts option='{ "arrayDestructuring": true }' +const [a] = [1]; +const [b, c] = [1, 2]; +``` + + + + +```ts option='{ "arrayDestructuring": true }' +const [a]: number[] = [1]; +const [b]: [number] = [2]; +const [c, d]: [boolean, string] = [true, 'text']; + +for (const [key, val] of new Map([['key', 1]])) { +} +``` + + + + +### `arrowParameter` + +Whether to enforce type annotations for parameters of arrow functions. + +Examples of code with `{ "arrowParameter": true }`: + + + + +```ts option='{ "arrowParameter": true }' +const logsSize = size => console.log(size); + +['hello', 'world'].map(text => text.length); + +const mapper = { + map: text => text + '...', +}; +``` + + + + +```ts option='{ "arrowParameter": true }' +const logsSize = (size: number) => console.log(size); + +['hello', 'world'].map((text: string) => text.length); + +const mapper = { + map: (text: string) => text + '...', +}; +``` + + + + +### `memberVariableDeclaration` + +Whether to enforce type annotations on member variables of classes. + +Examples of code with `{ "memberVariableDeclaration": true }`: + + + + +```ts option='{ "memberVariableDeclaration": true }' +class ContainsText { + delayedText; + immediateTextImplicit = 'text'; +} +``` + + + + +```ts option='{ "memberVariableDeclaration": true }' +class ContainsText { + delayedText: string; + immediateTextImplicit: string = 'text'; +} +``` + + + + +### `objectDestructuring` + +Whether to enforce type annotations on variables declared using object destructuring. + +Examples of code with `{ "objectDestructuring": true }`: + + + + +```ts option='{ "objectDestructuring": true }' +const { length } = 'text'; +const [b, c] = Math.random() ? [1, 2] : [3, 4]; +``` + + + + +```ts option='{ "objectDestructuring": true }' +const { length }: { length: number } = 'text'; +const [b, c]: [number, number] = Math.random() ? [1, 2] : [3, 4]; + +for (const { key, val } of [{ key: 'key', val: 1 }]) { +} +``` + + + + +### `parameter` + +Whether to enforce type annotations for parameters of functions and methods. + +Examples of code with `{ "parameter": true }`: + + + + +```ts option='{ "parameter": true }' +function logsSize(size): void { + console.log(size); +} + +const doublesSize = function (size): number { + return size * 2; +}; + +const divider = { + curriesSize(size): number { + return size; + }, + dividesSize: function (size): number { + return size / 2; + }, +}; + +class Logger { + log(text): boolean { + console.log('>', text); + return true; + } +} +``` + + + + +```ts option='{ "parameter": true }' +function logsSize(size: number): void { + console.log(size); +} + +const doublesSize = function (size: number): number { + return size * 2; +}; + +const divider = { + curriesSize(size: number): number { + return size; + }, + dividesSize: function (size: number): number { + return size / 2; + }, +}; + +class Logger { + log(text: boolean): boolean { + console.log('>', text); + return true; + } +} +``` + + + + +### `propertyDeclaration` + +Whether to enforce type annotations for properties of interfaces and types. + +Examples of code with `{ "propertyDeclaration": true }`: + + + + +```ts option='{ "propertyDeclaration": true }' +type Members = { + member; + otherMember; +}; +``` + + + + +```ts option='{ "propertyDeclaration": true }' +type Members = { + member: boolean; + otherMember: string; +}; +``` + + + + +### `variableDeclaration` + +Whether to enforce type annotations for variable declarations, excluding array and object destructuring. + +Examples of code with `{ "variableDeclaration": true }`: + + + + +```ts option='{ "variableDeclaration": true }' +const text = 'text'; +let initialText = 'text'; +let delayedText; +``` + + + + +```ts option='{ "variableDeclaration": true }' +const text: string = 'text'; +let initialText: string = 'text'; +let delayedText: string; +``` + + + + +### `variableDeclarationIgnoreFunction` + +Ignore variable declarations for non-arrow and arrow functions. + +Examples of code with `{ "variableDeclaration": true, "variableDeclarationIgnoreFunction": true }`: + + + + +```ts option='{ "variableDeclaration": true, "variableDeclarationIgnoreFunction": true }' +const text = 'text'; +``` + + + + +```ts option='{ "variableDeclaration": true, "variableDeclarationIgnoreFunction": true }' +const a = (): void => {}; +const b = function (): void {}; +const c: () => void = (): void => {}; + +class Foo { + a = (): void => {}; + b = function (): void {}; + c: () => void = (): void => {}; +} +``` + + + + +## When Not To Use It + +If you are using stricter TypeScript compiler options, particularly `--noImplicitAny` and/or `--strictPropertyInitialization`, you likely don't need this rule. + +In general, if you do not consider the cost of writing unnecessary type annotations reasonable, then do not use this rule. + +## Further Reading + +- [TypeScript Type System](https://basarat.gitbooks.io/typescript/docs/types/type-system.html) +- [Type Inference](https://www.typescriptlang.org/docs/handbook/type-inference.html) diff --git a/node_modules/@typescript-eslint/eslint-plugin/docs/rules/unbound-method.mdx b/node_modules/@typescript-eslint/eslint-plugin/docs/rules/unbound-method.mdx new file mode 100644 index 000000000..0399686b1 --- /dev/null +++ b/node_modules/@typescript-eslint/eslint-plugin/docs/rules/unbound-method.mdx @@ -0,0 +1,111 @@ +--- +description: 'Enforce unbound methods are called with their expected scope.' +--- + +import Tabs from '@theme/Tabs'; +import TabItem from '@theme/TabItem'; + +> 🛑 This file is source code, not the primary documentation location! 🛑 +> +> See **https://typescript-eslint.io/rules/unbound-method** for documentation. + +Class method functions don't preserve the class scope when passed as standalone variables ("unbound"). +If your function does not access `this`, [you can annotate it with `this: void`](https://www.typescriptlang.org/docs/handbook/2/functions.html#declaring-this-in-a-function), or consider using an arrow function instead. +Otherwise, passing class methods around as values can remove type safety by failing to capture `this`. + +This rule reports when a class method is referenced in an unbound manner. + +:::note Tip +If you're working with `jest`, you can use [`eslint-plugin-jest`'s version of this rule](https://github.com/jest-community/eslint-plugin-jest/blob/main/docs/rules/unbound-method.md) to lint your test files, which knows when it's ok to pass an unbound method to `expect` calls. +::: + +## Examples + + + + +```ts +class MyClass { + public log(): void { + console.log(this); + } +} + +const instance = new MyClass(); + +// This logs the global scope (`window`/`global`), not the class instance +const myLog = instance.log; +myLog(); + +// This log might later be called with an incorrect scope +const { log } = instance; + +// arith.double may refer to `this` internally +const arith = { + double(x: number): number { + return x * 2; + }, +}; +const { double } = arith; +``` + + + + +```ts +class MyClass { + public logUnbound(): void { + console.log(this); + } + + public logBound = () => console.log(this); +} + +const instance = new MyClass(); + +// logBound will always be bound with the correct scope +const { logBound } = instance; +logBound(); + +// .bind and lambdas will also add a correct scope +const dotBindLog = instance.logUnbound.bind(instance); +const innerLog = () => instance.logUnbound(); + +// arith.double explicitly declares that it does not refer to `this` internally +const arith = { + double(this: void, x: number): number { + return x * 2; + }, +}; +const { double } = arith; +``` + + + + +## Options + +### `ignoreStatic` + +Examples of **correct** code for this rule with `{ ignoreStatic: true }`: + +```ts option='{ "ignoreStatic": true }' showPlaygroundButton +class OtherClass { + static log() { + console.log(OtherClass); + } +} + +// With `ignoreStatic`, statics are assumed to not rely on a particular scope +const { log } = OtherClass; + +log(); +``` + +## When Not To Use It + +If your project dynamically changes `this` scopes around in a way TypeScript has difficulties modeling, this rule may not be viable to use. +One likely difficult pattern is if your code intentionally waits to bind methods after use, such as by passing a `scope: this` along with the method. +You might consider using [ESLint disable comments](https://eslint.org/docs/latest/use/configure/rules#using-configuration-comments-1) for those specific situations instead of completely disabling this rule. + +If you're wanting to use `toBeCalled` and similar matches in `jest` tests, you can disable this rule for your test files in favor of [`eslint-plugin-jest`'s version of this rule](https://github.com/jest-community/eslint-plugin-jest/blob/main/docs/rules/unbound-method.mdx). diff --git a/node_modules/@typescript-eslint/eslint-plugin/docs/rules/unified-signatures.mdx b/node_modules/@typescript-eslint/eslint-plugin/docs/rules/unified-signatures.mdx new file mode 100644 index 000000000..6e2fd8d5f --- /dev/null +++ b/node_modules/@typescript-eslint/eslint-plugin/docs/rules/unified-signatures.mdx @@ -0,0 +1,86 @@ +--- +description: 'Disallow two overloads that could be unified into one with a union or an optional/rest parameter.' +--- + +import Tabs from '@theme/Tabs'; +import TabItem from '@theme/TabItem'; + +> 🛑 This file is source code, not the primary documentation location! 🛑 +> +> See **https://typescript-eslint.io/rules/unified-signatures** for documentation. + +Function overload signatures are a TypeScript way to define a function that can be called in multiple very different ways. +Overload signatures add syntax and theoretical bloat, so it's generally best to avoid using them when possible. +Switching to union types and/or optional or rest parameters can often avoid the need for overload signatures. + +This rule reports when function overload signatures can be replaced by a single function signature. + +## Examples + + + + +```ts +function x(x: number): void; +function x(x: string): void; +``` + +```ts +function y(): void; +function y(...x: number[]): void; +``` + + + + +```ts +function x(x: number | string): void; +``` + +```ts +function y(...x: number[]): void; +``` + +```ts +// This rule won't check overload signatures with different rest parameter types. +// See https://github.com/microsoft/TypeScript/issues/5077 +function f(...a: number[]): void; +function f(...a: string[]): void; +``` + + + + +## Options + +### `ignoreDifferentlyNamedParameters` + +Examples of code for this rule with `ignoreDifferentlyNamedParameters`: + + + + +```ts option='{ "ignoreDifferentlyNamedParameters": true }' +function f(a: number): void; +function f(a: string): void; +``` + + + + +```ts option='{ "ignoreDifferentlyNamedParameters": true }' +function f(a: number): void; +function f(b: string): void; +``` + + + + +## When Not To Use It + +This is purely a stylistic rule to help with readability of function signature overloads. +You can turn it off if you don't want to consistently keep them next to each other and unified. + +## Related To + +- [`adjacent-overload-signatures`](./adjacent-overload-signatures.mdx) diff --git a/node_modules/@typescript-eslint/eslint-plugin/docs/rules/use-unknown-in-catch-callback-variable.mdx b/node_modules/@typescript-eslint/eslint-plugin/docs/rules/use-unknown-in-catch-callback-variable.mdx new file mode 100644 index 000000000..8192950ad --- /dev/null +++ b/node_modules/@typescript-eslint/eslint-plugin/docs/rules/use-unknown-in-catch-callback-variable.mdx @@ -0,0 +1,84 @@ +--- +description: 'Enforce typing arguments in `.catch()` callbacks as `unknown`.' +--- + +import Tabs from '@theme/Tabs'; +import TabItem from '@theme/TabItem'; + +> 🛑 This file is source code, not the primary documentation location! 🛑 +> +> See **https://typescript-eslint.io/rules/use-unknown-in-catch-callback-variable** for documentation. + +This rule enforces that you always use the `unknown` type for the parameter of a `Promise.prototype.catch()` callback. + + + + +```ts +Promise.reject(new Error('I will reject!')).catch(err => { + console.log(err); +}); + +Promise.reject(new Error('I will reject!')).catch((err: any) => { + console.log(err); +}); + +Promise.reject(new Error('I will reject!')).catch((err: Error) => { + console.log(err); +}); +``` + + + + +```ts +Promise.reject(new Error('I will reject!')).catch((err: unknown) => { + console.log(err); +}); +``` + + + + +The reason for this rule is to enable programmers to impose constraints on `Promise` error handling analogously to what TypeScript provides for ordinary exception handling. + +For ordinary exceptions, TypeScript treats the `catch` variable as `any` by default. However, `unknown` would be a more accurate type, so TypeScript [introduced the `useUnknownInCatchVariables` compiler option](https://www.typescriptlang.org/docs/handbook/release-notes/typescript-4-4.html#defaulting-to-the-unknown-type-in-catch-variables---useunknownincatchvariables) to treat the `catch` variable as `unknown` instead. + +```ts +try { + throw x; +} catch (err) { + // err has type 'any' with useUnknownInCatchVariables: false + // err has type 'unknown' with useUnknownInCatchVariables: true +} +``` + +The Promise analog of the `try-catch` block, [`Promise.prototype.catch()`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Promise/catch), is not affected by the `useUnknownInCatchVariables` compiler option, and its "`catch` variable" will always have the type `any`. + +```ts +Promise.reject(x).catch(err => { + // err has type 'any' regardless of `useUnknownInCatchVariables` +}); +``` + +However, you can still provide an explicit type annotation, which lets you achieve the same effect as the `useUnknownInCatchVariables` option does for synchronous `catch` variables. + +```ts +Promise.reject(x).catch((err: unknown) => { + // err has type 'unknown' +}); +``` + +:::info +There is actually a way to have the `catch()` callback variable use the `unknown` type _without_ an explicit type annotation at the call sites, but it has the drawback that it involves overriding global type declarations. +For example, the library [better-TypeScript-lib](https://github.com/uhyo/better-typescript-lib) sets this up globally for your project (see [the relevant lines in the better-TypeScript-lib source code](https://github.com/uhyo/better-typescript-lib/blob/c294e177d1cc2b1d1803febf8192a4c83a1fe028/lib/lib.es5.d.ts#L635) for details on how). + +For further reading on this, you may also want to look into +[the discussion in the proposal for this rule](https://github.com/typescript-eslint/typescript-eslint/issues/7526#issuecomment-1690600813) and [this TypeScript issue on typing catch callback variables as unknown](https://github.com/microsoft/TypeScript/issues/45602). +::: + +## When Not To Use It + +If your codebase is not yet able to enable `useUnknownInCatchVariables`, it likely would be similarly difficult to enable this rule. + +If you have modified the global type declarations in order to make `catch()` callbacks use the `unknown` type without an explicit type annotation, you do not need this rule. diff --git a/node_modules/@typescript-eslint/typescript-estree/dist/create-program/validateDefaultProjectForFilesGlob.d.ts b/node_modules/@typescript-eslint/typescript-estree/dist/create-program/validateDefaultProjectForFilesGlob.d.ts new file mode 100644 index 000000000..1fda5e6a2 --- /dev/null +++ b/node_modules/@typescript-eslint/typescript-estree/dist/create-program/validateDefaultProjectForFilesGlob.d.ts @@ -0,0 +1,4 @@ +import type { ProjectServiceOptions } from '../parser-options'; +export declare const DEFAULT_PROJECT_FILES_ERROR_EXPLANATION = "\n\nHaving many files run with the default project is known to cause performance issues and slow down linting.\n\nSee https://typescript-eslint.io/troubleshooting/#allowdefaultprojectforfiles-glob-too-wide\n"; +export declare function validateDefaultProjectForFilesGlob(options: ProjectServiceOptions): void; +//# sourceMappingURL=validateDefaultProjectForFilesGlob.d.ts.map \ No newline at end of file diff --git a/node_modules/@typescript-eslint/typescript-estree/dist/create-program/validateDefaultProjectForFilesGlob.d.ts.map b/node_modules/@typescript-eslint/typescript-estree/dist/create-program/validateDefaultProjectForFilesGlob.d.ts.map new file mode 100644 index 000000000..37968d281 --- /dev/null +++ b/node_modules/@typescript-eslint/typescript-estree/dist/create-program/validateDefaultProjectForFilesGlob.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"validateDefaultProjectForFilesGlob.d.ts","sourceRoot":"","sources":["../../src/create-program/validateDefaultProjectForFilesGlob.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,qBAAqB,EAAE,MAAM,mBAAmB,CAAC;AAE/D,eAAO,MAAM,uCAAuC,oNAKnD,CAAC;AAEF,wBAAgB,kCAAkC,CAChD,OAAO,EAAE,qBAAqB,GAC7B,IAAI,CAiBN"} \ No newline at end of file diff --git a/node_modules/@typescript-eslint/typescript-estree/dist/create-program/validateDefaultProjectForFilesGlob.js b/node_modules/@typescript-eslint/typescript-estree/dist/create-program/validateDefaultProjectForFilesGlob.js new file mode 100644 index 000000000..bb2b933e3 --- /dev/null +++ b/node_modules/@typescript-eslint/typescript-estree/dist/create-program/validateDefaultProjectForFilesGlob.js @@ -0,0 +1,24 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.validateDefaultProjectForFilesGlob = exports.DEFAULT_PROJECT_FILES_ERROR_EXPLANATION = void 0; +exports.DEFAULT_PROJECT_FILES_ERROR_EXPLANATION = ` + +Having many files run with the default project is known to cause performance issues and slow down linting. + +See https://typescript-eslint.io/troubleshooting/#allowdefaultprojectforfiles-glob-too-wide +`; +function validateDefaultProjectForFilesGlob(options) { + if (!options.allowDefaultProjectForFiles?.length) { + return; + } + for (const glob of options.allowDefaultProjectForFiles) { + if (glob === '*') { + throw new Error(`allowDefaultProjectForFiles contains the overly wide '*'.${exports.DEFAULT_PROJECT_FILES_ERROR_EXPLANATION}`); + } + if (glob.includes('**')) { + throw new Error(`allowDefaultProjectForFiles glob '${glob}' contains a disallowed '**'.${exports.DEFAULT_PROJECT_FILES_ERROR_EXPLANATION}`); + } + } +} +exports.validateDefaultProjectForFilesGlob = validateDefaultProjectForFilesGlob; +//# sourceMappingURL=validateDefaultProjectForFilesGlob.js.map \ No newline at end of file diff --git a/node_modules/@typescript-eslint/typescript-estree/dist/create-program/validateDefaultProjectForFilesGlob.js.map b/node_modules/@typescript-eslint/typescript-estree/dist/create-program/validateDefaultProjectForFilesGlob.js.map new file mode 100644 index 000000000..5d60e7891 --- /dev/null +++ b/node_modules/@typescript-eslint/typescript-estree/dist/create-program/validateDefaultProjectForFilesGlob.js.map @@ -0,0 +1 @@ +{"version":3,"file":"validateDefaultProjectForFilesGlob.js","sourceRoot":"","sources":["../../src/create-program/validateDefaultProjectForFilesGlob.ts"],"names":[],"mappings":";;;AAEa,QAAA,uCAAuC,GAAG;;;;;CAKtD,CAAC;AAEF,SAAgB,kCAAkC,CAChD,OAA8B;IAE9B,IAAI,CAAC,OAAO,CAAC,2BAA2B,EAAE,MAAM,EAAE,CAAC;QACjD,OAAO;IACT,CAAC;IAED,KAAK,MAAM,IAAI,IAAI,OAAO,CAAC,2BAA2B,EAAE,CAAC;QACvD,IAAI,IAAI,KAAK,GAAG,EAAE,CAAC;YACjB,MAAM,IAAI,KAAK,CACb,4DAA4D,+CAAuC,EAAE,CACtG,CAAC;QACJ,CAAC;QACD,IAAI,IAAI,CAAC,QAAQ,CAAC,IAAI,CAAC,EAAE,CAAC;YACxB,MAAM,IAAI,KAAK,CACb,qCAAqC,IAAI,gCAAgC,+CAAuC,EAAE,CACnH,CAAC;QACJ,CAAC;IACH,CAAC;AACH,CAAC;AAnBD,gFAmBC"} \ No newline at end of file diff --git a/node_modules/@typescript-eslint/utils/dist/ts-eslint/eslint/ESLintShared.d.ts b/node_modules/@typescript-eslint/utils/dist/ts-eslint/eslint/ESLintShared.d.ts new file mode 100644 index 000000000..cb31d085f --- /dev/null +++ b/node_modules/@typescript-eslint/utils/dist/ts-eslint/eslint/ESLintShared.d.ts @@ -0,0 +1,382 @@ +import type { Linter } from '../Linter'; +import type { RuleMetaData } from '../Rule'; +export declare class ESLintBase> { + /** + * Creates a new instance of the main ESLint API. + * @param options The options for this instance. + */ + constructor(options?: Options); + /** + * This method calculates the configuration for a given file, which can be useful for debugging purposes. + * - It resolves and merges extends and overrides settings into the top level configuration. + * - It resolves the parser setting to absolute paths. + * - It normalizes the plugins setting to align short names. (e.g., eslint-plugin-foo → foo) + * - It adds the processor setting if a legacy file extension processor is matched. + * - It doesn't interpret the env setting to the globals and parserOptions settings, so the result object contains + * the env setting as is. + * @param filePath The path to the file whose configuration you would like to calculate. Directory paths are forbidden + * because ESLint cannot handle the overrides setting. + * @returns The promise that will be fulfilled with a configuration object. + */ + calculateConfigForFile(filePath: string): Promise; + getRulesMetaForResults(results: LintResult[]): Record>; + /** + * This method checks if a given file is ignored by your configuration. + * @param filePath The path to the file you want to check. + * @returns The promise that will be fulfilled with whether the file is ignored or not. If the file is ignored, then + * it will return true. + */ + isPathIgnored(filePath: string): Promise; + /** + * This method lints the files that match the glob patterns and then returns the results. + * @param patterns The lint target files. This can contain any of file paths, directory paths, and glob patterns. + * @returns The promise that will be fulfilled with an array of LintResult objects. + */ + lintFiles(patterns: string[] | string): Promise; + /** + * This method lints the given source code text and then returns the results. + * + * By default, this method uses the configuration that applies to files in the current working directory (the cwd + * constructor option). If you want to use a different configuration, pass options.filePath, and ESLint will load the + * same configuration that eslint.lintFiles() would use for a file at options.filePath. + * + * If the options.filePath value is configured to be ignored, this method returns an empty array. If the + * options.warnIgnored option is set along with the options.filePath option, this method returns a LintResult object. + * In that case, the result may contain a warning that indicates the file was ignored. + * @param code The source code text to check. + * @returns The promise that will be fulfilled with an array of LintResult objects. This is an array (despite there + * being only one lint result) in order to keep the interfaces between this and the eslint.lintFiles() + * method similar. + */ + lintText(code: string, options?: LintTextOptions): Promise; + /** + * This method loads a formatter. Formatters convert lint results to a human- or machine-readable string. + * @param name TThe path to the file you want to check. + * The following values are allowed: + * - undefined. In this case, loads the "stylish" built-in formatter. + * - A name of built-in formatters. + * - A name of third-party formatters. For examples: + * -- `foo` will load eslint-formatter-foo. + * -- `@foo` will load `@foo/eslint-formatter`. + * -- `@foo/bar` will load `@foo/eslint-formatter-bar`. + * - A path to the file that defines a formatter. The path must contain one or more path separators (/) in order to distinguish if it's a path or not. For example, start with ./. + * @returns The promise that will be fulfilled with a Formatter object. + */ + loadFormatter(name?: string): Promise; + /** + * This method copies the given results and removes warnings. The returned value contains only errors. + * @param results The LintResult objects to filter. + * @returns The filtered LintResult objects. + */ + static getErrorResults(results: LintResult): LintResult; + /** + * This method writes code modified by ESLint's autofix feature into its respective file. If any of the modified + * files don't exist, this method does nothing. + * @param results The LintResult objects to write. + * @returns The promise that will be fulfilled after all files are written. + */ + static outputFixes(results: LintResult[]): Promise; + /** + * The version text. + */ + static readonly version: string; + /** + * The type of configuration used by this class. + */ + static readonly configType: 'eslintrc' | 'flat'; +} +export interface ESLintOptions { + /** + * If false is present, ESLint suppresses directive comments in source code. + * If this option is false, it overrides the noInlineConfig setting in your configurations. + * @default true + */ + allowInlineConfig?: boolean; + /** + * Configuration object, extended by all configurations used with this instance. + * You can use this option to define the default settings that will be used if your configuration files don't + * configure it. + * @default null + */ + baseConfig?: Config | null; + /** + * If `true` is present, the `eslint.lintFiles()` method caches lint results and uses it if each target file is not + * changed. Please mind that ESLint doesn't clear the cache when you upgrade ESLint plugins. In that case, you have + * to remove the cache file manually. The `eslint.lintText()` method doesn't use caches even if you pass the + * options.filePath to the method. + * @default false + */ + cache?: boolean; + /** + * The eslint.lintFiles() method writes caches into this file. + * @default '.eslintcache' + */ + cacheLocation?: string; + /** + * Strategy for the cache to use for detecting changed files. + * @default 'metadata' + */ + cacheStrategy?: 'metadata' | 'content'; + /** + * The working directory. This must be an absolute path. + * @default process.cwd() + */ + cwd?: string; + /** + * Unless set to false, the `eslint.lintFiles()` method will throw an error when no target files are found. + * @default true + */ + errorOnUnmatchedPattern?: boolean; + /** + * If `true` is present, the `eslint.lintFiles()` and `eslint.lintText()` methods work in autofix mode. + * If a predicate function is present, the methods pass each lint message to the function, then use only the + * lint messages for which the function returned true. + * @default false + */ + fix?: boolean | ((message: LintMessage) => boolean); + /** + * The types of the rules that the `eslint.lintFiles()` and `eslint.lintText()` methods use for autofix. + * @default null + */ + fixTypes?: ('directive' | 'layout' | 'problem' | 'suggestion')[] | null; + /** + * If false is present, the `eslint.lintFiles()` method doesn't interpret glob patterns. + * @default true + */ + globInputPaths?: boolean; + /** + * Configuration object, overrides all configurations used with this instance. + * You can use this option to define the settings that will be used even if your configuration files configure it. + * @default null + */ + overrideConfig?: Config | null; + /** + * When set to true, missing patterns cause the linting operation to short circuit and not report any failures. + * @default false + */ + passOnNoPatterns?: boolean; + /** + * The plugin implementations that ESLint uses for the plugins setting of your configuration. + * This is a map-like object. Those keys are plugin IDs and each value is implementation. + * @default null + */ + plugins?: Record | null; +} +export interface DeprecatedRuleInfo { + /** + * The rule ID. + */ + ruleId: string; + /** + * The rule IDs that replace this deprecated rule. + */ + replacedBy: string[]; +} +/** + * The LintResult value is the information of the linting result of each file. + */ +export interface LintResult { + /** + * The number of errors. This includes fixable errors. + */ + errorCount: number; + /** + * The number of fatal errors. + */ + fatalErrorCount: number; + /** + * The absolute path to the file of this result. This is the string "" if the file path is unknown (when you + * didn't pass the options.filePath option to the eslint.lintText() method). + */ + filePath: string; + /** + * The number of errors that can be fixed automatically by the fix constructor option. + */ + fixableErrorCount: number; + /** + * The number of warnings that can be fixed automatically by the fix constructor option. + */ + fixableWarningCount: number; + /** + * The array of LintMessage objects. + */ + messages: LintMessage[]; + /** + * The source code of the file that was linted, with as many fixes applied as possible. + */ + output?: string; + /** + * The original source code text. This property is undefined if any messages didn't exist or the output + * property exists. + */ + source?: string; + /** + * The array of SuppressedLintMessage objects. + */ + suppressedMessages: SuppressedLintMessage[]; + /** + * The information about the deprecated rules that were used to check this file. + */ + usedDeprecatedRules: DeprecatedRuleInfo[]; + /** + * The number of warnings. This includes fixable warnings. + */ + warningCount: number; + /** + * Timing information of the lint run. + * This exists if and only if the `--stats` CLI flag was added or the `stats: true` + * option was passed to the ESLint class + * @since 9.0.0 + */ + stats?: LintStats; +} +export interface LintStats { + /** + * The number of times ESLint has applied at least one fix after linting. + */ + fixPasses: number; + /** + * The times spent on (parsing, fixing, linting) a file, where the linting refers to the timing information for each rule. + */ + times: { + passes: LintStatsTimePass[]; + }; +} +export interface LintStatsTimePass { + /** + * The total time that is spent when parsing a file. + */ + parse: LintStatsParseTime; + /** + * The total time that is spent on a rule. + */ + rules?: Record; + /** + * The total time that is spent on applying fixes to the code. + */ + fix: LintStatsFixTime; + /** + * The cumulative total + */ + total: number; +} +export interface LintStatsParseTime { + total: number; +} +export interface LintStatsRuleTime { + total: number; +} +export interface LintStatsFixTime { + total: number; +} +export interface LintTextOptions { + /** + * The path to the file of the source code text. If omitted, the result.filePath becomes the string "". + */ + filePath?: string; + /** + * If true is present and the options.filePath is a file ESLint should ignore, this method returns a lint result + * contains a warning message. + */ + warnIgnored?: boolean; +} +/** + * The LintMessage value is the information of each linting error. + */ +export interface LintMessage { + /** + * The 1-based column number of the begin point of this message. + */ + column: number | undefined; + /** + * The 1-based column number of the end point of this message. This property is undefined if this message + * is not a range. + */ + endColumn: number | undefined; + /** + * The 1-based line number of the end point of this message. This property is undefined if this + * message is not a range. + */ + endLine: number | undefined; + /** + * `true` if this is a fatal error unrelated to a rule, like a parsing error. + */ + fatal?: boolean | undefined; + /** + * The EditInfo object of autofix. This property is undefined if this message is not fixable. + */ + fix: EditInfo | undefined; + /** + * The 1-based line number of the begin point of this message. + */ + line: number | undefined; + /** + * The error message + */ + message: string; + /** + * The rule name that generates this lint message. If this message is generated by the ESLint core rather than + * rules, this is null. + */ + ruleId: string | null; + /** + * The severity of this message. 1 means warning and 2 means error. + */ + severity: 1 | 2; + /** + * The list of suggestions. Each suggestion is the pair of a description and an EditInfo object to fix code. API + * users such as editor integrations can choose one of them to fix the problem of this message. This property is + * undefined if this message doesn't have any suggestions. + */ + suggestions: { + desc: string; + fix: EditInfo; + }[] | undefined; +} +/** + * The SuppressedLintMessage value is the information of each suppressed linting error. + */ +export interface SuppressedLintMessage extends LintMessage { + /** + * The list of suppressions. + */ + suppressions?: { + /** + * Right now, this is always `directive` + */ + kind: string; + /** + * The free text description added after the `--` in the comment + */ + justification: string; + }[]; +} +/** + * The EditInfo value is information to edit text. + * + * This edit information means replacing the range of the range property by the text property value. It's like + * sourceCodeText.slice(0, edit.range[0]) + edit.text + sourceCodeText.slice(edit.range[1]). Therefore, it's an add + * if the range[0] and range[1] property values are the same value, and it's removal if the text property value is + * empty string. + */ +export interface EditInfo { + /** + * The pair of 0-based indices in source code text to remove. + */ + range: [number, number]; + /** + * The text to add. + */ + text: string; +} +/** + * The Formatter value is the object to convert the LintResult objects to text. + */ +export interface Formatter { + /** + * The method to convert the LintResult objects to text. + * Promise return supported since 8.4.0 + */ + format(results: LintResult[]): Promise | string; +} +//# sourceMappingURL=ESLintShared.d.ts.map \ No newline at end of file diff --git a/node_modules/@typescript-eslint/utils/dist/ts-eslint/eslint/ESLintShared.d.ts.map b/node_modules/@typescript-eslint/utils/dist/ts-eslint/eslint/ESLintShared.d.ts.map new file mode 100644 index 000000000..abdebed28 --- /dev/null +++ b/node_modules/@typescript-eslint/utils/dist/ts-eslint/eslint/ESLintShared.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"ESLintShared.d.ts","sourceRoot":"","sources":["../../../src/ts-eslint/eslint/ESLintShared.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,WAAW,CAAC;AACxC,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,SAAS,CAAC;AAE5C,MAAM,CAAC,OAAO,OAAO,UAAU,CAC7B,MAAM,SA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E,OAAO,GAAG,SAAS,CAAC;IAC5B;;OAEG;IACH,GAAG,EAAE,QAAQ,GAAG,SAAS,CAAC;IAC1B;;OAEG;IACH,IAAI,EAAE,MAAM,GAAG,SAAS,CAAC;IACzB;;OAEG;IACH,OAAO,EAAE,MAAM,CAAC;IAChB;;;OAGG;IACH,MAAM,EAAE,MAAM,GAAG,IAAI,CAAC;IACtB;;OAEG;IACH,QAAQ,EAAE,CAAC,GAAG,CAAC,CAAC;IAChB;;;;OAIG;IACH,WAAW,EACP;QACE,IAAI,EAAE,MAAM,CAAC;QACb,GAAG,EAAE,QAAQ,CAAC;KACf,EAAE,GACH,SAAS,CAAC;CACf;AAED;;GAEG;AACH,MAAM,WAAW,qBAAsB,SAAQ,WAAW;IACxD;;OAEG;IACH,YAAY,CAAC,EAAE;QACb;;WAEG;QACH,IAAI,EAAE,MAAM,CAAC;QACb;;WAEG;QACH,aAAa,EAAE,MAAM,CAAC;KACvB,EAAE,CAAC;CACL;AAED;;;;;;;GAOG;AACH,MAAM,WAAW,QAAQ;IACvB;;OAEG;IACH,KAAK,EAAE,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;IACxB;;OAEG;IACH,IAAI,EAAE,MAAM,CAAC;CACd;AAED;;GAEG;AACH,MAAM,WAAW,SAAS;IACxB;;;OAGG;IACH,MAAM,CAAC,OAAO,EAAE,UAAU,EAAE,GAAG,OAAO,CAAC,MAAM,CAAC,GAAG,MAAM,CAAC;CACzD"} \ No newline at end of file diff --git a/node_modules/@typescript-eslint/utils/dist/ts-eslint/eslint/ESLintShared.js b/node_modules/@typescript-eslint/utils/dist/ts-eslint/eslint/ESLintShared.js new file mode 100644 index 000000000..09d9a3118 --- /dev/null +++ b/node_modules/@typescript-eslint/utils/dist/ts-eslint/eslint/ESLintShared.js @@ -0,0 +1,3 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +//# sourceMappingURL=ESLintShared.js.map \ No newline at end of file diff --git a/node_modules/@typescript-eslint/utils/dist/ts-eslint/eslint/ESLintShared.js.map b/node_modules/@typescript-eslint/utils/dist/ts-eslint/eslint/ESLintShared.js.map new file mode 100644 index 000000000..02869193c --- /dev/null +++ b/node_modules/@typescript-eslint/utils/dist/ts-eslint/eslint/ESLintShared.js.map @@ -0,0 +1 @@ +{"version":3,"file":"ESLintShared.js","sourceRoot":"","sources":["../../../src/ts-eslint/eslint/ESLintShared.ts"],"names":[],"mappings":""} \ No newline at end of file diff --git a/node_modules/@typescript-eslint/utils/dist/ts-eslint/eslint/FlatESLint.d.ts b/node_modules/@typescript-eslint/utils/dist/ts-eslint/eslint/FlatESLint.d.ts new file mode 100644 index 000000000..8059e6387 --- /dev/null +++ b/node_modules/@typescript-eslint/utils/dist/ts-eslint/eslint/FlatESLint.d.ts @@ -0,0 +1,84 @@ +import type { FlatConfig } from '../Config'; +import type * as Shared from './ESLintShared'; +declare class FlatESLintBase extends Shared.ESLintBase { + static readonly configType: 'flat'; + /** + * Returns a configuration object for the given file based on the CLI options. + * This is the same logic used by the ESLint CLI executable to determine + * configuration for each file it processes. + * @param filePath The path of the file to retrieve a config object for. + * @returns A configuration object for the file or `undefined` if there is no configuration data for the object. + */ + calculateConfigForFile(filePath: string): Promise; + /** + * Finds the config file being used by this instance based on the options + * passed to the constructor. + * @returns The path to the config file being used or `undefined` if no config file is being used. + */ + findConfigFile(): Promise; +} +declare const FlatESLint_base: typeof FlatESLintBase; +/** + * The ESLint class is the primary class to use in Node.js applications. + * This class depends on the Node.js fs module and the file system, so you cannot use it in browsers. + * + * If you want to lint code on browsers, use the Linter class instead. + */ +export declare class FlatESLint extends FlatESLint_base { +} +export declare namespace FlatESLint { + interface ESLintOptions extends Shared.ESLintOptions { + /** + * If false is present, the eslint.lintFiles() method doesn't respect `ignorePatterns` ignorePatterns in your configuration. + * @default true + */ + ignore?: boolean; + /** + * Ignore file patterns to use in addition to config ignores. These patterns are relative to cwd. + * @default null + */ + ignorePatterns?: string[] | null; + /** + * The path to a configuration file, overrides all configurations used with this instance. + * The options.overrideConfig option is applied after this option is applied. + * Searches for default config file when falsy; doesn't do any config file lookup when `true`; considered to be a config filename when a string. + * @default false + */ + overrideConfigFile?: string | boolean; + /** + * A predicate function that filters rules to be run. + * This function is called with an object containing `ruleId` and `severity`, and returns `true` if the rule should be run. + * @default () => true + */ + ruleFilter?: RuleFilter; + /** + * When set to true, additional statistics are added to the lint results. + * @see {@link https://eslint.org/docs/latest/extend/stats} + * @default false + */ + stats?: boolean; + /** + * Show warnings when the file list includes ignored files. + * @default true + */ + warnIgnored?: boolean; + } + type DeprecatedRuleInfo = Shared.DeprecatedRuleInfo; + type EditInfo = Shared.EditInfo; + type Formatter = Shared.Formatter; + type LintMessage = Shared.LintMessage; + type LintResult = Shared.LintResult; + type LintStats = Shared.LintStats; + type LintStatsFixTime = Shared.LintStatsFixTime; + type LintStatsParseTime = Shared.LintStatsParseTime; + type LintStatsRuleTime = Shared.LintStatsRuleTime; + type LintStatsTimePass = Shared.LintStatsTimePass; + type LintTextOptions = Shared.LintTextOptions; + type SuppressedLintMessage = Shared.SuppressedLintMessage; + type RuleFilter = (rule: { + ruleId: string; + severity: number; + }) => boolean; +} +export {}; +//# sourceMappingURL=FlatESLint.d.ts.map \ No newline at end of file diff --git a/node_modules/@typescript-eslint/utils/dist/ts-eslint/eslint/FlatESLint.d.ts.map b/node_modules/@typescript-eslint/utils/dist/ts-eslint/eslint/FlatESLint.d.ts.map new file mode 100644 index 000000000..c41795faf --- /dev/null +++ b/node_modules/@typescript-eslint/utils/dist/ts-eslint/eslint/FlatESLint.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"FlatESLint.d.ts","sourceRoot":"","sources":["../../../src/ts-eslint/eslint/FlatESLint.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,WAAW,CAAC;AAC5C,OAAO,KAAK,KAAK,MAAM,MAAM,gBAAgB,CAAC;AAE9C,OAAO,OAAO,cAAe,SAAQ,MAAM,CAAC,UAAU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iB,CAAC;IACzD,KAAY,iBAAiB,GAAG,MAAM,CAAC,iBAAiB,CAAC;IACzD,KAAY,eAAe,GAAG,MAAM,CAAC,eAAe,CAAC;IACrD,KAAY,qBAAqB,GAAG,MAAM,CAAC,qBAAqB,CAAC;IACjE,KAAY,UAAU,GAAG,CAAC,IAAI,EAAE;QAC9B,MAAM,EAAE,MAAM,CAAC;QACf,QAAQ,EAAE,MAAM,CAAC;KAClB,KAAK,OAAO,CAAC;CACf"} \ No newline at end of file diff --git a/node_modules/@typescript-eslint/utils/dist/ts-eslint/eslint/FlatESLint.js b/node_modules/@typescript-eslint/utils/dist/ts-eslint/eslint/FlatESLint.js new file mode 100644 index 000000000..1add2c677 --- /dev/null +++ b/node_modules/@typescript-eslint/utils/dist/ts-eslint/eslint/FlatESLint.js @@ -0,0 +1,15 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.FlatESLint = void 0; +/* eslint-disable @typescript-eslint/no-namespace */ +const use_at_your_own_risk_1 = require("eslint/use-at-your-own-risk"); +/** + * The ESLint class is the primary class to use in Node.js applications. + * This class depends on the Node.js fs module and the file system, so you cannot use it in browsers. + * + * If you want to lint code on browsers, use the Linter class instead. + */ +class FlatESLint extends use_at_your_own_risk_1.FlatESLint { +} +exports.FlatESLint = FlatESLint; +//# sourceMappingURL=FlatESLint.js.map \ No newline at end of file diff --git a/node_modules/@typescript-eslint/utils/dist/ts-eslint/eslint/FlatESLint.js.map b/node_modules/@typescript-eslint/utils/dist/ts-eslint/eslint/FlatESLint.js.map new file mode 100644 index 000000000..016c43f31 --- /dev/null +++ b/node_modules/@typescript-eslint/utils/dist/ts-eslint/eslint/FlatESLint.js.map @@ -0,0 +1 @@ +{"version":3,"file":"FlatESLint.js","sourceRoot":"","sources":["../../../src/ts-eslint/eslint/FlatESLint.ts"],"names":[],"mappings":";;;AAAA,oDAAoD;AACpD,sEAA6E;AA4B7E;;;;;GAKG;AACH,MAAa,UAAW,SAAS,iCAA0C;CAAG;AAA9E,gCAA8E"} \ No newline at end of file diff --git a/node_modules/@typescript-eslint/utils/dist/ts-eslint/eslint/LegacyESLint.d.ts b/node_modules/@typescript-eslint/utils/dist/ts-eslint/eslint/LegacyESLint.d.ts new file mode 100644 index 000000000..698c0120c --- /dev/null +++ b/node_modules/@typescript-eslint/utils/dist/ts-eslint/eslint/LegacyESLint.d.ts @@ -0,0 +1,73 @@ +import type { ClassicConfig } from '../Config'; +import type { Linter } from '../Linter'; +import type * as Shared from './ESLintShared'; +declare class LegacyESLintBase extends Shared.ESLintBase { + static readonly configType: 'eslintrc'; +} +declare const LegacyESLint_base: typeof LegacyESLintBase; +/** + * The ESLint class is the primary class to use in Node.js applications. + * This class depends on the Node.js fs module and the file system, so you cannot use it in browsers. + * + * If you want to lint code on browsers, use the Linter class instead. + */ +export declare class LegacyESLint extends LegacyESLint_base { +} +export declare namespace LegacyESLint { + interface ESLintOptions extends Shared.ESLintOptions { + /** + * If you pass directory paths to the eslint.lintFiles() method, ESLint checks the files in those directories that + * have the given extensions. For example, when passing the src/ directory and extensions is [".js", ".ts"], ESLint + * will lint *.js and *.ts files in src/. If extensions is null, ESLint checks *.js files and files that match + * overrides[].files patterns in your configuration. + * Note: This option only applies when you pass directory paths to the eslint.lintFiles() method. + * If you pass glob patterns, ESLint will lint all files matching the glob pattern regardless of extension. + */ + extensions?: string[] | null; + /** + * If false is present, the eslint.lintFiles() method doesn't respect `.eslintignore` files in your configuration. + * @default true + */ + ignore?: boolean; + /** + * The path to a file ESLint uses instead of `$CWD/.eslintignore`. + * If a path is present and the file doesn't exist, this constructor will throw an error. + */ + ignorePath?: string; + /** + * The path to a configuration file, overrides all configurations used with this instance. + * The options.overrideConfig option is applied after this option is applied. + */ + overrideConfigFile?: string | null; + /** + * The severity to report unused eslint-disable directives. + * If this option is a severity, it overrides the reportUnusedDisableDirectives setting in your configurations. + */ + reportUnusedDisableDirectives?: Linter.SeverityString | null; + /** + * The path to a directory where plugins should be resolved from. + * If null is present, ESLint loads plugins from the location of the configuration file that contains the plugin + * setting. + * If a path is present, ESLint loads all plugins from there. + */ + resolvePluginsRelativeTo?: string | null; + /** + * An array of paths to directories to load custom rules from. + */ + rulePaths?: string[]; + /** + * If false is present, ESLint doesn't load configuration files (.eslintrc.* files). + * Only the configuration of the constructor options is valid. + */ + useEslintrc?: boolean; + } + type DeprecatedRuleInfo = Shared.DeprecatedRuleInfo; + type EditInfo = Shared.EditInfo; + type Formatter = Shared.Formatter; + type LintMessage = Shared.LintMessage; + type LintResult = Omit; + type LintTextOptions = Shared.LintTextOptions; + type SuppressedLintMessage = Shared.SuppressedLintMessage; +} +export {}; +//# sourceMappingURL=LegacyESLint.d.ts.map \ No newline at end of file diff --git a/node_modules/@typescript-eslint/utils/dist/ts-eslint/eslint/LegacyESLint.d.ts.map b/node_modules/@typescript-eslint/utils/dist/ts-eslint/eslint/LegacyESLint.d.ts.map new file mode 100644 index 000000000..0f024b85a --- /dev/null +++ b/node_modules/@typescript-eslint/utils/dist/ts-eslint/eslint/LegacyESLint.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"LegacyESLint.d.ts","sourceRoot":"","sources":["../../../src/ts-eslint/eslint/LegacyESLint.ts"],"names":[],"mappings":"AAIA,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,WAAW,CAAC;AAC/C,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,WAAW,CAAC;AACxC,OAAO,KAAK,KAAK,MAAM,MAAM,gBAAgB,CAAC;AAE9C,OAAO,OAAO,gBAAiB,SAAQ,MAAM,CAAC,UAAU,CACtD,aAAa,CAAC,MAAM,EACpB,YAAY,CAAC,aAAa,CAC3B;IACC,MAAM,CAAC,QAAQ,CAAC,UAAU,EAAE,UAAU,CAAC;CACxC;;AAED;;;;;GAKG;AACH,qBAAa,YAAa,SAAQ,iBAA+C;CAAG;AACpF,yBAAiB,YAAY,CAAC;IAC5B,UAAiB,aACf,SAAQ,MAAM,CAAC,aAAa,CAAC,aAAa,CAAC,MAAM,CAAC;QAClD;;;;;;;WAOG;QACH,UAAU,CAAC,EAAE,MAAM,EAAE,GAAG,IAAI,CAAC;QAC7B;;;WAGG;QACH,MAAM,CAAC,EAAE,OAAO,CAAC;QACjB;;;WAGG;QACH,UAAU,CAAC,EAAE,MAAM,CAAC;QACpB;;;WAGG;QACH,kBAAkB,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;QACnC;;;WAGG;QACH,6BAA6B,CAAC,EAAE,MAAM,CAAC,cAAc,GAAG,IAAI,CAAC;QAC7D;;;;;WAKG;QACH,wBAAwB,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;QACzC;;WAEG;QACH,SAAS,CAAC,EAAE,MAAM,EAAE,CAAC;QACrB;;;WAGG;QACH,WAAW,CAAC,EAAE,OAAO,CAAC;KACvB;IACD,KAAY,kBAAkB,GAAG,MAAM,CAAC,kBAAkB,CAAC;IAC3D,KAAY,QAAQ,GAAG,MAAM,CAAC,QAAQ,CAAC;IACvC,KAAY,SAAS,GAAG,MAAM,CAAC,SAAS,CAAC;IACzC,KAAY,WAAW,GAAG,MAAM,CAAC,WAAW,CAAC;IAC7C,KAAY,UAAU,GAAG,IAAI,CAAC,MAAM,CAAC,UAAU,EAAE,OAAO,CAAC,CAAC;IAC1D,KAAY,eAAe,GAAG,MAAM,CAAC,eAAe,CAAC;IACrD,KAAY,qBAAqB,GAAG,MAAM,CAAC,qBAAqB,CAAC;CAClE"} \ No newline at end of file diff --git a/node_modules/@typescript-eslint/utils/dist/ts-eslint/eslint/LegacyESLint.js b/node_modules/@typescript-eslint/utils/dist/ts-eslint/eslint/LegacyESLint.js new file mode 100644 index 000000000..88f281e12 --- /dev/null +++ b/node_modules/@typescript-eslint/utils/dist/ts-eslint/eslint/LegacyESLint.js @@ -0,0 +1,15 @@ +"use strict"; +/* eslint-disable @typescript-eslint/no-namespace */ +Object.defineProperty(exports, "__esModule", { value: true }); +exports.LegacyESLint = void 0; +const use_at_your_own_risk_1 = require("eslint/use-at-your-own-risk"); +/** + * The ESLint class is the primary class to use in Node.js applications. + * This class depends on the Node.js fs module and the file system, so you cannot use it in browsers. + * + * If you want to lint code on browsers, use the Linter class instead. + */ +class LegacyESLint extends use_at_your_own_risk_1.LegacyESLint { +} +exports.LegacyESLint = LegacyESLint; +//# sourceMappingURL=LegacyESLint.js.map \ No newline at end of file diff --git a/node_modules/@typescript-eslint/utils/dist/ts-eslint/eslint/LegacyESLint.js.map b/node_modules/@typescript-eslint/utils/dist/ts-eslint/eslint/LegacyESLint.js.map new file mode 100644 index 000000000..76c53e18e --- /dev/null +++ b/node_modules/@typescript-eslint/utils/dist/ts-eslint/eslint/LegacyESLint.js.map @@ -0,0 +1 @@ +{"version":3,"file":"LegacyESLint.js","sourceRoot":"","sources":["../../../src/ts-eslint/eslint/LegacyESLint.ts"],"names":[],"mappings":";AAAA,oDAAoD;;;AAEpD,sEAAiF;AAajF;;;;;GAKG;AACH,MAAa,YAAa,SAAS,mCAA8C;CAAG;AAApF,oCAAoF"} \ No newline at end of file diff --git a/node_modules/micromark-core-commonmark/dev/index.d.ts.map b/node_modules/micromark-core-commonmark/dev/index.d.ts.map new file mode 100644 index 000000000..ca7a93a9a --- /dev/null +++ b/node_modules/micromark-core-commonmark/dev/index.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["index.js"],"names":[],"mappings":""} \ No newline at end of file diff --git a/node_modules/micromark-core-commonmark/dev/lib/attention.d.ts.map b/node_modules/micromark-core-commonmark/dev/lib/attention.d.ts.map new file mode 100644 index 000000000..69af3aee5 --- /dev/null +++ b/node_modules/micromark-core-commonmark/dev/lib/attention.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"attention.d.ts","sourceRoot":"","sources":["attention.js"],"names":[],"mappings":"AAkBA,wBAAwB;AACxB,wBADW,SAAS,CAKnB;mBAtBY,OAAO,sBAAsB,EAAE,IAAI;wBACnC,OAAO,sBAAsB,EAAE,SAAS;oBACxC,OAAO,sBAAsB,EAAE,KAAK;oBACpC,OAAO,sBAAsB,EAAE,KAAK;uBACpC,OAAO,sBAAsB,EAAE,QAAQ;oBACvC,OAAO,sBAAsB,EAAE,KAAK;oBACpC,OAAO,sBAAsB,EAAE,KAAK;8BACpC,OAAO,sBAAsB,EAAE,eAAe;wBAC9C,OAAO,sBAAsB,EAAE,SAAS"} \ No newline at end of file diff --git a/node_modules/micromark-core-commonmark/dev/lib/autolink.d.ts.map b/node_modules/micromark-core-commonmark/dev/lib/autolink.d.ts.map new file mode 100644 index 000000000..8b1b37ca2 --- /dev/null +++ b/node_modules/micromark-core-commonmark/dev/lib/autolink.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"autolink.d.ts","sourceRoot":"","sources":["autolink.js"],"names":[],"mappings":"AAgBA,wBAAwB;AACxB,uBADW,SAAS,CACkD;wBAhBzD,OAAO,sBAAsB,EAAE,SAAS;oBACxC,OAAO,sBAAsB,EAAE,KAAK;8BACpC,OAAO,sBAAsB,EAAE,eAAe;wBAC9C,OAAO,sBAAsB,EAAE,SAAS"} \ No newline at end of file diff --git a/node_modules/micromark-core-commonmark/dev/lib/blank-line.d.ts.map b/node_modules/micromark-core-commonmark/dev/lib/blank-line.d.ts.map new file mode 100644 index 000000000..d41060b0a --- /dev/null +++ b/node_modules/micromark-core-commonmark/dev/lib/blank-line.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"blank-line.d.ts","sourceRoot":"","sources":["blank-line.js"],"names":[],"mappings":"AAWA,wBAAwB;AACxB,wBADW,SAAS,CACiD;wBAXxD,OAAO,sBAAsB,EAAE,SAAS;oBACxC,OAAO,sBAAsB,EAAE,KAAK;8BACpC,OAAO,sBAAsB,EAAE,eAAe;wBAC9C,OAAO,sBAAsB,EAAE,SAAS"} \ No newline at end of file diff --git a/node_modules/micromark-core-commonmark/dev/lib/block-quote.d.ts.map b/node_modules/micromark-core-commonmark/dev/lib/block-quote.d.ts.map new file mode 100644 index 000000000..808a61a6b --- /dev/null +++ b/node_modules/micromark-core-commonmark/dev/lib/block-quote.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"block-quote.d.ts","sourceRoot":"","sources":["block-quote.js"],"names":[],"mappings":"AAaA,wBAAwB;AACxB,yBADW,SAAS,CAMnB;wBAlBY,OAAO,sBAAsB,EAAE,SAAS;qBACxC,OAAO,sBAAsB,EAAE,MAAM;oBACrC,OAAO,sBAAsB,EAAE,KAAK;8BACpC,OAAO,sBAAsB,EAAE,eAAe;wBAC9C,OAAO,sBAAsB,EAAE,SAAS"} \ No newline at end of file diff --git a/node_modules/micromark-core-commonmark/dev/lib/character-escape.d.ts.map b/node_modules/micromark-core-commonmark/dev/lib/character-escape.d.ts.map new file mode 100644 index 000000000..280da236f --- /dev/null +++ b/node_modules/micromark-core-commonmark/dev/lib/character-escape.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"character-escape.d.ts","sourceRoot":"","sources":["character-escape.js"],"names":[],"mappings":"AAWA,wBAAwB;AACxB,8BADW,SAAS,CAInB;wBAdY,OAAO,sBAAsB,EAAE,SAAS;oBACxC,OAAO,sBAAsB,EAAE,KAAK;8BACpC,OAAO,sBAAsB,EAAE,eAAe;wBAC9C,OAAO,sBAAsB,EAAE,SAAS"} \ No newline at end of file diff --git a/node_modules/micromark-core-commonmark/dev/lib/character-reference.d.ts.map b/node_modules/micromark-core-commonmark/dev/lib/character-reference.d.ts.map new file mode 100644 index 000000000..5551b31da --- /dev/null +++ b/node_modules/micromark-core-commonmark/dev/lib/character-reference.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"character-reference.d.ts","sourceRoot":"","sources":["character-reference.js"],"names":[],"mappings":"AAiBA,wBAAwB;AACxB,iCADW,SAAS,CAInB;mBApBY,OAAO,sBAAsB,EAAE,IAAI;wBACnC,OAAO,sBAAsB,EAAE,SAAS;oBACxC,OAAO,sBAAsB,EAAE,KAAK;8BACpC,OAAO,sBAAsB,EAAE,eAAe;wBAC9C,OAAO,sBAAsB,EAAE,SAAS"} \ No newline at end of file diff --git a/node_modules/micromark-core-commonmark/dev/lib/code-fenced.d.ts.map b/node_modules/micromark-core-commonmark/dev/lib/code-fenced.d.ts.map new file mode 100644 index 000000000..12e4a1e76 --- /dev/null +++ b/node_modules/micromark-core-commonmark/dev/lib/code-fenced.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"code-fenced.d.ts","sourceRoot":"","sources":["code-fenced.js"],"names":[],"mappings":"AAmBA,wBAAwB;AACxB,yBADW,SAAS,CAKnB;mBAvBY,OAAO,sBAAsB,EAAE,IAAI;wBACnC,OAAO,sBAAsB,EAAE,SAAS;oBACxC,OAAO,sBAAsB,EAAE,KAAK;8BACpC,OAAO,sBAAsB,EAAE,eAAe;wBAC9C,OAAO,sBAAsB,EAAE,SAAS"} \ No newline at end of file diff --git a/node_modules/micromark-core-commonmark/dev/lib/code-indented.d.ts.map b/node_modules/micromark-core-commonmark/dev/lib/code-indented.d.ts.map new file mode 100644 index 000000000..1a0b1ef0c --- /dev/null +++ b/node_modules/micromark-core-commonmark/dev/lib/code-indented.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"code-indented.d.ts","sourceRoot":"","sources":["code-indented.js"],"names":[],"mappings":"AAYA,wBAAwB;AACxB,2BADW,SAAS,CAInB;wBAfY,OAAO,sBAAsB,EAAE,SAAS;oBACxC,OAAO,sBAAsB,EAAE,KAAK;8BACpC,OAAO,sBAAsB,EAAE,eAAe;wBAC9C,OAAO,sBAAsB,EAAE,SAAS"} \ No newline at end of file diff --git a/node_modules/micromark-core-commonmark/dev/lib/code-text.d.ts.map b/node_modules/micromark-core-commonmark/dev/lib/code-text.d.ts.map new file mode 100644 index 000000000..650f5d5c9 --- /dev/null +++ b/node_modules/micromark-core-commonmark/dev/lib/code-text.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"code-text.d.ts","sourceRoot":"","sources":["code-text.js"],"names":[],"mappings":"AAcA,wBAAwB;AACxB,uBADW,SAAS,CAMnB;wBAnBY,OAAO,sBAAsB,EAAE,SAAS;uBACxC,OAAO,sBAAsB,EAAE,QAAQ;uBACvC,OAAO,sBAAsB,EAAE,QAAQ;oBACvC,OAAO,sBAAsB,EAAE,KAAK;oBACpC,OAAO,sBAAsB,EAAE,KAAK;8BACpC,OAAO,sBAAsB,EAAE,eAAe;wBAC9C,OAAO,sBAAsB,EAAE,SAAS"} \ No newline at end of file diff --git a/node_modules/micromark-core-commonmark/dev/lib/content.d.ts.map b/node_modules/micromark-core-commonmark/dev/lib/content.d.ts.map new file mode 100644 index 000000000..cdb15a4ee --- /dev/null +++ b/node_modules/micromark-core-commonmark/dev/lib/content.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"content.d.ts","sourceRoot":"","sources":["content.js"],"names":[],"mappings":"AAeA;;;GAGG;AACH,sBAFU,SAAS,CAEwD;wBAlB9D,OAAO,sBAAsB,EAAE,SAAS;uBACxC,OAAO,sBAAsB,EAAE,QAAQ;oBACvC,OAAO,sBAAsB,EAAE,KAAK;oBACpC,OAAO,sBAAsB,EAAE,KAAK;8BACpC,OAAO,sBAAsB,EAAE,eAAe;wBAC9C,OAAO,sBAAsB,EAAE,SAAS"} \ No newline at end of file diff --git a/node_modules/micromark-core-commonmark/dev/lib/definition.d.ts.map b/node_modules/micromark-core-commonmark/dev/lib/definition.d.ts.map new file mode 100644 index 000000000..35d5c9743 --- /dev/null +++ b/node_modules/micromark-core-commonmark/dev/lib/definition.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"definition.d.ts","sourceRoot":"","sources":["definition.js"],"names":[],"mappings":"AAqBA,wBAAwB;AACxB,yBADW,SAAS,CACwD;wBArB/D,OAAO,sBAAsB,EAAE,SAAS;oBACxC,OAAO,sBAAsB,EAAE,KAAK;8BACpC,OAAO,sBAAsB,EAAE,eAAe;wBAC9C,OAAO,sBAAsB,EAAE,SAAS"} \ No newline at end of file diff --git a/node_modules/micromark-core-commonmark/dev/lib/hard-break-escape.d.ts.map b/node_modules/micromark-core-commonmark/dev/lib/hard-break-escape.d.ts.map new file mode 100644 index 000000000..c6215a93b --- /dev/null +++ b/node_modules/micromark-core-commonmark/dev/lib/hard-break-escape.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"hard-break-escape.d.ts","sourceRoot":"","sources":["hard-break-escape.js"],"names":[],"mappings":"AAWA,wBAAwB;AACxB,8BADW,SAAS,CAInB;wBAdY,OAAO,sBAAsB,EAAE,SAAS;oBACxC,OAAO,sBAAsB,EAAE,KAAK;8BACpC,OAAO,sBAAsB,EAAE,eAAe;wBAC9C,OAAO,sBAAsB,EAAE,SAAS"} \ No newline at end of file diff --git a/node_modules/micromark-core-commonmark/dev/lib/heading-atx.d.ts.map b/node_modules/micromark-core-commonmark/dev/lib/heading-atx.d.ts.map new file mode 100644 index 000000000..24d0f081a --- /dev/null +++ b/node_modules/micromark-core-commonmark/dev/lib/heading-atx.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"heading-atx.d.ts","sourceRoot":"","sources":["heading-atx.js"],"names":[],"mappings":"AAmBA,wBAAwB;AACxB,yBADW,SAAS,CAKnB;wBAvBY,OAAO,sBAAsB,EAAE,SAAS;uBACxC,OAAO,sBAAsB,EAAE,QAAQ;oBACvC,OAAO,sBAAsB,EAAE,KAAK;oBACpC,OAAO,sBAAsB,EAAE,KAAK;8BACpC,OAAO,sBAAsB,EAAE,eAAe;wBAC9C,OAAO,sBAAsB,EAAE,SAAS"} \ No newline at end of file diff --git a/node_modules/micromark-core-commonmark/dev/lib/html-flow.d.ts.map b/node_modules/micromark-core-commonmark/dev/lib/html-flow.d.ts.map new file mode 100644 index 000000000..4887e3334 --- /dev/null +++ b/node_modules/micromark-core-commonmark/dev/lib/html-flow.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"html-flow.d.ts","sourceRoot":"","sources":["html-flow.js"],"names":[],"mappings":"AAqBA,wBAAwB;AACxB,uBADW,SAAS,CAMnB;mBA1BY,OAAO,sBAAsB,EAAE,IAAI;wBACnC,OAAO,sBAAsB,EAAE,SAAS;uBACxC,OAAO,sBAAsB,EAAE,QAAQ;oBACvC,OAAO,sBAAsB,EAAE,KAAK;8BACpC,OAAO,sBAAsB,EAAE,eAAe;wBAC9C,OAAO,sBAAsB,EAAE,SAAS"} \ No newline at end of file diff --git a/node_modules/micromark-core-commonmark/dev/lib/html-text.d.ts.map b/node_modules/micromark-core-commonmark/dev/lib/html-text.d.ts.map new file mode 100644 index 000000000..4fffb9aab --- /dev/null +++ b/node_modules/micromark-core-commonmark/dev/lib/html-text.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"html-text.d.ts","sourceRoot":"","sources":["html-text.js"],"names":[],"mappings":"AAmBA,wBAAwB;AACxB,uBADW,SAAS,CACkD;mBAnBzD,OAAO,sBAAsB,EAAE,IAAI;wBACnC,OAAO,sBAAsB,EAAE,SAAS;oBACxC,OAAO,sBAAsB,EAAE,KAAK;8BACpC,OAAO,sBAAsB,EAAE,eAAe;wBAC9C,OAAO,sBAAsB,EAAE,SAAS"} \ No newline at end of file diff --git a/node_modules/micromark-core-commonmark/dev/lib/label-end.d.ts.map b/node_modules/micromark-core-commonmark/dev/lib/label-end.d.ts.map new file mode 100644 index 000000000..c168eec87 --- /dev/null +++ b/node_modules/micromark-core-commonmark/dev/lib/label-end.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"label-end.d.ts","sourceRoot":"","sources":["label-end.js"],"names":[],"mappings":"AAqBA,wBAAwB;AACxB,uBADW,SAAS,CAMnB;wBA1BY,OAAO,sBAAsB,EAAE,SAAS;oBACxC,OAAO,sBAAsB,EAAE,KAAK;uBACpC,OAAO,sBAAsB,EAAE,QAAQ;oBACvC,OAAO,sBAAsB,EAAE,KAAK;oBACpC,OAAO,sBAAsB,EAAE,KAAK;8BACpC,OAAO,sBAAsB,EAAE,eAAe;wBAC9C,OAAO,sBAAsB,EAAE,SAAS"} \ No newline at end of file diff --git a/node_modules/micromark-core-commonmark/dev/lib/label-start-image.d.ts.map b/node_modules/micromark-core-commonmark/dev/lib/label-start-image.d.ts.map new file mode 100644 index 000000000..a92f489f5 --- /dev/null +++ b/node_modules/micromark-core-commonmark/dev/lib/label-start-image.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"label-start-image.d.ts","sourceRoot":"","sources":["label-start-image.js"],"names":[],"mappings":"AAWA,wBAAwB;AACxB,8BADW,SAAS,CAKnB;wBAfY,OAAO,sBAAsB,EAAE,SAAS;oBACxC,OAAO,sBAAsB,EAAE,KAAK;8BACpC,OAAO,sBAAsB,EAAE,eAAe;wBAC9C,OAAO,sBAAsB,EAAE,SAAS"} \ No newline at end of file diff --git a/node_modules/micromark-core-commonmark/dev/lib/label-start-link.d.ts.map b/node_modules/micromark-core-commonmark/dev/lib/label-start-link.d.ts.map new file mode 100644 index 000000000..0dcae6be7 --- /dev/null +++ b/node_modules/micromark-core-commonmark/dev/lib/label-start-link.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"label-start-link.d.ts","sourceRoot":"","sources":["label-start-link.js"],"names":[],"mappings":"AAWA,wBAAwB;AACxB,6BADW,SAAS,CAKnB;wBAfY,OAAO,sBAAsB,EAAE,SAAS;oBACxC,OAAO,sBAAsB,EAAE,KAAK;8BACpC,OAAO,sBAAsB,EAAE,eAAe;wBAC9C,OAAO,sBAAsB,EAAE,SAAS"} \ No newline at end of file diff --git a/node_modules/micromark-core-commonmark/dev/lib/line-ending.d.ts.map b/node_modules/micromark-core-commonmark/dev/lib/line-ending.d.ts.map new file mode 100644 index 000000000..c8b482455 --- /dev/null +++ b/node_modules/micromark-core-commonmark/dev/lib/line-ending.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"line-ending.d.ts","sourceRoot":"","sources":["line-ending.js"],"names":[],"mappings":"AAYA,wBAAwB;AACxB,yBADW,SAAS,CACwD;wBAZ/D,OAAO,sBAAsB,EAAE,SAAS;oBACxC,OAAO,sBAAsB,EAAE,KAAK;8BACpC,OAAO,sBAAsB,EAAE,eAAe;wBAC9C,OAAO,sBAAsB,EAAE,SAAS"} \ No newline at end of file diff --git a/node_modules/micromark-core-commonmark/dev/lib/list.d.ts.map b/node_modules/micromark-core-commonmark/dev/lib/list.d.ts.map new file mode 100644 index 000000000..f8423bf8c --- /dev/null +++ b/node_modules/micromark-core-commonmark/dev/lib/list.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"list.d.ts","sourceRoot":"","sources":["list.js"],"names":[],"mappings":"AAiBA,wBAAwB;AACxB,mBADW,SAAS,CAMnB;mBAtBY,OAAO,sBAAsB,EAAE,IAAI;wBACnC,OAAO,sBAAsB,EAAE,SAAS;6BACxC,OAAO,sBAAsB,EAAE,cAAc;qBAC7C,OAAO,sBAAsB,EAAE,MAAM;oBACrC,OAAO,sBAAsB,EAAE,KAAK;8BACpC,OAAO,sBAAsB,EAAE,eAAe;wBAC9C,OAAO,sBAAsB,EAAE,SAAS"} \ No newline at end of file diff --git a/node_modules/micromark-core-commonmark/dev/lib/setext-underline.d.ts.map b/node_modules/micromark-core-commonmark/dev/lib/setext-underline.d.ts.map new file mode 100644 index 000000000..2153f66b0 --- /dev/null +++ b/node_modules/micromark-core-commonmark/dev/lib/setext-underline.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"setext-underline.d.ts","sourceRoot":"","sources":["setext-underline.js"],"names":[],"mappings":"AAcA,wBAAwB;AACxB,8BADW,SAAS,CAKnB;mBAlBY,OAAO,sBAAsB,EAAE,IAAI;wBACnC,OAAO,sBAAsB,EAAE,SAAS;uBACxC,OAAO,sBAAsB,EAAE,QAAQ;oBACvC,OAAO,sBAAsB,EAAE,KAAK;8BACpC,OAAO,sBAAsB,EAAE,eAAe;wBAC9C,OAAO,sBAAsB,EAAE,SAAS"} \ No newline at end of file diff --git a/node_modules/micromark-core-commonmark/dev/lib/thematic-break.d.ts.map b/node_modules/micromark-core-commonmark/dev/lib/thematic-break.d.ts.map new file mode 100644 index 000000000..5c706a8d8 --- /dev/null +++ b/node_modules/micromark-core-commonmark/dev/lib/thematic-break.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"thematic-break.d.ts","sourceRoot":"","sources":["thematic-break.js"],"names":[],"mappings":"AAaA,wBAAwB;AACxB,4BADW,SAAS,CAInB;mBAhBY,OAAO,sBAAsB,EAAE,IAAI;wBACnC,OAAO,sBAAsB,EAAE,SAAS;oBACxC,OAAO,sBAAsB,EAAE,KAAK;8BACpC,OAAO,sBAAsB,EAAE,eAAe;wBAC9C,OAAO,sBAAsB,EAAE,SAAS"} \ No newline at end of file diff --git a/node_modules/micromark-core-commonmark/index.d.ts.map b/node_modules/micromark-core-commonmark/index.d.ts.map new file mode 100644 index 000000000..ca7a93a9a --- /dev/null +++ b/node_modules/micromark-core-commonmark/index.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["index.js"],"names":[],"mappings":""} \ No newline at end of file diff --git a/node_modules/micromark-core-commonmark/lib/attention.d.ts.map b/node_modules/micromark-core-commonmark/lib/attention.d.ts.map new file mode 100644 index 000000000..69af3aee5 --- /dev/null +++ b/node_modules/micromark-core-commonmark/lib/attention.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"attention.d.ts","sourceRoot":"","sources":["attention.js"],"names":[],"mappings":"AAkBA,wBAAwB;AACxB,wBADW,SAAS,CAKnB;mBAtBY,OAAO,sBAAsB,EAAE,IAAI;wBACnC,OAAO,sBAAsB,EAAE,SAAS;oBACxC,OAAO,sBAAsB,EAAE,KAAK;oBACpC,OAAO,sBAAsB,EAAE,KAAK;uBACpC,OAAO,sBAAsB,EAAE,QAAQ;oBACvC,OAAO,sBAAsB,EAAE,KAAK;oBACpC,OAAO,sBAAsB,EAAE,KAAK;8BACpC,OAAO,sBAAsB,EAAE,eAAe;wBAC9C,OAAO,sBAAsB,EAAE,SAAS"} \ No newline at end of file diff --git a/node_modules/micromark-core-commonmark/lib/autolink.d.ts.map b/node_modules/micromark-core-commonmark/lib/autolink.d.ts.map new file mode 100644 index 000000000..8b1b37ca2 --- /dev/null +++ b/node_modules/micromark-core-commonmark/lib/autolink.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"autolink.d.ts","sourceRoot":"","sources":["autolink.js"],"names":[],"mappings":"AAgBA,wBAAwB;AACxB,uBADW,SAAS,CACkD;wBAhBzD,OAAO,sBAAsB,EAAE,SAAS;oBACxC,OAAO,sBAAsB,EAAE,KAAK;8BACpC,OAAO,sBAAsB,EAAE,eAAe;wBAC9C,OAAO,sBAAsB,EAAE,SAAS"} \ No newline at end of file diff --git a/node_modules/micromark-core-commonmark/lib/blank-line.d.ts.map b/node_modules/micromark-core-commonmark/lib/blank-line.d.ts.map new file mode 100644 index 000000000..d41060b0a --- /dev/null +++ b/node_modules/micromark-core-commonmark/lib/blank-line.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"blank-line.d.ts","sourceRoot":"","sources":["blank-line.js"],"names":[],"mappings":"AAWA,wBAAwB;AACxB,wBADW,SAAS,CACiD;wBAXxD,OAAO,sBAAsB,EAAE,SAAS;oBACxC,OAAO,sBAAsB,EAAE,KAAK;8BACpC,OAAO,sBAAsB,EAAE,eAAe;wBAC9C,OAAO,sBAAsB,EAAE,SAAS"} \ No newline at end of file diff --git a/node_modules/micromark-core-commonmark/lib/block-quote.d.ts.map b/node_modules/micromark-core-commonmark/lib/block-quote.d.ts.map new file mode 100644 index 000000000..808a61a6b --- /dev/null +++ b/node_modules/micromark-core-commonmark/lib/block-quote.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"block-quote.d.ts","sourceRoot":"","sources":["block-quote.js"],"names":[],"mappings":"AAaA,wBAAwB;AACxB,yBADW,SAAS,CAMnB;wBAlBY,OAAO,sBAAsB,EAAE,SAAS;qBACxC,OAAO,sBAAsB,EAAE,MAAM;oBACrC,OAAO,sBAAsB,EAAE,KAAK;8BACpC,OAAO,sBAAsB,EAAE,eAAe;wBAC9C,OAAO,sBAAsB,EAAE,SAAS"} \ No newline at end of file diff --git a/node_modules/micromark-core-commonmark/lib/character-escape.d.ts.map b/node_modules/micromark-core-commonmark/lib/character-escape.d.ts.map new file mode 100644 index 000000000..280da236f --- /dev/null +++ b/node_modules/micromark-core-commonmark/lib/character-escape.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"character-escape.d.ts","sourceRoot":"","sources":["character-escape.js"],"names":[],"mappings":"AAWA,wBAAwB;AACxB,8BADW,SAAS,CAInB;wBAdY,OAAO,sBAAsB,EAAE,SAAS;oBACxC,OAAO,sBAAsB,EAAE,KAAK;8BACpC,OAAO,sBAAsB,EAAE,eAAe;wBAC9C,OAAO,sBAAsB,EAAE,SAAS"} \ No newline at end of file diff --git a/node_modules/micromark-core-commonmark/lib/character-reference.d.ts.map b/node_modules/micromark-core-commonmark/lib/character-reference.d.ts.map new file mode 100644 index 000000000..5551b31da --- /dev/null +++ b/node_modules/micromark-core-commonmark/lib/character-reference.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"character-reference.d.ts","sourceRoot":"","sources":["character-reference.js"],"names":[],"mappings":"AAiBA,wBAAwB;AACxB,iCADW,SAAS,CAInB;mBApBY,OAAO,sBAAsB,EAAE,IAAI;wBACnC,OAAO,sBAAsB,EAAE,SAAS;oBACxC,OAAO,sBAAsB,EAAE,KAAK;8BACpC,OAAO,sBAAsB,EAAE,eAAe;wBAC9C,OAAO,sBAAsB,EAAE,SAAS"} \ No newline at end of file diff --git a/node_modules/micromark-core-commonmark/lib/code-fenced.d.ts.map b/node_modules/micromark-core-commonmark/lib/code-fenced.d.ts.map new file mode 100644 index 000000000..12e4a1e76 --- /dev/null +++ b/node_modules/micromark-core-commonmark/lib/code-fenced.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"code-fenced.d.ts","sourceRoot":"","sources":["code-fenced.js"],"names":[],"mappings":"AAmBA,wBAAwB;AACxB,yBADW,SAAS,CAKnB;mBAvBY,OAAO,sBAAsB,EAAE,IAAI;wBACnC,OAAO,sBAAsB,EAAE,SAAS;oBACxC,OAAO,sBAAsB,EAAE,KAAK;8BACpC,OAAO,sBAAsB,EAAE,eAAe;wBAC9C,OAAO,sBAAsB,EAAE,SAAS"} \ No newline at end of file diff --git a/node_modules/micromark-core-commonmark/lib/code-indented.d.ts.map b/node_modules/micromark-core-commonmark/lib/code-indented.d.ts.map new file mode 100644 index 000000000..1a0b1ef0c --- /dev/null +++ b/node_modules/micromark-core-commonmark/lib/code-indented.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"code-indented.d.ts","sourceRoot":"","sources":["code-indented.js"],"names":[],"mappings":"AAYA,wBAAwB;AACxB,2BADW,SAAS,CAInB;wBAfY,OAAO,sBAAsB,EAAE,SAAS;oBACxC,OAAO,sBAAsB,EAAE,KAAK;8BACpC,OAAO,sBAAsB,EAAE,eAAe;wBAC9C,OAAO,sBAAsB,EAAE,SAAS"} \ No newline at end of file diff --git a/node_modules/micromark-core-commonmark/lib/code-text.d.ts.map b/node_modules/micromark-core-commonmark/lib/code-text.d.ts.map new file mode 100644 index 000000000..650f5d5c9 --- /dev/null +++ b/node_modules/micromark-core-commonmark/lib/code-text.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"code-text.d.ts","sourceRoot":"","sources":["code-text.js"],"names":[],"mappings":"AAcA,wBAAwB;AACxB,uBADW,SAAS,CAMnB;wBAnBY,OAAO,sBAAsB,EAAE,SAAS;uBACxC,OAAO,sBAAsB,EAAE,QAAQ;uBACvC,OAAO,sBAAsB,EAAE,QAAQ;oBACvC,OAAO,sBAAsB,EAAE,KAAK;oBACpC,OAAO,sBAAsB,EAAE,KAAK;8BACpC,OAAO,sBAAsB,EAAE,eAAe;wBAC9C,OAAO,sBAAsB,EAAE,SAAS"} \ No newline at end of file diff --git a/node_modules/micromark-core-commonmark/lib/content.d.ts.map b/node_modules/micromark-core-commonmark/lib/content.d.ts.map new file mode 100644 index 000000000..cdb15a4ee --- /dev/null +++ b/node_modules/micromark-core-commonmark/lib/content.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"content.d.ts","sourceRoot":"","sources":["content.js"],"names":[],"mappings":"AAeA;;;GAGG;AACH,sBAFU,SAAS,CAEwD;wBAlB9D,OAAO,sBAAsB,EAAE,SAAS;uBACxC,OAAO,sBAAsB,EAAE,QAAQ;oBACvC,OAAO,sBAAsB,EAAE,KAAK;oBACpC,OAAO,sBAAsB,EAAE,KAAK;8BACpC,OAAO,sBAAsB,EAAE,eAAe;wBAC9C,OAAO,sBAAsB,EAAE,SAAS"} \ No newline at end of file diff --git a/node_modules/micromark-core-commonmark/lib/definition.d.ts.map b/node_modules/micromark-core-commonmark/lib/definition.d.ts.map new file mode 100644 index 000000000..35d5c9743 --- /dev/null +++ b/node_modules/micromark-core-commonmark/lib/definition.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"definition.d.ts","sourceRoot":"","sources":["definition.js"],"names":[],"mappings":"AAqBA,wBAAwB;AACxB,yBADW,SAAS,CACwD;wBArB/D,OAAO,sBAAsB,EAAE,SAAS;oBACxC,OAAO,sBAAsB,EAAE,KAAK;8BACpC,OAAO,sBAAsB,EAAE,eAAe;wBAC9C,OAAO,sBAAsB,EAAE,SAAS"} \ No newline at end of file diff --git a/node_modules/micromark-core-commonmark/lib/hard-break-escape.d.ts.map b/node_modules/micromark-core-commonmark/lib/hard-break-escape.d.ts.map new file mode 100644 index 000000000..c6215a93b --- /dev/null +++ b/node_modules/micromark-core-commonmark/lib/hard-break-escape.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"hard-break-escape.d.ts","sourceRoot":"","sources":["hard-break-escape.js"],"names":[],"mappings":"AAWA,wBAAwB;AACxB,8BADW,SAAS,CAInB;wBAdY,OAAO,sBAAsB,EAAE,SAAS;oBACxC,OAAO,sBAAsB,EAAE,KAAK;8BACpC,OAAO,sBAAsB,EAAE,eAAe;wBAC9C,OAAO,sBAAsB,EAAE,SAAS"} \ No newline at end of file diff --git a/node_modules/micromark-core-commonmark/lib/heading-atx.d.ts.map b/node_modules/micromark-core-commonmark/lib/heading-atx.d.ts.map new file mode 100644 index 000000000..24d0f081a --- /dev/null +++ b/node_modules/micromark-core-commonmark/lib/heading-atx.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"heading-atx.d.ts","sourceRoot":"","sources":["heading-atx.js"],"names":[],"mappings":"AAmBA,wBAAwB;AACxB,yBADW,SAAS,CAKnB;wBAvBY,OAAO,sBAAsB,EAAE,SAAS;uBACxC,OAAO,sBAAsB,EAAE,QAAQ;oBACvC,OAAO,sBAAsB,EAAE,KAAK;oBACpC,OAAO,sBAAsB,EAAE,KAAK;8BACpC,OAAO,sBAAsB,EAAE,eAAe;wBAC9C,OAAO,sBAAsB,EAAE,SAAS"} \ No newline at end of file diff --git a/node_modules/micromark-core-commonmark/lib/html-flow.d.ts.map b/node_modules/micromark-core-commonmark/lib/html-flow.d.ts.map new file mode 100644 index 000000000..4887e3334 --- /dev/null +++ b/node_modules/micromark-core-commonmark/lib/html-flow.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"html-flow.d.ts","sourceRoot":"","sources":["html-flow.js"],"names":[],"mappings":"AAqBA,wBAAwB;AACxB,uBADW,SAAS,CAMnB;mBA1BY,OAAO,sBAAsB,EAAE,IAAI;wBACnC,OAAO,sBAAsB,EAAE,SAAS;uBACxC,OAAO,sBAAsB,EAAE,QAAQ;oBACvC,OAAO,sBAAsB,EAAE,KAAK;8BACpC,OAAO,sBAAsB,EAAE,eAAe;wBAC9C,OAAO,sBAAsB,EAAE,SAAS"} \ No newline at end of file diff --git a/node_modules/micromark-core-commonmark/lib/html-text.d.ts.map b/node_modules/micromark-core-commonmark/lib/html-text.d.ts.map new file mode 100644 index 000000000..4fffb9aab --- /dev/null +++ b/node_modules/micromark-core-commonmark/lib/html-text.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"html-text.d.ts","sourceRoot":"","sources":["html-text.js"],"names":[],"mappings":"AAmBA,wBAAwB;AACxB,uBADW,SAAS,CACkD;mBAnBzD,OAAO,sBAAsB,EAAE,IAAI;wBACnC,OAAO,sBAAsB,EAAE,SAAS;oBACxC,OAAO,sBAAsB,EAAE,KAAK;8BACpC,OAAO,sBAAsB,EAAE,eAAe;wBAC9C,OAAO,sBAAsB,EAAE,SAAS"} \ No newline at end of file diff --git a/node_modules/micromark-core-commonmark/lib/label-end.d.ts.map b/node_modules/micromark-core-commonmark/lib/label-end.d.ts.map new file mode 100644 index 000000000..c168eec87 --- /dev/null +++ b/node_modules/micromark-core-commonmark/lib/label-end.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"label-end.d.ts","sourceRoot":"","sources":["label-end.js"],"names":[],"mappings":"AAqBA,wBAAwB;AACxB,uBADW,SAAS,CAMnB;wBA1BY,OAAO,sBAAsB,EAAE,SAAS;oBACxC,OAAO,sBAAsB,EAAE,KAAK;uBACpC,OAAO,sBAAsB,EAAE,QAAQ;oBACvC,OAAO,sBAAsB,EAAE,KAAK;oBACpC,OAAO,sBAAsB,EAAE,KAAK;8BACpC,OAAO,sBAAsB,EAAE,eAAe;wBAC9C,OAAO,sBAAsB,EAAE,SAAS"} \ No newline at end of file diff --git a/node_modules/micromark-core-commonmark/lib/label-start-image.d.ts.map b/node_modules/micromark-core-commonmark/lib/label-start-image.d.ts.map new file mode 100644 index 000000000..a92f489f5 --- /dev/null +++ b/node_modules/micromark-core-commonmark/lib/label-start-image.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"label-start-image.d.ts","sourceRoot":"","sources":["label-start-image.js"],"names":[],"mappings":"AAWA,wBAAwB;AACxB,8BADW,SAAS,CAKnB;wBAfY,OAAO,sBAAsB,EAAE,SAAS;oBACxC,OAAO,sBAAsB,EAAE,KAAK;8BACpC,OAAO,sBAAsB,EAAE,eAAe;wBAC9C,OAAO,sBAAsB,EAAE,SAAS"} \ No newline at end of file diff --git a/node_modules/micromark-core-commonmark/lib/label-start-link.d.ts.map b/node_modules/micromark-core-commonmark/lib/label-start-link.d.ts.map new file mode 100644 index 000000000..0dcae6be7 --- /dev/null +++ b/node_modules/micromark-core-commonmark/lib/label-start-link.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"label-start-link.d.ts","sourceRoot":"","sources":["label-start-link.js"],"names":[],"mappings":"AAWA,wBAAwB;AACxB,6BADW,SAAS,CAKnB;wBAfY,OAAO,sBAAsB,EAAE,SAAS;oBACxC,OAAO,sBAAsB,EAAE,KAAK;8BACpC,OAAO,sBAAsB,EAAE,eAAe;wBAC9C,OAAO,sBAAsB,EAAE,SAAS"} \ No newline at end of file diff --git a/node_modules/micromark-core-commonmark/lib/line-ending.d.ts.map b/node_modules/micromark-core-commonmark/lib/line-ending.d.ts.map new file mode 100644 index 000000000..c8b482455 --- /dev/null +++ b/node_modules/micromark-core-commonmark/lib/line-ending.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"line-ending.d.ts","sourceRoot":"","sources":["line-ending.js"],"names":[],"mappings":"AAYA,wBAAwB;AACxB,yBADW,SAAS,CACwD;wBAZ/D,OAAO,sBAAsB,EAAE,SAAS;oBACxC,OAAO,sBAAsB,EAAE,KAAK;8BACpC,OAAO,sBAAsB,EAAE,eAAe;wBAC9C,OAAO,sBAAsB,EAAE,SAAS"} \ No newline at end of file diff --git a/node_modules/micromark-core-commonmark/lib/list.d.ts.map b/node_modules/micromark-core-commonmark/lib/list.d.ts.map new file mode 100644 index 000000000..f8423bf8c --- /dev/null +++ b/node_modules/micromark-core-commonmark/lib/list.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"list.d.ts","sourceRoot":"","sources":["list.js"],"names":[],"mappings":"AAiBA,wBAAwB;AACxB,mBADW,SAAS,CAMnB;mBAtBY,OAAO,sBAAsB,EAAE,IAAI;wBACnC,OAAO,sBAAsB,EAAE,SAAS;6BACxC,OAAO,sBAAsB,EAAE,cAAc;qBAC7C,OAAO,sBAAsB,EAAE,MAAM;oBACrC,OAAO,sBAAsB,EAAE,KAAK;8BACpC,OAAO,sBAAsB,EAAE,eAAe;wBAC9C,OAAO,sBAAsB,EAAE,SAAS"} \ No newline at end of file diff --git a/node_modules/micromark-core-commonmark/lib/setext-underline.d.ts.map b/node_modules/micromark-core-commonmark/lib/setext-underline.d.ts.map new file mode 100644 index 000000000..2153f66b0 --- /dev/null +++ b/node_modules/micromark-core-commonmark/lib/setext-underline.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"setext-underline.d.ts","sourceRoot":"","sources":["setext-underline.js"],"names":[],"mappings":"AAcA,wBAAwB;AACxB,8BADW,SAAS,CAKnB;mBAlBY,OAAO,sBAAsB,EAAE,IAAI;wBACnC,OAAO,sBAAsB,EAAE,SAAS;uBACxC,OAAO,sBAAsB,EAAE,QAAQ;oBACvC,OAAO,sBAAsB,EAAE,KAAK;8BACpC,OAAO,sBAAsB,EAAE,eAAe;wBAC9C,OAAO,sBAAsB,EAAE,SAAS"} \ No newline at end of file diff --git a/node_modules/micromark-core-commonmark/lib/thematic-break.d.ts.map b/node_modules/micromark-core-commonmark/lib/thematic-break.d.ts.map new file mode 100644 index 000000000..5c706a8d8 --- /dev/null +++ b/node_modules/micromark-core-commonmark/lib/thematic-break.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"thematic-break.d.ts","sourceRoot":"","sources":["thematic-break.js"],"names":[],"mappings":"AAaA,wBAAwB;AACxB,4BADW,SAAS,CAInB;mBAhBY,OAAO,sBAAsB,EAAE,IAAI;wBACnC,OAAO,sBAAsB,EAAE,SAAS;oBACxC,OAAO,sBAAsB,EAAE,KAAK;8BACpC,OAAO,sBAAsB,EAAE,eAAe;wBAC9C,OAAO,sBAAsB,EAAE,SAAS"} \ No newline at end of file diff --git a/node_modules/micromark-core-commonmark/license b/node_modules/micromark-core-commonmark/license new file mode 100644 index 000000000..bc8f165a6 --- /dev/null +++ b/node_modules/micromark-core-commonmark/license @@ -0,0 +1,22 @@ +(The MIT License) + +Copyright (c) Titus Wormer + +Permission is hereby granted, free of charge, to any person obtaining +a copy of this software and associated documentation files (the +'Software'), to deal in the Software without restriction, including +without limitation the rights to use, copy, modify, merge, publish, +distribute, sublicense, and/or sell copies of the Software, and to +permit persons to whom the Software is furnished to do so, subject to +the following conditions: + +The above copyright notice and this permission notice shall be +included in all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED 'AS IS', WITHOUT WARRANTY OF ANY KIND, +EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF +MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. +IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY +CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, +TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE +SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. diff --git a/node_modules/micromark-util-subtokenize/dev/index.d.ts.map b/node_modules/micromark-util-subtokenize/dev/index.d.ts.map new file mode 100644 index 000000000..86e4aba8e --- /dev/null +++ b/node_modules/micromark-util-subtokenize/dev/index.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["index.js"],"names":[],"mappings":"AAcA;;;;;;;GAOG;AAEH,yCANW,2CAAY,GAEV,OAAO,CAkHnB;;oBApIY,OAAO,sBAAsB,EAAE,KAAK;oBACpC,OAAO,sBAAsB,EAAE,KAAK;oBACpC,OAAO,sBAAsB,EAAE,KAAK"} \ No newline at end of file diff --git a/node_modules/micromark-util-subtokenize/dev/lib/splice-buffer.d.ts b/node_modules/micromark-util-subtokenize/dev/lib/splice-buffer.d.ts new file mode 100644 index 000000000..34955307d --- /dev/null +++ b/node_modules/micromark-util-subtokenize/dev/lib/splice-buffer.d.ts @@ -0,0 +1,161 @@ +/** + * Some of the internal operations of micromark do lots of editing + * operations on very large arrays. This runs into problems with two + * properties of most circa-2020 JavaScript interpreters: + * + * - Array-length modifications at the high end of an array (push/pop) are + * expected to be common and are implemented in (amortized) time + * proportional to the number of elements added or removed, whereas + * other operations (shift/unshift and splice) are much less efficient. + * - Function arguments are passed on the stack, so adding tens of thousands + * of elements to an array with `arr.push[...newElements]` will frequently + * cause stack overflows. (see ) + * + * SpliceBuffers are an implementation of gap buffers, which are a + * generalization of the "queue made of two stacks" idea. The splice buffer + * maintains a cursor, and moving the cursor has cost proportional to the + * distance the cursor moves, but inserting, deleting, or splicing in + * new information at the cursor is as efficient as the push/pop operation. + * This allows for an efficient sequence of splices (or pushes, pops, shifts, + * or unshifts) as long such edits happen at the same part of the array or + * generally sweep through the array from the beginning to the end. + * + * The interface for splice buffers also supports large numbers of inputs by + * passing a single array argument rather passing multiple arguments on the + * function call stack. + * + * @template T + * Item type. + */ +export class SpliceBuffer { + /** + * @param {ReadonlyArray | null | undefined} [initial] + * Initial items (optional). + * @returns + * Splice buffer. + */ + constructor(initial?: ReadonlyArray | null | undefined); + /** @type {Array} */ + left: Array; + /** @type {Array} */ + right: Array; + /** + * Array access; + * does not move the cursor. + * + * @param {number} index + * Index. + * @return {T} + * Item. + */ + get(index: number): T; + /** + * The length of the splice buffer, one greater than the largest index in the + * array. + */ + get length(): number; + /** + * Remove and return `list[0]`; + * moves the cursor to `0`. + * + * @returns {T | undefined} + * Item, optional. + */ + shift(): T | undefined; + /** + * Slice the buffer to get an array; + * does not move the cursor. + * + * @param {number} start + * Start. + * @param {number | null | undefined} [end] + * End (optional). + * @returns {Array} + * Array of items. + */ + slice(start: number, end?: number | null | undefined): Array; + /** + * Mimics the behavior of Array.prototype.splice() except for the change of + * interface necessary to avoid segfaults when patching in very large arrays. + * + * This operation moves cursor is moved to `start` and results in the cursor + * placed after any inserted items. + * + * @param {number} start + * Start; + * zero-based index at which to start changing the array; + * negative numbers count backwards from the end of the array and values + * that are out-of bounds are clamped to the appropriate end of the array. + * @param {number | null | undefined} [deleteCount=0] + * Delete count (default: `0`); + * maximum number of elements to delete, starting from start. + * @param {Array | null | undefined} [items=[]] + * Items to include in place of the deleted items (default: `[]`). + * @return {Array} + * Any removed items. + */ + splice(start: number, deleteCount?: number | null | undefined, items?: Array | null | undefined): Array; + /** + * Remove and return the highest-numbered item in the array, so + * `list[list.length - 1]`; + * Moves the cursor to `length`. + * + * @returns {T | undefined} + * Item, optional. + */ + pop(): T | undefined; + /** + * Inserts a single item to the high-numbered side of the array; + * moves the cursor to `length`. + * + * @param {T} item + * Item. + * @returns {undefined} + * Nothing. + */ + push(item: T): undefined; + /** + * Inserts many items to the high-numbered side of the array. + * Moves the cursor to `length`. + * + * @param {Array} items + * Items. + * @returns {undefined} + * Nothing. + */ + pushMany(items: Array): undefined; + /** + * Inserts a single item to the low-numbered side of the array; + * Moves the cursor to `0`. + * + * @param {T} item + * Item. + * @returns {undefined} + * Nothing. + */ + unshift(item: T): undefined; + /** + * Inserts many items to the low-numbered side of the array; + * moves the cursor to `0`. + * + * @param {Array} items + * Items. + * @returns {undefined} + * Nothing. + */ + unshiftMany(items: Array): undefined; + /** + * Move the cursor to a specific position in the array. Requires + * time proportional to the distance moved. + * + * If `n < 0`, the cursor will end up at the beginning. + * If `n > length`, the cursor will end up at the end. + * + * @param {number} n + * Position. + * @return {undefined} + * Nothing. + */ + setCursor(n: number): undefined; +} +//# sourceMappingURL=splice-buffer.d.ts.map \ No newline at end of file diff --git a/node_modules/micromark-util-subtokenize/dev/lib/splice-buffer.d.ts.map b/node_modules/micromark-util-subtokenize/dev/lib/splice-buffer.d.ts.map new file mode 100644 index 000000000..cb671d7f2 --- /dev/null +++ b/node_modules/micromark-util-subtokenize/dev/lib/splice-buffer.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"splice-buffer.d.ts","sourceRoot":"","sources":["splice-buffer.js"],"names":[],"mappings":"AAEA;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA4BG;AACH;IACE;;;;;OAKG;IACH,sBALW,cAAc,CAAC,CAAC,GAAG,IAAI,GAAG,SAAS,EAU7C;IAJC,uBAAuB;IACvB,MADW,MAAM,CAAC,CAAC,CACoB;IACvC,uBAAuB;IACvB,OADW,MAAM,CAAC,CAAC,CACJ;IAGjB;;;;;;;;OAQG;IACH,WALW,MAAM,GAEL,CAAC,CAgBZ;IAED;;;OAGG;IACH,qBAEC;IAED;;;;;;OAMG;IACH,SAHa,CAAC,GAAG,SAAS,CAMzB;IAED;;;;;;;;;;OAUG;IACH,aAPW,MAAM,QAEN,MAAM,GAAG,IAAI,GAAG,SAAS,GAEvB,MAAM,CAAC,CAAC,CA0BpB;IAED;;;;;;;;;;;;;;;;;;;OAmBG;IACH,cAbW,MAAM,gBAKN,MAAM,GAAG,IAAI,GAAG,SAAS,UAGzB,MAAM,CAAC,CAAC,GAAG,IAAI,GAAG,SAAS,GAE1B,MAAM,CAAC,CAAC,CAcnB;IAED;;;;;;;OAOG;IACH,OAHa,CAAC,GAAG,SAAS,CAMzB;IAED;;;;;;;;OAQG;IACH,WALW,CAAC,GAEC,SAAS,CAMrB;IAED;;;;;;;;OAQG;IACH,gBALW,MAAM,CAAC,CAAC,GAEN,SAAS,CAMrB;IAED;;;;;;;;OAQG;IACH,cALW,CAAC,GAEC,SAAS,CAMrB;IAED;;;;;;;;OAQG;IACH,mBALW,MAAM,CAAC,CAAC,GAEN,SAAS,CAMrB;IAED;;;;;;;;;;;OAWG;IACH,aALW,MAAM,GAEL,SAAS,CAsBpB;CACF"} \ No newline at end of file diff --git a/node_modules/micromark-util-subtokenize/dev/lib/splice-buffer.js b/node_modules/micromark-util-subtokenize/dev/lib/splice-buffer.js new file mode 100644 index 000000000..7a7514717 --- /dev/null +++ b/node_modules/micromark-util-subtokenize/dev/lib/splice-buffer.js @@ -0,0 +1,288 @@ +import {constants} from 'micromark-util-symbol' + +/** + * Some of the internal operations of micromark do lots of editing + * operations on very large arrays. This runs into problems with two + * properties of most circa-2020 JavaScript interpreters: + * + * - Array-length modifications at the high end of an array (push/pop) are + * expected to be common and are implemented in (amortized) time + * proportional to the number of elements added or removed, whereas + * other operations (shift/unshift and splice) are much less efficient. + * - Function arguments are passed on the stack, so adding tens of thousands + * of elements to an array with `arr.push[...newElements]` will frequently + * cause stack overflows. (see ) + * + * SpliceBuffers are an implementation of gap buffers, which are a + * generalization of the "queue made of two stacks" idea. The splice buffer + * maintains a cursor, and moving the cursor has cost proportional to the + * distance the cursor moves, but inserting, deleting, or splicing in + * new information at the cursor is as efficient as the push/pop operation. + * This allows for an efficient sequence of splices (or pushes, pops, shifts, + * or unshifts) as long such edits happen at the same part of the array or + * generally sweep through the array from the beginning to the end. + * + * The interface for splice buffers also supports large numbers of inputs by + * passing a single array argument rather passing multiple arguments on the + * function call stack. + * + * @template T + * Item type. + */ +export class SpliceBuffer { + /** + * @param {ReadonlyArray | null | undefined} [initial] + * Initial items (optional). + * @returns + * Splice buffer. + */ + constructor(initial) { + /** @type {Array} */ + this.left = initial ? [...initial] : [] + /** @type {Array} */ + this.right = [] + } + + /** + * Array access; + * does not move the cursor. + * + * @param {number} index + * Index. + * @return {T} + * Item. + */ + get(index) { + if (index < 0 || index >= this.left.length + this.right.length) { + throw new RangeError( + 'Cannot access index `' + + index + + '` in a splice buffer of size `' + + (this.left.length + this.right.length) + + '`' + ) + } + + if (index < this.left.length) return this.left[index] + return this.right[this.right.length - index + this.left.length - 1] + } + + /** + * The length of the splice buffer, one greater than the largest index in the + * array. + */ + get length() { + return this.left.length + this.right.length + } + + /** + * Remove and return `list[0]`; + * moves the cursor to `0`. + * + * @returns {T | undefined} + * Item, optional. + */ + shift() { + this.setCursor(0) + return this.right.pop() + } + + /** + * Slice the buffer to get an array; + * does not move the cursor. + * + * @param {number} start + * Start. + * @param {number | null | undefined} [end] + * End (optional). + * @returns {Array} + * Array of items. + */ + slice(start, end) { + /** @type {number} */ + const stop = + end === null || end === undefined ? Number.POSITIVE_INFINITY : end + + if (stop < this.left.length) { + return this.left.slice(start, stop) + } + + if (start > this.left.length) { + return this.right + .slice( + this.right.length - stop + this.left.length, + this.right.length - start + this.left.length + ) + .reverse() + } + + return this.left + .slice(start) + .concat( + this.right.slice(this.right.length - stop + this.left.length).reverse() + ) + } + + /** + * Mimics the behavior of Array.prototype.splice() except for the change of + * interface necessary to avoid segfaults when patching in very large arrays. + * + * This operation moves cursor is moved to `start` and results in the cursor + * placed after any inserted items. + * + * @param {number} start + * Start; + * zero-based index at which to start changing the array; + * negative numbers count backwards from the end of the array and values + * that are out-of bounds are clamped to the appropriate end of the array. + * @param {number | null | undefined} [deleteCount=0] + * Delete count (default: `0`); + * maximum number of elements to delete, starting from start. + * @param {Array | null | undefined} [items=[]] + * Items to include in place of the deleted items (default: `[]`). + * @return {Array} + * Any removed items. + */ + splice(start, deleteCount, items) { + /** @type {number} */ + const count = deleteCount || 0 + + this.setCursor(Math.trunc(start)) + const removed = this.right.splice( + this.right.length - count, + Number.POSITIVE_INFINITY + ) + if (items) chunkedPush(this.left, items) + return removed.reverse() + } + + /** + * Remove and return the highest-numbered item in the array, so + * `list[list.length - 1]`; + * Moves the cursor to `length`. + * + * @returns {T | undefined} + * Item, optional. + */ + pop() { + this.setCursor(Number.POSITIVE_INFINITY) + return this.left.pop() + } + + /** + * Inserts a single item to the high-numbered side of the array; + * moves the cursor to `length`. + * + * @param {T} item + * Item. + * @returns {undefined} + * Nothing. + */ + push(item) { + this.setCursor(Number.POSITIVE_INFINITY) + this.left.push(item) + } + + /** + * Inserts many items to the high-numbered side of the array. + * Moves the cursor to `length`. + * + * @param {Array} items + * Items. + * @returns {undefined} + * Nothing. + */ + pushMany(items) { + this.setCursor(Number.POSITIVE_INFINITY) + chunkedPush(this.left, items) + } + + /** + * Inserts a single item to the low-numbered side of the array; + * Moves the cursor to `0`. + * + * @param {T} item + * Item. + * @returns {undefined} + * Nothing. + */ + unshift(item) { + this.setCursor(0) + this.right.push(item) + } + + /** + * Inserts many items to the low-numbered side of the array; + * moves the cursor to `0`. + * + * @param {Array} items + * Items. + * @returns {undefined} + * Nothing. + */ + unshiftMany(items) { + this.setCursor(0) + chunkedPush(this.right, items.reverse()) + } + + /** + * Move the cursor to a specific position in the array. Requires + * time proportional to the distance moved. + * + * If `n < 0`, the cursor will end up at the beginning. + * If `n > length`, the cursor will end up at the end. + * + * @param {number} n + * Position. + * @return {undefined} + * Nothing. + */ + setCursor(n) { + if ( + n === this.left.length || + (n > this.left.length && this.right.length === 0) || + (n < 0 && this.left.length === 0) + ) + return + if (n < this.left.length) { + // Move cursor to the this.left + const removed = this.left.splice(n, Number.POSITIVE_INFINITY) + chunkedPush(this.right, removed.reverse()) + } else { + // Move cursor to the this.right + const removed = this.right.splice( + this.left.length + this.right.length - n, + Number.POSITIVE_INFINITY + ) + chunkedPush(this.left, removed.reverse()) + } + } +} + +/** + * Avoid stack overflow by pushing items onto the stack in segments + * + * @template T + * Item type. + * @param {Array} list + * List to inject into. + * @param {ReadonlyArray} right + * Items to inject. + * @return {undefined} + * Nothing. + */ +function chunkedPush(list, right) { + /** @type {number} */ + let chunkStart = 0 + + if (right.length < constants.v8MaxSafeChunkSize) { + list.push(...right) + } else { + while (chunkStart < right.length) { + list.push( + ...right.slice(chunkStart, chunkStart + constants.v8MaxSafeChunkSize) + ) + chunkStart += constants.v8MaxSafeChunkSize + } + } +} diff --git a/node_modules/micromark-util-subtokenize/index.d.ts.map b/node_modules/micromark-util-subtokenize/index.d.ts.map new file mode 100644 index 000000000..86e4aba8e --- /dev/null +++ b/node_modules/micromark-util-subtokenize/index.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["index.js"],"names":[],"mappings":"AAcA;;;;;;;GAOG;AAEH,yCANW,2CAAY,GAEV,OAAO,CAkHnB;;oBApIY,OAAO,sBAAsB,EAAE,KAAK;oBACpC,OAAO,sBAAsB,EAAE,KAAK;oBACpC,OAAO,sBAAsB,EAAE,KAAK"} \ No newline at end of file diff --git a/node_modules/micromark-util-subtokenize/lib/splice-buffer.d.ts b/node_modules/micromark-util-subtokenize/lib/splice-buffer.d.ts new file mode 100644 index 000000000..34955307d --- /dev/null +++ b/node_modules/micromark-util-subtokenize/lib/splice-buffer.d.ts @@ -0,0 +1,161 @@ +/** + * Some of the internal operations of micromark do lots of editing + * operations on very large arrays. This runs into problems with two + * properties of most circa-2020 JavaScript interpreters: + * + * - Array-length modifications at the high end of an array (push/pop) are + * expected to be common and are implemented in (amortized) time + * proportional to the number of elements added or removed, whereas + * other operations (shift/unshift and splice) are much less efficient. + * - Function arguments are passed on the stack, so adding tens of thousands + * of elements to an array with `arr.push[...newElements]` will frequently + * cause stack overflows. (see ) + * + * SpliceBuffers are an implementation of gap buffers, which are a + * generalization of the "queue made of two stacks" idea. The splice buffer + * maintains a cursor, and moving the cursor has cost proportional to the + * distance the cursor moves, but inserting, deleting, or splicing in + * new information at the cursor is as efficient as the push/pop operation. + * This allows for an efficient sequence of splices (or pushes, pops, shifts, + * or unshifts) as long such edits happen at the same part of the array or + * generally sweep through the array from the beginning to the end. + * + * The interface for splice buffers also supports large numbers of inputs by + * passing a single array argument rather passing multiple arguments on the + * function call stack. + * + * @template T + * Item type. + */ +export class SpliceBuffer { + /** + * @param {ReadonlyArray | null | undefined} [initial] + * Initial items (optional). + * @returns + * Splice buffer. + */ + constructor(initial?: ReadonlyArray | null | undefined); + /** @type {Array} */ + left: Array; + /** @type {Array} */ + right: Array; + /** + * Array access; + * does not move the cursor. + * + * @param {number} index + * Index. + * @return {T} + * Item. + */ + get(index: number): T; + /** + * The length of the splice buffer, one greater than the largest index in the + * array. + */ + get length(): number; + /** + * Remove and return `list[0]`; + * moves the cursor to `0`. + * + * @returns {T | undefined} + * Item, optional. + */ + shift(): T | undefined; + /** + * Slice the buffer to get an array; + * does not move the cursor. + * + * @param {number} start + * Start. + * @param {number | null | undefined} [end] + * End (optional). + * @returns {Array} + * Array of items. + */ + slice(start: number, end?: number | null | undefined): Array; + /** + * Mimics the behavior of Array.prototype.splice() except for the change of + * interface necessary to avoid segfaults when patching in very large arrays. + * + * This operation moves cursor is moved to `start` and results in the cursor + * placed after any inserted items. + * + * @param {number} start + * Start; + * zero-based index at which to start changing the array; + * negative numbers count backwards from the end of the array and values + * that are out-of bounds are clamped to the appropriate end of the array. + * @param {number | null | undefined} [deleteCount=0] + * Delete count (default: `0`); + * maximum number of elements to delete, starting from start. + * @param {Array | null | undefined} [items=[]] + * Items to include in place of the deleted items (default: `[]`). + * @return {Array} + * Any removed items. + */ + splice(start: number, deleteCount?: number | null | undefined, items?: Array | null | undefined): Array; + /** + * Remove and return the highest-numbered item in the array, so + * `list[list.length - 1]`; + * Moves the cursor to `length`. + * + * @returns {T | undefined} + * Item, optional. + */ + pop(): T | undefined; + /** + * Inserts a single item to the high-numbered side of the array; + * moves the cursor to `length`. + * + * @param {T} item + * Item. + * @returns {undefined} + * Nothing. + */ + push(item: T): undefined; + /** + * Inserts many items to the high-numbered side of the array. + * Moves the cursor to `length`. + * + * @param {Array} items + * Items. + * @returns {undefined} + * Nothing. + */ + pushMany(items: Array): undefined; + /** + * Inserts a single item to the low-numbered side of the array; + * Moves the cursor to `0`. + * + * @param {T} item + * Item. + * @returns {undefined} + * Nothing. + */ + unshift(item: T): undefined; + /** + * Inserts many items to the low-numbered side of the array; + * moves the cursor to `0`. + * + * @param {Array} items + * Items. + * @returns {undefined} + * Nothing. + */ + unshiftMany(items: Array): undefined; + /** + * Move the cursor to a specific position in the array. Requires + * time proportional to the distance moved. + * + * If `n < 0`, the cursor will end up at the beginning. + * If `n > length`, the cursor will end up at the end. + * + * @param {number} n + * Position. + * @return {undefined} + * Nothing. + */ + setCursor(n: number): undefined; +} +//# sourceMappingURL=splice-buffer.d.ts.map \ No newline at end of file diff --git a/node_modules/micromark-util-subtokenize/lib/splice-buffer.d.ts.map b/node_modules/micromark-util-subtokenize/lib/splice-buffer.d.ts.map new file mode 100644 index 000000000..cb671d7f2 --- /dev/null +++ b/node_modules/micromark-util-subtokenize/lib/splice-buffer.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"splice-buffer.d.ts","sourceRoot":"","sources":["splice-buffer.js"],"names":[],"mappings":"AAEA;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA4BG;AACH;IACE;;;;;OAKG;IACH,sBALW,cAAc,CAAC,CAAC,GAAG,IAAI,GAAG,SAAS,EAU7C;IAJC,uBAAuB;IACvB,MADW,MAAM,CAAC,CAAC,CACoB;IACvC,uBAAuB;IACvB,OADW,MAAM,CAAC,CAAC,CACJ;IAGjB;;;;;;;;OAQG;IACH,WALW,MAAM,GAEL,CAAC,CAgBZ;IAED;;;OAGG;IACH,qBAEC;IAED;;;;;;OAMG;IACH,SAHa,CAAC,GAAG,SAAS,CAMzB;IAED;;;;;;;;;;OAUG;IACH,aAPW,MAAM,QAEN,MAAM,GAAG,IAAI,GAAG,SAAS,GAEvB,MAAM,CAAC,CAAC,CA0BpB;IAED;;;;;;;;;;;;;;;;;;;OAmBG;IACH,cAbW,MAAM,gBAKN,MAAM,GAAG,IAAI,GAAG,SAAS,UAGzB,MAAM,CAAC,CAAC,GAAG,IAAI,GAAG,SAAS,GAE1B,MAAM,CAAC,CAAC,CAcnB;IAED;;;;;;;OAOG;IACH,OAHa,CAAC,GAAG,SAAS,CAMzB;IAED;;;;;;;;OAQG;IACH,WALW,CAAC,GAEC,SAAS,CAMrB;IAED;;;;;;;;OAQG;IACH,gBALW,MAAM,CAAC,CAAC,GAEN,SAAS,CAMrB;IAED;;;;;;;;OAQG;IACH,cALW,CAAC,GAEC,SAAS,CAMrB;IAED;;;;;;;;OAQG;IACH,mBALW,MAAM,CAAC,CAAC,GAEN,SAAS,CAMrB;IAED;;;;;;;;;;;OAWG;IACH,aALW,MAAM,GAEL,SAAS,CAsBpB;CACF"} \ No newline at end of file diff --git a/node_modules/micromark-util-subtokenize/lib/splice-buffer.js b/node_modules/micromark-util-subtokenize/lib/splice-buffer.js new file mode 100644 index 000000000..4932c9730 --- /dev/null +++ b/node_modules/micromark-util-subtokenize/lib/splice-buffer.js @@ -0,0 +1,251 @@ +/** + * Some of the internal operations of micromark do lots of editing + * operations on very large arrays. This runs into problems with two + * properties of most circa-2020 JavaScript interpreters: + * + * - Array-length modifications at the high end of an array (push/pop) are + * expected to be common and are implemented in (amortized) time + * proportional to the number of elements added or removed, whereas + * other operations (shift/unshift and splice) are much less efficient. + * - Function arguments are passed on the stack, so adding tens of thousands + * of elements to an array with `arr.push[...newElements]` will frequently + * cause stack overflows. (see ) + * + * SpliceBuffers are an implementation of gap buffers, which are a + * generalization of the "queue made of two stacks" idea. The splice buffer + * maintains a cursor, and moving the cursor has cost proportional to the + * distance the cursor moves, but inserting, deleting, or splicing in + * new information at the cursor is as efficient as the push/pop operation. + * This allows for an efficient sequence of splices (or pushes, pops, shifts, + * or unshifts) as long such edits happen at the same part of the array or + * generally sweep through the array from the beginning to the end. + * + * The interface for splice buffers also supports large numbers of inputs by + * passing a single array argument rather passing multiple arguments on the + * function call stack. + * + * @template T + * Item type. + */ +export class SpliceBuffer { + /** + * @param {ReadonlyArray | null | undefined} [initial] + * Initial items (optional). + * @returns + * Splice buffer. + */ + constructor(initial) { + /** @type {Array} */ + this.left = initial ? [...initial] : []; + /** @type {Array} */ + this.right = []; + } + + /** + * Array access; + * does not move the cursor. + * + * @param {number} index + * Index. + * @return {T} + * Item. + */ + get(index) { + if (index < 0 || index >= this.left.length + this.right.length) { + throw new RangeError('Cannot access index `' + index + '` in a splice buffer of size `' + (this.left.length + this.right.length) + '`'); + } + if (index < this.left.length) return this.left[index]; + return this.right[this.right.length - index + this.left.length - 1]; + } + + /** + * The length of the splice buffer, one greater than the largest index in the + * array. + */ + get length() { + return this.left.length + this.right.length; + } + + /** + * Remove and return `list[0]`; + * moves the cursor to `0`. + * + * @returns {T | undefined} + * Item, optional. + */ + shift() { + this.setCursor(0); + return this.right.pop(); + } + + /** + * Slice the buffer to get an array; + * does not move the cursor. + * + * @param {number} start + * Start. + * @param {number | null | undefined} [end] + * End (optional). + * @returns {Array} + * Array of items. + */ + slice(start, end) { + /** @type {number} */ + const stop = end === null || end === undefined ? Number.POSITIVE_INFINITY : end; + if (stop < this.left.length) { + return this.left.slice(start, stop); + } + if (start > this.left.length) { + return this.right.slice(this.right.length - stop + this.left.length, this.right.length - start + this.left.length).reverse(); + } + return this.left.slice(start).concat(this.right.slice(this.right.length - stop + this.left.length).reverse()); + } + + /** + * Mimics the behavior of Array.prototype.splice() except for the change of + * interface necessary to avoid segfaults when patching in very large arrays. + * + * This operation moves cursor is moved to `start` and results in the cursor + * placed after any inserted items. + * + * @param {number} start + * Start; + * zero-based index at which to start changing the array; + * negative numbers count backwards from the end of the array and values + * that are out-of bounds are clamped to the appropriate end of the array. + * @param {number | null | undefined} [deleteCount=0] + * Delete count (default: `0`); + * maximum number of elements to delete, starting from start. + * @param {Array | null | undefined} [items=[]] + * Items to include in place of the deleted items (default: `[]`). + * @return {Array} + * Any removed items. + */ + splice(start, deleteCount, items) { + /** @type {number} */ + const count = deleteCount || 0; + this.setCursor(Math.trunc(start)); + const removed = this.right.splice(this.right.length - count, Number.POSITIVE_INFINITY); + if (items) chunkedPush(this.left, items); + return removed.reverse(); + } + + /** + * Remove and return the highest-numbered item in the array, so + * `list[list.length - 1]`; + * Moves the cursor to `length`. + * + * @returns {T | undefined} + * Item, optional. + */ + pop() { + this.setCursor(Number.POSITIVE_INFINITY); + return this.left.pop(); + } + + /** + * Inserts a single item to the high-numbered side of the array; + * moves the cursor to `length`. + * + * @param {T} item + * Item. + * @returns {undefined} + * Nothing. + */ + push(item) { + this.setCursor(Number.POSITIVE_INFINITY); + this.left.push(item); + } + + /** + * Inserts many items to the high-numbered side of the array. + * Moves the cursor to `length`. + * + * @param {Array} items + * Items. + * @returns {undefined} + * Nothing. + */ + pushMany(items) { + this.setCursor(Number.POSITIVE_INFINITY); + chunkedPush(this.left, items); + } + + /** + * Inserts a single item to the low-numbered side of the array; + * Moves the cursor to `0`. + * + * @param {T} item + * Item. + * @returns {undefined} + * Nothing. + */ + unshift(item) { + this.setCursor(0); + this.right.push(item); + } + + /** + * Inserts many items to the low-numbered side of the array; + * moves the cursor to `0`. + * + * @param {Array} items + * Items. + * @returns {undefined} + * Nothing. + */ + unshiftMany(items) { + this.setCursor(0); + chunkedPush(this.right, items.reverse()); + } + + /** + * Move the cursor to a specific position in the array. Requires + * time proportional to the distance moved. + * + * If `n < 0`, the cursor will end up at the beginning. + * If `n > length`, the cursor will end up at the end. + * + * @param {number} n + * Position. + * @return {undefined} + * Nothing. + */ + setCursor(n) { + if (n === this.left.length || n > this.left.length && this.right.length === 0 || n < 0 && this.left.length === 0) return; + if (n < this.left.length) { + // Move cursor to the this.left + const removed = this.left.splice(n, Number.POSITIVE_INFINITY); + chunkedPush(this.right, removed.reverse()); + } else { + // Move cursor to the this.right + const removed = this.right.splice(this.left.length + this.right.length - n, Number.POSITIVE_INFINITY); + chunkedPush(this.left, removed.reverse()); + } + } +} + +/** + * Avoid stack overflow by pushing items onto the stack in segments + * + * @template T + * Item type. + * @param {Array} list + * List to inject into. + * @param {ReadonlyArray} right + * Items to inject. + * @return {undefined} + * Nothing. + */ +function chunkedPush(list, right) { + /** @type {number} */ + let chunkStart = 0; + if (right.length < 10000) { + list.push(...right); + } else { + while (chunkStart < right.length) { + list.push(...right.slice(chunkStart, chunkStart + 10000)); + chunkStart += 10000; + } + } +} \ No newline at end of file diff --git a/node_modules/micromark-util-subtokenize/license b/node_modules/micromark-util-subtokenize/license new file mode 100644 index 000000000..bc8f165a6 --- /dev/null +++ b/node_modules/micromark-util-subtokenize/license @@ -0,0 +1,22 @@ +(The MIT License) + +Copyright (c) Titus Wormer + +Permission is hereby granted, free of charge, to any person obtaining +a copy of this software and associated documentation files (the +'Software'), to deal in the Software without restriction, including +without limitation the rights to use, copy, modify, merge, publish, +distribute, sublicense, and/or sell copies of the Software, and to +permit persons to whom the Software is furnished to do so, subject to +the following conditions: + +The above copyright notice and this permission notice shall be +included in all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED 'AS IS', WITHOUT WARRANTY OF ANY KIND, +EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF +MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. +IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY +CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, +TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE +SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. diff --git a/node_modules/minimatch/dist/commonjs/assert-valid-pattern.d.ts b/node_modules/minimatch/dist/commonjs/assert-valid-pattern.d.ts new file mode 100644 index 000000000..8e318b23a --- /dev/null +++ b/node_modules/minimatch/dist/commonjs/assert-valid-pattern.d.ts @@ -0,0 +1,2 @@ +export declare const assertValidPattern: (pattern: any) => void; +//# sourceMappingURL=assert-valid-pattern.d.ts.map \ No newline at end of file diff --git a/node_modules/minimatch/dist/commonjs/assert-valid-pattern.d.ts.map b/node_modules/minimatch/dist/commonjs/assert-valid-pattern.d.ts.map new file mode 100644 index 000000000..c61c03109 --- /dev/null +++ b/node_modules/minimatch/dist/commonjs/assert-valid-pattern.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"assert-valid-pattern.d.ts","sourceRoot":"","sources":["../../src/assert-valid-pattern.ts"],"names":[],"mappings":"AACA,eAAO,MAAM,kBAAkB,EAAE,CAAC,OAAO,EAAE,GAAG,KAAK,IAUlD,CAAA"} \ No newline at end of file diff --git a/node_modules/minimatch/dist/commonjs/assert-valid-pattern.js b/node_modules/minimatch/dist/commonjs/assert-valid-pattern.js new file mode 100644 index 000000000..5fc86bbd0 --- /dev/null +++ b/node_modules/minimatch/dist/commonjs/assert-valid-pattern.js @@ -0,0 +1,14 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.assertValidPattern = void 0; +const MAX_PATTERN_LENGTH = 1024 * 64; +const assertValidPattern = (pattern) => { + if (typeof pattern !== 'string') { + throw new TypeError('invalid pattern'); + } + if (pattern.length > MAX_PATTERN_LENGTH) { + throw new TypeError('pattern is too long'); + } +}; +exports.assertValidPattern = assertValidPattern; +//# sourceMappingURL=assert-valid-pattern.js.map \ No newline at end of file diff --git a/node_modules/minimatch/dist/commonjs/assert-valid-pattern.js.map b/node_modules/minimatch/dist/commonjs/assert-valid-pattern.js.map new file mode 100644 index 000000000..d43215c69 --- /dev/null +++ b/node_modules/minimatch/dist/commonjs/assert-valid-pattern.js.map @@ -0,0 +1 @@ +{"version":3,"file":"assert-valid-pattern.js","sourceRoot":"","sources":["../../src/assert-valid-pattern.ts"],"names":[],"mappings":";;;AAAA,MAAM,kBAAkB,GAAG,IAAI,GAAG,EAAE,CAAA;AAC7B,MAAM,kBAAkB,GAA2B,CACxD,OAAY,EACe,EAAE;IAC7B,IAAI,OAAO,OAAO,KAAK,QAAQ,EAAE;QAC/B,MAAM,IAAI,SAAS,CAAC,iBAAiB,CAAC,CAAA;KACvC;IAED,IAAI,OAAO,CAAC,MAAM,GAAG,kBAAkB,EAAE;QACvC,MAAM,IAAI,SAAS,CAAC,qBAAqB,CAAC,CAAA;KAC3C;AACH,CAAC,CAAA;AAVY,QAAA,kBAAkB,sBAU9B","sourcesContent":["const MAX_PATTERN_LENGTH = 1024 * 64\nexport const assertValidPattern: (pattern: any) => void = (\n pattern: any\n): asserts pattern is string => {\n if (typeof pattern !== 'string') {\n throw new TypeError('invalid pattern')\n }\n\n if (pattern.length > MAX_PATTERN_LENGTH) {\n throw new TypeError('pattern is too long')\n }\n}\n"]} \ No newline at end of file diff --git a/node_modules/minimatch/dist/commonjs/ast.d.ts b/node_modules/minimatch/dist/commonjs/ast.d.ts new file mode 100644 index 000000000..b8c1e5448 --- /dev/null +++ b/node_modules/minimatch/dist/commonjs/ast.d.ts @@ -0,0 +1,20 @@ +import { MinimatchOptions, MMRegExp } from './index.js'; +export type ExtglobType = '!' | '?' | '+' | '*' | '@'; +export declare class AST { + #private; + type: ExtglobType | null; + constructor(type: ExtglobType | null, parent?: AST, options?: MinimatchOptions); + get hasMagic(): boolean | undefined; + toString(): string; + push(...parts: (string | AST)[]): void; + toJSON(): any[]; + isStart(): boolean; + isEnd(): boolean; + copyIn(part: AST | string): void; + clone(parent: AST): AST; + static fromGlob(pattern: string, options?: MinimatchOptions): AST; + toMMPattern(): MMRegExp | string; + get options(): MinimatchOptions; + toRegExpSource(allowDot?: boolean): [re: string, body: string, hasMagic: boolean, uflag: boolean]; +} +//# sourceMappingURL=ast.d.ts.map \ No newline at end of file diff --git a/node_modules/minimatch/dist/commonjs/ast.d.ts.map b/node_modules/minimatch/dist/commonjs/ast.d.ts.map new file mode 100644 index 000000000..9e7bfb9a8 --- /dev/null +++ b/node_modules/minimatch/dist/commonjs/ast.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"ast.d.ts","sourceRoot":"","sources":["../../src/ast.ts"],"names":[],"mappings":"AAGA,OAAO,EAAE,gBAAgB,EAAE,QAAQ,EAAE,MAAM,YAAY,CAAA;AAwCvD,MAAM,MAAM,WAAW,GAAG,GAAG,GAAG,GAAG,GAAG,GAAG,GAAG,GAAG,GAAG,GAAG,CAAA;AAkCrD,qBAAa,GAAG;;IACd,IAAI,EAAE,WAAW,GAAG,IAAI,CAAA;gBAiBtB,IAAI,EAAE,WAAW,GAAG,IAAI,EACxB,MAAM,CAAC,EAAE,GAAG,EACZ,OAAO,GAAE,gBAAqB;IAahC,IAAI,QAAQ,IAAI,OAAO,GAAG,SAAS,CAUlC;IAGD,QAAQ,IAAI,MAAM;IA+ClB,IAAI,CAAC,GAAG,KAAK,EAAE,CAAC,MAAM,GAAG,GAAG,CAAC,EAAE;IAY/B,MAAM;IAgBN,OAAO,IAAI,OAAO;IAgBlB,KAAK,IAAI,OAAO;IAYhB,MAAM,CAAC,IAAI,EAAE,GAAG,GAAG,MAAM;IAKzB,KAAK,CAAC,MAAM,EAAE,GAAG;IAsIjB,MAAM,CAAC,QAAQ,CAAC,OAAO,EAAE,MAAM,EAAE,OAAO,GAAE,gBAAqB;IAQ/D,WAAW,IAAI,QAAQ,GAAG,MAAM;IA2BhC,IAAI,OAAO,qBAEV;IAuED,cAAc,CACZ,QAAQ,CAAC,EAAE,OAAO,GACjB,CAAC,EAAE,EAAE,MAAM,EAAE,IAAI,EAAE,MAAM,EAAE,QAAQ,EAAE,OAAO,EAAE,KAAK,EAAE,OAAO,CAAC;CAiMjE"} \ No newline at end of file diff --git a/node_modules/minimatch/dist/commonjs/ast.js b/node_modules/minimatch/dist/commonjs/ast.js new file mode 100644 index 000000000..7b2109625 --- /dev/null +++ b/node_modules/minimatch/dist/commonjs/ast.js @@ -0,0 +1,592 @@ +"use strict"; +// parse a single path portion +Object.defineProperty(exports, "__esModule", { value: true }); +exports.AST = void 0; +const brace_expressions_js_1 = require("./brace-expressions.js"); +const unescape_js_1 = require("./unescape.js"); +const types = new Set(['!', '?', '+', '*', '@']); +const isExtglobType = (c) => types.has(c); +// Patterns that get prepended to bind to the start of either the +// entire string, or just a single path portion, to prevent dots +// and/or traversal patterns, when needed. +// Exts don't need the ^ or / bit, because the root binds that already. +const startNoTraversal = '(?!(?:^|/)\\.\\.?(?:$|/))'; +const startNoDot = '(?!\\.)'; +// characters that indicate a start of pattern needs the "no dots" bit, +// because a dot *might* be matched. ( is not in the list, because in +// the case of a child extglob, it will handle the prevention itself. +const addPatternStart = new Set(['[', '.']); +// cases where traversal is A-OK, no dot prevention needed +const justDots = new Set(['..', '.']); +const reSpecials = new Set('().*{}+?[]^$\\!'); +const regExpEscape = (s) => s.replace(/[-[\]{}()*+?.,\\^$|#\s]/g, '\\$&'); +// any single thing other than / +const qmark = '[^/]'; +// * => any number of characters +const star = qmark + '*?'; +// use + when we need to ensure that *something* matches, because the * is +// the only thing in the path portion. +const starNoEmpty = qmark + '+?'; +// remove the \ chars that we added if we end up doing a nonmagic compare +// const deslash = (s: string) => s.replace(/\\(.)/g, '$1') +class AST { + type; + #root; + #hasMagic; + #uflag = false; + #parts = []; + #parent; + #parentIndex; + #negs; + #filledNegs = false; + #options; + #toString; + // set to true if it's an extglob with no children + // (which really means one child of '') + #emptyExt = false; + constructor(type, parent, options = {}) { + this.type = type; + // extglobs are inherently magical + if (type) + this.#hasMagic = true; + this.#parent = parent; + this.#root = this.#parent ? this.#parent.#root : this; + this.#options = this.#root === this ? options : this.#root.#options; + this.#negs = this.#root === this ? [] : this.#root.#negs; + if (type === '!' && !this.#root.#filledNegs) + this.#negs.push(this); + this.#parentIndex = this.#parent ? this.#parent.#parts.length : 0; + } + get hasMagic() { + /* c8 ignore start */ + if (this.#hasMagic !== undefined) + return this.#hasMagic; + /* c8 ignore stop */ + for (const p of this.#parts) { + if (typeof p === 'string') + continue; + if (p.type || p.hasMagic) + return (this.#hasMagic = true); + } + // note: will be undefined until we generate the regexp src and find out + return this.#hasMagic; + } + // reconstructs the pattern + toString() { + if (this.#toString !== undefined) + return this.#toString; + if (!this.type) { + return (this.#toString = this.#parts.map(p => String(p)).join('')); + } + else { + return (this.#toString = + this.type + '(' + this.#parts.map(p => String(p)).join('|') + ')'); + } + } + #fillNegs() { + /* c8 ignore start */ + if (this !== this.#root) + throw new Error('should only call on root'); + if (this.#filledNegs) + return this; + /* c8 ignore stop */ + // call toString() once to fill this out + this.toString(); + this.#filledNegs = true; + let n; + while ((n = this.#negs.pop())) { + if (n.type !== '!') + continue; + // walk up the tree, appending everthing that comes AFTER parentIndex + let p = n; + let pp = p.#parent; + while (pp) { + for (let i = p.#parentIndex + 1; !pp.type && i < pp.#parts.length; i++) { + for (const part of n.#parts) { + /* c8 ignore start */ + if (typeof part === 'string') { + throw new Error('string part in extglob AST??'); + } + /* c8 ignore stop */ + part.copyIn(pp.#parts[i]); + } + } + p = pp; + pp = p.#parent; + } + } + return this; + } + push(...parts) { + for (const p of parts) { + if (p === '') + continue; + /* c8 ignore start */ + if (typeof p !== 'string' && !(p instanceof AST && p.#parent === this)) { + throw new Error('invalid part: ' + p); + } + /* c8 ignore stop */ + this.#parts.push(p); + } + } + toJSON() { + const ret = this.type === null + ? this.#parts.slice().map(p => (typeof p === 'string' ? p : p.toJSON())) + : [this.type, ...this.#parts.map(p => p.toJSON())]; + if (this.isStart() && !this.type) + ret.unshift([]); + if (this.isEnd() && + (this === this.#root || + (this.#root.#filledNegs && this.#parent?.type === '!'))) { + ret.push({}); + } + return ret; + } + isStart() { + if (this.#root === this) + return true; + // if (this.type) return !!this.#parent?.isStart() + if (!this.#parent?.isStart()) + return false; + if (this.#parentIndex === 0) + return true; + // if everything AHEAD of this is a negation, then it's still the "start" + const p = this.#parent; + for (let i = 0; i < this.#parentIndex; i++) { + const pp = p.#parts[i]; + if (!(pp instanceof AST && pp.type === '!')) { + return false; + } + } + return true; + } + isEnd() { + if (this.#root === this) + return true; + if (this.#parent?.type === '!') + return true; + if (!this.#parent?.isEnd()) + return false; + if (!this.type) + return this.#parent?.isEnd(); + // if not root, it'll always have a parent + /* c8 ignore start */ + const pl = this.#parent ? this.#parent.#parts.length : 0; + /* c8 ignore stop */ + return this.#parentIndex === pl - 1; + } + copyIn(part) { + if (typeof part === 'string') + this.push(part); + else + this.push(part.clone(this)); + } + clone(parent) { + const c = new AST(this.type, parent); + for (const p of this.#parts) { + c.copyIn(p); + } + return c; + } + static #parseAST(str, ast, pos, opt) { + let escaping = false; + let inBrace = false; + let braceStart = -1; + let braceNeg = false; + if (ast.type === null) { + // outside of a extglob, append until we find a start + let i = pos; + let acc = ''; + while (i < str.length) { + const c = str.charAt(i++); + // still accumulate escapes at this point, but we do ignore + // starts that are escaped + if (escaping || c === '\\') { + escaping = !escaping; + acc += c; + continue; + } + if (inBrace) { + if (i === braceStart + 1) { + if (c === '^' || c === '!') { + braceNeg = true; + } + } + else if (c === ']' && !(i === braceStart + 2 && braceNeg)) { + inBrace = false; + } + acc += c; + continue; + } + else if (c === '[') { + inBrace = true; + braceStart = i; + braceNeg = false; + acc += c; + continue; + } + if (!opt.noext && isExtglobType(c) && str.charAt(i) === '(') { + ast.push(acc); + acc = ''; + const ext = new AST(c, ast); + i = AST.#parseAST(str, ext, i, opt); + ast.push(ext); + continue; + } + acc += c; + } + ast.push(acc); + return i; + } + // some kind of extglob, pos is at the ( + // find the next | or ) + let i = pos + 1; + let part = new AST(null, ast); + const parts = []; + let acc = ''; + while (i < str.length) { + const c = str.charAt(i++); + // still accumulate escapes at this point, but we do ignore + // starts that are escaped + if (escaping || c === '\\') { + escaping = !escaping; + acc += c; + continue; + } + if (inBrace) { + if (i === braceStart + 1) { + if (c === '^' || c === '!') { + braceNeg = true; + } + } + else if (c === ']' && !(i === braceStart + 2 && braceNeg)) { + inBrace = false; + } + acc += c; + continue; + } + else if (c === '[') { + inBrace = true; + braceStart = i; + braceNeg = false; + acc += c; + continue; + } + if (isExtglobType(c) && str.charAt(i) === '(') { + part.push(acc); + acc = ''; + const ext = new AST(c, part); + part.push(ext); + i = AST.#parseAST(str, ext, i, opt); + continue; + } + if (c === '|') { + part.push(acc); + acc = ''; + parts.push(part); + part = new AST(null, ast); + continue; + } + if (c === ')') { + if (acc === '' && ast.#parts.length === 0) { + ast.#emptyExt = true; + } + part.push(acc); + acc = ''; + ast.push(...parts, part); + return i; + } + acc += c; + } + // unfinished extglob + // if we got here, it was a malformed extglob! not an extglob, but + // maybe something else in there. + ast.type = null; + ast.#hasMagic = undefined; + ast.#parts = [str.substring(pos - 1)]; + return i; + } + static fromGlob(pattern, options = {}) { + const ast = new AST(null, undefined, options); + AST.#parseAST(pattern, ast, 0, options); + return ast; + } + // returns the regular expression if there's magic, or the unescaped + // string if not. + toMMPattern() { + // should only be called on root + /* c8 ignore start */ + if (this !== this.#root) + return this.#root.toMMPattern(); + /* c8 ignore stop */ + const glob = this.toString(); + const [re, body, hasMagic, uflag] = this.toRegExpSource(); + // if we're in nocase mode, and not nocaseMagicOnly, then we do + // still need a regular expression if we have to case-insensitively + // match capital/lowercase characters. + const anyMagic = hasMagic || + this.#hasMagic || + (this.#options.nocase && + !this.#options.nocaseMagicOnly && + glob.toUpperCase() !== glob.toLowerCase()); + if (!anyMagic) { + return body; + } + const flags = (this.#options.nocase ? 'i' : '') + (uflag ? 'u' : ''); + return Object.assign(new RegExp(`^${re}$`, flags), { + _src: re, + _glob: glob, + }); + } + get options() { + return this.#options; + } + // returns the string match, the regexp source, whether there's magic + // in the regexp (so a regular expression is required) and whether or + // not the uflag is needed for the regular expression (for posix classes) + // TODO: instead of injecting the start/end at this point, just return + // the BODY of the regexp, along with the start/end portions suitable + // for binding the start/end in either a joined full-path makeRe context + // (where we bind to (^|/), or a standalone matchPart context (where + // we bind to ^, and not /). Otherwise slashes get duped! + // + // In part-matching mode, the start is: + // - if not isStart: nothing + // - if traversal possible, but not allowed: ^(?!\.\.?$) + // - if dots allowed or not possible: ^ + // - if dots possible and not allowed: ^(?!\.) + // end is: + // - if not isEnd(): nothing + // - else: $ + // + // In full-path matching mode, we put the slash at the START of the + // pattern, so start is: + // - if first pattern: same as part-matching mode + // - if not isStart(): nothing + // - if traversal possible, but not allowed: /(?!\.\.?(?:$|/)) + // - if dots allowed or not possible: / + // - if dots possible and not allowed: /(?!\.) + // end is: + // - if last pattern, same as part-matching mode + // - else nothing + // + // Always put the (?:$|/) on negated tails, though, because that has to be + // there to bind the end of the negated pattern portion, and it's easier to + // just stick it in now rather than try to inject it later in the middle of + // the pattern. + // + // We can just always return the same end, and leave it up to the caller + // to know whether it's going to be used joined or in parts. + // And, if the start is adjusted slightly, can do the same there: + // - if not isStart: nothing + // - if traversal possible, but not allowed: (?:/|^)(?!\.\.?$) + // - if dots allowed or not possible: (?:/|^) + // - if dots possible and not allowed: (?:/|^)(?!\.) + // + // But it's better to have a simpler binding without a conditional, for + // performance, so probably better to return both start options. + // + // Then the caller just ignores the end if it's not the first pattern, + // and the start always gets applied. + // + // But that's always going to be $ if it's the ending pattern, or nothing, + // so the caller can just attach $ at the end of the pattern when building. + // + // So the todo is: + // - better detect what kind of start is needed + // - return both flavors of starting pattern + // - attach $ at the end of the pattern when creating the actual RegExp + // + // Ah, but wait, no, that all only applies to the root when the first pattern + // is not an extglob. If the first pattern IS an extglob, then we need all + // that dot prevention biz to live in the extglob portions, because eg + // +(*|.x*) can match .xy but not .yx. + // + // So, return the two flavors if it's #root and the first child is not an + // AST, otherwise leave it to the child AST to handle it, and there, + // use the (?:^|/) style of start binding. + // + // Even simplified further: + // - Since the start for a join is eg /(?!\.) and the start for a part + // is ^(?!\.), we can just prepend (?!\.) to the pattern (either root + // or start or whatever) and prepend ^ or / at the Regexp construction. + toRegExpSource(allowDot) { + const dot = allowDot ?? !!this.#options.dot; + if (this.#root === this) + this.#fillNegs(); + if (!this.type) { + const noEmpty = this.isStart() && this.isEnd(); + const src = this.#parts + .map(p => { + const [re, _, hasMagic, uflag] = typeof p === 'string' + ? AST.#parseGlob(p, this.#hasMagic, noEmpty) + : p.toRegExpSource(allowDot); + this.#hasMagic = this.#hasMagic || hasMagic; + this.#uflag = this.#uflag || uflag; + return re; + }) + .join(''); + let start = ''; + if (this.isStart()) { + if (typeof this.#parts[0] === 'string') { + // this is the string that will match the start of the pattern, + // so we need to protect against dots and such. + // '.' and '..' cannot match unless the pattern is that exactly, + // even if it starts with . or dot:true is set. + const dotTravAllowed = this.#parts.length === 1 && justDots.has(this.#parts[0]); + if (!dotTravAllowed) { + const aps = addPatternStart; + // check if we have a possibility of matching . or .., + // and prevent that. + const needNoTrav = + // dots are allowed, and the pattern starts with [ or . + (dot && aps.has(src.charAt(0))) || + // the pattern starts with \., and then [ or . + (src.startsWith('\\.') && aps.has(src.charAt(2))) || + // the pattern starts with \.\., and then [ or . + (src.startsWith('\\.\\.') && aps.has(src.charAt(4))); + // no need to prevent dots if it can't match a dot, or if a + // sub-pattern will be preventing it anyway. + const needNoDot = !dot && !allowDot && aps.has(src.charAt(0)); + start = needNoTrav ? startNoTraversal : needNoDot ? startNoDot : ''; + } + } + } + // append the "end of path portion" pattern to negation tails + let end = ''; + if (this.isEnd() && + this.#root.#filledNegs && + this.#parent?.type === '!') { + end = '(?:$|\\/)'; + } + const final = start + src + end; + return [ + final, + (0, unescape_js_1.unescape)(src), + (this.#hasMagic = !!this.#hasMagic), + this.#uflag, + ]; + } + // We need to calculate the body *twice* if it's a repeat pattern + // at the start, once in nodot mode, then again in dot mode, so a + // pattern like *(?) can match 'x.y' + const repeated = this.type === '*' || this.type === '+'; + // some kind of extglob + const start = this.type === '!' ? '(?:(?!(?:' : '(?:'; + let body = this.#partsToRegExp(dot); + if (this.isStart() && this.isEnd() && !body && this.type !== '!') { + // invalid extglob, has to at least be *something* present, if it's + // the entire path portion. + const s = this.toString(); + this.#parts = [s]; + this.type = null; + this.#hasMagic = undefined; + return [s, (0, unescape_js_1.unescape)(this.toString()), false, false]; + } + // XXX abstract out this map method + let bodyDotAllowed = !repeated || allowDot || dot || !startNoDot + ? '' + : this.#partsToRegExp(true); + if (bodyDotAllowed === body) { + bodyDotAllowed = ''; + } + if (bodyDotAllowed) { + body = `(?:${body})(?:${bodyDotAllowed})*?`; + } + // an empty !() is exactly equivalent to a starNoEmpty + let final = ''; + if (this.type === '!' && this.#emptyExt) { + final = (this.isStart() && !dot ? startNoDot : '') + starNoEmpty; + } + else { + const close = this.type === '!' + ? // !() must match something,but !(x) can match '' + '))' + + (this.isStart() && !dot && !allowDot ? startNoDot : '') + + star + + ')' + : this.type === '@' + ? ')' + : this.type === '?' + ? ')?' + : this.type === '+' && bodyDotAllowed + ? ')' + : this.type === '*' && bodyDotAllowed + ? `)?` + : `)${this.type}`; + final = start + body + close; + } + return [ + final, + (0, unescape_js_1.unescape)(body), + (this.#hasMagic = !!this.#hasMagic), + this.#uflag, + ]; + } + #partsToRegExp(dot) { + return this.#parts + .map(p => { + // extglob ASTs should only contain parent ASTs + /* c8 ignore start */ + if (typeof p === 'string') { + throw new Error('string type in extglob ast??'); + } + /* c8 ignore stop */ + // can ignore hasMagic, because extglobs are already always magic + const [re, _, _hasMagic, uflag] = p.toRegExpSource(dot); + this.#uflag = this.#uflag || uflag; + return re; + }) + .filter(p => !(this.isStart() && this.isEnd()) || !!p) + .join('|'); + } + static #parseGlob(glob, hasMagic, noEmpty = false) { + let escaping = false; + let re = ''; + let uflag = false; + for (let i = 0; i < glob.length; i++) { + const c = glob.charAt(i); + if (escaping) { + escaping = false; + re += (reSpecials.has(c) ? '\\' : '') + c; + continue; + } + if (c === '\\') { + if (i === glob.length - 1) { + re += '\\\\'; + } + else { + escaping = true; + } + continue; + } + if (c === '[') { + const [src, needUflag, consumed, magic] = (0, brace_expressions_js_1.parseClass)(glob, i); + if (consumed) { + re += src; + uflag = uflag || needUflag; + i += consumed - 1; + hasMagic = hasMagic || magic; + continue; + } + } + if (c === '*') { + if (noEmpty && glob === '*') + re += starNoEmpty; + else + re += star; + hasMagic = true; + continue; + } + if (c === '?') { + re += qmark; + hasMagic = true; + continue; + } + re += regExpEscape(c); + } + return [re, (0, unescape_js_1.unescape)(glob), !!hasMagic, uflag]; + } +} +exports.AST = AST; +//# sourceMappingURL=ast.js.map \ No newline at end of file diff --git a/node_modules/minimatch/dist/commonjs/ast.js.map b/node_modules/minimatch/dist/commonjs/ast.js.map new file mode 100644 index 000000000..8383e433b --- /dev/null +++ b/node_modules/minimatch/dist/commonjs/ast.js.map @@ -0,0 +1 @@ +{"version":3,"file":"ast.js","sourceRoot":"","sources":["../../src/ast.ts"],"names":[],"mappings":";AAAA,8BAA8B;;;AAE9B,iEAAmD;AAEnD,+CAAwC;AAwCxC,MAAM,KAAK,GAAG,IAAI,GAAG,CAAc,CAAC,GAAG,EAAE,GAAG,EAAE,GAAG,EAAE,GAAG,EAAE,GAAG,CAAC,CAAC,CAAA;AAC7D,MAAM,aAAa,GAAG,CAAC,CAAS,EAAoB,EAAE,CACpD,KAAK,CAAC,GAAG,CAAC,CAAgB,CAAC,CAAA;AAE7B,iEAAiE;AACjE,gEAAgE;AAChE,0CAA0C;AAC1C,uEAAuE;AACvE,MAAM,gBAAgB,GAAG,2BAA2B,CAAA;AACpD,MAAM,UAAU,GAAG,SAAS,CAAA;AAE5B,uEAAuE;AACvE,qEAAqE;AACrE,qEAAqE;AACrE,MAAM,eAAe,GAAG,IAAI,GAAG,CAAC,CAAC,GAAG,EAAE,GAAG,CAAC,CAAC,CAAA;AAC3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Q;iBACT;aACF;YACD,IAAI,CAAC,KAAK,GAAG,EAAE;gBACb,IAAI,OAAO,IAAI,IAAI,KAAK,GAAG;oBAAE,EAAE,IAAI,WAAW,CAAA;;oBACzC,EAAE,IAAI,IAAI,CAAA;gBACf,QAAQ,GAAG,IAAI,CAAA;gBACf,SAAQ;aACT;YACD,IAAI,CAAC,KAAK,GAAG,EAAE;gBACb,EAAE,IAAI,KAAK,CAAA;gBACX,QAAQ,GAAG,IAAI,CAAA;gBACf,SAAQ;aACT;YACD,EAAE,IAAI,YAAY,CAAC,CAAC,CAAC,CAAA;SACtB;QACD,OAAO,CAAC,EAAE,EAAE,IAAA,sBAAQ,EAAC,IAAI,CAAC,EAAE,CAAC,CAAC,QAAQ,EAAE,KAAK,CAAC,CAAA;IAChD,CAAC;CACF;AA/kBD,kBA+kBC","sourcesContent":["// parse a single path portion\n\nimport { parseClass } from './brace-expressions.js'\nimport { MinimatchOptions, MMRegExp } from './index.js'\nimport { unescape } from './unescape.js'\n\n// classes [] are handled by the parseClass method\n// for positive extglobs, we sub-parse the contents, and combine,\n// with the appropriate regexp close.\n// for negative extglobs, we sub-parse the contents, but then\n// have to include the rest of the pattern, then the parent, etc.,\n// as the thing that cannot be because RegExp negative lookaheads\n// are different from globs.\n//\n// So for example:\n// a@(i|w!(x|y)z|j)b => ^a(i|w((!?(x|y)zb).*)z|j)b$\n// 1 2 3 4 5 6 1 2 3 46 5 6\n//\n// Assembling the extglob requires not just the negated patterns themselves,\n// but also anything following the negative patterns up to the boundary\n// of the current pattern, plus anything following in the parent pattern.\n//\n//\n// So, first, we parse the string into an AST of extglobs, without turning\n// anything into regexps yet.\n//\n// ['a', {@ [['i'], ['w', {!['x', 'y']}, 'z'], ['j']]}, 'b']\n//\n// Then, for all the negative extglobs, we append whatever comes after in\n// each parent as their tail\n//\n// ['a', {@ [['i'], ['w', {!['x', 'y'], 'z', 'b'}, 'z'], ['j']]}, 'b']\n//\n// Lastly, we turn each of these pieces into a regexp, and join\n//\n// v----- .* because there's more following,\n// v v otherwise, .+ because it must be\n// v v *something* there.\n// ['^a', {@ ['i', 'w(?:(!?(?:x|y).*zb$).*)z', 'j' ]}, 'b$']\n// copy what follows into here--^^^^^\n// ['^a', '(?:i|w(?:(?!(?:x|y).*zb$).*)z|j)', 'b$']\n// ['^a(?:i|w(?:(?!(?:x|y).*zb$).*)z|j)b$']\n\nexport type ExtglobType = '!' | '?' | '+' | '*' | '@'\nconst types = new Set(['!', '?', '+', '*', '@'])\nconst isExtglobType = (c: string): c is ExtglobType =>\n types.has(c as ExtglobType)\n\n// Patterns that get prepended to bind to the start of either the\n// entire string, or just a single path portion, to prevent dots\n// and/or traversal patterns, when needed.\n// Exts don't need the ^ or / bit, because the root binds that already.\nconst startNoTraversal = '(?!(?:^|/)\\\\.\\\\.?(?:$|/))'\nconst startNoDot = '(?!\\\\.)'\n\n// characters that indicate a start of pattern needs the \"no dots\" bit,\n// because a dot *might* be matched. ( is not in the list, because in\n// the case of a child extglob, it will handle the prevention itself.\nconst addPatternStart = new Set(['[', '.'])\n// cases where traversal is A-OK, no dot prevention needed\nconst justDots = new Set(['..', '.'])\nconst reSpecials = new Set('().*{}+?[]^$\\\\!')\nconst regExpEscape = (s: string) =>\n s.replace(/[-[\\]{}()*+?.,\\\\^$|#\\s]/g, '\\\\$&')\n\n// any single thing other than /\nconst qmark = '[^/]'\n\n// * => any number of characters\nconst star = qmark + '*?'\n// use + when we need to ensure that *something* matches, because the * is\n// the only thing in the path portion.\nconst starNoEmpty = qmark + '+?'\n\n// remove the \\ chars that we added if we end up doing a nonmagic compare\n// const deslash = (s: string) => s.replace(/\\\\(.)/g, '$1')\n\nexport class AST {\n type: ExtglobType | null\n readonly #root: AST\n\n #hasMagic?: boolean\n #uflag: boolean = false\n #parts: (string | AST)[] = []\n readonly #parent?: AST\n readonly #parentIndex: number\n #negs: AST[]\n #filledNegs: boolean = false\n #options: MinimatchOptions\n #toString?: string\n // set to true if it's an extglob with no children\n // (which really means one child of '')\n #emptyExt: boolean = false\n\n constructor(\n type: ExtglobType | null,\n parent?: AST,\n options: MinimatchOptions = {}\n ) {\n this.type = type\n // extglobs are inherently magical\n if (type) this.#hasMagic = true\n this.#parent = parent\n this.#root = this.#parent ? this.#parent.#root : this\n this.#options = this.#root === this ? options : this.#root.#options\n this.#negs = this.#root === this ? [] : this.#root.#negs\n if (type === '!' && !this.#root.#filledNegs) this.#negs.push(this)\n this.#parentIndex = this.#parent ? this.#parent.#parts.length : 0\n }\n\n get hasMagic(): boolean | undefined {\n /* c8 ignore start */\n if (this.#hasMagic !== undefined) return this.#hasMagic\n /* c8 ignore stop */\n for (const p of this.#parts) {\n if (typeof p === 'string') continue\n if (p.type || p.hasMagic) return (this.#hasMagic = true)\n }\n // note: will be undefined until we generate the regexp src and find out\n return this.#hasMagic\n }\n\n // reconstructs the pattern\n toString(): string {\n if (this.#toString !== undefined) return this.#toString\n if (!this.type) {\n return (this.#toString = this.#parts.map(p => String(p)).join(''))\n } else {\n return (this.#toString =\n this.type + '(' + this.#parts.map(p => String(p)).join('|') + ')')\n }\n }\n\n #fillNegs() {\n /* c8 ignore start */\n if (this !== this.#root) throw new Error('should only call on root')\n if (this.#filledNegs) return this\n /* c8 ignore stop */\n\n // call toString() once to fill this out\n this.toString()\n this.#filledNegs = true\n let n: AST | undefined\n while ((n = this.#negs.pop())) {\n if (n.type !== '!') continue\n // walk up the tree, appending everthing that comes AFTER parentIndex\n let p: AST | undefined = n\n let pp = p.#parent\n while (pp) {\n for (\n let i = p.#parentIndex + 1;\n !pp.type && i < pp.#parts.length;\n i++\n ) {\n for (const part of n.#parts) {\n /* c8 ignore start */\n if (typeof part === 'string') {\n throw new Error('string part in extglob AST??')\n }\n /* c8 ignore stop */\n part.copyIn(pp.#parts[i])\n }\n }\n p = pp\n pp = p.#parent\n }\n }\n return this\n }\n\n push(...parts: (string | AST)[]) {\n for (const p of parts) {\n if (p === '') continue\n /* c8 ignore start */\n if (typeof p !== 'string' && !(p instanceof AST && p.#parent === this)) {\n throw new Error('invalid part: ' + p)\n }\n /* c8 ignore stop */\n this.#parts.push(p)\n }\n }\n\n toJSON() {\n const ret: any[] =\n this.type === null\n ? this.#parts.slice().map(p => (typeof p === 'string' ? p : p.toJSON()))\n : [this.type, ...this.#parts.map(p => (p as AST).toJSON())]\n if (this.isStart() && !this.type) ret.unshift([])\n if (\n this.isEnd() &&\n (this === this.#root ||\n (this.#root.#filledNegs && this.#parent?.type === '!'))\n ) {\n ret.push({})\n }\n return ret\n }\n\n isStart(): boolean {\n if (this.#root === this) return true\n // if (this.type) return !!this.#parent?.isStart()\n if (!this.#parent?.isStart()) return false\n if (this.#parentIndex === 0) return true\n // if everything AHEAD of this is a negation, then it's still the \"start\"\n const p = this.#parent\n for (let i = 0; i < this.#parentIndex; i++) {\n const pp = p.#parts[i]\n if (!(pp instanceof AST && pp.type === '!')) {\n return false\n }\n }\n return true\n }\n\n isEnd(): boolean {\n if (this.#root === this) return true\n if (this.#parent?.type === '!') return true\n if (!this.#parent?.isEnd()) return false\n if (!this.type) return this.#parent?.isEnd()\n // if not root, it'll always have a parent\n /* c8 ignore start */\n const pl = this.#parent ? this.#parent.#parts.length : 0\n /* c8 ignore stop */\n return this.#parentIndex === pl - 1\n }\n\n copyIn(part: AST | string) {\n if (typeof part === 'string') this.push(part)\n else this.push(part.clone(this))\n }\n\n clone(parent: AST) {\n const c = new AST(this.type, parent)\n for (const p of this.#parts) {\n c.copyIn(p)\n }\n return c\n }\n\n static #parseAST(\n str: string,\n ast: AST,\n pos: number,\n opt: MinimatchOptions\n ): number {\n let escaping = false\n let inBrace = false\n let braceStart = -1\n let braceNeg = false\n if (ast.type === null) {\n // outside of a extglob, append until we find a start\n let i = pos\n let acc = ''\n while (i < str.length) {\n const c = str.charAt(i++)\n // still accumulate escapes at this point, but we do ignore\n // starts that are escaped\n if (escaping || c === '\\\\') {\n escaping = !escaping\n acc += c\n continue\n }\n\n if (inBrace) {\n if (i === braceStart + 1) {\n if (c === '^' || c === '!') {\n braceNeg = true\n }\n } else if (c === ']' && !(i === braceStart + 2 && braceNeg)) {\n inBrace = false\n }\n acc += c\n continue\n } else if (c === '[') {\n inBrace = true\n braceStart = i\n braceNeg = false\n acc += c\n continue\n }\n\n if (!opt.noext && isExtglobType(c) && str.charAt(i) === '(') {\n ast.push(acc)\n acc = ''\n const ext = new AST(c, ast)\n i = AST.#parseAST(str, ext, i, opt)\n ast.push(ext)\n continue\n }\n acc += c\n }\n ast.push(acc)\n return i\n }\n\n // some kind of extglob, pos is at the (\n // find the next | or )\n let i = pos + 1\n let part = new AST(null, ast)\n const parts: AST[] = []\n let acc = ''\n while (i < str.length) {\n const c = str.charAt(i++)\n // still accumulate escapes at this point, but we do ignore\n // starts that are escaped\n if (escaping || c === '\\\\') {\n escaping = !escaping\n acc += c\n continue\n }\n\n if (inBrace) {\n if (i === braceStart + 1) {\n if (c === '^' || c === '!') {\n braceNeg = true\n }\n } else if (c === ']' && !(i === braceStart + 2 && braceNeg)) {\n inBrace = false\n }\n acc += c\n continue\n } else if (c === '[') {\n inBrace = true\n braceStart = i\n braceNeg = false\n acc += c\n continue\n }\n\n if (isExtglobType(c) && str.charAt(i) === '(') {\n part.push(acc)\n acc = ''\n const ext = new AST(c, part)\n part.push(ext)\n i = AST.#parseAST(str, ext, i, opt)\n continue\n }\n if (c === '|') {\n part.push(acc)\n acc = ''\n parts.push(part)\n part = new AST(null, ast)\n continue\n }\n if (c === ')') {\n if (acc === '' && ast.#parts.length === 0) {\n ast.#emptyExt = true\n }\n part.push(acc)\n acc = ''\n ast.push(...parts, part)\n return i\n }\n acc += c\n }\n\n // unfinished extglob\n // if we got here, it was a malformed extglob! not an extglob, but\n // maybe something else in there.\n ast.type = null\n ast.#hasMagic = undefined\n ast.#parts = [str.substring(pos - 1)]\n return i\n }\n\n static fromGlob(pattern: string, options: MinimatchOptions = {}) {\n const ast = new AST(null, undefined, options)\n AST.#parseAST(pattern, ast, 0, options)\n return ast\n }\n\n // returns the regular expression if there's magic, or the unescaped\n // string if not.\n toMMPattern(): MMRegExp | string {\n // should only be called on root\n /* c8 ignore start */\n if (this !== this.#root) return this.#root.toMMPattern()\n /* c8 ignore stop */\n const glob = this.toString()\n const [re, body, hasMagic, uflag] = this.toRegExpSource()\n // if we're in nocase mode, and not nocaseMagicOnly, then we do\n // still need a regular expression if we have to case-insensitively\n // match capital/lowercase characters.\n const anyMagic =\n hasMagic ||\n this.#hasMagic ||\n (this.#options.nocase &&\n !this.#options.nocaseMagicOnly &&\n glob.toUpperCase() !== glob.toLowerCase())\n if (!anyMagic) {\n return body\n }\n\n const flags = (this.#options.nocase ? 'i' : '') + (uflag ? 'u' : '')\n return Object.assign(new RegExp(`^${re}$`, flags), {\n _src: re,\n _glob: glob,\n })\n }\n\n get options() {\n return this.#options\n }\n\n // returns the string match, the regexp source, whether there's magic\n // in the regexp (so a regular expression is required) and whether or\n // not the uflag is needed for the regular expression (for posix classes)\n // TODO: instead of injecting the start/end at this point, just return\n // the BODY of the regexp, along with the start/end portions suitable\n // for binding the start/end in either a joined full-path makeRe context\n // (where we bind to (^|/), or a standalone matchPart context (where\n // we bind to ^, and not /). Otherwise slashes get duped!\n //\n // In part-matching mode, the start is:\n // - if not isStart: nothing\n // - if traversal possible, but not allowed: ^(?!\\.\\.?$)\n // - if dots allowed or not possible: ^\n // - if dots possible and not allowed: ^(?!\\.)\n // end is:\n // - if not isEnd(): nothing\n // - else: $\n //\n // In full-path matching mode, we put the slash at the START of the\n // pattern, so start is:\n // - if first pattern: same as part-matching mode\n // - if not isStart(): nothing\n // - if traversal possible, but not allowed: /(?!\\.\\.?(?:$|/))\n // - if dots allowed or not possible: /\n // - if dots possible and not allowed: /(?!\\.)\n // end is:\n // - if last pattern, same as part-matching mode\n // - else nothing\n //\n // Always put the (?:$|/) on negated tails, though, because that has to be\n // there to bind the end of the negated pattern portion, and it's easier to\n // just stick it in now rather than try to inject it later in the middle of\n // the pattern.\n //\n // We can just always return the same end, and leave it up to the caller\n // to know whether it's going to be used joined or in parts.\n // And, if the start is adjusted slightly, can do the same there:\n // - if not isStart: nothing\n // - if traversal possible, but not allowed: (?:/|^)(?!\\.\\.?$)\n // - if dots allowed or not possible: (?:/|^)\n // - if dots possible and not allowed: (?:/|^)(?!\\.)\n //\n // But it's better to have a simpler binding without a conditional, for\n // performance, so probably better to return both start options.\n //\n // Then the caller just ignores the end if it's not the first pattern,\n // and the start always gets applied.\n //\n // But that's always going to be $ if it's the ending pattern, or nothing,\n // so the caller can just attach $ at the end of the pattern when building.\n //\n // So the todo is:\n // - better detect what kind of start is needed\n // - return both flavors of starting pattern\n // - attach $ at the end of the pattern when creating the actual RegExp\n //\n // Ah, but wait, no, that all only applies to the root when the first pattern\n // is not an extglob. If the first pattern IS an extglob, then we need all\n // that dot prevention biz to live in the extglob portions, because eg\n // +(*|.x*) can match .xy but not .yx.\n //\n // So, return the two flavors if it's #root and the first child is not an\n // AST, otherwise leave it to the child AST to handle it, and there,\n // use the (?:^|/) style of start binding.\n //\n // Even simplified further:\n // - Since the start for a join is eg /(?!\\.) and the start for a part\n // is ^(?!\\.), we can just prepend (?!\\.) to the pattern (either root\n // or start or whatever) and prepend ^ or / at the Regexp construction.\n toRegExpSource(\n allowDot?: boolean\n ): [re: string, body: string, hasMagic: boolean, uflag: boolean] {\n const dot = allowDot ?? !!this.#options.dot\n if (this.#root === this) this.#fillNegs()\n if (!this.type) {\n const noEmpty = this.isStart() && this.isEnd()\n const src = this.#parts\n .map(p => {\n const [re, _, hasMagic, uflag] =\n typeof p === 'string'\n ? AST.#parseGlob(p, this.#hasMagic, noEmpty)\n : p.toRegExpSource(allowDot)\n this.#hasMagic = this.#hasMagic || hasMagic\n this.#uflag = this.#uflag || uflag\n return re\n })\n .join('')\n\n let start = ''\n if (this.isStart()) {\n if (typeof this.#parts[0] === 'string') {\n // this is the string that will match the start of the pattern,\n // so we need to protect against dots and such.\n\n // '.' and '..' cannot match unless the pattern is that exactly,\n // even if it starts with . or dot:true is set.\n const dotTravAllowed =\n this.#parts.length === 1 && justDots.has(this.#parts[0])\n if (!dotTravAllowed) {\n const aps = addPatternStart\n // check if we have a possibility of matching . or ..,\n // and prevent that.\n const needNoTrav =\n // dots are allowed, and the pattern starts with [ or .\n (dot && aps.has(src.charAt(0))) ||\n // the pattern starts with \\., and then [ or .\n (src.startsWith('\\\\.') && aps.has(src.charAt(2))) ||\n // the pattern starts with \\.\\., and then [ or .\n (src.startsWith('\\\\.\\\\.') && aps.has(src.charAt(4)))\n // no need to prevent dots if it can't match a dot, or if a\n // sub-pattern will be preventing it anyway.\n const needNoDot = !dot && !allowDot && aps.has(src.charAt(0))\n\n start = needNoTrav ? startNoTraversal : needNoDot ? startNoDot : ''\n }\n }\n }\n\n // append the \"end of path portion\" pattern to negation tails\n let end = ''\n if (\n this.isEnd() &&\n this.#root.#filledNegs &&\n this.#parent?.type === '!'\n ) {\n end = '(?:$|\\\\/)'\n }\n const final = start + src + end\n return [\n final,\n unescape(src),\n (this.#hasMagic = !!this.#hasMagic),\n this.#uflag,\n ]\n }\n\n // We need to calculate the body *twice* if it's a repeat pattern\n // at the start, once in nodot mode, then again in dot mode, so a\n // pattern like *(?) can match 'x.y'\n\n const repeated = this.type === '*' || this.type === '+'\n // some kind of extglob\n const start = this.type === '!' ? '(?:(?!(?:' : '(?:'\n let body = this.#partsToRegExp(dot)\n\n if (this.isStart() && this.isEnd() && !body && this.type !== '!') {\n // invalid extglob, has to at least be *something* present, if it's\n // the entire path portion.\n const s = this.toString()\n this.#parts = [s]\n this.type = null\n this.#hasMagic = undefined\n return [s, unescape(this.toString()), false, false]\n }\n\n // XXX abstract out this map method\n let bodyDotAllowed =\n !repeated || allowDot || dot || !startNoDot\n ? ''\n : this.#partsToRegExp(true)\n if (bodyDotAllowed === body) {\n bodyDotAllowed = ''\n }\n if (bodyDotAllowed) {\n body = `(?:${body})(?:${bodyDotAllowed})*?`\n }\n\n // an empty !() is exactly equivalent to a starNoEmpty\n let final = ''\n if (this.type === '!' && this.#emptyExt) {\n final = (this.isStart() && !dot ? startNoDot : '') + starNoEmpty\n } else {\n const close =\n this.type === '!'\n ? // !() must match something,but !(x) can match ''\n '))' +\n (this.isStart() && !dot && !allowDot ? startNoDot : '') +\n star +\n ')'\n : this.type === '@'\n ? ')'\n : this.type === '?'\n ? ')?'\n : this.type === '+' && bodyDotAllowed\n ? ')'\n : this.type === '*' && bodyDotAllowed\n ? `)?`\n : `)${this.type}`\n final = start + body + close\n }\n return [\n final,\n unescape(body),\n (this.#hasMagic = !!this.#hasMagic),\n this.#uflag,\n ]\n }\n\n #partsToRegExp(dot: boolean) {\n return this.#parts\n .map(p => {\n // extglob ASTs should only contain parent ASTs\n /* c8 ignore start */\n if (typeof p === 'string') {\n throw new Error('string type in extglob ast??')\n }\n /* c8 ignore stop */\n // can ignore hasMagic, because extglobs are already always magic\n const [re, _, _hasMagic, uflag] = p.toRegExpSource(dot)\n this.#uflag = this.#uflag || uflag\n return re\n })\n .filter(p => !(this.isStart() && this.isEnd()) || !!p)\n .join('|')\n }\n\n static #parseGlob(\n glob: string,\n hasMagic: boolean | undefined,\n noEmpty: boolean = false\n ): [re: string, body: string, hasMagic: boolean, uflag: boolean] {\n let escaping = false\n let re = ''\n let uflag = false\n for (let i = 0; i < glob.length; i++) {\n const c = glob.charAt(i)\n if (escaping) {\n escaping = false\n re += (reSpecials.has(c) ? '\\\\' : '') + c\n continue\n }\n if (c === '\\\\') {\n if (i === glob.length - 1) {\n re += '\\\\\\\\'\n } else {\n escaping = true\n }\n continue\n }\n if (c === '[') {\n const [src, needUflag, consumed, magic] = parseClass(glob, i)\n if (consumed) {\n re += src\n uflag = uflag || needUflag\n i += consumed - 1\n hasMagic = hasMagic || magic\n continue\n }\n }\n if (c === '*') {\n if (noEmpty && glob === '*') re += starNoEmpty\n else re += star\n hasMagic = true\n continue\n }\n if (c === '?') {\n re += qmark\n hasMagic = true\n continue\n }\n re += regExpEscape(c)\n }\n return [re, unescape(glob), !!hasMagic, uflag]\n }\n}\n"]} \ No newline at end of file diff --git a/node_modules/minimatch/dist/commonjs/brace-expressions.d.ts b/node_modules/minimatch/dist/commonjs/brace-expressions.d.ts new file mode 100644 index 000000000..b1572deb9 --- /dev/null +++ b/node_modules/minimatch/dist/commonjs/brace-expressions.d.ts @@ -0,0 +1,8 @@ +export type ParseClassResult = [ + src: string, + uFlag: boolean, + consumed: number, + hasMagic: boolean +]; +export declare const parseClass: (glob: string, position: number) => ParseClassResult; +//# sourceMappingURL=brace-expressions.d.ts.map \ No newline at end of file diff --git a/node_modules/minimatch/dist/commonjs/brace-expressions.d.ts.map b/node_modules/minimatch/dist/commonjs/brace-expressions.d.ts.map new file mode 100644 index 000000000..d39496487 --- /dev/null +++ b/node_modules/minimatch/dist/commonjs/brace-expressions.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"brace-expressions.d.ts","sourceRoot":"","sources":["../../src/brace-expressions.ts"],"names":[],"mappings":"AA+BA,MAAM,MAAM,gBAAgB,GAAG;IAC7B,GAAG,EAAE,MAAM;IACX,KAAK,EAAE,OAAO;IACd,QAAQ,EAAE,MAAM;IAChB,QAAQ,EAAE,OAAO;CAClB,CAAA;AAQD,eAAO,MAAM,UAAU,SACf,MAAM,YACF,MAAM,qBA8HjB,CAAA"} \ No newline at end of file diff --git a/node_modules/minimatch/dist/commonjs/brace-expressions.js b/node_modules/minimatch/dist/commonjs/brace-expressions.js new file mode 100644 index 000000000..0e13eefc4 --- /dev/null +++ b/node_modules/minimatch/dist/commonjs/brace-expressions.js @@ -0,0 +1,152 @@ +"use strict"; +// translate the various posix character classes into unicode properties +// this works across all unicode locales +Object.defineProperty(exports, "__esModule", { value: true }); +exports.parseClass = void 0; +// { : [, /u flag required, negated] +const posixClasses = { + '[:alnum:]': ['\\p{L}\\p{Nl}\\p{Nd}', true], + '[:alpha:]': ['\\p{L}\\p{Nl}', true], + '[:ascii:]': ['\\x' + '00-\\x' + '7f', false], + '[:blank:]': ['\\p{Zs}\\t', true], + '[:cntrl:]': ['\\p{Cc}', true], + '[:digit:]': ['\\p{Nd}', true], + '[:graph:]': ['\\p{Z}\\p{C}', true, true], + '[:lower:]': ['\\p{Ll}', true], + '[:print:]': ['\\p{C}', true], + '[:punct:]': ['\\p{P}', true], + '[:space:]': ['\\p{Z}\\t\\r\\n\\v\\f', true], + '[:upper:]': ['\\p{Lu}', true], + '[:word:]': ['\\p{L}\\p{Nl}\\p{Nd}\\p{Pc}', true], + '[:xdigit:]': ['A-Fa-f0-9', false], +}; +// only need to escape a few things inside of brace expressions +// escapes: [ \ ] - +const braceEscape = (s) => s.replace(/[[\]\\-]/g, '\\$&'); +// escape all regexp magic characters +const regexpEscape = (s) => s.replace(/[-[\]{}()*+?.,\\^$|#\s]/g, '\\$&'); +// everything has already been escaped, we just have to join +const rangesToString = (ranges) => ranges.join(''); +// takes a glob string at a posix brace expression, and returns +// an equivalent regular expression source, and boolean indicating +// whether the /u flag needs to be applied, and the number of chars +// consumed to parse the character class. +// This also removes out of order ranges, and returns ($.) if the +// entire class just no good. +const parseClass = (glob, position) => { + const pos = position; + /* c8 ignore start */ + if (glob.charAt(pos) !== '[') { + throw new Error('not in a brace expression'); + } + /* c8 ignore stop */ + const ranges = []; + const negs = []; + let i = pos + 1; + let sawStart = false; + let uflag = false; + let escaping = false; + let negate = false; + let endPos = pos; + let rangeStart = ''; + WHILE: while (i < glob.length) { + const c = glob.charAt(i); + if ((c === '!' || c === '^') && i === pos + 1) { + negate = true; + i++; + continue; + } + if (c === ']' && sawStart && !escaping) { + endPos = i + 1; + break; + } + sawStart = true; + if (c === '\\') { + if (!escaping) { + escaping = true; + i++; + continue; + } + // escaped \ char, fall through and treat like normal char + } + if (c === '[' && !escaping) { + // either a posix class, a collation equivalent, or just a [ + for (const [cls, [unip, u, neg]] of Object.entries(posixClasses)) { + if (glob.startsWith(cls, i)) { + // invalid, [a-[] is fine, but not [a-[:alpha]] + if (rangeStart) { + return ['$.', false, glob.length - pos, true]; + } + i += cls.length; + if (neg) + negs.push(unip); + else + ranges.push(unip); + uflag = uflag || u; + continue WHILE; + } + } + } + // now it's just a normal character, effectively + escaping = false; + if (rangeStart) { + // throw this range away if it's not valid, but others + // can still match. + if (c > rangeStart) { + ranges.push(braceEscape(rangeStart) + '-' + braceEscape(c)); + } + else if (c === rangeStart) { + ranges.push(braceEscape(c)); + } + rangeStart = ''; + i++; + continue; + } + // now might be the start of a range. + // can be either c-d or c-] or c] or c] at this point + if (glob.startsWith('-]', i + 1)) { + ranges.push(braceEscape(c + '-')); + i += 2; + continue; + } + if (glob.startsWith('-', i + 1)) { + rangeStart = c; + i += 2; + continue; + } + // not the start of a range, just a single character + ranges.push(braceEscape(c)); + i++; + } + if (endPos < i) { + // didn't see the end of the class, not a valid class, + // but might still be valid as a literal match. + return ['', false, 0, false]; + } + // if we got no ranges and no negates, then we have a range that + // cannot possibly match anything, and that poisons the whole glob + if (!ranges.length && !negs.length) { + return ['$.', false, glob.length - pos, true]; + } + // if we got one positive range, and it's a single character, then that's + // not actually a magic pattern, it's just that one literal character. + // we should not treat that as "magic", we should just return the literal + // character. [_] is a perfectly valid way to escape glob magic chars. + if (negs.length === 0 && + ranges.length === 1 && + /^\\?.$/.test(ranges[0]) && + !negate) { + const r = ranges[0].length === 2 ? ranges[0].slice(-1) : ranges[0]; + return [regexpEscape(r), false, endPos - pos, false]; + } + const sranges = '[' + (negate ? '^' : '') + rangesToString(ranges) + ']'; + const snegs = '[' + (negate ? '' : '^') + rangesToString(negs) + ']'; + const comb = ranges.length && negs.length + ? '(' + sranges + '|' + snegs + ')' + : ranges.length + ? sranges + : snegs; + return [comb, uflag, endPos - pos, true]; +}; +exports.parseClass = parseClass; +//# sourceMappingURL=brace-expressions.js.map \ No newline at end of file diff --git a/node_modules/minimatch/dist/commonjs/brace-expressions.js.map b/node_modules/minimatch/dist/commonjs/brace-expressions.js.map new file mode 100644 index 000000000..86b047561 --- /dev/null +++ b/node_modules/minimatch/dist/commonjs/brace-expressions.js.map @@ -0,0 +1 @@ +{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AC,YAAY,CAAC,CAAC,CAAC,EAAE,KAAK,EAAE,MAAM,GAAG,GAAG,EAAE,KAAK,CAAC,CAAA;KACrD;IAED,MAAM,OAAO,GAAG,GAAG,GAAG,CAAC,MAAM,CAAC,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC,EAAE,CAAC,GAAG,cAAc,CAAC,MAAM,CAAC,GAAG,GAAG,CAAA;IACxE,MAAM,KAAK,GAAG,GAAG,GAAG,CAAC,MAAM,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,GAAG,CAAC,GAAG,cAAc,CAAC,IAAI,CAAC,GAAG,GAAG,CAAA;IACpE,MAAM,IAAI,GACR,MAAM,CAAC,MAAM,IAAI,IAAI,CAAC,MAAM;QAC1B,CAAC,CAAC,GAAG,GAAG,OAAO,GAAG,GAAG,GAAG,KAAK,GAAG,GAAG;QACnC,CAAC,CAAC,MAAM,CAAC,MAAM;YACf,CAAC,CAAC,OAAO;YACT,CAAC,CAAC,KAAK,CAAA;IAEX,OAAO,CAAC,IAAI,EAAE,KAAK,EAAE,MAAM,GAAG,GAAG,EAAE,IAAI,CAAC,CAAA;AAC1C,CAAC,CAAA;AAhIY,QAAA,UAAU,cAgItB","sourcesContent":["// translate the various posix character classes into unicode properties\n// this works across all unicode locales\n\n// { : [, /u flag required, negated]\nconst posixClasses: { [k: string]: [e: string, u: boolean, n?: boolean] } = {\n '[:alnum:]': ['\\\\p{L}\\\\p{Nl}\\\\p{Nd}', true],\n '[:alpha:]': ['\\\\p{L}\\\\p{Nl}', true],\n '[:ascii:]': ['\\\\x' + '00-\\\\x' + '7f', false],\n '[:blank:]': ['\\\\p{Zs}\\\\t', true],\n '[:cntrl:]': ['\\\\p{Cc}', true],\n '[:digit:]': ['\\\\p{Nd}', true],\n '[:graph:]': ['\\\\p{Z}\\\\p{C}', true, true],\n '[:lower:]': ['\\\\p{Ll}', true],\n '[:print:]': ['\\\\p{C}', true],\n '[:punct:]': ['\\\\p{P}', true],\n '[:space:]': ['\\\\p{Z}\\\\t\\\\r\\\\n\\\\v\\\\f', true],\n '[:upper:]': ['\\\\p{Lu}', true],\n '[:word:]': ['\\\\p{L}\\\\p{Nl}\\\\p{Nd}\\\\p{Pc}', true],\n '[:xdigit:]': ['A-Fa-f0-9', false],\n}\n\n// only need to escape a few things inside of brace expressions\n// escapes: [ \\ ] -\nconst braceEscape = (s: string) => s.replace(/[[\\]\\\\-]/g, '\\\\$&')\n// escape all regexp magic characters\nconst regexpEscape = (s: string) =>\n s.replace(/[-[\\]{}()*+?.,\\\\^$|#\\s]/g, '\\\\$&')\n\n// everything has already been escaped, we just have to join\nconst rangesToString = (ranges: string[]): string => ranges.join('')\n\nexport type ParseClassResult = [\n src: string,\n uFlag: boolean,\n consumed: number,\n hasMagic: boolean\n]\n\n// takes a glob string at a posix brace expression, and returns\n// an equivalent regular expression source, and boolean indicating\n// whether the /u flag needs to be applied, and the number of chars\n// consumed to parse the character class.\n// This also removes out of order ranges, and returns ($.) if the\n// entire class just no good.\nexport const parseClass = (\n glob: string,\n position: number\n): ParseClassResult => {\n const pos = position\n /* c8 ignore start */\n if (glob.charAt(pos) !== '[') {\n throw new Error('not in a brace expression')\n }\n /* c8 ignore stop */\n const ranges: string[] = []\n const negs: string[] = []\n\n let i = pos + 1\n let sawStart = false\n let uflag = false\n let escaping = false\n let negate = false\n let endPos = pos\n let rangeStart = ''\n WHILE: while (i < glob.length) {\n const c = glob.charAt(i)\n if ((c === '!' || c === '^') && i === pos + 1) {\n negate = true\n i++\n continue\n }\n\n if (c === ']' && sawStart && !escaping) {\n endPos = i + 1\n break\n }\n\n sawStart = true\n if (c === '\\\\') {\n if (!escaping) {\n escaping = true\n i++\n continue\n }\n // escaped \\ char, fall through and treat like normal char\n }\n if (c === '[' && !escaping) {\n // either a posix class, a collation equivalent, or just a [\n for (const [cls, [unip, u, neg]] of Object.entries(posixClasses)) {\n if (glob.startsWith(cls, i)) {\n // invalid, [a-[] is fine, but not [a-[:alpha]]\n if (rangeStart) {\n return ['$.', false, glob.length - pos, true]\n }\n i += cls.length\n if (neg) negs.push(unip)\n else ranges.push(unip)\n uflag = uflag || u\n continue WHILE\n }\n }\n }\n\n // now it's just a normal character, effectively\n escaping = false\n if (rangeStart) {\n // throw this range away if it's not valid, but others\n // can still match.\n if (c > rangeStart) {\n ranges.push(braceEscape(rangeStart) + '-' + braceEscape(c))\n } else if (c === rangeStart) {\n ranges.push(braceEscape(c))\n }\n rangeStart = ''\n i++\n continue\n }\n\n // now might be the start of a range.\n // can be either c-d or c-] or c] or c] at this point\n if (glob.startsWith('-]', i + 1)) {\n ranges.push(braceEscape(c + '-'))\n i += 2\n continue\n }\n if (glob.startsWith('-', i + 1)) {\n rangeStart = c\n i += 2\n continue\n }\n\n // not the start of a range, just a single character\n ranges.push(braceEscape(c))\n i++\n }\n\n if (endPos < i) {\n // didn't see the end of the class, not a valid class,\n // but might still be valid as a literal match.\n return ['', false, 0, false]\n }\n\n // if we got no ranges and no negates, then we have a range that\n // cannot possibly match anything, and that poisons the whole glob\n if (!ranges.length && !negs.length) {\n return ['$.', false, glob.length - pos, true]\n }\n\n // if we got one positive range, and it's a single character, then that's\n // not actually a magic pattern, it's just that one literal character.\n // we should not treat that as \"magic\", we should just return the literal\n // character. [_] is a perfectly valid way to escape glob magic chars.\n if (\n negs.length === 0 &&\n ranges.length === 1 &&\n /^\\\\?.$/.test(ranges[0]) &&\n !negate\n ) {\n const r = ranges[0].length === 2 ? ranges[0].slice(-1) : ranges[0]\n return [regexpEscape(r), false, endPos - pos, false]\n }\n\n const sranges = '[' + (negate ? '^' : '') + rangesToString(ranges) + ']'\n const snegs = '[' + (negate ? '' : '^') + rangesToString(negs) + ']'\n const comb =\n ranges.length && negs.length\n ? '(' + sranges + '|' + snegs + ')'\n : ranges.length\n ? sranges\n : snegs\n\n return [comb, uflag, endPos - pos, true]\n}\n"]} \ No newline at end of file diff --git a/node_modules/minimatch/dist/commonjs/escape.d.ts b/node_modules/minimatch/dist/commonjs/escape.d.ts new file mode 100644 index 000000000..dc3e31631 --- /dev/null +++ b/node_modules/minimatch/dist/commonjs/escape.d.ts @@ -0,0 +1,12 @@ +import { MinimatchOptions } from './index.js'; +/** + * Escape all magic characters in a glob pattern. + * + * If the {@link windowsPathsNoEscape | GlobOptions.windowsPathsNoEscape} + * option is used, then characters are escaped by wrapping in `[]`, because + * a magic character wrapped in a character class can only be satisfied by + * that exact character. In this mode, `\` is _not_ escaped, because it is + * not interpreted as a magic character, but instead as a path separator. + */ +export declare const escape: (s: string, { windowsPathsNoEscape, }?: Pick) => string; +//# sourceMappingURL=escape.d.ts.map \ No newline at end of file diff --git a/node_modules/minimatch/dist/commonjs/escape.d.ts.map b/node_modules/minimatch/dist/commonjs/escape.d.ts.map new file mode 100644 index 000000000..0779dae7e --- /dev/null +++ b/node_modules/minimatch/dist/commonjs/escape.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"escape.d.ts","sourceRoot":"","sources":["../../src/escape.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,gBAAgB,EAAE,MAAM,YAAY,CAAA;AAC7C;;;;;;;;GAQG;AACH,eAAO,MAAM,MAAM,MACd,MAAM,8BAGN,KAAK,gBAAgB,EAAE,sBAAsB,CAAC,WAQlD,CAAA"} \ No newline at end of file diff --git a/node_modules/minimatch/dist/commonjs/escape.js b/node_modules/minimatch/dist/commonjs/escape.js new file mode 100644 index 000000000..02a4f8a8e --- /dev/null +++ b/node_modules/minimatch/dist/commonjs/escape.js @@ -0,0 +1,22 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.escape = void 0; +/** + * Escape all magic characters in a glob pattern. + * + * If the {@link windowsPathsNoEscape | GlobOptions.windowsPathsNoEscape} + * option is used, then characters are escaped by wrapping in `[]`, because + * a magic character wrapped in a character class can only be satisfied by + * that exact character. In this mode, `\` is _not_ escaped, because it is + * not interpreted as a magic character, but instead as a path separator. + */ +const escape = (s, { windowsPathsNoEscape = false, } = {}) => { + // don't need to escape +@! because we escape the parens + // that make those magic, and escaping ! as [!] isn't valid, + // because [!]] is a valid glob class meaning not ']'. + return windowsPathsNoEscape + ? s.replace(/[?*()[\]]/g, '[$&]') + : s.replace(/[?*()[\]\\]/g, '\\$&'); +}; +exports.escape = escape; +//# sourceMappingURL=escape.js.map \ No newline at end of file diff --git a/node_modules/minimatch/dist/commonjs/escape.js.map b/node_modules/minimatch/dist/commonjs/escape.js.map new file mode 100644 index 000000000..264b2ea51 --- /dev/null +++ b/node_modules/minimatch/dist/commonjs/escape.js.map @@ -0,0 +1 @@ +{"version":3,"file":"escape.js","sourceRoot":"","sources":["../../src/escape.ts"],"names":[],"mappings":";;;AACA;;;;;;;;GAQG;AACI,MAAM,MAAM,GAAG,CACpB,CAAS,EACT,EACE,oBAAoB,GAAG,KAAK,MACsB,EAAE,EACtD,EAAE;IACF,wDAAwD;IACxD,4DAA4D;IAC5D,sDAAsD;IACtD,OAAO,oBAAoB;QACzB,CAAC,CAAC,CAAC,CAAC,OAAO,CAAC,YAAY,EAAE,MAAM,CAAC;QACjC,CAAC,CAAC,CAAC,CAAC,OAAO,CAAC,cAAc,EAAE,MAAM,CAAC,CAAA;AACvC,CAAC,CAAA;AAZY,QAAA,MAAM,UAYlB","sourcesContent":["import { MinimatchOptions } from './index.js'\n/**\n * Escape all magic characters in a glob pattern.\n *\n * If the {@link windowsPathsNoEscape | GlobOptions.windowsPathsNoEscape}\n * option is used, then characters are escaped by wrapping in `[]`, because\n * a magic character wrapped in a character class can only be satisfied by\n * that exact character. In this mode, `\\` is _not_ escaped, because it is\n * not interpreted as a magic character, but instead as a path separator.\n */\nexport const escape = (\n s: string,\n {\n windowsPathsNoEscape = false,\n }: Pick = {}\n) => {\n // don't need to escape +@! because we escape the parens\n // that make those magic, and escaping ! as [!] isn't valid,\n // because [!]] is a valid glob class meaning not ']'.\n return windowsPathsNoEscape\n ? s.replace(/[?*()[\\]]/g, '[$&]')\n : s.replace(/[?*()[\\]\\\\]/g, '\\\\$&')\n}\n"]} \ No newline at end of file diff --git a/node_modules/minimatch/dist/commonjs/index.d.ts b/node_modules/minimatch/dist/commonjs/index.d.ts new file mode 100644 index 000000000..41d16a98e --- /dev/null +++ b/node_modules/minimatch/dist/commonjs/index.d.ts @@ -0,0 +1,94 @@ +import { AST } from './ast.js'; +type Platform = 'aix' | 'android' | 'darwin' | 'freebsd' | 'haiku' | 'linux' | 'openbsd' | 'sunos' | 'win32' | 'cygwin' | 'netbsd'; +export interface MinimatchOptions { + nobrace?: boolean; + nocomment?: boolean; + nonegate?: boolean; + debug?: boolean; + noglobstar?: boolean; + noext?: boolean; + nonull?: boolean; + windowsPathsNoEscape?: boolean; + allowWindowsEscape?: boolean; + partial?: boolean; + dot?: boolean; + nocase?: boolean; + nocaseMagicOnly?: boolean; + magicalBraces?: boolean; + matchBase?: boolean; + flipNegate?: boolean; + preserveMultipleSlashes?: boolean; + optimizationLevel?: number; + platform?: Platform; + windowsNoMagicRoot?: boolean; +} +export declare const minimatch: { + (p: string, pattern: string, options?: MinimatchOptions): boolean; + sep: Sep; + GLOBSTAR: typeof GLOBSTAR; + filter: (pattern: string, options?: MinimatchOptions) => (p: string) => boolean; + defaults: (def: MinimatchOptions) => typeof minimatch; + braceExpand: (pattern: string, options?: MinimatchOptions) => string[]; + makeRe: (pattern: string, options?: MinimatchOptions) => false | MMRegExp; + match: (list: string[], pattern: string, options?: MinimatchOptions) => string[]; + AST: typeof AST; + Minimatch: typeof Minimatch; + escape: (s: string, { windowsPathsNoEscape, }?: Pick) => string; + unescape: (s: string, { windowsPathsNoEscape, }?: Pick) => string; +}; +type Sep = '\\' | '/'; +export declare const sep: Sep; +export declare const GLOBSTAR: unique symbol; +export declare const filter: (pattern: string, options?: MinimatchOptions) => (p: string) => boolean; +export declare const defaults: (def: MinimatchOptions) => typeof minimatch; +export declare const braceExpand: (pattern: string, options?: MinimatchOptions) => string[]; +export declare const makeRe: (pattern: string, options?: MinimatchOptions) => false | MMRegExp; +export declare const match: (list: string[], pattern: string, options?: MinimatchOptions) => string[]; +export type MMRegExp = RegExp & { + _src?: string; + _glob?: string; +}; +export type ParseReturnFiltered = string | MMRegExp | typeof GLOBSTAR; +export type ParseReturn = ParseReturnFiltered | false; +export declare class Minimatch { + options: MinimatchOptions; + set: ParseReturnFiltered[][]; + pattern: string; + windowsPathsNoEscape: boolean; + nonegate: boolean; + negate: boolean; + comment: boolean; + empty: boolean; + preserveMultipleSlashes: boolean; + partial: boolean; + globSet: string[]; + globParts: string[][]; + nocase: boolean; + isWindows: boolean; + platform: Platform; + windowsNoMagicRoot: boolean; + regexp: false | null | MMRegExp; + constructor(pattern: string, options?: MinimatchOptions); + hasMagic(): boolean; + debug(..._: any[]): void; + make(): void; + preprocess(globParts: string[][]): string[][]; + adjascentGlobstarOptimize(globParts: string[][]): string[][]; + levelOneOptimize(globParts: string[][]): string[][]; + levelTwoFileOptimize(parts: string | string[]): string[]; + firstPhasePreProcess(globParts: string[][]): string[][]; + secondPhasePreProcess(globParts: string[][]): string[][]; + partsMatch(a: string[], b: string[], emptyGSMatch?: boolean): false | string[]; + parseNegate(): void; + matchOne(file: string[], pattern: ParseReturn[], partial?: boolean): boolean; + braceExpand(): string[]; + parse(pattern: string): ParseReturn; + makeRe(): false | MMRegExp; + slashSplit(p: string): string[]; + match(f: string, partial?: boolean): boolean; + static defaults(def: MinimatchOptions): typeof Minimatch; +} +export { AST } from './ast.js'; +export { escape } from './escape.js'; +export { unescape } from './unescape.js'; +//# sourceMappingURL=index.d.ts.map \ No newline at end of file diff --git a/node_modules/minimatch/dist/commonjs/index.d.ts.map b/node_modules/minimatch/dist/commonjs/index.d.ts.map new file mode 100644 index 000000000..21f9cdc90 --- /dev/null +++ b/node_modules/minimatch/dist/commonjs/index.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,GAAG,EAAe,MAAM,UAAU,CAAA;AAI3C,KAAK,QAAQ,GAC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AI,GAAG,QAAQ,CAAA;gBACnB,OAAO,EAAE,MAAM,EAAE,OAAO,GAAE,gBAAqB;IAkC3D,QAAQ,IAAI,OAAO;IAYnB,KAAK,CAAC,GAAG,CAAC,EAAE,GAAG,EAAE;IAEjB,IAAI;IA0FJ,UAAU,CAAC,SAAS,EAAE,MAAM,EAAE,EAAE;IA8BhC,yBAAyB,CAAC,SAAS,EAAE,MAAM,EAAE,EAAE;IAiB/C,gBAAgB,CAAC,SAAS,EAAE,MAAM,EAAE,EAAE;IAoBtC,oBAAoB,CAAC,KAAK,EAAE,MAAM,GAAG,MAAM,EAAE;IA6D7C,oBAAoB,CAAC,SAAS,EAAE,MAAM,EAAE,EAAE;IA0F1C,qBAAqB,CAAC,SAAS,EAAE,MAAM,EAAE,EAAE,GAAG,MAAM,EAAE,EAAE;IAgBxD,UAAU,CACR,CAAC,EAAE,MAAM,EAAE,EACX,CAAC,EAAE,MAAM,EAAE,EACX,YAAY,GAAE,OAAe,GAC5B,KAAK,GAAG,MAAM,EAAE;IA+CnB,WAAW;IAqBX,QAAQ,CAAC,IAAI,EAAE,MAAM,EAAE,EAAE,OAAO,EAAE,WAAW,EAAE,EAAE,OAAO,GAAE,OAAe;IAiNzE,WAAW;IAIX,KAAK,CAAC,OAAO,EAAE,MAAM,GAAG,WAAW;IAiDnC,MAAM;IAsFN,UAAU,CAAC,CAAC,EAAE,MAAM;IAepB,KAAK,CAAC,CAAC,EAAE,MAAM,EAAE,OAAO,UAAe;IAiEvC,MAAM,CAAC,QAAQ,CAAC,GAAG,EAAE,gBAAgB;CAGtC;AAED,OAAO,EAAE,GAAG,EAAE,MAAM,UAAU,CAAA;AAC9B,OAAO,EAAE,MAAM,EAAE,MAAM,aAAa,CAAA;AACpC,OAAO,EAAE,QAAQ,EAAE,MAAM,eAAe,CAAA"} \ No newline at end of file diff --git a/node_modules/minimatch/dist/commonjs/index.js b/node_modules/minimatch/dist/commonjs/index.js new file mode 100644 index 000000000..d05f8b47f --- /dev/null +++ b/node_modules/minimatch/dist/commonjs/index.js @@ -0,0 +1,1016 @@ +"use strict"; +var __importDefault = (this && this.__importDefault) || function (mod) { + return (mod && mod.__esModule) ? mod : { "default": mod }; +}; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.unescape = exports.escape = exports.AST = exports.Minimatch = exports.match = exports.makeRe = exports.braceExpand = exports.defaults = exports.filter = exports.GLOBSTAR = exports.sep = exports.minimatch = void 0; +const brace_expansion_1 = __importDefault(require("brace-expansion")); +const assert_valid_pattern_js_1 = require("./assert-valid-pattern.js"); +const ast_js_1 = require("./ast.js"); +const escape_js_1 = require("./escape.js"); +const unescape_js_1 = require("./unescape.js"); +const minimatch = (p, pattern, options = {}) => { + (0, assert_valid_pattern_js_1.assertValidPattern)(pattern); + // shortcut: comments match nothing. + if (!options.nocomment && pattern.charAt(0) === '#') { + return false; + } + return new Minimatch(pattern, options).match(p); +}; +exports.minimatch = minimatch; +// Optimized checking for the most common glob patterns. +const starDotExtRE = /^\*+([^+@!?\*\[\(]*)$/; +const starDotExtTest = (ext) => (f) => !f.startsWith('.') && f.endsWith(ext); +const starDotExtTestDot = (ext) => (f) => f.endsWith(ext); +const starDotExtTestNocase = (ext) => { + ext = ext.toLowerCase(); + return (f) => !f.startsWith('.') && f.toLowerCase().endsWith(ext); +}; +const starDotExtTestNocaseDot = (ext) => { + ext = ext.toLowerCase(); + return (f) => f.toLowerCase().endsWith(ext); +}; +const starDotStarRE = /^\*+\.\*+$/; +const starDotStarTest = (f) => !f.startsWith('.') && f.includes('.'); +const starDotStarTestDot = (f) => f !== '.' && f !== '..' && f.includes('.'); +const dotStarRE = /^\.\*+$/; +const dotStarTest = (f) => f !== '.' && f !== '..' && f.startsWith('.'); +const starRE = /^\*+$/; +const starTest = (f) => f.length !== 0 && !f.startsWith('.'); +const starTestDot = (f) => f.length !== 0 && f !== '.' && f !== '..'; +const qmarksRE = /^\?+([^+@!?\*\[\(]*)?$/; +const qmarksTestNocase = ([$0, ext = '']) => { + const noext = qmarksTestNoExt([$0]); + if (!ext) + return noext; + ext = ext.toLowerCase(); + return (f) => noext(f) && f.toLowerCase().endsWith(ext); +}; +const qmarksTestNocaseDot = ([$0, ext = '']) => { + const noext = qmarksTestNoExtDot([$0]); + if (!ext) + return noext; + ext = ext.toLowerCase(); + return (f) => noext(f) && f.toLowerCase().endsWith(ext); +}; +const qmarksTestDot = ([$0, ext = '']) => { + const noext = qmarksTestNoExtDot([$0]); + return !ext ? noext : (f) => noext(f) && f.endsWith(ext); +}; +const qmarksTest = ([$0, ext = '']) => { + const noext = qmarksTestNoExt([$0]); + return !ext ? noext : (f) => noext(f) && f.endsWith(ext); +}; +const qmarksTestNoExt = ([$0]) => { + const len = $0.length; + return (f) => f.length === len && !f.startsWith('.'); +}; +const qmarksTestNoExtDot = ([$0]) => { + const len = $0.length; + return (f) => f.length === len && f !== '.' && f !== '..'; +}; +/* c8 ignore start */ +const defaultPlatform = (typeof process === 'object' && process + ? (typeof process.env === 'object' && + process.env && + process.env.__MINIMATCH_TESTING_PLATFORM__) || + process.platform + : 'posix'); +const path = { + win32: { sep: '\\' }, + posix: { sep: '/' }, +}; +/* c8 ignore stop */ +exports.sep = defaultPlatform === 'win32' ? path.win32.sep : path.posix.sep; +exports.minimatch.sep = exports.sep; +exports.GLOBSTAR = Symbol('globstar **'); +exports.minimatch.GLOBSTAR = exports.GLOBSTAR; +// any single thing other than / +// don't need to escape / when using new RegExp() +const qmark = '[^/]'; +// * => any number of characters +const 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. +const twoStarDot = '(?:(?!(?:\\/|^)(?:\\.{1,2})($|\\/)).)*?'; +// not a ^ or / followed by a dot, +// followed by anything, any number of times. +const twoStarNoDot = '(?:(?!(?:\\/|^)\\.).)*?'; +const filter = (pattern, options = {}) => (p) => (0, exports.minimatch)(p, pattern, options); +exports.filter = filter; +exports.minimatch.filter = exports.filter; +const ext = (a, b = {}) => Object.assign({}, a, b); +const defaults = (def) => { + if (!def || typeof def !== 'object' || !Object.keys(def).length) { + return exports.minimatch; + } + const orig = exports.minimatch; + const m = (p, pattern, options = {}) => orig(p, pattern, ext(def, options)); + return Object.assign(m, { + Minimatch: class Minimatch extends orig.Minimatch { + constructor(pattern, options = {}) { + super(pattern, ext(def, options)); + } + static defaults(options) { + return orig.defaults(ext(def, options)).Minimatch; + } + }, + AST: class AST extends orig.AST { + /* c8 ignore start */ + constructor(type, parent, options = {}) { + super(type, parent, ext(def, options)); + } + /* c8 ignore stop */ + static fromGlob(pattern, options = {}) { + return orig.AST.fromGlob(pattern, ext(def, options)); + } + }, + unescape: (s, options = {}) => orig.unescape(s, ext(def, options)), + escape: (s, options = {}) => orig.escape(s, ext(def, options)), + filter: (pattern, options = {}) => orig.filter(pattern, ext(def, options)), + defaults: (options) => orig.defaults(ext(def, options)), + makeRe: (pattern, options = {}) => orig.makeRe(pattern, ext(def, options)), + braceExpand: (pattern, options = {}) => orig.braceExpand(pattern, ext(def, options)), + match: (list, pattern, options = {}) => orig.match(list, pattern, ext(def, options)), + sep: orig.sep, + GLOBSTAR: exports.GLOBSTAR, + }); +}; +exports.defaults = defaults; +exports.minimatch.defaults = exports.defaults; +// 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 +const braceExpand = (pattern, options = {}) => { + (0, assert_valid_pattern_js_1.assertValidPattern)(pattern); + // Thanks to Yeting Li for + // improving this regexp to avoid a ReDOS vulnerability. + if (options.nobrace || !/\{(?:(?!\{).)*\}/.test(pattern)) { + // shortcut. no need to expand. + return [pattern]; + } + return (0, brace_expansion_1.default)(pattern); +}; +exports.braceExpand = braceExpand; +exports.minimatch.braceExpand = exports.braceExpand; +// 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. +const makeRe = (pattern, options = {}) => new Minimatch(pattern, options).makeRe(); +exports.makeRe = makeRe; +exports.minimatch.makeRe = exports.makeRe; +const match = (list, pattern, options = {}) => { + const mm = new Minimatch(pattern, options); + list = list.filter(f => mm.match(f)); + if (mm.options.nonull && !list.length) { + list.push(pattern); + } + return list; +}; +exports.match = match; +exports.minimatch.match = exports.match; +// replace stuff like \* with * +const globMagic = /[?*]|[+@!]\(.*?\)|\[|\]/; +const regExpEscape = (s) => s.replace(/[-[\]{}()*+?.,\\^$|#\s]/g, '\\$&'); +class Minimatch { + options; + set; + pattern; + windowsPathsNoEscape; + nonegate; + negate; + comment; + empty; + preserveMultipleSlashes; + partial; + globSet; + globParts; + nocase; + isWindows; + platform; + windowsNoMagicRoot; + regexp; + constructor(pattern, options = {}) { + (0, assert_valid_pattern_js_1.assertValidPattern)(pattern); + options = options || {}; + this.options = options; + this.pattern = pattern; + this.platform = options.platform || defaultPlatform; + this.isWindows = this.platform === 'win32'; + this.windowsPathsNoEscape = + !!options.windowsPathsNoEscape || options.allowWindowsEscape === false; + if (this.windowsPathsNoEscape) { + this.pattern = this.pattern.replace(/\\/g, '/'); + } + this.preserveMultipleSlashes = !!options.preserveMultipleSlashes; + this.regexp = null; + this.negate = false; + this.nonegate = !!options.nonegate; + this.comment = false; + this.empty = false; + this.partial = !!options.partial; + this.nocase = !!this.options.nocase; + this.windowsNoMagicRoot = + options.windowsNoMagicRoot !== undefined + ? options.windowsNoMagicRoot + : !!(this.isWindows && this.nocase); + this.globSet = []; + this.globParts = []; + this.set = []; + // make the set of regexps etc. + this.make(); + } + hasMagic() { + if (this.options.magicalBraces && this.set.length > 1) { + return true; + } + for (const pattern of this.set) { + for (const part of pattern) { + if (typeof part !== 'string') + return true; + } + } + return false; + } + debug(..._) { } + make() { + const pattern = this.pattern; + const 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 + this.globSet = [...new Set(this.braceExpand())]; + if (options.debug) { + this.debug = (...args) => console.error(...args); + } + this.debug(this.pattern, this.globSet); + // 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 + // + // First, we preprocess to make the glob pattern sets a bit simpler + // and deduped. There are some perf-killing patterns that can cause + // problems with a glob walk, but we can simplify them down a bit. + const rawGlobParts = this.globSet.map(s => this.slashSplit(s)); + this.globParts = this.preprocess(rawGlobParts); + this.debug(this.pattern, this.globParts); + // glob --> regexps + let set = this.globParts.map((s, _, __) => { + if (this.isWindows && this.windowsNoMagicRoot) { + // check if it's a drive or unc path. + const isUNC = s[0] === '' && + s[1] === '' && + (s[2] === '?' || !globMagic.test(s[2])) && + !globMagic.test(s[3]); + const isDrive = /^[a-z]:/i.test(s[0]); + if (isUNC) { + return [...s.slice(0, 4), ...s.slice(4).map(ss => this.parse(ss))]; + } + else if (isDrive) { + return [s[0], ...s.slice(1).map(ss => this.parse(ss))]; + } + } + return s.map(ss => this.parse(ss)); + }); + this.debug(this.pattern, set); + // filter out everything that didn't compile properly. + this.set = set.filter(s => s.indexOf(false) === -1); + // do not treat the ? in UNC paths as magic + if (this.isWindows) { + for (let i = 0; i < this.set.length; i++) { + const p = this.set[i]; + if (p[0] === '' && + p[1] === '' && + this.globParts[i][2] === '?' && + typeof p[3] === 'string' && + /^[a-z]:$/i.test(p[3])) { + p[2] = '?'; + } + } + } + this.debug(this.pattern, this.set); + } + // various transforms to equivalent pattern sets that are + // faster to process in a filesystem walk. The goal is to + // eliminate what we can, and push all ** patterns as far + // to the right as possible, even if it increases the number + // of patterns that we have to process. + preprocess(globParts) { + // if we're not in globstar mode, then turn all ** into * + if (this.options.noglobstar) { + for (let i = 0; i < globParts.length; i++) { + for (let j = 0; j < globParts[i].length; j++) { + if (globParts[i][j] === '**') { + globParts[i][j] = '*'; + } + } + } + } + const { optimizationLevel = 1 } = this.options; + if (optimizationLevel >= 2) { + // aggressive optimization for the purpose of fs walking + globParts = this.firstPhasePreProcess(globParts); + globParts = this.secondPhasePreProcess(globParts); + } + else if (optimizationLevel >= 1) { + // just basic optimizations to remove some .. parts + globParts = this.levelOneOptimize(globParts); + } + else { + // just collapse multiple ** portions into one + globParts = this.adjascentGlobstarOptimize(globParts); + } + return globParts; + } + // just get rid of adjascent ** portions + adjascentGlobstarOptimize(globParts) { + return globParts.map(parts => { + let gs = -1; + while (-1 !== (gs = parts.indexOf('**', gs + 1))) { + let i = gs; + while (parts[i + 1] === '**') { + i++; + } + if (i !== gs) { + parts.splice(gs, i - gs); + } + } + return parts; + }); + } + // get rid of adjascent ** and resolve .. portions + levelOneOptimize(globParts) { + return globParts.map(parts => { + parts = parts.reduce((set, part) => { + const prev = set[set.length - 1]; + if (part === '**' && prev === '**') { + return set; + } + if (part === '..') { + if (prev && prev !== '..' && prev !== '.' && prev !== '**') { + set.pop(); + return set; + } + } + set.push(part); + return set; + }, []); + return parts.length === 0 ? [''] : parts; + }); + } + levelTwoFileOptimize(parts) { + if (!Array.isArray(parts)) { + parts = this.slashSplit(parts); + } + let didSomething = false; + do { + didSomething = false; + //
                                  // -> 
                                  /
                                  +            if (!this.preserveMultipleSlashes) {
                                  +                for (let i = 1; i < parts.length - 1; i++) {
                                  +                    const p = parts[i];
                                  +                    // don't squeeze out UNC patterns
                                  +                    if (i === 1 && p === '' && parts[0] === '')
                                  +                        continue;
                                  +                    if (p === '.' || p === '') {
                                  +                        didSomething = true;
                                  +                        parts.splice(i, 1);
                                  +                        i--;
                                  +                    }
                                  +                }
                                  +                if (parts[0] === '.' &&
                                  +                    parts.length === 2 &&
                                  +                    (parts[1] === '.' || parts[1] === '')) {
                                  +                    didSomething = true;
                                  +                    parts.pop();
                                  +                }
                                  +            }
                                  +            // 
                                  /

                                  /../ ->

                                  /
                                  +            let dd = 0;
                                  +            while (-1 !== (dd = parts.indexOf('..', dd + 1))) {
                                  +                const p = parts[dd - 1];
                                  +                if (p && p !== '.' && p !== '..' && p !== '**') {
                                  +                    didSomething = true;
                                  +                    parts.splice(dd - 1, 2);
                                  +                    dd -= 2;
                                  +                }
                                  +            }
                                  +        } while (didSomething);
                                  +        return parts.length === 0 ? [''] : parts;
                                  +    }
                                  +    // First phase: single-pattern processing
                                  +    // 
                                   is 1 or more portions
                                  +    //  is 1 or more portions
                                  +    // 

                                  is any portion other than ., .., '', or ** + // is . or '' + // + // **/.. is *brutal* for filesystem walking performance, because + // it effectively resets the recursive walk each time it occurs, + // and ** cannot be reduced out by a .. pattern part like a regexp + // or most strings (other than .., ., and '') can be. + // + //

                                  /**/../

                                  /

                                  / -> {

                                  /../

                                  /

                                  /,

                                  /**/

                                  /

                                  /} + //

                                  // -> 
                                  /
                                  +    // 
                                  /

                                  /../ ->

                                  /
                                  +    // **/**/ -> **/
                                  +    //
                                  +    // **/*/ -> */**/ <== not valid because ** doesn't follow
                                  +    // this WOULD be allowed if ** did follow symlinks, or * didn't
                                  +    firstPhasePreProcess(globParts) {
                                  +        let didSomething = false;
                                  +        do {
                                  +            didSomething = false;
                                  +            // 
                                  /**/../

                                  /

                                  / -> {

                                  /../

                                  /

                                  /,

                                  /**/

                                  /

                                  /} + for (let parts of globParts) { + let gs = -1; + while (-1 !== (gs = parts.indexOf('**', gs + 1))) { + let gss = gs; + while (parts[gss + 1] === '**') { + //

                                  /**/**/ -> 
                                  /**/
                                  +                        gss++;
                                  +                    }
                                  +                    // eg, if gs is 2 and gss is 4, that means we have 3 **
                                  +                    // parts, and can remove 2 of them.
                                  +                    if (gss > gs) {
                                  +                        parts.splice(gs + 1, gss - gs);
                                  +                    }
                                  +                    let next = parts[gs + 1];
                                  +                    const p = parts[gs + 2];
                                  +                    const p2 = parts[gs + 3];
                                  +                    if (next !== '..')
                                  +                        continue;
                                  +                    if (!p ||
                                  +                        p === '.' ||
                                  +                        p === '..' ||
                                  +                        !p2 ||
                                  +                        p2 === '.' ||
                                  +                        p2 === '..') {
                                  +                        continue;
                                  +                    }
                                  +                    didSomething = true;
                                  +                    // edit parts in place, and push the new one
                                  +                    parts.splice(gs, 1);
                                  +                    const other = parts.slice(0);
                                  +                    other[gs] = '**';
                                  +                    globParts.push(other);
                                  +                    gs--;
                                  +                }
                                  +                // 
                                  // -> 
                                  /
                                  +                if (!this.preserveMultipleSlashes) {
                                  +                    for (let i = 1; i < parts.length - 1; i++) {
                                  +                        const p = parts[i];
                                  +                        // don't squeeze out UNC patterns
                                  +                        if (i === 1 && p === '' && parts[0] === '')
                                  +                            continue;
                                  +                        if (p === '.' || p === '') {
                                  +                            didSomething = true;
                                  +                            parts.splice(i, 1);
                                  +                            i--;
                                  +                        }
                                  +                    }
                                  +                    if (parts[0] === '.' &&
                                  +                        parts.length === 2 &&
                                  +                        (parts[1] === '.' || parts[1] === '')) {
                                  +                        didSomething = true;
                                  +                        parts.pop();
                                  +                    }
                                  +                }
                                  +                // 
                                  /

                                  /../ ->

                                  /
                                  +                let dd = 0;
                                  +                while (-1 !== (dd = parts.indexOf('..', dd + 1))) {
                                  +                    const p = parts[dd - 1];
                                  +                    if (p && p !== '.' && p !== '..' && p !== '**') {
                                  +                        didSomething = true;
                                  +                        const needDot = dd === 1 && parts[dd + 1] === '**';
                                  +                        const splin = needDot ? ['.'] : [];
                                  +                        parts.splice(dd - 1, 2, ...splin);
                                  +                        if (parts.length === 0)
                                  +                            parts.push('');
                                  +                        dd -= 2;
                                  +                    }
                                  +                }
                                  +            }
                                  +        } while (didSomething);
                                  +        return globParts;
                                  +    }
                                  +    // second phase: multi-pattern dedupes
                                  +    // {
                                  /*/,
                                  /

                                  /} ->

                                  /*/
                                  +    // {
                                  /,
                                  /} -> 
                                  /
                                  +    // {
                                  /**/,
                                  /} -> 
                                  /**/
                                  +    //
                                  +    // {
                                  /**/,
                                  /**/

                                  /} ->

                                  /**/
                                  +    // ^-- not valid because ** doens't follow symlinks
                                  +    secondPhasePreProcess(globParts) {
                                  +        for (let i = 0; i < globParts.length - 1; i++) {
                                  +            for (let j = i + 1; j < globParts.length; j++) {
                                  +                const matched = this.partsMatch(globParts[i], globParts[j], !this.preserveMultipleSlashes);
                                  +                if (!matched)
                                  +                    continue;
                                  +                globParts[i] = matched;
                                  +                globParts[j] = [];
                                  +            }
                                  +        }
                                  +        return globParts.filter(gs => gs.length);
                                  +    }
                                  +    partsMatch(a, b, emptyGSMatch = false) {
                                  +        let ai = 0;
                                  +        let bi = 0;
                                  +        let result = [];
                                  +        let which = '';
                                  +        while (ai < a.length && bi < b.length) {
                                  +            if (a[ai] === b[bi]) {
                                  +                result.push(which === 'b' ? b[bi] : a[ai]);
                                  +                ai++;
                                  +                bi++;
                                  +            }
                                  +            else if (emptyGSMatch && a[ai] === '**' && b[bi] === a[ai + 1]) {
                                  +                result.push(a[ai]);
                                  +                ai++;
                                  +            }
                                  +            else if (emptyGSMatch && b[bi] === '**' && a[ai] === b[bi + 1]) {
                                  +                result.push(b[bi]);
                                  +                bi++;
                                  +            }
                                  +            else if (a[ai] === '*' &&
                                  +                b[bi] &&
                                  +                (this.options.dot || !b[bi].startsWith('.')) &&
                                  +                b[bi] !== '**') {
                                  +                if (which === 'b')
                                  +                    return false;
                                  +                which = 'a';
                                  +                result.push(a[ai]);
                                  +                ai++;
                                  +                bi++;
                                  +            }
                                  +            else if (b[bi] === '*' &&
                                  +                a[ai] &&
                                  +                (this.options.dot || !a[ai].startsWith('.')) &&
                                  +                a[ai] !== '**') {
                                  +                if (which === 'a')
                                  +                    return false;
                                  +                which = 'b';
                                  +                result.push(b[bi]);
                                  +                ai++;
                                  +                bi++;
                                  +            }
                                  +            else {
                                  +                return false;
                                  +            }
                                  +        }
                                  +        // if we fall out of the loop, it means they two are identical
                                  +        // as long as their lengths match
                                  +        return a.length === b.length && result;
                                  +    }
                                  +    parseNegate() {
                                  +        if (this.nonegate)
                                  +            return;
                                  +        const pattern = this.pattern;
                                  +        let negate = false;
                                  +        let negateOffset = 0;
                                  +        for (let i = 0; i < pattern.length && pattern.charAt(i) === '!'; i++) {
                                  +            negate = !negate;
                                  +            negateOffset++;
                                  +        }
                                  +        if (negateOffset)
                                  +            this.pattern = pattern.slice(negateOffset);
                                  +        this.negate = 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.
                                  +    matchOne(file, pattern, partial = false) {
                                  +        const options = this.options;
                                  +        // UNC paths like //?/X:/... can match X:/... and vice versa
                                  +        // Drive letters in absolute drive or unc paths are always compared
                                  +        // case-insensitively.
                                  +        if (this.isWindows) {
                                  +            const fileDrive = typeof file[0] === 'string' && /^[a-z]:$/i.test(file[0]);
                                  +            const fileUNC = !fileDrive &&
                                  +                file[0] === '' &&
                                  +                file[1] === '' &&
                                  +                file[2] === '?' &&
                                  +                /^[a-z]:$/i.test(file[3]);
                                  +            const patternDrive = typeof pattern[0] === 'string' && /^[a-z]:$/i.test(pattern[0]);
                                  +            const patternUNC = !patternDrive &&
                                  +                pattern[0] === '' &&
                                  +                pattern[1] === '' &&
                                  +                pattern[2] === '?' &&
                                  +                typeof pattern[3] === 'string' &&
                                  +                /^[a-z]:$/i.test(pattern[3]);
                                  +            const fdi = fileUNC ? 3 : fileDrive ? 0 : undefined;
                                  +            const pdi = patternUNC ? 3 : patternDrive ? 0 : undefined;
                                  +            if (typeof fdi === 'number' && typeof pdi === 'number') {
                                  +                const [fd, pd] = [file[fdi], pattern[pdi]];
                                  +                if (fd.toLowerCase() === pd.toLowerCase()) {
                                  +                    pattern[pdi] = fd;
                                  +                    if (pdi > fdi) {
                                  +                        pattern = pattern.slice(pdi);
                                  +                    }
                                  +                    else if (fdi > pdi) {
                                  +                        file = file.slice(fdi);
                                  +                    }
                                  +                }
                                  +            }
                                  +        }
                                  +        // resolve and reduce . and .. portions in the file as well.
                                  +        // dont' need to do the second phase, because it's only one string[]
                                  +        const { optimizationLevel = 1 } = this.options;
                                  +        if (optimizationLevel >= 2) {
                                  +            file = this.levelTwoFileOptimize(file);
                                  +        }
                                  +        this.debug('matchOne', this, { file, 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.
                                  +            /* c8 ignore start */
                                  +            if (p === false) {
                                  +                return false;
                                  +            }
                                  +            /* c8 ignore stop */
                                  +            if (p === exports.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.
                                  +                /* c8 ignore start */
                                  +                if (partial) {
                                  +                    // ran out of file
                                  +                    this.debug('\n>>> no match, partial?', file, fr, pattern, pr);
                                  +                    if (fr === fl) {
                                  +                        return true;
                                  +                    }
                                  +                }
                                  +                /* c8 ignore stop */
                                  +                return false;
                                  +            }
                                  +            // something other than **
                                  +            // non-magic patterns just have to match exactly
                                  +            // patterns with magic have been turned into regexps.
                                  +            let hit;
                                  +            if (typeof p === 'string') {
                                  +                hit = f === p;
                                  +                this.debug('string match', p, f, hit);
                                  +            }
                                  +            else {
                                  +                hit = p.test(f);
                                  +                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 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] === '';
                                  +            /* c8 ignore start */
                                  +        }
                                  +        else {
                                  +            // should be unreachable.
                                  +            throw new Error('wtf?');
                                  +        }
                                  +        /* c8 ignore stop */
                                  +    }
                                  +    braceExpand() {
                                  +        return (0, exports.braceExpand)(this.pattern, this.options);
                                  +    }
                                  +    parse(pattern) {
                                  +        (0, assert_valid_pattern_js_1.assertValidPattern)(pattern);
                                  +        const options = this.options;
                                  +        // shortcuts
                                  +        if (pattern === '**')
                                  +            return exports.GLOBSTAR;
                                  +        if (pattern === '')
                                  +            return '';
                                  +        // far and away, the most common glob pattern parts are
                                  +        // *, *.*, and *.  Add a fast check method for those.
                                  +        let m;
                                  +        let fastTest = null;
                                  +        if ((m = pattern.match(starRE))) {
                                  +            fastTest = options.dot ? starTestDot : starTest;
                                  +        }
                                  +        else if ((m = pattern.match(starDotExtRE))) {
                                  +            fastTest = (options.nocase
                                  +                ? options.dot
                                  +                    ? starDotExtTestNocaseDot
                                  +                    : starDotExtTestNocase
                                  +                : options.dot
                                  +                    ? starDotExtTestDot
                                  +                    : starDotExtTest)(m[1]);
                                  +        }
                                  +        else if ((m = pattern.match(qmarksRE))) {
                                  +            fastTest = (options.nocase
                                  +                ? options.dot
                                  +                    ? qmarksTestNocaseDot
                                  +                    : qmarksTestNocase
                                  +                : options.dot
                                  +                    ? qmarksTestDot
                                  +                    : qmarksTest)(m);
                                  +        }
                                  +        else if ((m = pattern.match(starDotStarRE))) {
                                  +            fastTest = options.dot ? starDotStarTestDot : starDotStarTest;
                                  +        }
                                  +        else if ((m = pattern.match(dotStarRE))) {
                                  +            fastTest = dotStarTest;
                                  +        }
                                  +        const re = ast_js_1.AST.fromGlob(pattern, this.options).toMMPattern();
                                  +        if (fastTest && typeof re === 'object') {
                                  +            // Avoids overriding in frozen environments
                                  +            Reflect.defineProperty(re, 'test', { value: fastTest });
                                  +        }
                                  +        return re;
                                  +    }
                                  +    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.
                                  +        const set = this.set;
                                  +        if (!set.length) {
                                  +            this.regexp = false;
                                  +            return this.regexp;
                                  +        }
                                  +        const options = this.options;
                                  +        const twoStar = options.noglobstar
                                  +            ? star
                                  +            : options.dot
                                  +                ? twoStarDot
                                  +                : twoStarNoDot;
                                  +        const flags = new Set(options.nocase ? ['i'] : []);
                                  +        // regexpify non-globstar patterns
                                  +        // if ** is only item, then we just do one twoStar
                                  +        // if ** is first, and there are more, prepend (\/|twoStar\/)? to next
                                  +        // if ** is last, append (\/twoStar|) to previous
                                  +        // if ** is in the middle, append (\/|\/twoStar\/) to previous
                                  +        // then filter out GLOBSTAR symbols
                                  +        let re = set
                                  +            .map(pattern => {
                                  +            const pp = pattern.map(p => {
                                  +                if (p instanceof RegExp) {
                                  +                    for (const f of p.flags.split(''))
                                  +                        flags.add(f);
                                  +                }
                                  +                return typeof p === 'string'
                                  +                    ? regExpEscape(p)
                                  +                    : p === exports.GLOBSTAR
                                  +                        ? exports.GLOBSTAR
                                  +                        : p._src;
                                  +            });
                                  +            pp.forEach((p, i) => {
                                  +                const next = pp[i + 1];
                                  +                const prev = pp[i - 1];
                                  +                if (p !== exports.GLOBSTAR || prev === exports.GLOBSTAR) {
                                  +                    return;
                                  +                }
                                  +                if (prev === undefined) {
                                  +                    if (next !== undefined && next !== exports.GLOBSTAR) {
                                  +                        pp[i + 1] = '(?:\\/|' + twoStar + '\\/)?' + next;
                                  +                    }
                                  +                    else {
                                  +                        pp[i] = twoStar;
                                  +                    }
                                  +                }
                                  +                else if (next === undefined) {
                                  +                    pp[i - 1] = prev + '(?:\\/|' + twoStar + ')?';
                                  +                }
                                  +                else if (next !== exports.GLOBSTAR) {
                                  +                    pp[i - 1] = prev + '(?:\\/|\\/' + twoStar + '\\/)' + next;
                                  +                    pp[i + 1] = exports.GLOBSTAR;
                                  +                }
                                  +            });
                                  +            return pp.filter(p => p !== exports.GLOBSTAR).join('/');
                                  +        })
                                  +            .join('|');
                                  +        // need to wrap in parens if we had more than one thing with |,
                                  +        // otherwise only the first will be anchored to ^ and the last to $
                                  +        const [open, close] = set.length > 1 ? ['(?:', ')'] : ['', ''];
                                  +        // must match entire pattern
                                  +        // ending in a * or ** will make it less strict.
                                  +        re = '^' + open + re + close + '$';
                                  +        // can match anything, as long as it's not this.
                                  +        if (this.negate)
                                  +            re = '^(?!' + re + ').+$';
                                  +        try {
                                  +            this.regexp = new RegExp(re, [...flags].join(''));
                                  +            /* c8 ignore start */
                                  +        }
                                  +        catch (ex) {
                                  +            // should be impossible
                                  +            this.regexp = false;
                                  +        }
                                  +        /* c8 ignore stop */
                                  +        return this.regexp;
                                  +    }
                                  +    slashSplit(p) {
                                  +        // if p starts with // on windows, we preserve that
                                  +        // so that UNC paths aren't broken.  Otherwise, any number of
                                  +        // / characters are coalesced into one, unless
                                  +        // preserveMultipleSlashes is set to true.
                                  +        if (this.preserveMultipleSlashes) {
                                  +            return p.split('/');
                                  +        }
                                  +        else if (this.isWindows && /^\/\/[^\/]+/.test(p)) {
                                  +            // add an extra '' for the one we lose
                                  +            return ['', ...p.split(/\/+/)];
                                  +        }
                                  +        else {
                                  +            return p.split(/\/+/);
                                  +        }
                                  +    }
                                  +    match(f, 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;
                                  +        }
                                  +        const options = this.options;
                                  +        // windows: need to use /, not \
                                  +        if (this.isWindows) {
                                  +            f = f.split('\\').join('/');
                                  +        }
                                  +        // treat the test path as a set of pathparts.
                                  +        const ff = this.slashSplit(f);
                                  +        this.debug(this.pattern, 'split', ff);
                                  +        // 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.
                                  +        const set = this.set;
                                  +        this.debug(this.pattern, 'set', set);
                                  +        // Find the basename of the path by looking for the last non-empty segment
                                  +        let filename = ff[ff.length - 1];
                                  +        if (!filename) {
                                  +            for (let i = ff.length - 2; !filename && i >= 0; i--) {
                                  +                filename = ff[i];
                                  +            }
                                  +        }
                                  +        for (let i = 0; i < set.length; i++) {
                                  +            const pattern = set[i];
                                  +            let file = ff;
                                  +            if (options.matchBase && pattern.length === 1) {
                                  +                file = [filename];
                                  +            }
                                  +            const 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;
                                  +    }
                                  +    static defaults(def) {
                                  +        return exports.minimatch.defaults(def).Minimatch;
                                  +    }
                                  +}
                                  +exports.Minimatch = Minimatch;
                                  +/* c8 ignore start */
                                  +var ast_js_2 = require("./ast.js");
                                  +Object.defineProperty(exports, "AST", { enumerable: true, get: function () { return ast_js_2.AST; } });
                                  +var escape_js_2 = require("./escape.js");
                                  +Object.defineProperty(exports, "escape", { enumerable: true, get: function () { return escape_js_2.escape; } });
                                  +var unescape_js_2 = require("./unescape.js");
                                  +Object.defineProperty(exports, "unescape", { enumerable: true, get: function () { return unescape_js_2.unescape; } });
                                  +/* c8 ignore stop */
                                  +exports.minimatch.AST = ast_js_1.AST;
                                  +exports.minimatch.Minimatch = Minimatch;
                                  +exports.minimatch.escape = escape_js_1.escape;
                                  +exports.minimatch.unescape = unescape_js_1.unescape;
                                  +//# sourceMappingURL=index.js.map
                                  \ No newline at end of file
                                  diff --git a/node_modules/minimatch/dist/commonjs/index.js.map b/node_modules/minimatch/dist/commonjs/index.js.map
                                  new file mode 100644
                                  index 000000000..bae99b22b
                                  --- /dev/null
                                  +++ b/node_modules/minimatch/dist/commonjs/index.js.map
                                  @@ -0,0 +1 @@
                                  +{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":";;;;;;AAAA,sEAAoC;AACpC,uEAA8D;AAC9D,qCAA2C;AAC3C,2CAAoC;AACpC,+CAAwC;AAsCjC,MAAM,SAAS,GAAG,CACvB,CAAS,EACT,OAAe,EACf,UAA4B,EAAE,EAC9B,EAAE;IACF,IAAA,4CAAkB,EAAC,OAAO,CAAC,CAAA;IAE3B,oCAAoC;IACpC,IAAI,CAAC,OAAO,CAAC,SAAS,IAAI,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Ag4BC;AACD,qBAAqB;AACrB,mCAA8B;AAArB,6FAAA,GAAG,OAAA;AACZ,yCAAoC;AAA3B,mGAAA,MAAM,OAAA;AACf,6CAAwC;AAA/B,uGAAA,QAAQ,OAAA;AACjB,oBAAoB;AACpB,iBAAS,CAAC,GAAG,GAAG,YAAG,CAAA;AACnB,iBAAS,CAAC,SAAS,GAAG,SAAS,CAAA;AAC/B,iBAAS,CAAC,MAAM,GAAG,kBAAM,CAAA;AACzB,iBAAS,CAAC,QAAQ,GAAG,sBAAQ,CAAA","sourcesContent":["import expand from 'brace-expansion'\nimport { assertValidPattern } from './assert-valid-pattern.js'\nimport { AST, ExtglobType } from './ast.js'\nimport { escape } from './escape.js'\nimport { unescape } from './unescape.js'\n\ntype Platform =\n  | 'aix'\n  | 'android'\n  | 'darwin'\n  | 'freebsd'\n  | 'haiku'\n  | 'linux'\n  | 'openbsd'\n  | 'sunos'\n  | 'win32'\n  | 'cygwin'\n  | 'netbsd'\n\nexport interface MinimatchOptions {\n  nobrace?: boolean\n  nocomment?: boolean\n  nonegate?: boolean\n  debug?: boolean\n  noglobstar?: boolean\n  noext?: boolean\n  nonull?: boolean\n  windowsPathsNoEscape?: boolean\n  allowWindowsEscape?: boolean\n  partial?: boolean\n  dot?: boolean\n  nocase?: boolean\n  nocaseMagicOnly?: boolean\n  magicalBraces?: boolean\n  matchBase?: boolean\n  flipNegate?: boolean\n  preserveMultipleSlashes?: boolean\n  optimizationLevel?: number\n  platform?: Platform\n  windowsNoMagicRoot?: boolean\n}\n\nexport const minimatch = (\n  p: string,\n  pattern: string,\n  options: MinimatchOptions = {}\n) => {\n  assertValidPattern(pattern)\n\n  // shortcut: comments match nothing.\n  if (!options.nocomment && pattern.charAt(0) === '#') {\n    return false\n  }\n\n  return new Minimatch(pattern, options).match(p)\n}\n\n// Optimized checking for the most common glob patterns.\nconst starDotExtRE = /^\\*+([^+@!?\\*\\[\\(]*)$/\nconst starDotExtTest = (ext: string) => (f: string) =>\n  !f.startsWith('.') && f.endsWith(ext)\nconst starDotExtTestDot = (ext: string) => (f: string) => f.endsWith(ext)\nconst starDotExtTestNocase = (ext: string) => {\n  ext = ext.toLowerCase()\n  return (f: string) => !f.startsWith('.') && f.toLowerCase().endsWith(ext)\n}\nconst starDotExtTestNocaseDot = (ext: string) => {\n  ext = ext.toLowerCase()\n  return (f: string) => f.toLowerCase().endsWith(ext)\n}\nconst starDotStarRE = /^\\*+\\.\\*+$/\nconst starDotStarTest = (f: string) => !f.startsWith('.') && f.includes('.')\nconst starDotStarTestDot = (f: string) =>\n  f !== '.' && f !== '..' && f.includes('.')\nconst dotStarRE = /^\\.\\*+$/\nconst dotStarTest = (f: string) => f !== '.' && f !== '..' && f.startsWith('.')\nconst starRE = /^\\*+$/\nconst starTest = (f: string) => f.length !== 0 && !f.startsWith('.')\nconst starTestDot = (f: string) => f.length !== 0 && f !== '.' && f !== '..'\nconst qmarksRE = /^\\?+([^+@!?\\*\\[\\(]*)?$/\nconst qmarksTestNocase = ([$0, ext = '']: RegExpMatchArray) => {\n  const noext = qmarksTestNoExt([$0])\n  if (!ext) return noext\n  ext = ext.toLowerCase()\n  return (f: string) => noext(f) && f.toLowerCase().endsWith(ext)\n}\nconst qmarksTestNocaseDot = ([$0, ext = '']: RegExpMatchArray) => {\n  const noext = qmarksTestNoExtDot([$0])\n  if (!ext) return noext\n  ext = ext.toLowerCase()\n  return (f: string) => noext(f) && f.toLowerCase().endsWith(ext)\n}\nconst qmarksTestDot = ([$0, ext = '']: RegExpMatchArray) => {\n  const noext = qmarksTestNoExtDot([$0])\n  return !ext ? noext : (f: string) => noext(f) && f.endsWith(ext)\n}\nconst qmarksTest = ([$0, ext = '']: RegExpMatchArray) => {\n  const noext = qmarksTestNoExt([$0])\n  return !ext ? noext : (f: string) => noext(f) && f.endsWith(ext)\n}\nconst qmarksTestNoExt = ([$0]: RegExpMatchArray) => {\n  const len = $0.length\n  return (f: string) => f.length === len && !f.startsWith('.')\n}\nconst qmarksTestNoExtDot = ([$0]: RegExpMatchArray) => {\n  const len = $0.length\n  return (f: string) => f.length === len && f !== '.' && f !== '..'\n}\n\n/* c8 ignore start */\nconst defaultPlatform: Platform = (\n  typeof process === 'object' && process\n    ? (typeof process.env === 'object' &&\n        process.env &&\n        process.env.__MINIMATCH_TESTING_PLATFORM__) ||\n      process.platform\n    : 'posix'\n) as Platform\ntype Sep = '\\\\' | '/'\nconst path: { [k: string]: { sep: Sep } } = {\n  win32: { sep: '\\\\' },\n  posix: { sep: '/' },\n}\n/* c8 ignore stop */\n\nexport const sep = defaultPlatform === 'win32' ? path.win32.sep : path.posix.sep\nminimatch.sep = sep\n\nexport const GLOBSTAR = Symbol('globstar **')\nminimatch.GLOBSTAR = GLOBSTAR\n\n// any single thing other than /\n// don't need to escape / when using new RegExp()\nconst qmark = '[^/]'\n\n// * => any number of characters\nconst star = qmark + '*?'\n\n// ** when dots are allowed.  Anything goes, except .. and .\n// not (^ or / followed by one or two dots followed by $ or /),\n// followed by anything, any number of times.\nconst twoStarDot = '(?:(?!(?:\\\\/|^)(?:\\\\.{1,2})($|\\\\/)).)*?'\n\n// not a ^ or / followed by a dot,\n// followed by anything, any number of times.\nconst twoStarNoDot = '(?:(?!(?:\\\\/|^)\\\\.).)*?'\n\nexport const filter =\n  (pattern: string, options: MinimatchOptions = {}) =>\n  (p: string) =>\n    minimatch(p, pattern, options)\nminimatch.filter = filter\n\nconst ext = (a: MinimatchOptions, b: MinimatchOptions = {}) =>\n  Object.assign({}, a, b)\n\nexport const defaults = (def: MinimatchOptions): typeof minimatch => {\n  if (!def || typeof def !== 'object' || !Object.keys(def).length) {\n    return minimatch\n  }\n\n  const orig = minimatch\n\n  const m = (p: string, pattern: string, options: MinimatchOptions = {}) =>\n    orig(p, pattern, ext(def, options))\n\n  return Object.assign(m, {\n    Minimatch: class Minimatch extends orig.Minimatch {\n      constructor(pattern: string, options: MinimatchOptions = {}) {\n        super(pattern, ext(def, options))\n      }\n      static defaults(options: MinimatchOptions) {\n        return orig.defaults(ext(def, options)).Minimatch\n      }\n    },\n\n    AST: class AST extends orig.AST {\n      /* c8 ignore start */\n      constructor(\n        type: ExtglobType | null,\n        parent?: AST,\n        options: MinimatchOptions = {}\n      ) {\n        super(type, parent, ext(def, options))\n      }\n      /* c8 ignore stop */\n\n      static fromGlob(pattern: string, options: MinimatchOptions = {}) {\n        return orig.AST.fromGlob(pattern, ext(def, options))\n      }\n    },\n\n    unescape: (\n      s: string,\n      options: Pick = {}\n    ) => orig.unescape(s, ext(def, options)),\n\n    escape: (\n      s: string,\n      options: Pick = {}\n    ) => orig.escape(s, ext(def, options)),\n\n    filter: (pattern: string, options: MinimatchOptions = {}) =>\n      orig.filter(pattern, ext(def, options)),\n\n    defaults: (options: MinimatchOptions) => orig.defaults(ext(def, options)),\n\n    makeRe: (pattern: string, options: MinimatchOptions = {}) =>\n      orig.makeRe(pattern, ext(def, options)),\n\n    braceExpand: (pattern: string, options: MinimatchOptions = {}) =>\n      orig.braceExpand(pattern, ext(def, options)),\n\n    match: (list: string[], pattern: string, options: MinimatchOptions = {}) =>\n      orig.match(list, pattern, ext(def, options)),\n\n    sep: orig.sep,\n    GLOBSTAR: GLOBSTAR as typeof GLOBSTAR,\n  })\n}\nminimatch.defaults = defaults\n\n// Brace expansion:\n// a{b,c}d -> abd acd\n// a{b,}c -> abc ac\n// a{0..3}d -> a0d a1d a2d a3d\n// a{b,c{d,e}f}g -> abg acdfg acefg\n// a{b,c}d{e,f}g -> abdeg acdeg abdeg abdfg\n//\n// Invalid sets are not expanded.\n// a{2..}b -> a{2..}b\n// a{b}c -> a{b}c\nexport const braceExpand = (\n  pattern: string,\n  options: MinimatchOptions = {}\n) => {\n  assertValidPattern(pattern)\n\n  // Thanks to Yeting Li  for\n  // improving this regexp to avoid a ReDOS vulnerability.\n  if (options.nobrace || !/\\{(?:(?!\\{).)*\\}/.test(pattern)) {\n    // shortcut. no need to expand.\n    return [pattern]\n  }\n\n  return expand(pattern)\n}\nminimatch.braceExpand = braceExpand\n\n// parse a component of the expanded set.\n// At this point, no pattern may contain \"/\" in it\n// so we're going to return a 2d array, where each entry is the full\n// pattern, split on '/', and then turned into a regular expression.\n// A regexp is made at the end which joins each array with an\n// escaped /, and another full one which joins each regexp with |.\n//\n// Following the lead of Bash 4.1, note that \"**\" only has special meaning\n// when it is the *only* thing in a path portion.  Otherwise, any series\n// of * is equivalent to a single *.  Globstar behavior is enabled by\n// default, and can be disabled by setting options.noglobstar.\n\nexport const makeRe = (pattern: string, options: MinimatchOptions = {}) =>\n  new Minimatch(pattern, options).makeRe()\nminimatch.makeRe = makeRe\n\nexport const match = (\n  list: string[],\n  pattern: string,\n  options: MinimatchOptions = {}\n) => {\n  const mm = new Minimatch(pattern, options)\n  list = list.filter(f => mm.match(f))\n  if (mm.options.nonull && !list.length) {\n    list.push(pattern)\n  }\n  return list\n}\nminimatch.match = match\n\n// replace stuff like \\* with *\nconst globMagic = /[?*]|[+@!]\\(.*?\\)|\\[|\\]/\nconst regExpEscape = (s: string) =>\n  s.replace(/[-[\\]{}()*+?.,\\\\^$|#\\s]/g, '\\\\$&')\n\nexport type MMRegExp = RegExp & {\n  _src?: string\n  _glob?: string\n}\n\nexport type ParseReturnFiltered = string | MMRegExp | typeof GLOBSTAR\nexport type ParseReturn = ParseReturnFiltered | false\n\nexport class Minimatch {\n  options: MinimatchOptions\n  set: ParseReturnFiltered[][]\n  pattern: string\n\n  windowsPathsNoEscape: boolean\n  nonegate: boolean\n  negate: boolean\n  comment: boolean\n  empty: boolean\n  preserveMultipleSlashes: boolean\n  partial: boolean\n  globSet: string[]\n  globParts: string[][]\n  nocase: boolean\n\n  isWindows: boolean\n  platform: Platform\n  windowsNoMagicRoot: boolean\n\n  regexp: false | null | MMRegExp\n  constructor(pattern: string, options: MinimatchOptions = {}) {\n    assertValidPattern(pattern)\n\n    options = options || {}\n    this.options = options\n    this.pattern = pattern\n    this.platform = options.platform || defaultPlatform\n    this.isWindows = this.platform === 'win32'\n    this.windowsPathsNoEscape =\n      !!options.windowsPathsNoEscape || options.allowWindowsEscape === false\n    if (this.windowsPathsNoEscape) {\n      this.pattern = this.pattern.replace(/\\\\/g, '/')\n    }\n    this.preserveMultipleSlashes = !!options.preserveMultipleSlashes\n    this.regexp = null\n    this.negate = false\n    this.nonegate = !!options.nonegate\n    this.comment = false\n    this.empty = false\n    this.partial = !!options.partial\n    this.nocase = !!this.options.nocase\n    this.windowsNoMagicRoot =\n      options.windowsNoMagicRoot !== undefined\n        ? options.windowsNoMagicRoot\n        : !!(this.isWindows && this.nocase)\n\n    this.globSet = []\n    this.globParts = []\n    this.set = []\n\n    // make the set of regexps etc.\n    this.make()\n  }\n\n  hasMagic(): boolean {\n    if (this.options.magicalBraces && this.set.length > 1) {\n      return true\n    }\n    for (const pattern of this.set) {\n      for (const part of pattern) {\n        if (typeof part !== 'string') return true\n      }\n    }\n    return false\n  }\n\n  debug(..._: any[]) {}\n\n  make() {\n    const pattern = this.pattern\n    const options = this.options\n\n    // empty patterns and comments match nothing.\n    if (!options.nocomment && pattern.charAt(0) === '#') {\n      this.comment = true\n      return\n    }\n\n    if (!pattern) {\n      this.empty = true\n      return\n    }\n\n    // step 1: figure out negation, etc.\n    this.parseNegate()\n\n    // step 2: expand braces\n    this.globSet = [...new Set(this.braceExpand())]\n\n    if (options.debug) {\n      this.debug = (...args: any[]) => console.error(...args)\n    }\n\n    this.debug(this.pattern, this.globSet)\n\n    // step 3: now we have a set, so turn each one into a series of\n    // path-portion matching patterns.\n    // These will be regexps, except in the case of \"**\", which is\n    // set to the GLOBSTAR object for globstar behavior,\n    // and will not contain any / characters\n    //\n    // First, we preprocess to make the glob pattern sets a bit simpler\n    // and deduped.  There are some perf-killing patterns that can cause\n    // problems with a glob walk, but we can simplify them down a bit.\n    const rawGlobParts = this.globSet.map(s => this.slashSplit(s))\n    this.globParts = this.preprocess(rawGlobParts)\n    this.debug(this.pattern, this.globParts)\n\n    // glob --> regexps\n    let set = this.globParts.map((s, _, __) => {\n      if (this.isWindows && this.windowsNoMagicRoot) {\n        // check if it's a drive or unc path.\n        const isUNC =\n          s[0] === '' &&\n          s[1] === '' &&\n          (s[2] === '?' || !globMagic.test(s[2])) &&\n          !globMagic.test(s[3])\n        const isDrive = /^[a-z]:/i.test(s[0])\n        if (isUNC) {\n          return [...s.slice(0, 4), ...s.slice(4).map(ss => this.parse(ss))]\n        } else if (isDrive) {\n          return [s[0], ...s.slice(1).map(ss => this.parse(ss))]\n        }\n      }\n      return s.map(ss => this.parse(ss))\n    })\n\n    this.debug(this.pattern, set)\n\n    // filter out everything that didn't compile properly.\n    this.set = set.filter(\n      s => s.indexOf(false) === -1\n    ) as ParseReturnFiltered[][]\n\n    // do not treat the ? in UNC paths as magic\n    if (this.isWindows) {\n      for (let i = 0; i < this.set.length; i++) {\n        const p = this.set[i]\n        if (\n          p[0] === '' &&\n          p[1] === '' &&\n          this.globParts[i][2] === '?' &&\n          typeof p[3] === 'string' &&\n          /^[a-z]:$/i.test(p[3])\n        ) {\n          p[2] = '?'\n        }\n      }\n    }\n\n    this.debug(this.pattern, this.set)\n  }\n\n  // various transforms to equivalent pattern sets that are\n  // faster to process in a filesystem walk.  The goal is to\n  // eliminate what we can, and push all ** patterns as far\n  // to the right as possible, even if it increases the number\n  // of patterns that we have to process.\n  preprocess(globParts: string[][]) {\n    // if we're not in globstar mode, then turn all ** into *\n    if (this.options.noglobstar) {\n      for (let i = 0; i < globParts.length; i++) {\n        for (let j = 0; j < globParts[i].length; j++) {\n          if (globParts[i][j] === '**') {\n            globParts[i][j] = '*'\n          }\n        }\n      }\n    }\n\n    const { optimizationLevel = 1 } = this.options\n\n    if (optimizationLevel >= 2) {\n      // aggressive optimization for the purpose of fs walking\n      globParts = this.firstPhasePreProcess(globParts)\n      globParts = this.secondPhasePreProcess(globParts)\n    } else if (optimizationLevel >= 1) {\n      // just basic optimizations to remove some .. parts\n      globParts = this.levelOneOptimize(globParts)\n    } else {\n      // just collapse multiple ** portions into one\n      globParts = this.adjascentGlobstarOptimize(globParts)\n    }\n\n    return globParts\n  }\n\n  // just get rid of adjascent ** portions\n  adjascentGlobstarOptimize(globParts: string[][]) {\n    return globParts.map(parts => {\n      let gs: number = -1\n      while (-1 !== (gs = parts.indexOf('**', gs + 1))) {\n        let i = gs\n        while (parts[i + 1] === '**') {\n          i++\n        }\n        if (i !== gs) {\n          parts.splice(gs, i - gs)\n        }\n      }\n      return parts\n    })\n  }\n\n  // get rid of adjascent ** and resolve .. portions\n  levelOneOptimize(globParts: string[][]) {\n    return globParts.map(parts => {\n      parts = parts.reduce((set: string[], part) => {\n        const prev = set[set.length - 1]\n        if (part === '**' && prev === '**') {\n          return set\n        }\n        if (part === '..') {\n          if (prev && prev !== '..' && prev !== '.' && prev !== '**') {\n            set.pop()\n            return set\n          }\n        }\n        set.push(part)\n        return set\n      }, [])\n      return parts.length === 0 ? [''] : parts\n    })\n  }\n\n  levelTwoFileOptimize(parts: string | string[]) {\n    if (!Array.isArray(parts)) {\n      parts = this.slashSplit(parts)\n    }\n    let didSomething: boolean = false\n    do {\n      didSomething = false\n      // 
                                  // -> 
                                  /\n      if (!this.preserveMultipleSlashes) {\n        for (let i = 1; i < parts.length - 1; i++) {\n          const p = parts[i]\n          // don't squeeze out UNC patterns\n          if (i === 1 && p === '' && parts[0] === '') continue\n          if (p === '.' || p === '') {\n            didSomething = true\n            parts.splice(i, 1)\n            i--\n          }\n        }\n        if (\n          parts[0] === '.' &&\n          parts.length === 2 &&\n          (parts[1] === '.' || parts[1] === '')\n        ) {\n          didSomething = true\n          parts.pop()\n        }\n      }\n\n      // 
                                  /

                                  /../ ->

                                  /\n      let dd: number = 0\n      while (-1 !== (dd = parts.indexOf('..', dd + 1))) {\n        const p = parts[dd - 1]\n        if (p && p !== '.' && p !== '..' && p !== '**') {\n          didSomething = true\n          parts.splice(dd - 1, 2)\n          dd -= 2\n        }\n      }\n    } while (didSomething)\n    return parts.length === 0 ? [''] : parts\n  }\n\n  // First phase: single-pattern processing\n  // 
                                   is 1 or more portions\n  //  is 1 or more portions\n  // 

                                  is any portion other than ., .., '', or **\n // is . or ''\n //\n // **/.. is *brutal* for filesystem walking performance, because\n // it effectively resets the recursive walk each time it occurs,\n // and ** cannot be reduced out by a .. pattern part like a regexp\n // or most strings (other than .., ., and '') can be.\n //\n //

                                  /**/../

                                  /

                                  / -> {

                                  /../

                                  /

                                  /,

                                  /**/

                                  /

                                  /}\n //

                                  // -> 
                                  /\n  // 
                                  /

                                  /../ ->

                                  /\n  // **/**/ -> **/\n  //\n  // **/*/ -> */**/ <== not valid because ** doesn't follow\n  // this WOULD be allowed if ** did follow symlinks, or * didn't\n  firstPhasePreProcess(globParts: string[][]) {\n    let didSomething = false\n    do {\n      didSomething = false\n      // 
                                  /**/../

                                  /

                                  / -> {

                                  /../

                                  /

                                  /,

                                  /**/

                                  /

                                  /}\n for (let parts of globParts) {\n let gs: number = -1\n while (-1 !== (gs = parts.indexOf('**', gs + 1))) {\n let gss: number = gs\n while (parts[gss + 1] === '**') {\n //

                                  /**/**/ -> 
                                  /**/\n            gss++\n          }\n          // eg, if gs is 2 and gss is 4, that means we have 3 **\n          // parts, and can remove 2 of them.\n          if (gss > gs) {\n            parts.splice(gs + 1, gss - gs)\n          }\n\n          let next = parts[gs + 1]\n          const p = parts[gs + 2]\n          const p2 = parts[gs + 3]\n          if (next !== '..') continue\n          if (\n            !p ||\n            p === '.' ||\n            p === '..' ||\n            !p2 ||\n            p2 === '.' ||\n            p2 === '..'\n          ) {\n            continue\n          }\n          didSomething = true\n          // edit parts in place, and push the new one\n          parts.splice(gs, 1)\n          const other = parts.slice(0)\n          other[gs] = '**'\n          globParts.push(other)\n          gs--\n        }\n\n        // 
                                  // -> 
                                  /\n        if (!this.preserveMultipleSlashes) {\n          for (let i = 1; i < parts.length - 1; i++) {\n            const p = parts[i]\n            // don't squeeze out UNC patterns\n            if (i === 1 && p === '' && parts[0] === '') continue\n            if (p === '.' || p === '') {\n              didSomething = true\n              parts.splice(i, 1)\n              i--\n            }\n          }\n          if (\n            parts[0] === '.' &&\n            parts.length === 2 &&\n            (parts[1] === '.' || parts[1] === '')\n          ) {\n            didSomething = true\n            parts.pop()\n          }\n        }\n\n        // 
                                  /

                                  /../ ->

                                  /\n        let dd: number = 0\n        while (-1 !== (dd = parts.indexOf('..', dd + 1))) {\n          const p = parts[dd - 1]\n          if (p && p !== '.' && p !== '..' && p !== '**') {\n            didSomething = true\n            const needDot = dd === 1 && parts[dd + 1] === '**'\n            const splin = needDot ? ['.'] : []\n            parts.splice(dd - 1, 2, ...splin)\n            if (parts.length === 0) parts.push('')\n            dd -= 2\n          }\n        }\n      }\n    } while (didSomething)\n\n    return globParts\n  }\n\n  // second phase: multi-pattern dedupes\n  // {
                                  /*/,
                                  /

                                  /} ->

                                  /*/\n  // {
                                  /,
                                  /} -> 
                                  /\n  // {
                                  /**/,
                                  /} -> 
                                  /**/\n  //\n  // {
                                  /**/,
                                  /**/

                                  /} ->

                                  /**/\n  // ^-- not valid because ** doens't follow symlinks\n  secondPhasePreProcess(globParts: string[][]): string[][] {\n    for (let i = 0; i < globParts.length - 1; i++) {\n      for (let j = i + 1; j < globParts.length; j++) {\n        const matched = this.partsMatch(\n          globParts[i],\n          globParts[j],\n          !this.preserveMultipleSlashes\n        )\n        if (!matched) continue\n        globParts[i] = matched\n        globParts[j] = []\n      }\n    }\n    return globParts.filter(gs => gs.length)\n  }\n\n  partsMatch(\n    a: string[],\n    b: string[],\n    emptyGSMatch: boolean = false\n  ): false | string[] {\n    let ai = 0\n    let bi = 0\n    let result: string[] = []\n    let which: string = ''\n    while (ai < a.length && bi < b.length) {\n      if (a[ai] === b[bi]) {\n        result.push(which === 'b' ? b[bi] : a[ai])\n        ai++\n        bi++\n      } else if (emptyGSMatch && a[ai] === '**' && b[bi] === a[ai + 1]) {\n        result.push(a[ai])\n        ai++\n      } else if (emptyGSMatch && b[bi] === '**' && a[ai] === b[bi + 1]) {\n        result.push(b[bi])\n        bi++\n      } else if (\n        a[ai] === '*' &&\n        b[bi] &&\n        (this.options.dot || !b[bi].startsWith('.')) &&\n        b[bi] !== '**'\n      ) {\n        if (which === 'b') return false\n        which = 'a'\n        result.push(a[ai])\n        ai++\n        bi++\n      } else if (\n        b[bi] === '*' &&\n        a[ai] &&\n        (this.options.dot || !a[ai].startsWith('.')) &&\n        a[ai] !== '**'\n      ) {\n        if (which === 'a') return false\n        which = 'b'\n        result.push(b[bi])\n        ai++\n        bi++\n      } else {\n        return false\n      }\n    }\n    // if we fall out of the loop, it means they two are identical\n    // as long as their lengths match\n    return a.length === b.length && result\n  }\n\n  parseNegate() {\n    if (this.nonegate) return\n\n    const pattern = this.pattern\n    let negate = false\n    let negateOffset = 0\n\n    for (let i = 0; i < pattern.length && pattern.charAt(i) === '!'; i++) {\n      negate = !negate\n      negateOffset++\n    }\n\n    if (negateOffset) this.pattern = pattern.slice(negateOffset)\n    this.negate = negate\n  }\n\n  // set partial to true to test if, for example,\n  // \"/a/b\" matches the start of \"/*/b/*/d\"\n  // Partial means, if you run out of file before you run\n  // out of pattern, then that's fine, as long as all\n  // the parts match.\n  matchOne(file: string[], pattern: ParseReturn[], partial: boolean = false) {\n    const options = this.options\n\n    // UNC paths like //?/X:/... can match X:/... and vice versa\n    // Drive letters in absolute drive or unc paths are always compared\n    // case-insensitively.\n    if (this.isWindows) {\n      const fileDrive = typeof file[0] === 'string' && /^[a-z]:$/i.test(file[0])\n      const fileUNC =\n        !fileDrive &&\n        file[0] === '' &&\n        file[1] === '' &&\n        file[2] === '?' &&\n        /^[a-z]:$/i.test(file[3])\n\n      const patternDrive =\n        typeof pattern[0] === 'string' && /^[a-z]:$/i.test(pattern[0])\n      const patternUNC =\n        !patternDrive &&\n        pattern[0] === '' &&\n        pattern[1] === '' &&\n        pattern[2] === '?' &&\n        typeof pattern[3] === 'string' &&\n        /^[a-z]:$/i.test(pattern[3])\n\n      const fdi = fileUNC ? 3 : fileDrive ? 0 : undefined\n      const pdi = patternUNC ? 3 : patternDrive ? 0 : undefined\n      if (typeof fdi === 'number' && typeof pdi === 'number') {\n        const [fd, pd]: [string, string] = [file[fdi], pattern[pdi] as string]\n        if (fd.toLowerCase() === pd.toLowerCase()) {\n          pattern[pdi] = fd\n          if (pdi > fdi) {\n            pattern = pattern.slice( pdi)\n          } else if (fdi > pdi) {\n            file = file.slice(fdi)\n          }\n        }\n      }\n    }\n\n    // resolve and reduce . and .. portions in the file as well.\n    // dont' need to do the second phase, because it's only one string[]\n    const { optimizationLevel = 1 } = this.options\n    if (optimizationLevel >= 2) {\n      file = this.levelTwoFileOptimize(file)\n    }\n\n    this.debug('matchOne', this, { file, pattern })\n    this.debug('matchOne', file.length, pattern.length)\n\n    for (\n      var fi = 0, pi = 0, fl = file.length, pl = pattern.length;\n      fi < fl && pi < pl;\n      fi++, pi++\n    ) {\n      this.debug('matchOne loop')\n      var p = pattern[pi]\n      var f = file[fi]\n\n      this.debug(pattern, p, f)\n\n      // should be impossible.\n      // some invalid regexp stuff in the set.\n      /* c8 ignore start */\n      if (p === false) {\n        return false\n      }\n      /* c8 ignore stop */\n\n      if (p === GLOBSTAR) {\n        this.debug('GLOBSTAR', [pattern, p, f])\n\n        // \"**\"\n        // a/**/b/**/c would match the following:\n        // a/b/x/y/z/c\n        // a/x/y/z/b/c\n        // a/b/x/b/x/c\n        // a/b/c\n        // To do this, take the rest of the pattern after\n        // the **, and see if it would match the file remainder.\n        // If so, return success.\n        // If not, the ** \"swallows\" a segment, and try again.\n        // This is recursively awful.\n        //\n        // a/**/b/**/c matching a/b/x/y/z/c\n        // - a matches a\n        // - doublestar\n        //   - matchOne(b/x/y/z/c, b/**/c)\n        //     - b matches b\n        //     - doublestar\n        //       - matchOne(x/y/z/c, c) -> no\n        //       - matchOne(y/z/c, c) -> no\n        //       - matchOne(z/c, c) -> no\n        //       - matchOne(c, c) yes, hit\n        var fr = fi\n        var pr = pi + 1\n        if (pr === pl) {\n          this.debug('** at the end')\n          // a ** at the end will just swallow the rest.\n          // We have found a match.\n          // however, it will not swallow /.x, unless\n          // options.dot is set.\n          // . and .. are *never* matched by **, for explosively\n          // exponential reasons.\n          for (; fi < fl; fi++) {\n            if (\n              file[fi] === '.' ||\n              file[fi] === '..' ||\n              (!options.dot && file[fi].charAt(0) === '.')\n            )\n              return false\n          }\n          return true\n        }\n\n        // ok, let's see if we can swallow whatever we can.\n        while (fr < fl) {\n          var swallowee = file[fr]\n\n          this.debug('\\nglobstar while', file, fr, pattern, pr, swallowee)\n\n          // XXX remove this slice.  Just pass the start index.\n          if (this.matchOne(file.slice(fr), pattern.slice(pr), partial)) {\n            this.debug('globstar found match!', fr, fl, swallowee)\n            // found a match.\n            return true\n          } else {\n            // can't swallow \".\" or \"..\" ever.\n            // can only swallow \".foo\" when explicitly asked.\n            if (\n              swallowee === '.' ||\n              swallowee === '..' ||\n              (!options.dot && swallowee.charAt(0) === '.')\n            ) {\n              this.debug('dot detected!', file, fr, pattern, pr)\n              break\n            }\n\n            // ** swallows a segment, and continue.\n            this.debug('globstar swallow a segment, and continue')\n            fr++\n          }\n        }\n\n        // no match was found.\n        // However, in partial mode, we can't say this is necessarily over.\n        /* c8 ignore start */\n        if (partial) {\n          // ran out of file\n          this.debug('\\n>>> no match, partial?', file, fr, pattern, pr)\n          if (fr === fl) {\n            return true\n          }\n        }\n        /* c8 ignore stop */\n        return false\n      }\n\n      // something other than **\n      // non-magic patterns just have to match exactly\n      // patterns with magic have been turned into regexps.\n      let hit: boolean\n      if (typeof p === 'string') {\n        hit = f === p\n        this.debug('string match', p, f, hit)\n      } else {\n        hit = p.test(f)\n        this.debug('pattern match', p, f, hit)\n      }\n\n      if (!hit) return false\n    }\n\n    // Note: ending in / means that we'll get a final \"\"\n    // at the end of the pattern.  This can only match a\n    // corresponding \"\" at the end of the file.\n    // If the file ends in /, then it can only match a\n    // a pattern that ends in /, unless the pattern just\n    // doesn't have any more for it. But, a/b/ should *not*\n    // match \"a/b/*\", even though \"\" matches against the\n    // [^/]*? pattern, except in partial mode, where it might\n    // simply not be reached yet.\n    // However, a/b/ should still satisfy a/*\n\n    // now either we fell off the end of the pattern, or we're done.\n    if (fi === fl && pi === pl) {\n      // ran out of pattern and filename at the same time.\n      // an exact hit!\n      return true\n    } else if (fi === fl) {\n      // ran out of file, but still had pattern left.\n      // this is ok if we're doing the match as part of\n      // a glob fs traversal.\n      return partial\n    } else if (pi === pl) {\n      // ran out of pattern, still have file left.\n      // this is only acceptable if we're on the very last\n      // empty segment of a file with a trailing slash.\n      // a/* should match a/b/\n      return fi === fl - 1 && file[fi] === ''\n\n      /* c8 ignore start */\n    } else {\n      // should be unreachable.\n      throw new Error('wtf?')\n    }\n    /* c8 ignore stop */\n  }\n\n  braceExpand() {\n    return braceExpand(this.pattern, this.options)\n  }\n\n  parse(pattern: string): ParseReturn {\n    assertValidPattern(pattern)\n\n    const options = this.options\n\n    // shortcuts\n    if (pattern === '**') return GLOBSTAR\n    if (pattern === '') return ''\n\n    // far and away, the most common glob pattern parts are\n    // *, *.*, and *.  Add a fast check method for those.\n    let m: RegExpMatchArray | null\n    let fastTest: null | ((f: string) => boolean) = null\n    if ((m = pattern.match(starRE))) {\n      fastTest = options.dot ? starTestDot : starTest\n    } else if ((m = pattern.match(starDotExtRE))) {\n      fastTest = (\n        options.nocase\n          ? options.dot\n            ? starDotExtTestNocaseDot\n            : starDotExtTestNocase\n          : options.dot\n          ? starDotExtTestDot\n          : starDotExtTest\n      )(m[1])\n    } else if ((m = pattern.match(qmarksRE))) {\n      fastTest = (\n        options.nocase\n          ? options.dot\n            ? qmarksTestNocaseDot\n            : qmarksTestNocase\n          : options.dot\n          ? qmarksTestDot\n          : qmarksTest\n      )(m)\n    } else if ((m = pattern.match(starDotStarRE))) {\n      fastTest = options.dot ? starDotStarTestDot : starDotStarTest\n    } else if ((m = pattern.match(dotStarRE))) {\n      fastTest = dotStarTest\n    }\n\n    const re = AST.fromGlob(pattern, this.options).toMMPattern()\n    if (fastTest && typeof re === 'object') {\n      // Avoids overriding in frozen environments\n      Reflect.defineProperty(re, 'test', { value: fastTest })\n    }\n    return re\n  }\n\n  makeRe() {\n    if (this.regexp || this.regexp === false) return this.regexp\n\n    // at this point, this.set is a 2d array of partial\n    // pattern strings, or \"**\".\n    //\n    // It's better to use .match().  This function shouldn't\n    // be used, really, but it's pretty convenient sometimes,\n    // when you just want to work with a regex.\n    const set = this.set\n\n    if (!set.length) {\n      this.regexp = false\n      return this.regexp\n    }\n    const options = this.options\n\n    const twoStar = options.noglobstar\n      ? star\n      : options.dot\n      ? twoStarDot\n      : twoStarNoDot\n    const flags = new Set(options.nocase ? ['i'] : [])\n\n    // regexpify non-globstar patterns\n    // if ** is only item, then we just do one twoStar\n    // if ** is first, and there are more, prepend (\\/|twoStar\\/)? to next\n    // if ** is last, append (\\/twoStar|) to previous\n    // if ** is in the middle, append (\\/|\\/twoStar\\/) to previous\n    // then filter out GLOBSTAR symbols\n    let re = set\n      .map(pattern => {\n        const pp: (string | typeof GLOBSTAR)[] = pattern.map(p => {\n          if (p instanceof RegExp) {\n            for (const f of p.flags.split('')) flags.add(f)\n          }\n          return typeof p === 'string'\n            ? regExpEscape(p)\n            : p === GLOBSTAR\n            ? GLOBSTAR\n            : p._src\n        }) as (string | typeof GLOBSTAR)[]\n        pp.forEach((p, i) => {\n          const next = pp[i + 1]\n          const prev = pp[i - 1]\n          if (p !== GLOBSTAR || prev === GLOBSTAR) {\n            return\n          }\n          if (prev === undefined) {\n            if (next !== undefined && next !== GLOBSTAR) {\n              pp[i + 1] = '(?:\\\\/|' + twoStar + '\\\\/)?' + next\n            } else {\n              pp[i] = twoStar\n            }\n          } else if (next === undefined) {\n            pp[i - 1] = prev + '(?:\\\\/|' + twoStar + ')?'\n          } else if (next !== GLOBSTAR) {\n            pp[i - 1] = prev + '(?:\\\\/|\\\\/' + twoStar + '\\\\/)' + next\n            pp[i + 1] = GLOBSTAR\n          }\n        })\n        return pp.filter(p => p !== GLOBSTAR).join('/')\n      })\n      .join('|')\n\n    // need to wrap in parens if we had more than one thing with |,\n    // otherwise only the first will be anchored to ^ and the last to $\n    const [open, close] = set.length > 1 ? ['(?:', ')'] : ['', '']\n    // must match entire pattern\n    // ending in a * or ** will make it less strict.\n    re = '^' + open + re + close + '$'\n\n    // can match anything, as long as it's not this.\n    if (this.negate) re = '^(?!' + re + ').+$'\n\n    try {\n      this.regexp = new RegExp(re, [...flags].join(''))\n      /* c8 ignore start */\n    } catch (ex) {\n      // should be impossible\n      this.regexp = false\n    }\n    /* c8 ignore stop */\n    return this.regexp\n  }\n\n  slashSplit(p: string) {\n    // if p starts with // on windows, we preserve that\n    // so that UNC paths aren't broken.  Otherwise, any number of\n    // / characters are coalesced into one, unless\n    // preserveMultipleSlashes is set to true.\n    if (this.preserveMultipleSlashes) {\n      return p.split('/')\n    } else if (this.isWindows && /^\\/\\/[^\\/]+/.test(p)) {\n      // add an extra '' for the one we lose\n      return ['', ...p.split(/\\/+/)]\n    } else {\n      return p.split(/\\/+/)\n    }\n  }\n\n  match(f: string, partial = this.partial) {\n    this.debug('match', f, this.pattern)\n    // short-circuit in the case of busted things.\n    // comments, etc.\n    if (this.comment) {\n      return false\n    }\n    if (this.empty) {\n      return f === ''\n    }\n\n    if (f === '/' && partial) {\n      return true\n    }\n\n    const options = this.options\n\n    // windows: need to use /, not \\\n    if (this.isWindows) {\n      f = f.split('\\\\').join('/')\n    }\n\n    // treat the test path as a set of pathparts.\n    const ff = this.slashSplit(f)\n    this.debug(this.pattern, 'split', ff)\n\n    // just ONE of the pattern sets in this.set needs to match\n    // in order for it to be valid.  If negating, then just one\n    // match means that we have failed.\n    // Either way, return on the first hit.\n\n    const set = this.set\n    this.debug(this.pattern, 'set', set)\n\n    // Find the basename of the path by looking for the last non-empty segment\n    let filename: string = ff[ff.length - 1]\n    if (!filename) {\n      for (let i = ff.length - 2; !filename && i >= 0; i--) {\n        filename = ff[i]\n      }\n    }\n\n    for (let i = 0; i < set.length; i++) {\n      const pattern = set[i]\n      let file = ff\n      if (options.matchBase && pattern.length === 1) {\n        file = [filename]\n      }\n      const hit = this.matchOne(file, pattern, partial)\n      if (hit) {\n        if (options.flipNegate) {\n          return true\n        }\n        return !this.negate\n      }\n    }\n\n    // didn't get any hits.  this is success if it's a negative\n    // pattern, failure otherwise.\n    if (options.flipNegate) {\n      return false\n    }\n    return this.negate\n  }\n\n  static defaults(def: MinimatchOptions) {\n    return minimatch.defaults(def).Minimatch\n  }\n}\n/* c8 ignore start */\nexport { AST } from './ast.js'\nexport { escape } from './escape.js'\nexport { unescape } from './unescape.js'\n/* c8 ignore stop */\nminimatch.AST = AST\nminimatch.Minimatch = Minimatch\nminimatch.escape = escape\nminimatch.unescape = unescape\n"]}
                                  \ No newline at end of file
                                  diff --git a/node_modules/minimatch/dist/commonjs/package.json b/node_modules/minimatch/dist/commonjs/package.json
                                  new file mode 100644
                                  index 000000000..5bbefffba
                                  --- /dev/null
                                  +++ b/node_modules/minimatch/dist/commonjs/package.json
                                  @@ -0,0 +1,3 @@
                                  +{
                                  +  "type": "commonjs"
                                  +}
                                  diff --git a/node_modules/minimatch/dist/commonjs/unescape.d.ts b/node_modules/minimatch/dist/commonjs/unescape.d.ts
                                  new file mode 100644
                                  index 000000000..23a7b387c
                                  --- /dev/null
                                  +++ b/node_modules/minimatch/dist/commonjs/unescape.d.ts
                                  @@ -0,0 +1,17 @@
                                  +import { MinimatchOptions } from './index.js';
                                  +/**
                                  + * Un-escape a string that has been escaped with {@link escape}.
                                  + *
                                  + * If the {@link windowsPathsNoEscape} option is used, then square-brace
                                  + * escapes are removed, but not backslash escapes.  For example, it will turn
                                  + * the string `'[*]'` into `*`, but it will not turn `'\\*'` into `'*'`,
                                  + * becuase `\` is a path separator in `windowsPathsNoEscape` mode.
                                  + *
                                  + * When `windowsPathsNoEscape` is not set, then both brace escapes and
                                  + * backslash escapes are removed.
                                  + *
                                  + * Slashes (and backslashes in `windowsPathsNoEscape` mode) cannot be escaped
                                  + * or unescaped.
                                  + */
                                  +export declare const unescape: (s: string, { windowsPathsNoEscape, }?: Pick) => string;
                                  +//# sourceMappingURL=unescape.d.ts.map
                                  \ No newline at end of file
                                  diff --git a/node_modules/minimatch/dist/commonjs/unescape.d.ts.map b/node_modules/minimatch/dist/commonjs/unescape.d.ts.map
                                  new file mode 100644
                                  index 000000000..7ace07013
                                  --- /dev/null
                                  +++ b/node_modules/minimatch/dist/commonjs/unescape.d.ts.map
                                  @@ -0,0 +1 @@
                                  +{"version":3,"file":"unescape.d.ts","sourceRoot":"","sources":["../../src/unescape.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,gBAAgB,EAAE,MAAM,YAAY,CAAA;AAC7C;;;;;;;;;;;;;GAaG;AACH,eAAO,MAAM,QAAQ,MAChB,MAAM,8BAGN,KAAK,gBAAgB,EAAE,sBAAsB,CAAC,WAKlD,CAAA"}
                                  \ No newline at end of file
                                  diff --git a/node_modules/minimatch/dist/commonjs/unescape.js b/node_modules/minimatch/dist/commonjs/unescape.js
                                  new file mode 100644
                                  index 000000000..47c36bcee
                                  --- /dev/null
                                  +++ b/node_modules/minimatch/dist/commonjs/unescape.js
                                  @@ -0,0 +1,24 @@
                                  +"use strict";
                                  +Object.defineProperty(exports, "__esModule", { value: true });
                                  +exports.unescape = void 0;
                                  +/**
                                  + * Un-escape a string that has been escaped with {@link escape}.
                                  + *
                                  + * If the {@link windowsPathsNoEscape} option is used, then square-brace
                                  + * escapes are removed, but not backslash escapes.  For example, it will turn
                                  + * the string `'[*]'` into `*`, but it will not turn `'\\*'` into `'*'`,
                                  + * becuase `\` is a path separator in `windowsPathsNoEscape` mode.
                                  + *
                                  + * When `windowsPathsNoEscape` is not set, then both brace escapes and
                                  + * backslash escapes are removed.
                                  + *
                                  + * Slashes (and backslashes in `windowsPathsNoEscape` mode) cannot be escaped
                                  + * or unescaped.
                                  + */
                                  +const unescape = (s, { windowsPathsNoEscape = false, } = {}) => {
                                  +    return windowsPathsNoEscape
                                  +        ? s.replace(/\[([^\/\\])\]/g, '$1')
                                  +        : s.replace(/((?!\\).|^)\[([^\/\\])\]/g, '$1$2').replace(/\\([^\/])/g, '$1');
                                  +};
                                  +exports.unescape = unescape;
                                  +//# sourceMappingURL=unescape.js.map
                                  \ No newline at end of file
                                  diff --git a/node_modules/minimatch/dist/commonjs/unescape.js.map b/node_modules/minimatch/dist/commonjs/unescape.js.map
                                  new file mode 100644
                                  index 000000000..353d3aa02
                                  --- /dev/null
                                  +++ b/node_modules/minimatch/dist/commonjs/unescape.js.map
                                  @@ -0,0 +1 @@
                                  +{"version":3,"file":"unescape.js","sourceRoot":"","sources":["../../src/unescape.ts"],"names":[],"mappings":";;;AACA;;;;;;;;;;;;;GAaG;AACI,MAAM,QAAQ,GAAG,CACtB,CAAS,EACT,EACE,oBAAoB,GAAG,KAAK,MACsB,EAAE,EACtD,EAAE;IACF,OAAO,oBAAoB;QACzB,CAAC,CAAC,CAAC,CAAC,OAAO,CAAC,gBAAgB,EAAE,IAAI,CAAC;QACnC,CAAC,CAAC,CAAC,CAAC,OAAO,CAAC,2BAA2B,EAAE,MAAM,CAAC,CAAC,OAAO,CAAC,YAAY,EAAE,IAAI,CAAC,CAAA;AAChF,CAAC,CAAA;AATY,QAAA,QAAQ,YASpB","sourcesContent":["import { MinimatchOptions } from './index.js'\n/**\n * Un-escape a string that has been escaped with {@link escape}.\n *\n * If the {@link windowsPathsNoEscape} option is used, then square-brace\n * escapes are removed, but not backslash escapes.  For example, it will turn\n * the string `'[*]'` into `*`, but it will not turn `'\\\\*'` into `'*'`,\n * becuase `\\` is a path separator in `windowsPathsNoEscape` mode.\n *\n * When `windowsPathsNoEscape` is not set, then both brace escapes and\n * backslash escapes are removed.\n *\n * Slashes (and backslashes in `windowsPathsNoEscape` mode) cannot be escaped\n * or unescaped.\n */\nexport const unescape = (\n  s: string,\n  {\n    windowsPathsNoEscape = false,\n  }: Pick = {}\n) => {\n  return windowsPathsNoEscape\n    ? s.replace(/\\[([^\\/\\\\])\\]/g, '$1')\n    : s.replace(/((?!\\\\).|^)\\[([^\\/\\\\])\\]/g, '$1$2').replace(/\\\\([^\\/])/g, '$1')\n}\n"]}
                                  \ No newline at end of file
                                  diff --git a/node_modules/minimatch/dist/esm/assert-valid-pattern.d.ts b/node_modules/minimatch/dist/esm/assert-valid-pattern.d.ts
                                  new file mode 100644
                                  index 000000000..8e318b23a
                                  --- /dev/null
                                  +++ b/node_modules/minimatch/dist/esm/assert-valid-pattern.d.ts
                                  @@ -0,0 +1,2 @@
                                  +export declare const assertValidPattern: (pattern: any) => void;
                                  +//# sourceMappingURL=assert-valid-pattern.d.ts.map
                                  \ No newline at end of file
                                  diff --git a/node_modules/minimatch/dist/esm/assert-valid-pattern.d.ts.map b/node_modules/minimatch/dist/esm/assert-valid-pattern.d.ts.map
                                  new file mode 100644
                                  index 000000000..c61c03109
                                  --- /dev/null
                                  +++ b/node_modules/minimatch/dist/esm/assert-valid-pattern.d.ts.map
                                  @@ -0,0 +1 @@
                                  +{"version":3,"file":"assert-valid-pattern.d.ts","sourceRoot":"","sources":["../../src/assert-valid-pattern.ts"],"names":[],"mappings":"AACA,eAAO,MAAM,kBAAkB,EAAE,CAAC,OAAO,EAAE,GAAG,KAAK,IAUlD,CAAA"}
                                  \ No newline at end of file
                                  diff --git a/node_modules/minimatch/dist/esm/assert-valid-pattern.js b/node_modules/minimatch/dist/esm/assert-valid-pattern.js
                                  new file mode 100644
                                  index 000000000..7b534fc30
                                  --- /dev/null
                                  +++ b/node_modules/minimatch/dist/esm/assert-valid-pattern.js
                                  @@ -0,0 +1,10 @@
                                  +const MAX_PATTERN_LENGTH = 1024 * 64;
                                  +export const assertValidPattern = (pattern) => {
                                  +    if (typeof pattern !== 'string') {
                                  +        throw new TypeError('invalid pattern');
                                  +    }
                                  +    if (pattern.length > MAX_PATTERN_LENGTH) {
                                  +        throw new TypeError('pattern is too long');
                                  +    }
                                  +};
                                  +//# sourceMappingURL=assert-valid-pattern.js.map
                                  \ No newline at end of file
                                  diff --git a/node_modules/minimatch/dist/esm/assert-valid-pattern.js.map b/node_modules/minimatch/dist/esm/assert-valid-pattern.js.map
                                  new file mode 100644
                                  index 000000000..b1a5a0b93
                                  --- /dev/null
                                  +++ b/node_modules/minimatch/dist/esm/assert-valid-pattern.js.map
                                  @@ -0,0 +1 @@
                                  +{"version":3,"file":"assert-valid-pattern.js","sourceRoot":"","sources":["../../src/assert-valid-pattern.ts"],"names":[],"mappings":"AAAA,MAAM,kBAAkB,GAAG,IAAI,GAAG,EAAE,CAAA;AACpC,MAAM,CAAC,MAAM,kBAAkB,GAA2B,CACxD,OAAY,EACe,EAAE;IAC7B,IAAI,OAAO,OAAO,KAAK,QAAQ,EAAE;QAC/B,MAAM,IAAI,SAAS,CAAC,iBAAiB,CAAC,CAAA;KACvC;IAED,IAAI,OAAO,CAAC,MAAM,GAAG,kBAAkB,EAAE;QACvC,MAAM,IAAI,SAAS,CAAC,qBAAqB,CAAC,CAAA;KAC3C;AACH,CAAC,CAAA","sourcesContent":["const MAX_PATTERN_LENGTH = 1024 * 64\nexport const assertValidPattern: (pattern: any) => void = (\n  pattern: any\n): asserts pattern is string => {\n  if (typeof pattern !== 'string') {\n    throw new TypeError('invalid pattern')\n  }\n\n  if (pattern.length > MAX_PATTERN_LENGTH) {\n    throw new TypeError('pattern is too long')\n  }\n}\n"]}
                                  \ No newline at end of file
                                  diff --git a/node_modules/minimatch/dist/esm/ast.d.ts b/node_modules/minimatch/dist/esm/ast.d.ts
                                  new file mode 100644
                                  index 000000000..b8c1e5448
                                  --- /dev/null
                                  +++ b/node_modules/minimatch/dist/esm/ast.d.ts
                                  @@ -0,0 +1,20 @@
                                  +import { MinimatchOptions, MMRegExp } from './index.js';
                                  +export type ExtglobType = '!' | '?' | '+' | '*' | '@';
                                  +export declare class AST {
                                  +    #private;
                                  +    type: ExtglobType | null;
                                  +    constructor(type: ExtglobType | null, parent?: AST, options?: MinimatchOptions);
                                  +    get hasMagic(): boolean | undefined;
                                  +    toString(): string;
                                  +    push(...parts: (string | AST)[]): void;
                                  +    toJSON(): any[];
                                  +    isStart(): boolean;
                                  +    isEnd(): boolean;
                                  +    copyIn(part: AST | string): void;
                                  +    clone(parent: AST): AST;
                                  +    static fromGlob(pattern: string, options?: MinimatchOptions): AST;
                                  +    toMMPattern(): MMRegExp | string;
                                  +    get options(): MinimatchOptions;
                                  +    toRegExpSource(allowDot?: boolean): [re: string, body: string, hasMagic: boolean, uflag: boolean];
                                  +}
                                  +//# sourceMappingURL=ast.d.ts.map
                                  \ No newline at end of file
                                  diff --git a/node_modules/minimatch/dist/esm/ast.d.ts.map b/node_modules/minimatch/dist/esm/ast.d.ts.map
                                  new file mode 100644
                                  index 000000000..9e7bfb9a8
                                  --- /dev/null
                                  +++ b/node_modules/minimatch/dist/esm/ast.d.ts.map
                                  @@ -0,0 +1 @@
                                  +{"version":3,"file":"ast.d.ts","sourceRoot":"","sources":["../../src/ast.ts"],"names":[],"mappings":"AAGA,OAAO,EAAE,gBAAgB,EAAE,QAAQ,EAAE,MAAM,YAAY,CAAA;AAwCvD,MAAM,MAAM,WAAW,GAAG,GAAG,GAAG,GAAG,GAAG,GAAG,GAAG,GAAG,GAAG,GAAG,CAAA;AAkCrD,qBAAa,GAAG;;IACd,IAAI,EAAE,WAAW,GAAG,IAAI,CAAA;gBAiBtB,IAAI,EAAE,WAAW,GAAG,IAAI,EACxB,MAAM,CAAC,EAAE,GAAG,EACZ,OAAO,GAAE,gBAAqB;IAahC,IAAI,QAAQ,IAAI,OAAO,GAAG,SAAS,CAUlC;IAGD,QAAQ,IAAI,MAAM;IA+ClB,IAAI,CAAC,GAAG,KAAK,EAAE,CAAC,MAAM,GAAG,GAAG,CAAC,EAAE;IAY/B,MAAM;IAgBN,OAAO,IAAI,OAAO;IAgBlB,KAAK,IAAI,OAAO;IAYhB,MAAM,CAAC,IAAI,EAAE,GAAG,GAAG,MAAM;IAKzB,KAAK,CAAC,MAAM,EAAE,GAAG;IAsIjB,MAAM,CAAC,QAAQ,CAAC,OAAO,EAAE,MAAM,EAAE,OAAO,GAAE,gBAAqB;IAQ/D,WAAW,IAAI,QAAQ,GAAG,MAAM;IA2BhC,IAAI,OAAO,qBAEV;IAuED,cAAc,CACZ,QAAQ,CAAC,EAAE,OAAO,GACjB,CAAC,EAAE,EAAE,MAAM,EAAE,IAAI,EAAE,MAAM,EAAE,QAAQ,EAAE,OAAO,EAAE,KAAK,EAAE,OAAO,CAAC;CAiMjE"}
                                  \ No newline at end of file
                                  diff --git a/node_modules/minimatch/dist/esm/ast.js b/node_modules/minimatch/dist/esm/ast.js
                                  new file mode 100644
                                  index 000000000..2d2bced65
                                  --- /dev/null
                                  +++ b/node_modules/minimatch/dist/esm/ast.js
                                  @@ -0,0 +1,588 @@
                                  +// parse a single path portion
                                  +import { parseClass } from './brace-expressions.js';
                                  +import { unescape } from './unescape.js';
                                  +const types = new Set(['!', '?', '+', '*', '@']);
                                  +const isExtglobType = (c) => types.has(c);
                                  +// Patterns that get prepended to bind to the start of either the
                                  +// entire string, or just a single path portion, to prevent dots
                                  +// and/or traversal patterns, when needed.
                                  +// Exts don't need the ^ or / bit, because the root binds that already.
                                  +const startNoTraversal = '(?!(?:^|/)\\.\\.?(?:$|/))';
                                  +const startNoDot = '(?!\\.)';
                                  +// characters that indicate a start of pattern needs the "no dots" bit,
                                  +// because a dot *might* be matched. ( is not in the list, because in
                                  +// the case of a child extglob, it will handle the prevention itself.
                                  +const addPatternStart = new Set(['[', '.']);
                                  +// cases where traversal is A-OK, no dot prevention needed
                                  +const justDots = new Set(['..', '.']);
                                  +const reSpecials = new Set('().*{}+?[]^$\\!');
                                  +const regExpEscape = (s) => s.replace(/[-[\]{}()*+?.,\\^$|#\s]/g, '\\$&');
                                  +// any single thing other than /
                                  +const qmark = '[^/]';
                                  +// * => any number of characters
                                  +const star = qmark + '*?';
                                  +// use + when we need to ensure that *something* matches, because the * is
                                  +// the only thing in the path portion.
                                  +const starNoEmpty = qmark + '+?';
                                  +// remove the \ chars that we added if we end up doing a nonmagic compare
                                  +// const deslash = (s: string) => s.replace(/\\(.)/g, '$1')
                                  +export class AST {
                                  +    type;
                                  +    #root;
                                  +    #hasMagic;
                                  +    #uflag = false;
                                  +    #parts = [];
                                  +    #parent;
                                  +    #parentIndex;
                                  +    #negs;
                                  +    #filledNegs = false;
                                  +    #options;
                                  +    #toString;
                                  +    // set to true if it's an extglob with no children
                                  +    // (which really means one child of '')
                                  +    #emptyExt = false;
                                  +    constructor(type, parent, options = {}) {
                                  +        this.type = type;
                                  +        // extglobs are inherently magical
                                  +        if (type)
                                  +            this.#hasMagic = true;
                                  +        this.#parent = parent;
                                  +        this.#root = this.#parent ? this.#parent.#root : this;
                                  +        this.#options = this.#root === this ? options : this.#root.#options;
                                  +        this.#negs = this.#root === this ? [] : this.#root.#negs;
                                  +        if (type === '!' && !this.#root.#filledNegs)
                                  +            this.#negs.push(this);
                                  +        this.#parentIndex = this.#parent ? this.#parent.#parts.length : 0;
                                  +    }
                                  +    get hasMagic() {
                                  +        /* c8 ignore start */
                                  +        if (this.#hasMagic !== undefined)
                                  +            return this.#hasMagic;
                                  +        /* c8 ignore stop */
                                  +        for (const p of this.#parts) {
                                  +            if (typeof p === 'string')
                                  +                continue;
                                  +            if (p.type || p.hasMagic)
                                  +                return (this.#hasMagic = true);
                                  +        }
                                  +        // note: will be undefined until we generate the regexp src and find out
                                  +        return this.#hasMagic;
                                  +    }
                                  +    // reconstructs the pattern
                                  +    toString() {
                                  +        if (this.#toString !== undefined)
                                  +            return this.#toString;
                                  +        if (!this.type) {
                                  +            return (this.#toString = this.#parts.map(p => String(p)).join(''));
                                  +        }
                                  +        else {
                                  +            return (this.#toString =
                                  +                this.type + '(' + this.#parts.map(p => String(p)).join('|') + ')');
                                  +        }
                                  +    }
                                  +    #fillNegs() {
                                  +        /* c8 ignore start */
                                  +        if (this !== this.#root)
                                  +            throw new Error('should only call on root');
                                  +        if (this.#filledNegs)
                                  +            return this;
                                  +        /* c8 ignore stop */
                                  +        // call toString() once to fill this out
                                  +        this.toString();
                                  +        this.#filledNegs = true;
                                  +        let n;
                                  +        while ((n = this.#negs.pop())) {
                                  +            if (n.type !== '!')
                                  +                continue;
                                  +            // walk up the tree, appending everthing that comes AFTER parentIndex
                                  +            let p = n;
                                  +            let pp = p.#parent;
                                  +            while (pp) {
                                  +                for (let i = p.#parentIndex + 1; !pp.type && i < pp.#parts.length; i++) {
                                  +                    for (const part of n.#parts) {
                                  +                        /* c8 ignore start */
                                  +                        if (typeof part === 'string') {
                                  +                            throw new Error('string part in extglob AST??');
                                  +                        }
                                  +                        /* c8 ignore stop */
                                  +                        part.copyIn(pp.#parts[i]);
                                  +                    }
                                  +                }
                                  +                p = pp;
                                  +                pp = p.#parent;
                                  +            }
                                  +        }
                                  +        return this;
                                  +    }
                                  +    push(...parts) {
                                  +        for (const p of parts) {
                                  +            if (p === '')
                                  +                continue;
                                  +            /* c8 ignore start */
                                  +            if (typeof p !== 'string' && !(p instanceof AST && p.#parent === this)) {
                                  +                throw new Error('invalid part: ' + p);
                                  +            }
                                  +            /* c8 ignore stop */
                                  +            this.#parts.push(p);
                                  +        }
                                  +    }
                                  +    toJSON() {
                                  +        const ret = this.type === null
                                  +            ? this.#parts.slice().map(p => (typeof p === 'string' ? p : p.toJSON()))
                                  +            : [this.type, ...this.#parts.map(p => p.toJSON())];
                                  +        if (this.isStart() && !this.type)
                                  +            ret.unshift([]);
                                  +        if (this.isEnd() &&
                                  +            (this === this.#root ||
                                  +                (this.#root.#filledNegs && this.#parent?.type === '!'))) {
                                  +            ret.push({});
                                  +        }
                                  +        return ret;
                                  +    }
                                  +    isStart() {
                                  +        if (this.#root === this)
                                  +            return true;
                                  +        // if (this.type) return !!this.#parent?.isStart()
                                  +        if (!this.#parent?.isStart())
                                  +            return false;
                                  +        if (this.#parentIndex === 0)
                                  +            return true;
                                  +        // if everything AHEAD of this is a negation, then it's still the "start"
                                  +        const p = this.#parent;
                                  +        for (let i = 0; i < this.#parentIndex; i++) {
                                  +            const pp = p.#parts[i];
                                  +            if (!(pp instanceof AST && pp.type === '!')) {
                                  +                return false;
                                  +            }
                                  +        }
                                  +        return true;
                                  +    }
                                  +    isEnd() {
                                  +        if (this.#root === this)
                                  +            return true;
                                  +        if (this.#parent?.type === '!')
                                  +            return true;
                                  +        if (!this.#parent?.isEnd())
                                  +            return false;
                                  +        if (!this.type)
                                  +            return this.#parent?.isEnd();
                                  +        // if not root, it'll always have a parent
                                  +        /* c8 ignore start */
                                  +        const pl = this.#parent ? this.#parent.#parts.length : 0;
                                  +        /* c8 ignore stop */
                                  +        return this.#parentIndex === pl - 1;
                                  +    }
                                  +    copyIn(part) {
                                  +        if (typeof part === 'string')
                                  +            this.push(part);
                                  +        else
                                  +            this.push(part.clone(this));
                                  +    }
                                  +    clone(parent) {
                                  +        const c = new AST(this.type, parent);
                                  +        for (const p of this.#parts) {
                                  +            c.copyIn(p);
                                  +        }
                                  +        return c;
                                  +    }
                                  +    static #parseAST(str, ast, pos, opt) {
                                  +        let escaping = false;
                                  +        let inBrace = false;
                                  +        let braceStart = -1;
                                  +        let braceNeg = false;
                                  +        if (ast.type === null) {
                                  +            // outside of a extglob, append until we find a start
                                  +            let i = pos;
                                  +            let acc = '';
                                  +            while (i < str.length) {
                                  +                const c = str.charAt(i++);
                                  +                // still accumulate escapes at this point, but we do ignore
                                  +                // starts that are escaped
                                  +                if (escaping || c === '\\') {
                                  +                    escaping = !escaping;
                                  +                    acc += c;
                                  +                    continue;
                                  +                }
                                  +                if (inBrace) {
                                  +                    if (i === braceStart + 1) {
                                  +                        if (c === '^' || c === '!') {
                                  +                            braceNeg = true;
                                  +                        }
                                  +                    }
                                  +                    else if (c === ']' && !(i === braceStart + 2 && braceNeg)) {
                                  +                        inBrace = false;
                                  +                    }
                                  +                    acc += c;
                                  +                    continue;
                                  +                }
                                  +                else if (c === '[') {
                                  +                    inBrace = true;
                                  +                    braceStart = i;
                                  +                    braceNeg = false;
                                  +                    acc += c;
                                  +                    continue;
                                  +                }
                                  +                if (!opt.noext && isExtglobType(c) && str.charAt(i) === '(') {
                                  +                    ast.push(acc);
                                  +                    acc = '';
                                  +                    const ext = new AST(c, ast);
                                  +                    i = AST.#parseAST(str, ext, i, opt);
                                  +                    ast.push(ext);
                                  +                    continue;
                                  +                }
                                  +                acc += c;
                                  +            }
                                  +            ast.push(acc);
                                  +            return i;
                                  +        }
                                  +        // some kind of extglob, pos is at the (
                                  +        // find the next | or )
                                  +        let i = pos + 1;
                                  +        let part = new AST(null, ast);
                                  +        const parts = [];
                                  +        let acc = '';
                                  +        while (i < str.length) {
                                  +            const c = str.charAt(i++);
                                  +            // still accumulate escapes at this point, but we do ignore
                                  +            // starts that are escaped
                                  +            if (escaping || c === '\\') {
                                  +                escaping = !escaping;
                                  +                acc += c;
                                  +                continue;
                                  +            }
                                  +            if (inBrace) {
                                  +                if (i === braceStart + 1) {
                                  +                    if (c === '^' || c === '!') {
                                  +                        braceNeg = true;
                                  +                    }
                                  +                }
                                  +                else if (c === ']' && !(i === braceStart + 2 && braceNeg)) {
                                  +                    inBrace = false;
                                  +                }
                                  +                acc += c;
                                  +                continue;
                                  +            }
                                  +            else if (c === '[') {
                                  +                inBrace = true;
                                  +                braceStart = i;
                                  +                braceNeg = false;
                                  +                acc += c;
                                  +                continue;
                                  +            }
                                  +            if (isExtglobType(c) && str.charAt(i) === '(') {
                                  +                part.push(acc);
                                  +                acc = '';
                                  +                const ext = new AST(c, part);
                                  +                part.push(ext);
                                  +                i = AST.#parseAST(str, ext, i, opt);
                                  +                continue;
                                  +            }
                                  +            if (c === '|') {
                                  +                part.push(acc);
                                  +                acc = '';
                                  +                parts.push(part);
                                  +                part = new AST(null, ast);
                                  +                continue;
                                  +            }
                                  +            if (c === ')') {
                                  +                if (acc === '' && ast.#parts.length === 0) {
                                  +                    ast.#emptyExt = true;
                                  +                }
                                  +                part.push(acc);
                                  +                acc = '';
                                  +                ast.push(...parts, part);
                                  +                return i;
                                  +            }
                                  +            acc += c;
                                  +        }
                                  +        // unfinished extglob
                                  +        // if we got here, it was a malformed extglob! not an extglob, but
                                  +        // maybe something else in there.
                                  +        ast.type = null;
                                  +        ast.#hasMagic = undefined;
                                  +        ast.#parts = [str.substring(pos - 1)];
                                  +        return i;
                                  +    }
                                  +    static fromGlob(pattern, options = {}) {
                                  +        const ast = new AST(null, undefined, options);
                                  +        AST.#parseAST(pattern, ast, 0, options);
                                  +        return ast;
                                  +    }
                                  +    // returns the regular expression if there's magic, or the unescaped
                                  +    // string if not.
                                  +    toMMPattern() {
                                  +        // should only be called on root
                                  +        /* c8 ignore start */
                                  +        if (this !== this.#root)
                                  +            return this.#root.toMMPattern();
                                  +        /* c8 ignore stop */
                                  +        const glob = this.toString();
                                  +        const [re, body, hasMagic, uflag] = this.toRegExpSource();
                                  +        // if we're in nocase mode, and not nocaseMagicOnly, then we do
                                  +        // still need a regular expression if we have to case-insensitively
                                  +        // match capital/lowercase characters.
                                  +        const anyMagic = hasMagic ||
                                  +            this.#hasMagic ||
                                  +            (this.#options.nocase &&
                                  +                !this.#options.nocaseMagicOnly &&
                                  +                glob.toUpperCase() !== glob.toLowerCase());
                                  +        if (!anyMagic) {
                                  +            return body;
                                  +        }
                                  +        const flags = (this.#options.nocase ? 'i' : '') + (uflag ? 'u' : '');
                                  +        return Object.assign(new RegExp(`^${re}$`, flags), {
                                  +            _src: re,
                                  +            _glob: glob,
                                  +        });
                                  +    }
                                  +    get options() {
                                  +        return this.#options;
                                  +    }
                                  +    // returns the string match, the regexp source, whether there's magic
                                  +    // in the regexp (so a regular expression is required) and whether or
                                  +    // not the uflag is needed for the regular expression (for posix classes)
                                  +    // TODO: instead of injecting the start/end at this point, just return
                                  +    // the BODY of the regexp, along with the start/end portions suitable
                                  +    // for binding the start/end in either a joined full-path makeRe context
                                  +    // (where we bind to (^|/), or a standalone matchPart context (where
                                  +    // we bind to ^, and not /).  Otherwise slashes get duped!
                                  +    //
                                  +    // In part-matching mode, the start is:
                                  +    // - if not isStart: nothing
                                  +    // - if traversal possible, but not allowed: ^(?!\.\.?$)
                                  +    // - if dots allowed or not possible: ^
                                  +    // - if dots possible and not allowed: ^(?!\.)
                                  +    // end is:
                                  +    // - if not isEnd(): nothing
                                  +    // - else: $
                                  +    //
                                  +    // In full-path matching mode, we put the slash at the START of the
                                  +    // pattern, so start is:
                                  +    // - if first pattern: same as part-matching mode
                                  +    // - if not isStart(): nothing
                                  +    // - if traversal possible, but not allowed: /(?!\.\.?(?:$|/))
                                  +    // - if dots allowed or not possible: /
                                  +    // - if dots possible and not allowed: /(?!\.)
                                  +    // end is:
                                  +    // - if last pattern, same as part-matching mode
                                  +    // - else nothing
                                  +    //
                                  +    // Always put the (?:$|/) on negated tails, though, because that has to be
                                  +    // there to bind the end of the negated pattern portion, and it's easier to
                                  +    // just stick it in now rather than try to inject it later in the middle of
                                  +    // the pattern.
                                  +    //
                                  +    // We can just always return the same end, and leave it up to the caller
                                  +    // to know whether it's going to be used joined or in parts.
                                  +    // And, if the start is adjusted slightly, can do the same there:
                                  +    // - if not isStart: nothing
                                  +    // - if traversal possible, but not allowed: (?:/|^)(?!\.\.?$)
                                  +    // - if dots allowed or not possible: (?:/|^)
                                  +    // - if dots possible and not allowed: (?:/|^)(?!\.)
                                  +    //
                                  +    // But it's better to have a simpler binding without a conditional, for
                                  +    // performance, so probably better to return both start options.
                                  +    //
                                  +    // Then the caller just ignores the end if it's not the first pattern,
                                  +    // and the start always gets applied.
                                  +    //
                                  +    // But that's always going to be $ if it's the ending pattern, or nothing,
                                  +    // so the caller can just attach $ at the end of the pattern when building.
                                  +    //
                                  +    // So the todo is:
                                  +    // - better detect what kind of start is needed
                                  +    // - return both flavors of starting pattern
                                  +    // - attach $ at the end of the pattern when creating the actual RegExp
                                  +    //
                                  +    // Ah, but wait, no, that all only applies to the root when the first pattern
                                  +    // is not an extglob. If the first pattern IS an extglob, then we need all
                                  +    // that dot prevention biz to live in the extglob portions, because eg
                                  +    // +(*|.x*) can match .xy but not .yx.
                                  +    //
                                  +    // So, return the two flavors if it's #root and the first child is not an
                                  +    // AST, otherwise leave it to the child AST to handle it, and there,
                                  +    // use the (?:^|/) style of start binding.
                                  +    //
                                  +    // Even simplified further:
                                  +    // - Since the start for a join is eg /(?!\.) and the start for a part
                                  +    // is ^(?!\.), we can just prepend (?!\.) to the pattern (either root
                                  +    // or start or whatever) and prepend ^ or / at the Regexp construction.
                                  +    toRegExpSource(allowDot) {
                                  +        const dot = allowDot ?? !!this.#options.dot;
                                  +        if (this.#root === this)
                                  +            this.#fillNegs();
                                  +        if (!this.type) {
                                  +            const noEmpty = this.isStart() && this.isEnd();
                                  +            const src = this.#parts
                                  +                .map(p => {
                                  +                const [re, _, hasMagic, uflag] = typeof p === 'string'
                                  +                    ? AST.#parseGlob(p, this.#hasMagic, noEmpty)
                                  +                    : p.toRegExpSource(allowDot);
                                  +                this.#hasMagic = this.#hasMagic || hasMagic;
                                  +                this.#uflag = this.#uflag || uflag;
                                  +                return re;
                                  +            })
                                  +                .join('');
                                  +            let start = '';
                                  +            if (this.isStart()) {
                                  +                if (typeof this.#parts[0] === 'string') {
                                  +                    // this is the string that will match the start of the pattern,
                                  +                    // so we need to protect against dots and such.
                                  +                    // '.' and '..' cannot match unless the pattern is that exactly,
                                  +                    // even if it starts with . or dot:true is set.
                                  +                    const dotTravAllowed = this.#parts.length === 1 && justDots.has(this.#parts[0]);
                                  +                    if (!dotTravAllowed) {
                                  +                        const aps = addPatternStart;
                                  +                        // check if we have a possibility of matching . or ..,
                                  +                        // and prevent that.
                                  +                        const needNoTrav = 
                                  +                        // dots are allowed, and the pattern starts with [ or .
                                  +                        (dot && aps.has(src.charAt(0))) ||
                                  +                            // the pattern starts with \., and then [ or .
                                  +                            (src.startsWith('\\.') && aps.has(src.charAt(2))) ||
                                  +                            // the pattern starts with \.\., and then [ or .
                                  +                            (src.startsWith('\\.\\.') && aps.has(src.charAt(4)));
                                  +                        // no need to prevent dots if it can't match a dot, or if a
                                  +                        // sub-pattern will be preventing it anyway.
                                  +                        const needNoDot = !dot && !allowDot && aps.has(src.charAt(0));
                                  +                        start = needNoTrav ? startNoTraversal : needNoDot ? startNoDot : '';
                                  +                    }
                                  +                }
                                  +            }
                                  +            // append the "end of path portion" pattern to negation tails
                                  +            let end = '';
                                  +            if (this.isEnd() &&
                                  +                this.#root.#filledNegs &&
                                  +                this.#parent?.type === '!') {
                                  +                end = '(?:$|\\/)';
                                  +            }
                                  +            const final = start + src + end;
                                  +            return [
                                  +                final,
                                  +                unescape(src),
                                  +                (this.#hasMagic = !!this.#hasMagic),
                                  +                this.#uflag,
                                  +            ];
                                  +        }
                                  +        // We need to calculate the body *twice* if it's a repeat pattern
                                  +        // at the start, once in nodot mode, then again in dot mode, so a
                                  +        // pattern like *(?) can match 'x.y'
                                  +        const repeated = this.type === '*' || this.type === '+';
                                  +        // some kind of extglob
                                  +        const start = this.type === '!' ? '(?:(?!(?:' : '(?:';
                                  +        let body = this.#partsToRegExp(dot);
                                  +        if (this.isStart() && this.isEnd() && !body && this.type !== '!') {
                                  +            // invalid extglob, has to at least be *something* present, if it's
                                  +            // the entire path portion.
                                  +            const s = this.toString();
                                  +            this.#parts = [s];
                                  +            this.type = null;
                                  +            this.#hasMagic = undefined;
                                  +            return [s, unescape(this.toString()), false, false];
                                  +        }
                                  +        // XXX abstract out this map method
                                  +        let bodyDotAllowed = !repeated || allowDot || dot || !startNoDot
                                  +            ? ''
                                  +            : this.#partsToRegExp(true);
                                  +        if (bodyDotAllowed === body) {
                                  +            bodyDotAllowed = '';
                                  +        }
                                  +        if (bodyDotAllowed) {
                                  +            body = `(?:${body})(?:${bodyDotAllowed})*?`;
                                  +        }
                                  +        // an empty !() is exactly equivalent to a starNoEmpty
                                  +        let final = '';
                                  +        if (this.type === '!' && this.#emptyExt) {
                                  +            final = (this.isStart() && !dot ? startNoDot : '') + starNoEmpty;
                                  +        }
                                  +        else {
                                  +            const close = this.type === '!'
                                  +                ? // !() must match something,but !(x) can match ''
                                  +                    '))' +
                                  +                        (this.isStart() && !dot && !allowDot ? startNoDot : '') +
                                  +                        star +
                                  +                        ')'
                                  +                : this.type === '@'
                                  +                    ? ')'
                                  +                    : this.type === '?'
                                  +                        ? ')?'
                                  +                        : this.type === '+' && bodyDotAllowed
                                  +                            ? ')'
                                  +                            : this.type === '*' && bodyDotAllowed
                                  +                                ? `)?`
                                  +                                : `)${this.type}`;
                                  +            final = start + body + close;
                                  +        }
                                  +        return [
                                  +            final,
                                  +            unescape(body),
                                  +            (this.#hasMagic = !!this.#hasMagic),
                                  +            this.#uflag,
                                  +        ];
                                  +    }
                                  +    #partsToRegExp(dot) {
                                  +        return this.#parts
                                  +            .map(p => {
                                  +            // extglob ASTs should only contain parent ASTs
                                  +            /* c8 ignore start */
                                  +            if (typeof p === 'string') {
                                  +                throw new Error('string type in extglob ast??');
                                  +            }
                                  +            /* c8 ignore stop */
                                  +            // can ignore hasMagic, because extglobs are already always magic
                                  +            const [re, _, _hasMagic, uflag] = p.toRegExpSource(dot);
                                  +            this.#uflag = this.#uflag || uflag;
                                  +            return re;
                                  +        })
                                  +            .filter(p => !(this.isStart() && this.isEnd()) || !!p)
                                  +            .join('|');
                                  +    }
                                  +    static #parseGlob(glob, hasMagic, noEmpty = false) {
                                  +        let escaping = false;
                                  +        let re = '';
                                  +        let uflag = false;
                                  +        for (let i = 0; i < glob.length; i++) {
                                  +            const c = glob.charAt(i);
                                  +            if (escaping) {
                                  +                escaping = false;
                                  +                re += (reSpecials.has(c) ? '\\' : '') + c;
                                  +                continue;
                                  +            }
                                  +            if (c === '\\') {
                                  +                if (i === glob.length - 1) {
                                  +                    re += '\\\\';
                                  +                }
                                  +                else {
                                  +                    escaping = true;
                                  +                }
                                  +                continue;
                                  +            }
                                  +            if (c === '[') {
                                  +                const [src, needUflag, consumed, magic] = parseClass(glob, i);
                                  +                if (consumed) {
                                  +                    re += src;
                                  +                    uflag = uflag || needUflag;
                                  +                    i += consumed - 1;
                                  +                    hasMagic = hasMagic || magic;
                                  +                    continue;
                                  +                }
                                  +            }
                                  +            if (c === '*') {
                                  +                if (noEmpty && glob === '*')
                                  +                    re += starNoEmpty;
                                  +                else
                                  +                    re += star;
                                  +                hasMagic = true;
                                  +                continue;
                                  +            }
                                  +            if (c === '?') {
                                  +                re += qmark;
                                  +                hasMagic = true;
                                  +                continue;
                                  +            }
                                  +            re += regExpEscape(c);
                                  +        }
                                  +        return [re, unescape(glob), !!hasMagic, uflag];
                                  +    }
                                  +}
                                  +//# sourceMappingURL=ast.js.map
                                  \ No newline at end of file
                                  diff --git a/node_modules/minimatch/dist/esm/ast.js.map b/node_modules/minimatch/dist/esm/ast.js.map
                                  new file mode 100644
                                  index 000000000..f1f8b34cb
                                  --- /dev/null
                                  +++ b/node_modules/minimatch/dist/esm/ast.js.map
                                  @@ -0,0 +1 @@
                                  +{"version":3,"file":"ast.js","sourceRoot":"","sources":["../../src/ast.ts"],"names":[],"mappings":"AAAA,8BAA8B;AAE9B,OAAO,EAAE,UAAU,EAAE,MAAM,wBAAwB,CAAA;AAEnD,OAAO,EAAE,QAAQ,EAAE,MAAM,eAAe,CAAA;AAwCxC,MAAM,KAAK,GAAG,IAAI,GAAG,CAAc,CAAC,GAAG,EAAE,GAAG,EAAE,GAAG,EAAE,GAAG,EAAE,GAAG,CAAC,CAAC,CAAA;AAC7D,MAAM,aAAa,GAAG,CAAC,CAAS,EAAoB,EAAE,CACpD,KAAK,CAAC,GAAG,CAAC,CAAgB,CAAC,CAAA;AAE7B,iEAAiE;AACjE,gEAAgE;AAChE,0CAA0C;AAC1C,uEAAuE;AACvE,MAAM,gBAAgB,GAAG,2BAA2B,CAAA;AACpD,MAAM,UAAU,GAAG,SAAS,CAAA;AAE5B,uEAAuE;AACvE,qEAAqE;AACrE,qEAAqE;AACrE,MAAM,eAAe,GAAG,IAAI,GAAG,CAAC,CAAC,GAAG,EAAE,GAAG,CAAC,CAAC,CAAA;AAC3C,0DAA0D;AAC1D,MAAM,QAAQ,GAAG,IAAI,GAAG,CAAC,CAAC,IAAI,EAAE,GAAG,CAAC,CAAC,CAAA;AACrC,MAAM,UA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E,IAAI,IAAI,CAAA;gBACf,QAAQ,GAAG,IAAI,CAAA;gBACf,SAAQ;aACT;YACD,IAAI,CAAC,KAAK,GAAG,EAAE;gBACb,EAAE,IAAI,KAAK,CAAA;gBACX,QAAQ,GAAG,IAAI,CAAA;gBACf,SAAQ;aACT;YACD,EAAE,IAAI,YAAY,CAAC,CAAC,CAAC,CAAA;SACtB;QACD,OAAO,CAAC,EAAE,EAAE,QAAQ,CAAC,IAAI,CAAC,EAAE,CAAC,CAAC,QAAQ,EAAE,KAAK,CAAC,CAAA;IAChD,CAAC;CACF","sourcesContent":["// parse a single path portion\n\nimport { parseClass } from './brace-expressions.js'\nimport { MinimatchOptions, MMRegExp } from './index.js'\nimport { unescape } from './unescape.js'\n\n// classes [] are handled by the parseClass method\n// for positive extglobs, we sub-parse the contents, and combine,\n// with the appropriate regexp close.\n// for negative extglobs, we sub-parse the contents, but then\n// have to include the rest of the pattern, then the parent, etc.,\n// as the thing that cannot be because RegExp negative lookaheads\n// are different from globs.\n//\n// So for example:\n// a@(i|w!(x|y)z|j)b => ^a(i|w((!?(x|y)zb).*)z|j)b$\n//   1   2 3   4 5 6      1   2    3   46      5 6\n//\n// Assembling the extglob requires not just the negated patterns themselves,\n// but also anything following the negative patterns up to the boundary\n// of the current pattern, plus anything following in the parent pattern.\n//\n//\n// So, first, we parse the string into an AST of extglobs, without turning\n// anything into regexps yet.\n//\n// ['a', {@ [['i'], ['w', {!['x', 'y']}, 'z'], ['j']]}, 'b']\n//\n// Then, for all the negative extglobs, we append whatever comes after in\n// each parent as their tail\n//\n// ['a', {@ [['i'], ['w', {!['x', 'y'], 'z', 'b'}, 'z'], ['j']]}, 'b']\n//\n// Lastly, we turn each of these pieces into a regexp, and join\n//\n//                                 v----- .* because there's more following,\n//                                 v    v  otherwise, .+ because it must be\n//                                 v    v  *something* there.\n// ['^a', {@ ['i', 'w(?:(!?(?:x|y).*zb$).*)z', 'j' ]}, 'b$']\n//   copy what follows into here--^^^^^\n// ['^a', '(?:i|w(?:(?!(?:x|y).*zb$).*)z|j)', 'b$']\n// ['^a(?:i|w(?:(?!(?:x|y).*zb$).*)z|j)b$']\n\nexport type ExtglobType = '!' | '?' | '+' | '*' | '@'\nconst types = new Set(['!', '?', '+', '*', '@'])\nconst isExtglobType = (c: string): c is ExtglobType =>\n  types.has(c as ExtglobType)\n\n// Patterns that get prepended to bind to the start of either the\n// entire string, or just a single path portion, to prevent dots\n// and/or traversal patterns, when needed.\n// Exts don't need the ^ or / bit, because the root binds that already.\nconst startNoTraversal = '(?!(?:^|/)\\\\.\\\\.?(?:$|/))'\nconst startNoDot = '(?!\\\\.)'\n\n// characters that indicate a start of pattern needs the \"no dots\" bit,\n// because a dot *might* be matched. ( is not in the list, because in\n// the case of a child extglob, it will handle the prevention itself.\nconst addPatternStart = new Set(['[', '.'])\n// cases where traversal is A-OK, no dot prevention needed\nconst justDots = new Set(['..', '.'])\nconst reSpecials = new Set('().*{}+?[]^$\\\\!')\nconst regExpEscape = (s: string) =>\n  s.replace(/[-[\\]{}()*+?.,\\\\^$|#\\s]/g, '\\\\$&')\n\n// any single thing other than /\nconst qmark = '[^/]'\n\n// * => any number of characters\nconst star = qmark + '*?'\n// use + when we need to ensure that *something* matches, because the * is\n// the only thing in the path portion.\nconst starNoEmpty = qmark + '+?'\n\n// remove the \\ chars that we added if we end up doing a nonmagic compare\n// const deslash = (s: string) => s.replace(/\\\\(.)/g, '$1')\n\nexport class AST {\n  type: ExtglobType | null\n  readonly #root: AST\n\n  #hasMagic?: boolean\n  #uflag: boolean = false\n  #parts: (string | AST)[] = []\n  readonly #parent?: AST\n  readonly #parentIndex: number\n  #negs: AST[]\n  #filledNegs: boolean = false\n  #options: MinimatchOptions\n  #toString?: string\n  // set to true if it's an extglob with no children\n  // (which really means one child of '')\n  #emptyExt: boolean = false\n\n  constructor(\n    type: ExtglobType | null,\n    parent?: AST,\n    options: MinimatchOptions = {}\n  ) {\n    this.type = type\n    // extglobs are inherently magical\n    if (type) this.#hasMagic = true\n    this.#parent = parent\n    this.#root = this.#parent ? this.#parent.#root : this\n    this.#options = this.#root === this ? options : this.#root.#options\n    this.#negs = this.#root === this ? [] : this.#root.#negs\n    if (type === '!' && !this.#root.#filledNegs) this.#negs.push(this)\n    this.#parentIndex = this.#parent ? this.#parent.#parts.length : 0\n  }\n\n  get hasMagic(): boolean | undefined {\n    /* c8 ignore start */\n    if (this.#hasMagic !== undefined) return this.#hasMagic\n    /* c8 ignore stop */\n    for (const p of this.#parts) {\n      if (typeof p === 'string') continue\n      if (p.type || p.hasMagic) return (this.#hasMagic = true)\n    }\n    // note: will be undefined until we generate the regexp src and find out\n    return this.#hasMagic\n  }\n\n  // reconstructs the pattern\n  toString(): string {\n    if (this.#toString !== undefined) return this.#toString\n    if (!this.type) {\n      return (this.#toString = this.#parts.map(p => String(p)).join(''))\n    } else {\n      return (this.#toString =\n        this.type + '(' + this.#parts.map(p => String(p)).join('|') + ')')\n    }\n  }\n\n  #fillNegs() {\n    /* c8 ignore start */\n    if (this !== this.#root) throw new Error('should only call on root')\n    if (this.#filledNegs) return this\n    /* c8 ignore stop */\n\n    // call toString() once to fill this out\n    this.toString()\n    this.#filledNegs = true\n    let n: AST | undefined\n    while ((n = this.#negs.pop())) {\n      if (n.type !== '!') continue\n      // walk up the tree, appending everthing that comes AFTER parentIndex\n      let p: AST | undefined = n\n      let pp = p.#parent\n      while (pp) {\n        for (\n          let i = p.#parentIndex + 1;\n          !pp.type && i < pp.#parts.length;\n          i++\n        ) {\n          for (const part of n.#parts) {\n            /* c8 ignore start */\n            if (typeof part === 'string') {\n              throw new Error('string part in extglob AST??')\n            }\n            /* c8 ignore stop */\n            part.copyIn(pp.#parts[i])\n          }\n        }\n        p = pp\n        pp = p.#parent\n      }\n    }\n    return this\n  }\n\n  push(...parts: (string | AST)[]) {\n    for (const p of parts) {\n      if (p === '') continue\n      /* c8 ignore start */\n      if (typeof p !== 'string' && !(p instanceof AST && p.#parent === this)) {\n        throw new Error('invalid part: ' + p)\n      }\n      /* c8 ignore stop */\n      this.#parts.push(p)\n    }\n  }\n\n  toJSON() {\n    const ret: any[] =\n      this.type === null\n        ? this.#parts.slice().map(p => (typeof p === 'string' ? p : p.toJSON()))\n        : [this.type, ...this.#parts.map(p => (p as AST).toJSON())]\n    if (this.isStart() && !this.type) ret.unshift([])\n    if (\n      this.isEnd() &&\n      (this === this.#root ||\n        (this.#root.#filledNegs && this.#parent?.type === '!'))\n    ) {\n      ret.push({})\n    }\n    return ret\n  }\n\n  isStart(): boolean {\n    if (this.#root === this) return true\n    // if (this.type) return !!this.#parent?.isStart()\n    if (!this.#parent?.isStart()) return false\n    if (this.#parentIndex === 0) return true\n    // if everything AHEAD of this is a negation, then it's still the \"start\"\n    const p = this.#parent\n    for (let i = 0; i < this.#parentIndex; i++) {\n      const pp = p.#parts[i]\n      if (!(pp instanceof AST && pp.type === '!')) {\n        return false\n      }\n    }\n    return true\n  }\n\n  isEnd(): boolean {\n    if (this.#root === this) return true\n    if (this.#parent?.type === '!') return true\n    if (!this.#parent?.isEnd()) return false\n    if (!this.type) return this.#parent?.isEnd()\n    // if not root, it'll always have a parent\n    /* c8 ignore start */\n    const pl = this.#parent ? this.#parent.#parts.length : 0\n    /* c8 ignore stop */\n    return this.#parentIndex === pl - 1\n  }\n\n  copyIn(part: AST | string) {\n    if (typeof part === 'string') this.push(part)\n    else this.push(part.clone(this))\n  }\n\n  clone(parent: AST) {\n    const c = new AST(this.type, parent)\n    for (const p of this.#parts) {\n      c.copyIn(p)\n    }\n    return c\n  }\n\n  static #parseAST(\n    str: string,\n    ast: AST,\n    pos: number,\n    opt: MinimatchOptions\n  ): number {\n    let escaping = false\n    let inBrace = false\n    let braceStart = -1\n    let braceNeg = false\n    if (ast.type === null) {\n      // outside of a extglob, append until we find a start\n      let i = pos\n      let acc = ''\n      while (i < str.length) {\n        const c = str.charAt(i++)\n        // still accumulate escapes at this point, but we do ignore\n        // starts that are escaped\n        if (escaping || c === '\\\\') {\n          escaping = !escaping\n          acc += c\n          continue\n        }\n\n        if (inBrace) {\n          if (i === braceStart + 1) {\n            if (c === '^' || c === '!') {\n              braceNeg = true\n            }\n          } else if (c === ']' && !(i === braceStart + 2 && braceNeg)) {\n            inBrace = false\n          }\n          acc += c\n          continue\n        } else if (c === '[') {\n          inBrace = true\n          braceStart = i\n          braceNeg = false\n          acc += c\n          continue\n        }\n\n        if (!opt.noext && isExtglobType(c) && str.charAt(i) === '(') {\n          ast.push(acc)\n          acc = ''\n          const ext = new AST(c, ast)\n          i = AST.#parseAST(str, ext, i, opt)\n          ast.push(ext)\n          continue\n        }\n        acc += c\n      }\n      ast.push(acc)\n      return i\n    }\n\n    // some kind of extglob, pos is at the (\n    // find the next | or )\n    let i = pos + 1\n    let part = new AST(null, ast)\n    const parts: AST[] = []\n    let acc = ''\n    while (i < str.length) {\n      const c = str.charAt(i++)\n      // still accumulate escapes at this point, but we do ignore\n      // starts that are escaped\n      if (escaping || c === '\\\\') {\n        escaping = !escaping\n        acc += c\n        continue\n      }\n\n      if (inBrace) {\n        if (i === braceStart + 1) {\n          if (c === '^' || c === '!') {\n            braceNeg = true\n          }\n        } else if (c === ']' && !(i === braceStart + 2 && braceNeg)) {\n          inBrace = false\n        }\n        acc += c\n        continue\n      } else if (c === '[') {\n        inBrace = true\n        braceStart = i\n        braceNeg = false\n        acc += c\n        continue\n      }\n\n      if (isExtglobType(c) && str.charAt(i) === '(') {\n        part.push(acc)\n        acc = ''\n        const ext = new AST(c, part)\n        part.push(ext)\n        i = AST.#parseAST(str, ext, i, opt)\n        continue\n      }\n      if (c === '|') {\n        part.push(acc)\n        acc = ''\n        parts.push(part)\n        part = new AST(null, ast)\n        continue\n      }\n      if (c === ')') {\n        if (acc === '' && ast.#parts.length === 0) {\n          ast.#emptyExt = true\n        }\n        part.push(acc)\n        acc = ''\n        ast.push(...parts, part)\n        return i\n      }\n      acc += c\n    }\n\n    // unfinished extglob\n    // if we got here, it was a malformed extglob! not an extglob, but\n    // maybe something else in there.\n    ast.type = null\n    ast.#hasMagic = undefined\n    ast.#parts = [str.substring(pos - 1)]\n    return i\n  }\n\n  static fromGlob(pattern: string, options: MinimatchOptions = {}) {\n    const ast = new AST(null, undefined, options)\n    AST.#parseAST(pattern, ast, 0, options)\n    return ast\n  }\n\n  // returns the regular expression if there's magic, or the unescaped\n  // string if not.\n  toMMPattern(): MMRegExp | string {\n    // should only be called on root\n    /* c8 ignore start */\n    if (this !== this.#root) return this.#root.toMMPattern()\n    /* c8 ignore stop */\n    const glob = this.toString()\n    const [re, body, hasMagic, uflag] = this.toRegExpSource()\n    // if we're in nocase mode, and not nocaseMagicOnly, then we do\n    // still need a regular expression if we have to case-insensitively\n    // match capital/lowercase characters.\n    const anyMagic =\n      hasMagic ||\n      this.#hasMagic ||\n      (this.#options.nocase &&\n        !this.#options.nocaseMagicOnly &&\n        glob.toUpperCase() !== glob.toLowerCase())\n    if (!anyMagic) {\n      return body\n    }\n\n    const flags = (this.#options.nocase ? 'i' : '') + (uflag ? 'u' : '')\n    return Object.assign(new RegExp(`^${re}$`, flags), {\n      _src: re,\n      _glob: glob,\n    })\n  }\n\n  get options() {\n    return this.#options\n  }\n\n  // returns the string match, the regexp source, whether there's magic\n  // in the regexp (so a regular expression is required) and whether or\n  // not the uflag is needed for the regular expression (for posix classes)\n  // TODO: instead of injecting the start/end at this point, just return\n  // the BODY of the regexp, along with the start/end portions suitable\n  // for binding the start/end in either a joined full-path makeRe context\n  // (where we bind to (^|/), or a standalone matchPart context (where\n  // we bind to ^, and not /).  Otherwise slashes get duped!\n  //\n  // In part-matching mode, the start is:\n  // - if not isStart: nothing\n  // - if traversal possible, but not allowed: ^(?!\\.\\.?$)\n  // - if dots allowed or not possible: ^\n  // - if dots possible and not allowed: ^(?!\\.)\n  // end is:\n  // - if not isEnd(): nothing\n  // - else: $\n  //\n  // In full-path matching mode, we put the slash at the START of the\n  // pattern, so start is:\n  // - if first pattern: same as part-matching mode\n  // - if not isStart(): nothing\n  // - if traversal possible, but not allowed: /(?!\\.\\.?(?:$|/))\n  // - if dots allowed or not possible: /\n  // - if dots possible and not allowed: /(?!\\.)\n  // end is:\n  // - if last pattern, same as part-matching mode\n  // - else nothing\n  //\n  // Always put the (?:$|/) on negated tails, though, because that has to be\n  // there to bind the end of the negated pattern portion, and it's easier to\n  // just stick it in now rather than try to inject it later in the middle of\n  // the pattern.\n  //\n  // We can just always return the same end, and leave it up to the caller\n  // to know whether it's going to be used joined or in parts.\n  // And, if the start is adjusted slightly, can do the same there:\n  // - if not isStart: nothing\n  // - if traversal possible, but not allowed: (?:/|^)(?!\\.\\.?$)\n  // - if dots allowed or not possible: (?:/|^)\n  // - if dots possible and not allowed: (?:/|^)(?!\\.)\n  //\n  // But it's better to have a simpler binding without a conditional, for\n  // performance, so probably better to return both start options.\n  //\n  // Then the caller just ignores the end if it's not the first pattern,\n  // and the start always gets applied.\n  //\n  // But that's always going to be $ if it's the ending pattern, or nothing,\n  // so the caller can just attach $ at the end of the pattern when building.\n  //\n  // So the todo is:\n  // - better detect what kind of start is needed\n  // - return both flavors of starting pattern\n  // - attach $ at the end of the pattern when creating the actual RegExp\n  //\n  // Ah, but wait, no, that all only applies to the root when the first pattern\n  // is not an extglob. If the first pattern IS an extglob, then we need all\n  // that dot prevention biz to live in the extglob portions, because eg\n  // +(*|.x*) can match .xy but not .yx.\n  //\n  // So, return the two flavors if it's #root and the first child is not an\n  // AST, otherwise leave it to the child AST to handle it, and there,\n  // use the (?:^|/) style of start binding.\n  //\n  // Even simplified further:\n  // - Since the start for a join is eg /(?!\\.) and the start for a part\n  // is ^(?!\\.), we can just prepend (?!\\.) to the pattern (either root\n  // or start or whatever) and prepend ^ or / at the Regexp construction.\n  toRegExpSource(\n    allowDot?: boolean\n  ): [re: string, body: string, hasMagic: boolean, uflag: boolean] {\n    const dot = allowDot ?? !!this.#options.dot\n    if (this.#root === this) this.#fillNegs()\n    if (!this.type) {\n      const noEmpty = this.isStart() && this.isEnd()\n      const src = this.#parts\n        .map(p => {\n          const [re, _, hasMagic, uflag] =\n            typeof p === 'string'\n              ? AST.#parseGlob(p, this.#hasMagic, noEmpty)\n              : p.toRegExpSource(allowDot)\n          this.#hasMagic = this.#hasMagic || hasMagic\n          this.#uflag = this.#uflag || uflag\n          return re\n        })\n        .join('')\n\n      let start = ''\n      if (this.isStart()) {\n        if (typeof this.#parts[0] === 'string') {\n          // this is the string that will match the start of the pattern,\n          // so we need to protect against dots and such.\n\n          // '.' and '..' cannot match unless the pattern is that exactly,\n          // even if it starts with . or dot:true is set.\n          const dotTravAllowed =\n            this.#parts.length === 1 && justDots.has(this.#parts[0])\n          if (!dotTravAllowed) {\n            const aps = addPatternStart\n            // check if we have a possibility of matching . or ..,\n            // and prevent that.\n            const needNoTrav =\n              // dots are allowed, and the pattern starts with [ or .\n              (dot && aps.has(src.charAt(0))) ||\n              // the pattern starts with \\., and then [ or .\n              (src.startsWith('\\\\.') && aps.has(src.charAt(2))) ||\n              // the pattern starts with \\.\\., and then [ or .\n              (src.startsWith('\\\\.\\\\.') && aps.has(src.charAt(4)))\n            // no need to prevent dots if it can't match a dot, or if a\n            // sub-pattern will be preventing it anyway.\n            const needNoDot = !dot && !allowDot && aps.has(src.charAt(0))\n\n            start = needNoTrav ? startNoTraversal : needNoDot ? startNoDot : ''\n          }\n        }\n      }\n\n      // append the \"end of path portion\" pattern to negation tails\n      let end = ''\n      if (\n        this.isEnd() &&\n        this.#root.#filledNegs &&\n        this.#parent?.type === '!'\n      ) {\n        end = '(?:$|\\\\/)'\n      }\n      const final = start + src + end\n      return [\n        final,\n        unescape(src),\n        (this.#hasMagic = !!this.#hasMagic),\n        this.#uflag,\n      ]\n    }\n\n    // We need to calculate the body *twice* if it's a repeat pattern\n    // at the start, once in nodot mode, then again in dot mode, so a\n    // pattern like *(?) can match 'x.y'\n\n    const repeated = this.type === '*' || this.type === '+'\n    // some kind of extglob\n    const start = this.type === '!' ? '(?:(?!(?:' : '(?:'\n    let body = this.#partsToRegExp(dot)\n\n    if (this.isStart() && this.isEnd() && !body && this.type !== '!') {\n      // invalid extglob, has to at least be *something* present, if it's\n      // the entire path portion.\n      const s = this.toString()\n      this.#parts = [s]\n      this.type = null\n      this.#hasMagic = undefined\n      return [s, unescape(this.toString()), false, false]\n    }\n\n    // XXX abstract out this map method\n    let bodyDotAllowed =\n      !repeated || allowDot || dot || !startNoDot\n        ? ''\n        : this.#partsToRegExp(true)\n    if (bodyDotAllowed === body) {\n      bodyDotAllowed = ''\n    }\n    if (bodyDotAllowed) {\n      body = `(?:${body})(?:${bodyDotAllowed})*?`\n    }\n\n    // an empty !() is exactly equivalent to a starNoEmpty\n    let final = ''\n    if (this.type === '!' && this.#emptyExt) {\n      final = (this.isStart() && !dot ? startNoDot : '') + starNoEmpty\n    } else {\n      const close =\n        this.type === '!'\n          ? // !() must match something,but !(x) can match ''\n            '))' +\n            (this.isStart() && !dot && !allowDot ? startNoDot : '') +\n            star +\n            ')'\n          : this.type === '@'\n          ? ')'\n          : this.type === '?'\n          ? ')?'\n          : this.type === '+' && bodyDotAllowed\n          ? ')'\n          : this.type === '*' && bodyDotAllowed\n          ? `)?`\n          : `)${this.type}`\n      final = start + body + close\n    }\n    return [\n      final,\n      unescape(body),\n      (this.#hasMagic = !!this.#hasMagic),\n      this.#uflag,\n    ]\n  }\n\n  #partsToRegExp(dot: boolean) {\n    return this.#parts\n      .map(p => {\n        // extglob ASTs should only contain parent ASTs\n        /* c8 ignore start */\n        if (typeof p === 'string') {\n          throw new Error('string type in extglob ast??')\n        }\n        /* c8 ignore stop */\n        // can ignore hasMagic, because extglobs are already always magic\n        const [re, _, _hasMagic, uflag] = p.toRegExpSource(dot)\n        this.#uflag = this.#uflag || uflag\n        return re\n      })\n      .filter(p => !(this.isStart() && this.isEnd()) || !!p)\n      .join('|')\n  }\n\n  static #parseGlob(\n    glob: string,\n    hasMagic: boolean | undefined,\n    noEmpty: boolean = false\n  ): [re: string, body: string, hasMagic: boolean, uflag: boolean] {\n    let escaping = false\n    let re = ''\n    let uflag = false\n    for (let i = 0; i < glob.length; i++) {\n      const c = glob.charAt(i)\n      if (escaping) {\n        escaping = false\n        re += (reSpecials.has(c) ? '\\\\' : '') + c\n        continue\n      }\n      if (c === '\\\\') {\n        if (i === glob.length - 1) {\n          re += '\\\\\\\\'\n        } else {\n          escaping = true\n        }\n        continue\n      }\n      if (c === '[') {\n        const [src, needUflag, consumed, magic] = parseClass(glob, i)\n        if (consumed) {\n          re += src\n          uflag = uflag || needUflag\n          i += consumed - 1\n          hasMagic = hasMagic || magic\n          continue\n        }\n      }\n      if (c === '*') {\n        if (noEmpty && glob === '*') re += starNoEmpty\n        else re += star\n        hasMagic = true\n        continue\n      }\n      if (c === '?') {\n        re += qmark\n        hasMagic = true\n        continue\n      }\n      re += regExpEscape(c)\n    }\n    return [re, unescape(glob), !!hasMagic, uflag]\n  }\n}\n"]}
                                  \ No newline at end of file
                                  diff --git a/node_modules/minimatch/dist/esm/brace-expressions.d.ts b/node_modules/minimatch/dist/esm/brace-expressions.d.ts
                                  new file mode 100644
                                  index 000000000..b1572deb9
                                  --- /dev/null
                                  +++ b/node_modules/minimatch/dist/esm/brace-expressions.d.ts
                                  @@ -0,0 +1,8 @@
                                  +export type ParseClassResult = [
                                  +    src: string,
                                  +    uFlag: boolean,
                                  +    consumed: number,
                                  +    hasMagic: boolean
                                  +];
                                  +export declare const parseClass: (glob: string, position: number) => ParseClassResult;
                                  +//# sourceMappingURL=brace-expressions.d.ts.map
                                  \ No newline at end of file
                                  diff --git a/node_modules/minimatch/dist/esm/brace-expressions.d.ts.map b/node_modules/minimatch/dist/esm/brace-expressions.d.ts.map
                                  new file mode 100644
                                  index 000000000..d39496487
                                  --- /dev/null
                                  +++ b/node_modules/minimatch/dist/esm/brace-expressions.d.ts.map
                                  @@ -0,0 +1 @@
                                  +{"version":3,"file":"brace-expressions.d.ts","sourceRoot":"","sources":["../../src/brace-expressions.ts"],"names":[],"mappings":"AA+BA,MAAM,MAAM,gBAAgB,GAAG;IAC7B,GAAG,EAAE,MAAM;IACX,KAAK,EAAE,OAAO;IACd,QAAQ,EAAE,MAAM;IAChB,QAAQ,EAAE,OAAO;CAClB,CAAA;AAQD,eAAO,MAAM,UAAU,SACf,MAAM,YACF,MAAM,qBA8HjB,CAAA"}
                                  \ No newline at end of file
                                  diff --git a/node_modules/minimatch/dist/esm/brace-expressions.js b/node_modules/minimatch/dist/esm/brace-expressions.js
                                  new file mode 100644
                                  index 000000000..c629d6ae8
                                  --- /dev/null
                                  +++ b/node_modules/minimatch/dist/esm/brace-expressions.js
                                  @@ -0,0 +1,148 @@
                                  +// translate the various posix character classes into unicode properties
                                  +// this works across all unicode locales
                                  +// { : [, /u flag required, negated]
                                  +const posixClasses = {
                                  +    '[:alnum:]': ['\\p{L}\\p{Nl}\\p{Nd}', true],
                                  +    '[:alpha:]': ['\\p{L}\\p{Nl}', true],
                                  +    '[:ascii:]': ['\\x' + '00-\\x' + '7f', false],
                                  +    '[:blank:]': ['\\p{Zs}\\t', true],
                                  +    '[:cntrl:]': ['\\p{Cc}', true],
                                  +    '[:digit:]': ['\\p{Nd}', true],
                                  +    '[:graph:]': ['\\p{Z}\\p{C}', true, true],
                                  +    '[:lower:]': ['\\p{Ll}', true],
                                  +    '[:print:]': ['\\p{C}', true],
                                  +    '[:punct:]': ['\\p{P}', true],
                                  +    '[:space:]': ['\\p{Z}\\t\\r\\n\\v\\f', true],
                                  +    '[:upper:]': ['\\p{Lu}', true],
                                  +    '[:word:]': ['\\p{L}\\p{Nl}\\p{Nd}\\p{Pc}', true],
                                  +    '[:xdigit:]': ['A-Fa-f0-9', false],
                                  +};
                                  +// only need to escape a few things inside of brace expressions
                                  +// escapes: [ \ ] -
                                  +const braceEscape = (s) => s.replace(/[[\]\\-]/g, '\\$&');
                                  +// escape all regexp magic characters
                                  +const regexpEscape = (s) => s.replace(/[-[\]{}()*+?.,\\^$|#\s]/g, '\\$&');
                                  +// everything has already been escaped, we just have to join
                                  +const rangesToString = (ranges) => ranges.join('');
                                  +// takes a glob string at a posix brace expression, and returns
                                  +// an equivalent regular expression source, and boolean indicating
                                  +// whether the /u flag needs to be applied, and the number of chars
                                  +// consumed to parse the character class.
                                  +// This also removes out of order ranges, and returns ($.) if the
                                  +// entire class just no good.
                                  +export const parseClass = (glob, position) => {
                                  +    const pos = position;
                                  +    /* c8 ignore start */
                                  +    if (glob.charAt(pos) !== '[') {
                                  +        throw new Error('not in a brace expression');
                                  +    }
                                  +    /* c8 ignore stop */
                                  +    const ranges = [];
                                  +    const negs = [];
                                  +    let i = pos + 1;
                                  +    let sawStart = false;
                                  +    let uflag = false;
                                  +    let escaping = false;
                                  +    let negate = false;
                                  +    let endPos = pos;
                                  +    let rangeStart = '';
                                  +    WHILE: while (i < glob.length) {
                                  +        const c = glob.charAt(i);
                                  +        if ((c === '!' || c === '^') && i === pos + 1) {
                                  +            negate = true;
                                  +            i++;
                                  +            continue;
                                  +        }
                                  +        if (c === ']' && sawStart && !escaping) {
                                  +            endPos = i + 1;
                                  +            break;
                                  +        }
                                  +        sawStart = true;
                                  +        if (c === '\\') {
                                  +            if (!escaping) {
                                  +                escaping = true;
                                  +                i++;
                                  +                continue;
                                  +            }
                                  +            // escaped \ char, fall through and treat like normal char
                                  +        }
                                  +        if (c === '[' && !escaping) {
                                  +            // either a posix class, a collation equivalent, or just a [
                                  +            for (const [cls, [unip, u, neg]] of Object.entries(posixClasses)) {
                                  +                if (glob.startsWith(cls, i)) {
                                  +                    // invalid, [a-[] is fine, but not [a-[:alpha]]
                                  +                    if (rangeStart) {
                                  +                        return ['$.', false, glob.length - pos, true];
                                  +                    }
                                  +                    i += cls.length;
                                  +                    if (neg)
                                  +                        negs.push(unip);
                                  +                    else
                                  +                        ranges.push(unip);
                                  +                    uflag = uflag || u;
                                  +                    continue WHILE;
                                  +                }
                                  +            }
                                  +        }
                                  +        // now it's just a normal character, effectively
                                  +        escaping = false;
                                  +        if (rangeStart) {
                                  +            // throw this range away if it's not valid, but others
                                  +            // can still match.
                                  +            if (c > rangeStart) {
                                  +                ranges.push(braceEscape(rangeStart) + '-' + braceEscape(c));
                                  +            }
                                  +            else if (c === rangeStart) {
                                  +                ranges.push(braceEscape(c));
                                  +            }
                                  +            rangeStart = '';
                                  +            i++;
                                  +            continue;
                                  +        }
                                  +        // now might be the start of a range.
                                  +        // can be either c-d or c-] or c] or c] at this point
                                  +        if (glob.startsWith('-]', i + 1)) {
                                  +            ranges.push(braceEscape(c + '-'));
                                  +            i += 2;
                                  +            continue;
                                  +        }
                                  +        if (glob.startsWith('-', i + 1)) {
                                  +            rangeStart = c;
                                  +            i += 2;
                                  +            continue;
                                  +        }
                                  +        // not the start of a range, just a single character
                                  +        ranges.push(braceEscape(c));
                                  +        i++;
                                  +    }
                                  +    if (endPos < i) {
                                  +        // didn't see the end of the class, not a valid class,
                                  +        // but might still be valid as a literal match.
                                  +        return ['', false, 0, false];
                                  +    }
                                  +    // if we got no ranges and no negates, then we have a range that
                                  +    // cannot possibly match anything, and that poisons the whole glob
                                  +    if (!ranges.length && !negs.length) {
                                  +        return ['$.', false, glob.length - pos, true];
                                  +    }
                                  +    // if we got one positive range, and it's a single character, then that's
                                  +    // not actually a magic pattern, it's just that one literal character.
                                  +    // we should not treat that as "magic", we should just return the literal
                                  +    // character. [_] is a perfectly valid way to escape glob magic chars.
                                  +    if (negs.length === 0 &&
                                  +        ranges.length === 1 &&
                                  +        /^\\?.$/.test(ranges[0]) &&
                                  +        !negate) {
                                  +        const r = ranges[0].length === 2 ? ranges[0].slice(-1) : ranges[0];
                                  +        return [regexpEscape(r), false, endPos - pos, false];
                                  +    }
                                  +    const sranges = '[' + (negate ? '^' : '') + rangesToString(ranges) + ']';
                                  +    const snegs = '[' + (negate ? '' : '^') + rangesToString(negs) + ']';
                                  +    const comb = ranges.length && negs.length
                                  +        ? '(' + sranges + '|' + snegs + ')'
                                  +        : ranges.length
                                  +            ? sranges
                                  +            : snegs;
                                  +    return [comb, uflag, endPos - pos, true];
                                  +};
                                  +//# sourceMappingURL=brace-expressions.js.map
                                  \ No newline at end of file
                                  diff --git a/node_modules/minimatch/dist/esm/brace-expressions.js.map b/node_modules/minimatch/dist/esm/brace-expressions.js.map
                                  new file mode 100644
                                  index 000000000..cdba30da1
                                  --- /dev/null
                                  +++ b/node_modules/minimatch/dist/esm/brace-expressions.js.map
                                  @@ -0,0 +1 @@
                                  +{"version":3,"file":"brace-expressions.js","sourceRoot":"","sources":["../../src/brace-expressions.ts"],"names":[],"mappings":"AAAA,wEAAwE;AACxE,wCAAwC;AAExC,8DAA8D;AAC9D,MAAM,YAAY,GAA0D;IAC1E,WAAW,EAAE,CAAC,sBAAsB,EAAE,IAAI,CAAC;IAC3C,WAAW,EAAE,CAAC,eAAe,EAAE,IAAI,CAAC;IACpC,WAAW,EAAE,CAAC,KAAK,GAAG,QAAQ,GAAG,IAAI,EAAE,KAAK,CAAC;IAC7C,WAAW,EAAE,CAAC,YAAY,EAAE,IAAI,CAAC;IACjC,WAAW,EAAE,CAAC,SAAS,EAAE,IAAI,CAAC;IAC9B,WAAW,EAAE,CAAC,SAAS,EAAE,IAAI,CAAC;IAC9B,WAAW,EAAE,CAAC,cAAc,EAAE,IAAI,EAAE,IAAI,CAAC;IACzC,WAAW,EAAE,CAAC,SAAS,EAAE,IAAI,CAAC;IAC9B,WAAW,EAAE,CAAC,QAAQ,EAAE,IAAI,CAAC;IAC7B,WAAW,EAAE,CAAC,QAAQ,EAAE,IAAI,CAAC;IAC7B,WAAW,EAAE,CAAC,uBAAuB,EAAE,IAAI,CAAC;IAC5C,WAAW,EAAE,CAAC,SAAS,EAAE,IAAI,CAAC;IAC9B,UAAU,EAAE,CAAC,6BAA6B,EAAE,IAAI,CAAC;IACjD,YAAY,EAAE,CAAC,WAAW,EAAE,KAAK,CAAC;CACnC,CAAA;AAED,+DAA+D;AAC/D,mBAAmB;AACnB,MAAM,WAAW,GAAG,CAAC,CAAS,EAAE,EAAE,CAAC,CAAC,CAAC,OAAO,CAAC,WAAW,EAAE,MAA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C;QACxB,CAAC,MAAM,EACP;QACA,MAAM,CAAC,GAAG,MAAM,CAAC,CAAC,CAAC,CAAC,MAAM,KAAK,CAAC,CAAC,CAAC,CAAC,MAAM,CAAC,CAAC,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,MAAM,CAAC,CAAC,CAAC,CAAA;QAClE,OAAO,CAAC,YAAY,CAAC,CAAC,CAAC,EAAE,KAAK,EAAE,MAAM,GAAG,GAAG,EAAE,KAAK,CAAC,CAAA;KACrD;IAED,MAAM,OAAO,GAAG,GAAG,GAAG,CAAC,MAAM,CAAC,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC,EAAE,CAAC,GAAG,cAAc,CAAC,MAAM,CAAC,GAAG,GAAG,CAAA;IACxE,MAAM,KAAK,GAAG,GAAG,GAAG,CAAC,MAAM,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,GAAG,CAAC,GAAG,cAAc,CAAC,IAAI,CAAC,GAAG,GAAG,CAAA;IACpE,MAAM,IAAI,GACR,MAAM,CAAC,MAAM,IAAI,IAAI,CAAC,MAAM;QAC1B,CAAC,CAAC,GAAG,GAAG,OAAO,GAAG,GAAG,GAAG,KAAK,GAAG,GAAG;QACnC,CAAC,CAAC,MAAM,CAAC,MAAM;YACf,CAAC,CAAC,OAAO;YACT,CAAC,CAAC,KAAK,CAAA;IAEX,OAAO,CAAC,IAAI,EAAE,KAAK,EAAE,MAAM,GAAG,GAAG,EAAE,IAAI,CAAC,CAAA;AAC1C,CAAC,CAAA","sourcesContent":["// translate the various posix character classes into unicode properties\n// this works across all unicode locales\n\n// { : [, /u flag required, negated]\nconst posixClasses: { [k: string]: [e: string, u: boolean, n?: boolean] } = {\n  '[:alnum:]': ['\\\\p{L}\\\\p{Nl}\\\\p{Nd}', true],\n  '[:alpha:]': ['\\\\p{L}\\\\p{Nl}', true],\n  '[:ascii:]': ['\\\\x' + '00-\\\\x' + '7f', false],\n  '[:blank:]': ['\\\\p{Zs}\\\\t', true],\n  '[:cntrl:]': ['\\\\p{Cc}', true],\n  '[:digit:]': ['\\\\p{Nd}', true],\n  '[:graph:]': ['\\\\p{Z}\\\\p{C}', true, true],\n  '[:lower:]': ['\\\\p{Ll}', true],\n  '[:print:]': ['\\\\p{C}', true],\n  '[:punct:]': ['\\\\p{P}', true],\n  '[:space:]': ['\\\\p{Z}\\\\t\\\\r\\\\n\\\\v\\\\f', true],\n  '[:upper:]': ['\\\\p{Lu}', true],\n  '[:word:]': ['\\\\p{L}\\\\p{Nl}\\\\p{Nd}\\\\p{Pc}', true],\n  '[:xdigit:]': ['A-Fa-f0-9', false],\n}\n\n// only need to escape a few things inside of brace expressions\n// escapes: [ \\ ] -\nconst braceEscape = (s: string) => s.replace(/[[\\]\\\\-]/g, '\\\\$&')\n// escape all regexp magic characters\nconst regexpEscape = (s: string) =>\n  s.replace(/[-[\\]{}()*+?.,\\\\^$|#\\s]/g, '\\\\$&')\n\n// everything has already been escaped, we just have to join\nconst rangesToString = (ranges: string[]): string => ranges.join('')\n\nexport type ParseClassResult = [\n  src: string,\n  uFlag: boolean,\n  consumed: number,\n  hasMagic: boolean\n]\n\n// takes a glob string at a posix brace expression, and returns\n// an equivalent regular expression source, and boolean indicating\n// whether the /u flag needs to be applied, and the number of chars\n// consumed to parse the character class.\n// This also removes out of order ranges, and returns ($.) if the\n// entire class just no good.\nexport const parseClass = (\n  glob: string,\n  position: number\n): ParseClassResult => {\n  const pos = position\n  /* c8 ignore start */\n  if (glob.charAt(pos) !== '[') {\n    throw new Error('not in a brace expression')\n  }\n  /* c8 ignore stop */\n  const ranges: string[] = []\n  const negs: string[] = []\n\n  let i = pos + 1\n  let sawStart = false\n  let uflag = false\n  let escaping = false\n  let negate = false\n  let endPos = pos\n  let rangeStart = ''\n  WHILE: while (i < glob.length) {\n    const c = glob.charAt(i)\n    if ((c === '!' || c === '^') && i === pos + 1) {\n      negate = true\n      i++\n      continue\n    }\n\n    if (c === ']' && sawStart && !escaping) {\n      endPos = i + 1\n      break\n    }\n\n    sawStart = true\n    if (c === '\\\\') {\n      if (!escaping) {\n        escaping = true\n        i++\n        continue\n      }\n      // escaped \\ char, fall through and treat like normal char\n    }\n    if (c === '[' && !escaping) {\n      // either a posix class, a collation equivalent, or just a [\n      for (const [cls, [unip, u, neg]] of Object.entries(posixClasses)) {\n        if (glob.startsWith(cls, i)) {\n          // invalid, [a-[] is fine, but not [a-[:alpha]]\n          if (rangeStart) {\n            return ['$.', false, glob.length - pos, true]\n          }\n          i += cls.length\n          if (neg) negs.push(unip)\n          else ranges.push(unip)\n          uflag = uflag || u\n          continue WHILE\n        }\n      }\n    }\n\n    // now it's just a normal character, effectively\n    escaping = false\n    if (rangeStart) {\n      // throw this range away if it's not valid, but others\n      // can still match.\n      if (c > rangeStart) {\n        ranges.push(braceEscape(rangeStart) + '-' + braceEscape(c))\n      } else if (c === rangeStart) {\n        ranges.push(braceEscape(c))\n      }\n      rangeStart = ''\n      i++\n      continue\n    }\n\n    // now might be the start of a range.\n    // can be either c-d or c-] or c] or c] at this point\n    if (glob.startsWith('-]', i + 1)) {\n      ranges.push(braceEscape(c + '-'))\n      i += 2\n      continue\n    }\n    if (glob.startsWith('-', i + 1)) {\n      rangeStart = c\n      i += 2\n      continue\n    }\n\n    // not the start of a range, just a single character\n    ranges.push(braceEscape(c))\n    i++\n  }\n\n  if (endPos < i) {\n    // didn't see the end of the class, not a valid class,\n    // but might still be valid as a literal match.\n    return ['', false, 0, false]\n  }\n\n  // if we got no ranges and no negates, then we have a range that\n  // cannot possibly match anything, and that poisons the whole glob\n  if (!ranges.length && !negs.length) {\n    return ['$.', false, glob.length - pos, true]\n  }\n\n  // if we got one positive range, and it's a single character, then that's\n  // not actually a magic pattern, it's just that one literal character.\n  // we should not treat that as \"magic\", we should just return the literal\n  // character. [_] is a perfectly valid way to escape glob magic chars.\n  if (\n    negs.length === 0 &&\n    ranges.length === 1 &&\n    /^\\\\?.$/.test(ranges[0]) &&\n    !negate\n  ) {\n    const r = ranges[0].length === 2 ? ranges[0].slice(-1) : ranges[0]\n    return [regexpEscape(r), false, endPos - pos, false]\n  }\n\n  const sranges = '[' + (negate ? '^' : '') + rangesToString(ranges) + ']'\n  const snegs = '[' + (negate ? '' : '^') + rangesToString(negs) + ']'\n  const comb =\n    ranges.length && negs.length\n      ? '(' + sranges + '|' + snegs + ')'\n      : ranges.length\n      ? sranges\n      : snegs\n\n  return [comb, uflag, endPos - pos, true]\n}\n"]}
                                  \ No newline at end of file
                                  diff --git a/node_modules/minimatch/dist/esm/escape.d.ts b/node_modules/minimatch/dist/esm/escape.d.ts
                                  new file mode 100644
                                  index 000000000..dc3e31631
                                  --- /dev/null
                                  +++ b/node_modules/minimatch/dist/esm/escape.d.ts
                                  @@ -0,0 +1,12 @@
                                  +import { MinimatchOptions } from './index.js';
                                  +/**
                                  + * Escape all magic characters in a glob pattern.
                                  + *
                                  + * If the {@link windowsPathsNoEscape | GlobOptions.windowsPathsNoEscape}
                                  + * option is used, then characters are escaped by wrapping in `[]`, because
                                  + * a magic character wrapped in a character class can only be satisfied by
                                  + * that exact character.  In this mode, `\` is _not_ escaped, because it is
                                  + * not interpreted as a magic character, but instead as a path separator.
                                  + */
                                  +export declare const escape: (s: string, { windowsPathsNoEscape, }?: Pick) => string;
                                  +//# sourceMappingURL=escape.d.ts.map
                                  \ No newline at end of file
                                  diff --git a/node_modules/minimatch/dist/esm/escape.d.ts.map b/node_modules/minimatch/dist/esm/escape.d.ts.map
                                  new file mode 100644
                                  index 000000000..0779dae7e
                                  --- /dev/null
                                  +++ b/node_modules/minimatch/dist/esm/escape.d.ts.map
                                  @@ -0,0 +1 @@
                                  +{"version":3,"file":"escape.d.ts","sourceRoot":"","sources":["../../src/escape.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,gBAAgB,EAAE,MAAM,YAAY,CAAA;AAC7C;;;;;;;;GAQG;AACH,eAAO,MAAM,MAAM,MACd,MAAM,8BAGN,KAAK,gBAAgB,EAAE,sBAAsB,CAAC,WAQlD,CAAA"}
                                  \ No newline at end of file
                                  diff --git a/node_modules/minimatch/dist/esm/escape.js b/node_modules/minimatch/dist/esm/escape.js
                                  new file mode 100644
                                  index 000000000..16f7c8c7b
                                  --- /dev/null
                                  +++ b/node_modules/minimatch/dist/esm/escape.js
                                  @@ -0,0 +1,18 @@
                                  +/**
                                  + * Escape all magic characters in a glob pattern.
                                  + *
                                  + * If the {@link windowsPathsNoEscape | GlobOptions.windowsPathsNoEscape}
                                  + * option is used, then characters are escaped by wrapping in `[]`, because
                                  + * a magic character wrapped in a character class can only be satisfied by
                                  + * that exact character.  In this mode, `\` is _not_ escaped, because it is
                                  + * not interpreted as a magic character, but instead as a path separator.
                                  + */
                                  +export const escape = (s, { windowsPathsNoEscape = false, } = {}) => {
                                  +    // don't need to escape +@! because we escape the parens
                                  +    // that make those magic, and escaping ! as [!] isn't valid,
                                  +    // because [!]] is a valid glob class meaning not ']'.
                                  +    return windowsPathsNoEscape
                                  +        ? s.replace(/[?*()[\]]/g, '[$&]')
                                  +        : s.replace(/[?*()[\]\\]/g, '\\$&');
                                  +};
                                  +//# sourceMappingURL=escape.js.map
                                  \ No newline at end of file
                                  diff --git a/node_modules/minimatch/dist/esm/escape.js.map b/node_modules/minimatch/dist/esm/escape.js.map
                                  new file mode 100644
                                  index 000000000..170fd1ad5
                                  --- /dev/null
                                  +++ b/node_modules/minimatch/dist/esm/escape.js.map
                                  @@ -0,0 +1 @@
                                  +{"version":3,"file":"escape.js","sourceRoot":"","sources":["../../src/escape.ts"],"names":[],"mappings":"AACA;;;;;;;;GAQG;AACH,MAAM,CAAC,MAAM,MAAM,GAAG,CACpB,CAAS,EACT,EACE,oBAAoB,GAAG,KAAK,MACsB,EAAE,EACtD,EAAE;IACF,wDAAwD;IACxD,4DAA4D;IAC5D,sDAAsD;IACtD,OAAO,oBAAoB;QACzB,CAAC,CAAC,CAAC,CAAC,OAAO,CAAC,YAAY,EAAE,MAAM,CAAC;QACjC,CAAC,CAAC,CAAC,CAAC,OAAO,CAAC,cAAc,EAAE,MAAM,CAAC,CAAA;AACvC,CAAC,CAAA","sourcesContent":["import { MinimatchOptions } from './index.js'\n/**\n * Escape all magic characters in a glob pattern.\n *\n * If the {@link windowsPathsNoEscape | GlobOptions.windowsPathsNoEscape}\n * option is used, then characters are escaped by wrapping in `[]`, because\n * a magic character wrapped in a character class can only be satisfied by\n * that exact character.  In this mode, `\\` is _not_ escaped, because it is\n * not interpreted as a magic character, but instead as a path separator.\n */\nexport const escape = (\n  s: string,\n  {\n    windowsPathsNoEscape = false,\n  }: Pick = {}\n) => {\n  // don't need to escape +@! because we escape the parens\n  // that make those magic, and escaping ! as [!] isn't valid,\n  // because [!]] is a valid glob class meaning not ']'.\n  return windowsPathsNoEscape\n    ? s.replace(/[?*()[\\]]/g, '[$&]')\n    : s.replace(/[?*()[\\]\\\\]/g, '\\\\$&')\n}\n"]}
                                  \ No newline at end of file
                                  diff --git a/node_modules/minimatch/dist/esm/index.d.ts b/node_modules/minimatch/dist/esm/index.d.ts
                                  new file mode 100644
                                  index 000000000..41d16a98e
                                  --- /dev/null
                                  +++ b/node_modules/minimatch/dist/esm/index.d.ts
                                  @@ -0,0 +1,94 @@
                                  +import { AST } from './ast.js';
                                  +type Platform = 'aix' | 'android' | 'darwin' | 'freebsd' | 'haiku' | 'linux' | 'openbsd' | 'sunos' | 'win32' | 'cygwin' | 'netbsd';
                                  +export interface MinimatchOptions {
                                  +    nobrace?: boolean;
                                  +    nocomment?: boolean;
                                  +    nonegate?: boolean;
                                  +    debug?: boolean;
                                  +    noglobstar?: boolean;
                                  +    noext?: boolean;
                                  +    nonull?: boolean;
                                  +    windowsPathsNoEscape?: boolean;
                                  +    allowWindowsEscape?: boolean;
                                  +    partial?: boolean;
                                  +    dot?: boolean;
                                  +    nocase?: boolean;
                                  +    nocaseMagicOnly?: boolean;
                                  +    magicalBraces?: boolean;
                                  +    matchBase?: boolean;
                                  +    flipNegate?: boolean;
                                  +    preserveMultipleSlashes?: boolean;
                                  +    optimizationLevel?: number;
                                  +    platform?: Platform;
                                  +    windowsNoMagicRoot?: boolean;
                                  +}
                                  +export declare const minimatch: {
                                  +    (p: string, pattern: string, options?: MinimatchOptions): boolean;
                                  +    sep: Sep;
                                  +    GLOBSTAR: typeof GLOBSTAR;
                                  +    filter: (pattern: string, options?: MinimatchOptions) => (p: string) => boolean;
                                  +    defaults: (def: MinimatchOptions) => typeof minimatch;
                                  +    braceExpand: (pattern: string, options?: MinimatchOptions) => string[];
                                  +    makeRe: (pattern: string, options?: MinimatchOptions) => false | MMRegExp;
                                  +    match: (list: string[], pattern: string, options?: MinimatchOptions) => string[];
                                  +    AST: typeof AST;
                                  +    Minimatch: typeof Minimatch;
                                  +    escape: (s: string, { windowsPathsNoEscape, }?: Pick) => string;
                                  +    unescape: (s: string, { windowsPathsNoEscape, }?: Pick) => string;
                                  +};
                                  +type Sep = '\\' | '/';
                                  +export declare const sep: Sep;
                                  +export declare const GLOBSTAR: unique symbol;
                                  +export declare const filter: (pattern: string, options?: MinimatchOptions) => (p: string) => boolean;
                                  +export declare const defaults: (def: MinimatchOptions) => typeof minimatch;
                                  +export declare const braceExpand: (pattern: string, options?: MinimatchOptions) => string[];
                                  +export declare const makeRe: (pattern: string, options?: MinimatchOptions) => false | MMRegExp;
                                  +export declare const match: (list: string[], pattern: string, options?: MinimatchOptions) => string[];
                                  +export type MMRegExp = RegExp & {
                                  +    _src?: string;
                                  +    _glob?: string;
                                  +};
                                  +export type ParseReturnFiltered = string | MMRegExp | typeof GLOBSTAR;
                                  +export type ParseReturn = ParseReturnFiltered | false;
                                  +export declare class Minimatch {
                                  +    options: MinimatchOptions;
                                  +    set: ParseReturnFiltered[][];
                                  +    pattern: string;
                                  +    windowsPathsNoEscape: boolean;
                                  +    nonegate: boolean;
                                  +    negate: boolean;
                                  +    comment: boolean;
                                  +    empty: boolean;
                                  +    preserveMultipleSlashes: boolean;
                                  +    partial: boolean;
                                  +    globSet: string[];
                                  +    globParts: string[][];
                                  +    nocase: boolean;
                                  +    isWindows: boolean;
                                  +    platform: Platform;
                                  +    windowsNoMagicRoot: boolean;
                                  +    regexp: false | null | MMRegExp;
                                  +    constructor(pattern: string, options?: MinimatchOptions);
                                  +    hasMagic(): boolean;
                                  +    debug(..._: any[]): void;
                                  +    make(): void;
                                  +    preprocess(globParts: string[][]): string[][];
                                  +    adjascentGlobstarOptimize(globParts: string[][]): string[][];
                                  +    levelOneOptimize(globParts: string[][]): string[][];
                                  +    levelTwoFileOptimize(parts: string | string[]): string[];
                                  +    firstPhasePreProcess(globParts: string[][]): string[][];
                                  +    secondPhasePreProcess(globParts: string[][]): string[][];
                                  +    partsMatch(a: string[], b: string[], emptyGSMatch?: boolean): false | string[];
                                  +    parseNegate(): void;
                                  +    matchOne(file: string[], pattern: ParseReturn[], partial?: boolean): boolean;
                                  +    braceExpand(): string[];
                                  +    parse(pattern: string): ParseReturn;
                                  +    makeRe(): false | MMRegExp;
                                  +    slashSplit(p: string): string[];
                                  +    match(f: string, partial?: boolean): boolean;
                                  +    static defaults(def: MinimatchOptions): typeof Minimatch;
                                  +}
                                  +export { AST } from './ast.js';
                                  +export { escape } from './escape.js';
                                  +export { unescape } from './unescape.js';
                                  +//# sourceMappingURL=index.d.ts.map
                                  \ No newline at end of file
                                  diff --git a/node_modules/minimatch/dist/esm/index.d.ts.map b/node_modules/minimatch/dist/esm/index.d.ts.map
                                  new file mode 100644
                                  index 000000000..21f9cdc90
                                  --- /dev/null
                                  +++ b/node_modules/minimatch/dist/esm/index.d.ts.map
                                  @@ -0,0 +1 @@
                                  +{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,GAAG,EAAe,MAAM,UAAU,CAAA;AAI3C,KAAK,QAAQ,GACT,KAAK,GACL,SAAS,GACT,QAAQ,GACR,SAAS,GACT,OAAO,GACP,OAAO,GACP,SAAS,GACT,OAAO,GACP,OAAO,GACP,QAAQ,GACR,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K,CAAC,GAAG,CAAC,EAAE,GAAG,EAAE;IAEjB,IAAI;IA0FJ,UAAU,CAAC,SAAS,EAAE,MAAM,EAAE,EAAE;IA8BhC,yBAAyB,CAAC,SAAS,EAAE,MAAM,EAAE,EAAE;IAiB/C,gBAAgB,CAAC,SAAS,EAAE,MAAM,EAAE,EAAE;IAoBtC,oBAAoB,CAAC,KAAK,EAAE,MAAM,GAAG,MAAM,EAAE;IA6D7C,oBAAoB,CAAC,SAAS,EAAE,MAAM,EAAE,EAAE;IA0F1C,qBAAqB,CAAC,SAAS,EAAE,MAAM,EAAE,EAAE,GAAG,MAAM,EAAE,EAAE;IAgBxD,UAAU,CACR,CAAC,EAAE,MAAM,EAAE,EACX,CAAC,EAAE,MAAM,EAAE,EACX,YAAY,GAAE,OAAe,GAC5B,KAAK,GAAG,MAAM,EAAE;IA+CnB,WAAW;IAqBX,QAAQ,CAAC,IAAI,EAAE,MAAM,EAAE,EAAE,OAAO,EAAE,WAAW,EAAE,EAAE,OAAO,GAAE,OAAe;IAiNzE,WAAW;IAIX,KAAK,CAAC,OAAO,EAAE,MAAM,GAAG,WAAW;IAiDnC,MAAM;IAsFN,UAAU,CAAC,CAAC,EAAE,MAAM;IAepB,KAAK,CAAC,CAAC,EAAE,MAAM,EAAE,OAAO,UAAe;IAiEvC,MAAM,CAAC,QAAQ,CAAC,GAAG,EAAE,gBAAgB;CAGtC;AAED,OAAO,EAAE,GAAG,EAAE,MAAM,UAAU,CAAA;AAC9B,OAAO,EAAE,MAAM,EAAE,MAAM,aAAa,CAAA;AACpC,OAAO,EAAE,QAAQ,EAAE,MAAM,eAAe,CAAA"}
                                  \ No newline at end of file
                                  diff --git a/node_modules/minimatch/dist/esm/index.js b/node_modules/minimatch/dist/esm/index.js
                                  new file mode 100644
                                  index 000000000..ff6319369
                                  --- /dev/null
                                  +++ b/node_modules/minimatch/dist/esm/index.js
                                  @@ -0,0 +1,1000 @@
                                  +import expand from 'brace-expansion';
                                  +import { assertValidPattern } from './assert-valid-pattern.js';
                                  +import { AST } from './ast.js';
                                  +import { escape } from './escape.js';
                                  +import { unescape } from './unescape.js';
                                  +export const minimatch = (p, pattern, options = {}) => {
                                  +    assertValidPattern(pattern);
                                  +    // shortcut: comments match nothing.
                                  +    if (!options.nocomment && pattern.charAt(0) === '#') {
                                  +        return false;
                                  +    }
                                  +    return new Minimatch(pattern, options).match(p);
                                  +};
                                  +// Optimized checking for the most common glob patterns.
                                  +const starDotExtRE = /^\*+([^+@!?\*\[\(]*)$/;
                                  +const starDotExtTest = (ext) => (f) => !f.startsWith('.') && f.endsWith(ext);
                                  +const starDotExtTestDot = (ext) => (f) => f.endsWith(ext);
                                  +const starDotExtTestNocase = (ext) => {
                                  +    ext = ext.toLowerCase();
                                  +    return (f) => !f.startsWith('.') && f.toLowerCase().endsWith(ext);
                                  +};
                                  +const starDotExtTestNocaseDot = (ext) => {
                                  +    ext = ext.toLowerCase();
                                  +    return (f) => f.toLowerCase().endsWith(ext);
                                  +};
                                  +const starDotStarRE = /^\*+\.\*+$/;
                                  +const starDotStarTest = (f) => !f.startsWith('.') && f.includes('.');
                                  +const starDotStarTestDot = (f) => f !== '.' && f !== '..' && f.includes('.');
                                  +const dotStarRE = /^\.\*+$/;
                                  +const dotStarTest = (f) => f !== '.' && f !== '..' && f.startsWith('.');
                                  +const starRE = /^\*+$/;
                                  +const starTest = (f) => f.length !== 0 && !f.startsWith('.');
                                  +const starTestDot = (f) => f.length !== 0 && f !== '.' && f !== '..';
                                  +const qmarksRE = /^\?+([^+@!?\*\[\(]*)?$/;
                                  +const qmarksTestNocase = ([$0, ext = '']) => {
                                  +    const noext = qmarksTestNoExt([$0]);
                                  +    if (!ext)
                                  +        return noext;
                                  +    ext = ext.toLowerCase();
                                  +    return (f) => noext(f) && f.toLowerCase().endsWith(ext);
                                  +};
                                  +const qmarksTestNocaseDot = ([$0, ext = '']) => {
                                  +    const noext = qmarksTestNoExtDot([$0]);
                                  +    if (!ext)
                                  +        return noext;
                                  +    ext = ext.toLowerCase();
                                  +    return (f) => noext(f) && f.toLowerCase().endsWith(ext);
                                  +};
                                  +const qmarksTestDot = ([$0, ext = '']) => {
                                  +    const noext = qmarksTestNoExtDot([$0]);
                                  +    return !ext ? noext : (f) => noext(f) && f.endsWith(ext);
                                  +};
                                  +const qmarksTest = ([$0, ext = '']) => {
                                  +    const noext = qmarksTestNoExt([$0]);
                                  +    return !ext ? noext : (f) => noext(f) && f.endsWith(ext);
                                  +};
                                  +const qmarksTestNoExt = ([$0]) => {
                                  +    const len = $0.length;
                                  +    return (f) => f.length === len && !f.startsWith('.');
                                  +};
                                  +const qmarksTestNoExtDot = ([$0]) => {
                                  +    const len = $0.length;
                                  +    return (f) => f.length === len && f !== '.' && f !== '..';
                                  +};
                                  +/* c8 ignore start */
                                  +const defaultPlatform = (typeof process === 'object' && process
                                  +    ? (typeof process.env === 'object' &&
                                  +        process.env &&
                                  +        process.env.__MINIMATCH_TESTING_PLATFORM__) ||
                                  +        process.platform
                                  +    : 'posix');
                                  +const path = {
                                  +    win32: { sep: '\\' },
                                  +    posix: { sep: '/' },
                                  +};
                                  +/* c8 ignore stop */
                                  +export const sep = defaultPlatform === 'win32' ? path.win32.sep : path.posix.sep;
                                  +minimatch.sep = sep;
                                  +export const GLOBSTAR = Symbol('globstar **');
                                  +minimatch.GLOBSTAR = GLOBSTAR;
                                  +// any single thing other than /
                                  +// don't need to escape / when using new RegExp()
                                  +const qmark = '[^/]';
                                  +// * => any number of characters
                                  +const 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.
                                  +const twoStarDot = '(?:(?!(?:\\/|^)(?:\\.{1,2})($|\\/)).)*?';
                                  +// not a ^ or / followed by a dot,
                                  +// followed by anything, any number of times.
                                  +const twoStarNoDot = '(?:(?!(?:\\/|^)\\.).)*?';
                                  +export const filter = (pattern, options = {}) => (p) => minimatch(p, pattern, options);
                                  +minimatch.filter = filter;
                                  +const ext = (a, b = {}) => Object.assign({}, a, b);
                                  +export const defaults = (def) => {
                                  +    if (!def || typeof def !== 'object' || !Object.keys(def).length) {
                                  +        return minimatch;
                                  +    }
                                  +    const orig = minimatch;
                                  +    const m = (p, pattern, options = {}) => orig(p, pattern, ext(def, options));
                                  +    return Object.assign(m, {
                                  +        Minimatch: class Minimatch extends orig.Minimatch {
                                  +            constructor(pattern, options = {}) {
                                  +                super(pattern, ext(def, options));
                                  +            }
                                  +            static defaults(options) {
                                  +                return orig.defaults(ext(def, options)).Minimatch;
                                  +            }
                                  +        },
                                  +        AST: class AST extends orig.AST {
                                  +            /* c8 ignore start */
                                  +            constructor(type, parent, options = {}) {
                                  +                super(type, parent, ext(def, options));
                                  +            }
                                  +            /* c8 ignore stop */
                                  +            static fromGlob(pattern, options = {}) {
                                  +                return orig.AST.fromGlob(pattern, ext(def, options));
                                  +            }
                                  +        },
                                  +        unescape: (s, options = {}) => orig.unescape(s, ext(def, options)),
                                  +        escape: (s, options = {}) => orig.escape(s, ext(def, options)),
                                  +        filter: (pattern, options = {}) => orig.filter(pattern, ext(def, options)),
                                  +        defaults: (options) => orig.defaults(ext(def, options)),
                                  +        makeRe: (pattern, options = {}) => orig.makeRe(pattern, ext(def, options)),
                                  +        braceExpand: (pattern, options = {}) => orig.braceExpand(pattern, ext(def, options)),
                                  +        match: (list, pattern, options = {}) => orig.match(list, pattern, ext(def, options)),
                                  +        sep: orig.sep,
                                  +        GLOBSTAR: GLOBSTAR,
                                  +    });
                                  +};
                                  +minimatch.defaults = defaults;
                                  +// 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
                                  +export const braceExpand = (pattern, options = {}) => {
                                  +    assertValidPattern(pattern);
                                  +    // Thanks to Yeting Li  for
                                  +    // improving this regexp to avoid a ReDOS vulnerability.
                                  +    if (options.nobrace || !/\{(?:(?!\{).)*\}/.test(pattern)) {
                                  +        // shortcut. no need to expand.
                                  +        return [pattern];
                                  +    }
                                  +    return expand(pattern);
                                  +};
                                  +minimatch.braceExpand = braceExpand;
                                  +// 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.
                                  +export const makeRe = (pattern, options = {}) => new Minimatch(pattern, options).makeRe();
                                  +minimatch.makeRe = makeRe;
                                  +export const match = (list, pattern, options = {}) => {
                                  +    const mm = new Minimatch(pattern, options);
                                  +    list = list.filter(f => mm.match(f));
                                  +    if (mm.options.nonull && !list.length) {
                                  +        list.push(pattern);
                                  +    }
                                  +    return list;
                                  +};
                                  +minimatch.match = match;
                                  +// replace stuff like \* with *
                                  +const globMagic = /[?*]|[+@!]\(.*?\)|\[|\]/;
                                  +const regExpEscape = (s) => s.replace(/[-[\]{}()*+?.,\\^$|#\s]/g, '\\$&');
                                  +export class Minimatch {
                                  +    options;
                                  +    set;
                                  +    pattern;
                                  +    windowsPathsNoEscape;
                                  +    nonegate;
                                  +    negate;
                                  +    comment;
                                  +    empty;
                                  +    preserveMultipleSlashes;
                                  +    partial;
                                  +    globSet;
                                  +    globParts;
                                  +    nocase;
                                  +    isWindows;
                                  +    platform;
                                  +    windowsNoMagicRoot;
                                  +    regexp;
                                  +    constructor(pattern, options = {}) {
                                  +        assertValidPattern(pattern);
                                  +        options = options || {};
                                  +        this.options = options;
                                  +        this.pattern = pattern;
                                  +        this.platform = options.platform || defaultPlatform;
                                  +        this.isWindows = this.platform === 'win32';
                                  +        this.windowsPathsNoEscape =
                                  +            !!options.windowsPathsNoEscape || options.allowWindowsEscape === false;
                                  +        if (this.windowsPathsNoEscape) {
                                  +            this.pattern = this.pattern.replace(/\\/g, '/');
                                  +        }
                                  +        this.preserveMultipleSlashes = !!options.preserveMultipleSlashes;
                                  +        this.regexp = null;
                                  +        this.negate = false;
                                  +        this.nonegate = !!options.nonegate;
                                  +        this.comment = false;
                                  +        this.empty = false;
                                  +        this.partial = !!options.partial;
                                  +        this.nocase = !!this.options.nocase;
                                  +        this.windowsNoMagicRoot =
                                  +            options.windowsNoMagicRoot !== undefined
                                  +                ? options.windowsNoMagicRoot
                                  +                : !!(this.isWindows && this.nocase);
                                  +        this.globSet = [];
                                  +        this.globParts = [];
                                  +        this.set = [];
                                  +        // make the set of regexps etc.
                                  +        this.make();
                                  +    }
                                  +    hasMagic() {
                                  +        if (this.options.magicalBraces && this.set.length > 1) {
                                  +            return true;
                                  +        }
                                  +        for (const pattern of this.set) {
                                  +            for (const part of pattern) {
                                  +                if (typeof part !== 'string')
                                  +                    return true;
                                  +            }
                                  +        }
                                  +        return false;
                                  +    }
                                  +    debug(..._) { }
                                  +    make() {
                                  +        const pattern = this.pattern;
                                  +        const 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
                                  +        this.globSet = [...new Set(this.braceExpand())];
                                  +        if (options.debug) {
                                  +            this.debug = (...args) => console.error(...args);
                                  +        }
                                  +        this.debug(this.pattern, this.globSet);
                                  +        // 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
                                  +        //
                                  +        // First, we preprocess to make the glob pattern sets a bit simpler
                                  +        // and deduped.  There are some perf-killing patterns that can cause
                                  +        // problems with a glob walk, but we can simplify them down a bit.
                                  +        const rawGlobParts = this.globSet.map(s => this.slashSplit(s));
                                  +        this.globParts = this.preprocess(rawGlobParts);
                                  +        this.debug(this.pattern, this.globParts);
                                  +        // glob --> regexps
                                  +        let set = this.globParts.map((s, _, __) => {
                                  +            if (this.isWindows && this.windowsNoMagicRoot) {
                                  +                // check if it's a drive or unc path.
                                  +                const isUNC = s[0] === '' &&
                                  +                    s[1] === '' &&
                                  +                    (s[2] === '?' || !globMagic.test(s[2])) &&
                                  +                    !globMagic.test(s[3]);
                                  +                const isDrive = /^[a-z]:/i.test(s[0]);
                                  +                if (isUNC) {
                                  +                    return [...s.slice(0, 4), ...s.slice(4).map(ss => this.parse(ss))];
                                  +                }
                                  +                else if (isDrive) {
                                  +                    return [s[0], ...s.slice(1).map(ss => this.parse(ss))];
                                  +                }
                                  +            }
                                  +            return s.map(ss => this.parse(ss));
                                  +        });
                                  +        this.debug(this.pattern, set);
                                  +        // filter out everything that didn't compile properly.
                                  +        this.set = set.filter(s => s.indexOf(false) === -1);
                                  +        // do not treat the ? in UNC paths as magic
                                  +        if (this.isWindows) {
                                  +            for (let i = 0; i < this.set.length; i++) {
                                  +                const p = this.set[i];
                                  +                if (p[0] === '' &&
                                  +                    p[1] === '' &&
                                  +                    this.globParts[i][2] === '?' &&
                                  +                    typeof p[3] === 'string' &&
                                  +                    /^[a-z]:$/i.test(p[3])) {
                                  +                    p[2] = '?';
                                  +                }
                                  +            }
                                  +        }
                                  +        this.debug(this.pattern, this.set);
                                  +    }
                                  +    // various transforms to equivalent pattern sets that are
                                  +    // faster to process in a filesystem walk.  The goal is to
                                  +    // eliminate what we can, and push all ** patterns as far
                                  +    // to the right as possible, even if it increases the number
                                  +    // of patterns that we have to process.
                                  +    preprocess(globParts) {
                                  +        // if we're not in globstar mode, then turn all ** into *
                                  +        if (this.options.noglobstar) {
                                  +            for (let i = 0; i < globParts.length; i++) {
                                  +                for (let j = 0; j < globParts[i].length; j++) {
                                  +                    if (globParts[i][j] === '**') {
                                  +                        globParts[i][j] = '*';
                                  +                    }
                                  +                }
                                  +            }
                                  +        }
                                  +        const { optimizationLevel = 1 } = this.options;
                                  +        if (optimizationLevel >= 2) {
                                  +            // aggressive optimization for the purpose of fs walking
                                  +            globParts = this.firstPhasePreProcess(globParts);
                                  +            globParts = this.secondPhasePreProcess(globParts);
                                  +        }
                                  +        else if (optimizationLevel >= 1) {
                                  +            // just basic optimizations to remove some .. parts
                                  +            globParts = this.levelOneOptimize(globParts);
                                  +        }
                                  +        else {
                                  +            // just collapse multiple ** portions into one
                                  +            globParts = this.adjascentGlobstarOptimize(globParts);
                                  +        }
                                  +        return globParts;
                                  +    }
                                  +    // just get rid of adjascent ** portions
                                  +    adjascentGlobstarOptimize(globParts) {
                                  +        return globParts.map(parts => {
                                  +            let gs = -1;
                                  +            while (-1 !== (gs = parts.indexOf('**', gs + 1))) {
                                  +                let i = gs;
                                  +                while (parts[i + 1] === '**') {
                                  +                    i++;
                                  +                }
                                  +                if (i !== gs) {
                                  +                    parts.splice(gs, i - gs);
                                  +                }
                                  +            }
                                  +            return parts;
                                  +        });
                                  +    }
                                  +    // get rid of adjascent ** and resolve .. portions
                                  +    levelOneOptimize(globParts) {
                                  +        return globParts.map(parts => {
                                  +            parts = parts.reduce((set, part) => {
                                  +                const prev = set[set.length - 1];
                                  +                if (part === '**' && prev === '**') {
                                  +                    return set;
                                  +                }
                                  +                if (part === '..') {
                                  +                    if (prev && prev !== '..' && prev !== '.' && prev !== '**') {
                                  +                        set.pop();
                                  +                        return set;
                                  +                    }
                                  +                }
                                  +                set.push(part);
                                  +                return set;
                                  +            }, []);
                                  +            return parts.length === 0 ? [''] : parts;
                                  +        });
                                  +    }
                                  +    levelTwoFileOptimize(parts) {
                                  +        if (!Array.isArray(parts)) {
                                  +            parts = this.slashSplit(parts);
                                  +        }
                                  +        let didSomething = false;
                                  +        do {
                                  +            didSomething = false;
                                  +            // 
                                  // -> 
                                  /
                                  +            if (!this.preserveMultipleSlashes) {
                                  +                for (let i = 1; i < parts.length - 1; i++) {
                                  +                    const p = parts[i];
                                  +                    // don't squeeze out UNC patterns
                                  +                    if (i === 1 && p === '' && parts[0] === '')
                                  +                        continue;
                                  +                    if (p === '.' || p === '') {
                                  +                        didSomething = true;
                                  +                        parts.splice(i, 1);
                                  +                        i--;
                                  +                    }
                                  +                }
                                  +                if (parts[0] === '.' &&
                                  +                    parts.length === 2 &&
                                  +                    (parts[1] === '.' || parts[1] === '')) {
                                  +                    didSomething = true;
                                  +                    parts.pop();
                                  +                }
                                  +            }
                                  +            // 
                                  /

                                  /../ ->

                                  /
                                  +            let dd = 0;
                                  +            while (-1 !== (dd = parts.indexOf('..', dd + 1))) {
                                  +                const p = parts[dd - 1];
                                  +                if (p && p !== '.' && p !== '..' && p !== '**') {
                                  +                    didSomething = true;
                                  +                    parts.splice(dd - 1, 2);
                                  +                    dd -= 2;
                                  +                }
                                  +            }
                                  +        } while (didSomething);
                                  +        return parts.length === 0 ? [''] : parts;
                                  +    }
                                  +    // First phase: single-pattern processing
                                  +    // 
                                   is 1 or more portions
                                  +    //  is 1 or more portions
                                  +    // 

                                  is any portion other than ., .., '', or ** + // is . or '' + // + // **/.. is *brutal* for filesystem walking performance, because + // it effectively resets the recursive walk each time it occurs, + // and ** cannot be reduced out by a .. pattern part like a regexp + // or most strings (other than .., ., and '') can be. + // + //

                                  /**/../

                                  /

                                  / -> {

                                  /../

                                  /

                                  /,

                                  /**/

                                  /

                                  /} + //

                                  // -> 
                                  /
                                  +    // 
                                  /

                                  /../ ->

                                  /
                                  +    // **/**/ -> **/
                                  +    //
                                  +    // **/*/ -> */**/ <== not valid because ** doesn't follow
                                  +    // this WOULD be allowed if ** did follow symlinks, or * didn't
                                  +    firstPhasePreProcess(globParts) {
                                  +        let didSomething = false;
                                  +        do {
                                  +            didSomething = false;
                                  +            // 
                                  /**/../

                                  /

                                  / -> {

                                  /../

                                  /

                                  /,

                                  /**/

                                  /

                                  /} + for (let parts of globParts) { + let gs = -1; + while (-1 !== (gs = parts.indexOf('**', gs + 1))) { + let gss = gs; + while (parts[gss + 1] === '**') { + //

                                  /**/**/ -> 
                                  /**/
                                  +                        gss++;
                                  +                    }
                                  +                    // eg, if gs is 2 and gss is 4, that means we have 3 **
                                  +                    // parts, and can remove 2 of them.
                                  +                    if (gss > gs) {
                                  +                        parts.splice(gs + 1, gss - gs);
                                  +                    }
                                  +                    let next = parts[gs + 1];
                                  +                    const p = parts[gs + 2];
                                  +                    const p2 = parts[gs + 3];
                                  +                    if (next !== '..')
                                  +                        continue;
                                  +                    if (!p ||
                                  +                        p === '.' ||
                                  +                        p === '..' ||
                                  +                        !p2 ||
                                  +                        p2 === '.' ||
                                  +                        p2 === '..') {
                                  +                        continue;
                                  +                    }
                                  +                    didSomething = true;
                                  +                    // edit parts in place, and push the new one
                                  +                    parts.splice(gs, 1);
                                  +                    const other = parts.slice(0);
                                  +                    other[gs] = '**';
                                  +                    globParts.push(other);
                                  +                    gs--;
                                  +                }
                                  +                // 
                                  // -> 
                                  /
                                  +                if (!this.preserveMultipleSlashes) {
                                  +                    for (let i = 1; i < parts.length - 1; i++) {
                                  +                        const p = parts[i];
                                  +                        // don't squeeze out UNC patterns
                                  +                        if (i === 1 && p === '' && parts[0] === '')
                                  +                            continue;
                                  +                        if (p === '.' || p === '') {
                                  +                            didSomething = true;
                                  +                            parts.splice(i, 1);
                                  +                            i--;
                                  +                        }
                                  +                    }
                                  +                    if (parts[0] === '.' &&
                                  +                        parts.length === 2 &&
                                  +                        (parts[1] === '.' || parts[1] === '')) {
                                  +                        didSomething = true;
                                  +                        parts.pop();
                                  +                    }
                                  +                }
                                  +                // 
                                  /

                                  /../ ->

                                  /
                                  +                let dd = 0;
                                  +                while (-1 !== (dd = parts.indexOf('..', dd + 1))) {
                                  +                    const p = parts[dd - 1];
                                  +                    if (p && p !== '.' && p !== '..' && p !== '**') {
                                  +                        didSomething = true;
                                  +                        const needDot = dd === 1 && parts[dd + 1] === '**';
                                  +                        const splin = needDot ? ['.'] : [];
                                  +                        parts.splice(dd - 1, 2, ...splin);
                                  +                        if (parts.length === 0)
                                  +                            parts.push('');
                                  +                        dd -= 2;
                                  +                    }
                                  +                }
                                  +            }
                                  +        } while (didSomething);
                                  +        return globParts;
                                  +    }
                                  +    // second phase: multi-pattern dedupes
                                  +    // {
                                  /*/,
                                  /

                                  /} ->

                                  /*/
                                  +    // {
                                  /,
                                  /} -> 
                                  /
                                  +    // {
                                  /**/,
                                  /} -> 
                                  /**/
                                  +    //
                                  +    // {
                                  /**/,
                                  /**/

                                  /} ->

                                  /**/
                                  +    // ^-- not valid because ** doens't follow symlinks
                                  +    secondPhasePreProcess(globParts) {
                                  +        for (let i = 0; i < globParts.length - 1; i++) {
                                  +            for (let j = i + 1; j < globParts.length; j++) {
                                  +                const matched = this.partsMatch(globParts[i], globParts[j], !this.preserveMultipleSlashes);
                                  +                if (!matched)
                                  +                    continue;
                                  +                globParts[i] = matched;
                                  +                globParts[j] = [];
                                  +            }
                                  +        }
                                  +        return globParts.filter(gs => gs.length);
                                  +    }
                                  +    partsMatch(a, b, emptyGSMatch = false) {
                                  +        let ai = 0;
                                  +        let bi = 0;
                                  +        let result = [];
                                  +        let which = '';
                                  +        while (ai < a.length && bi < b.length) {
                                  +            if (a[ai] === b[bi]) {
                                  +                result.push(which === 'b' ? b[bi] : a[ai]);
                                  +                ai++;
                                  +                bi++;
                                  +            }
                                  +            else if (emptyGSMatch && a[ai] === '**' && b[bi] === a[ai + 1]) {
                                  +                result.push(a[ai]);
                                  +                ai++;
                                  +            }
                                  +            else if (emptyGSMatch && b[bi] === '**' && a[ai] === b[bi + 1]) {
                                  +                result.push(b[bi]);
                                  +                bi++;
                                  +            }
                                  +            else if (a[ai] === '*' &&
                                  +                b[bi] &&
                                  +                (this.options.dot || !b[bi].startsWith('.')) &&
                                  +                b[bi] !== '**') {
                                  +                if (which === 'b')
                                  +                    return false;
                                  +                which = 'a';
                                  +                result.push(a[ai]);
                                  +                ai++;
                                  +                bi++;
                                  +            }
                                  +            else if (b[bi] === '*' &&
                                  +                a[ai] &&
                                  +                (this.options.dot || !a[ai].startsWith('.')) &&
                                  +                a[ai] !== '**') {
                                  +                if (which === 'a')
                                  +                    return false;
                                  +                which = 'b';
                                  +                result.push(b[bi]);
                                  +                ai++;
                                  +                bi++;
                                  +            }
                                  +            else {
                                  +                return false;
                                  +            }
                                  +        }
                                  +        // if we fall out of the loop, it means they two are identical
                                  +        // as long as their lengths match
                                  +        return a.length === b.length && result;
                                  +    }
                                  +    parseNegate() {
                                  +        if (this.nonegate)
                                  +            return;
                                  +        const pattern = this.pattern;
                                  +        let negate = false;
                                  +        let negateOffset = 0;
                                  +        for (let i = 0; i < pattern.length && pattern.charAt(i) === '!'; i++) {
                                  +            negate = !negate;
                                  +            negateOffset++;
                                  +        }
                                  +        if (negateOffset)
                                  +            this.pattern = pattern.slice(negateOffset);
                                  +        this.negate = 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.
                                  +    matchOne(file, pattern, partial = false) {
                                  +        const options = this.options;
                                  +        // UNC paths like //?/X:/... can match X:/... and vice versa
                                  +        // Drive letters in absolute drive or unc paths are always compared
                                  +        // case-insensitively.
                                  +        if (this.isWindows) {
                                  +            const fileDrive = typeof file[0] === 'string' && /^[a-z]:$/i.test(file[0]);
                                  +            const fileUNC = !fileDrive &&
                                  +                file[0] === '' &&
                                  +                file[1] === '' &&
                                  +                file[2] === '?' &&
                                  +                /^[a-z]:$/i.test(file[3]);
                                  +            const patternDrive = typeof pattern[0] === 'string' && /^[a-z]:$/i.test(pattern[0]);
                                  +            const patternUNC = !patternDrive &&
                                  +                pattern[0] === '' &&
                                  +                pattern[1] === '' &&
                                  +                pattern[2] === '?' &&
                                  +                typeof pattern[3] === 'string' &&
                                  +                /^[a-z]:$/i.test(pattern[3]);
                                  +            const fdi = fileUNC ? 3 : fileDrive ? 0 : undefined;
                                  +            const pdi = patternUNC ? 3 : patternDrive ? 0 : undefined;
                                  +            if (typeof fdi === 'number' && typeof pdi === 'number') {
                                  +                const [fd, pd] = [file[fdi], pattern[pdi]];
                                  +                if (fd.toLowerCase() === pd.toLowerCase()) {
                                  +                    pattern[pdi] = fd;
                                  +                    if (pdi > fdi) {
                                  +                        pattern = pattern.slice(pdi);
                                  +                    }
                                  +                    else if (fdi > pdi) {
                                  +                        file = file.slice(fdi);
                                  +                    }
                                  +                }
                                  +            }
                                  +        }
                                  +        // resolve and reduce . and .. portions in the file as well.
                                  +        // dont' need to do the second phase, because it's only one string[]
                                  +        const { optimizationLevel = 1 } = this.options;
                                  +        if (optimizationLevel >= 2) {
                                  +            file = this.levelTwoFileOptimize(file);
                                  +        }
                                  +        this.debug('matchOne', this, { file, 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.
                                  +            /* c8 ignore start */
                                  +            if (p === false) {
                                  +                return false;
                                  +            }
                                  +            /* c8 ignore stop */
                                  +            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.
                                  +                /* c8 ignore start */
                                  +                if (partial) {
                                  +                    // ran out of file
                                  +                    this.debug('\n>>> no match, partial?', file, fr, pattern, pr);
                                  +                    if (fr === fl) {
                                  +                        return true;
                                  +                    }
                                  +                }
                                  +                /* c8 ignore stop */
                                  +                return false;
                                  +            }
                                  +            // something other than **
                                  +            // non-magic patterns just have to match exactly
                                  +            // patterns with magic have been turned into regexps.
                                  +            let hit;
                                  +            if (typeof p === 'string') {
                                  +                hit = f === p;
                                  +                this.debug('string match', p, f, hit);
                                  +            }
                                  +            else {
                                  +                hit = p.test(f);
                                  +                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 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] === '';
                                  +            /* c8 ignore start */
                                  +        }
                                  +        else {
                                  +            // should be unreachable.
                                  +            throw new Error('wtf?');
                                  +        }
                                  +        /* c8 ignore stop */
                                  +    }
                                  +    braceExpand() {
                                  +        return braceExpand(this.pattern, this.options);
                                  +    }
                                  +    parse(pattern) {
                                  +        assertValidPattern(pattern);
                                  +        const options = this.options;
                                  +        // shortcuts
                                  +        if (pattern === '**')
                                  +            return GLOBSTAR;
                                  +        if (pattern === '')
                                  +            return '';
                                  +        // far and away, the most common glob pattern parts are
                                  +        // *, *.*, and *.  Add a fast check method for those.
                                  +        let m;
                                  +        let fastTest = null;
                                  +        if ((m = pattern.match(starRE))) {
                                  +            fastTest = options.dot ? starTestDot : starTest;
                                  +        }
                                  +        else if ((m = pattern.match(starDotExtRE))) {
                                  +            fastTest = (options.nocase
                                  +                ? options.dot
                                  +                    ? starDotExtTestNocaseDot
                                  +                    : starDotExtTestNocase
                                  +                : options.dot
                                  +                    ? starDotExtTestDot
                                  +                    : starDotExtTest)(m[1]);
                                  +        }
                                  +        else if ((m = pattern.match(qmarksRE))) {
                                  +            fastTest = (options.nocase
                                  +                ? options.dot
                                  +                    ? qmarksTestNocaseDot
                                  +                    : qmarksTestNocase
                                  +                : options.dot
                                  +                    ? qmarksTestDot
                                  +                    : qmarksTest)(m);
                                  +        }
                                  +        else if ((m = pattern.match(starDotStarRE))) {
                                  +            fastTest = options.dot ? starDotStarTestDot : starDotStarTest;
                                  +        }
                                  +        else if ((m = pattern.match(dotStarRE))) {
                                  +            fastTest = dotStarTest;
                                  +        }
                                  +        const re = AST.fromGlob(pattern, this.options).toMMPattern();
                                  +        if (fastTest && typeof re === 'object') {
                                  +            // Avoids overriding in frozen environments
                                  +            Reflect.defineProperty(re, 'test', { value: fastTest });
                                  +        }
                                  +        return re;
                                  +    }
                                  +    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.
                                  +        const set = this.set;
                                  +        if (!set.length) {
                                  +            this.regexp = false;
                                  +            return this.regexp;
                                  +        }
                                  +        const options = this.options;
                                  +        const twoStar = options.noglobstar
                                  +            ? star
                                  +            : options.dot
                                  +                ? twoStarDot
                                  +                : twoStarNoDot;
                                  +        const flags = new Set(options.nocase ? ['i'] : []);
                                  +        // regexpify non-globstar patterns
                                  +        // if ** is only item, then we just do one twoStar
                                  +        // if ** is first, and there are more, prepend (\/|twoStar\/)? to next
                                  +        // if ** is last, append (\/twoStar|) to previous
                                  +        // if ** is in the middle, append (\/|\/twoStar\/) to previous
                                  +        // then filter out GLOBSTAR symbols
                                  +        let re = set
                                  +            .map(pattern => {
                                  +            const pp = pattern.map(p => {
                                  +                if (p instanceof RegExp) {
                                  +                    for (const f of p.flags.split(''))
                                  +                        flags.add(f);
                                  +                }
                                  +                return typeof p === 'string'
                                  +                    ? regExpEscape(p)
                                  +                    : p === GLOBSTAR
                                  +                        ? GLOBSTAR
                                  +                        : p._src;
                                  +            });
                                  +            pp.forEach((p, i) => {
                                  +                const next = pp[i + 1];
                                  +                const prev = pp[i - 1];
                                  +                if (p !== GLOBSTAR || prev === GLOBSTAR) {
                                  +                    return;
                                  +                }
                                  +                if (prev === undefined) {
                                  +                    if (next !== undefined && next !== GLOBSTAR) {
                                  +                        pp[i + 1] = '(?:\\/|' + twoStar + '\\/)?' + next;
                                  +                    }
                                  +                    else {
                                  +                        pp[i] = twoStar;
                                  +                    }
                                  +                }
                                  +                else if (next === undefined) {
                                  +                    pp[i - 1] = prev + '(?:\\/|' + twoStar + ')?';
                                  +                }
                                  +                else if (next !== GLOBSTAR) {
                                  +                    pp[i - 1] = prev + '(?:\\/|\\/' + twoStar + '\\/)' + next;
                                  +                    pp[i + 1] = GLOBSTAR;
                                  +                }
                                  +            });
                                  +            return pp.filter(p => p !== GLOBSTAR).join('/');
                                  +        })
                                  +            .join('|');
                                  +        // need to wrap in parens if we had more than one thing with |,
                                  +        // otherwise only the first will be anchored to ^ and the last to $
                                  +        const [open, close] = set.length > 1 ? ['(?:', ')'] : ['', ''];
                                  +        // must match entire pattern
                                  +        // ending in a * or ** will make it less strict.
                                  +        re = '^' + open + re + close + '$';
                                  +        // can match anything, as long as it's not this.
                                  +        if (this.negate)
                                  +            re = '^(?!' + re + ').+$';
                                  +        try {
                                  +            this.regexp = new RegExp(re, [...flags].join(''));
                                  +            /* c8 ignore start */
                                  +        }
                                  +        catch (ex) {
                                  +            // should be impossible
                                  +            this.regexp = false;
                                  +        }
                                  +        /* c8 ignore stop */
                                  +        return this.regexp;
                                  +    }
                                  +    slashSplit(p) {
                                  +        // if p starts with // on windows, we preserve that
                                  +        // so that UNC paths aren't broken.  Otherwise, any number of
                                  +        // / characters are coalesced into one, unless
                                  +        // preserveMultipleSlashes is set to true.
                                  +        if (this.preserveMultipleSlashes) {
                                  +            return p.split('/');
                                  +        }
                                  +        else if (this.isWindows && /^\/\/[^\/]+/.test(p)) {
                                  +            // add an extra '' for the one we lose
                                  +            return ['', ...p.split(/\/+/)];
                                  +        }
                                  +        else {
                                  +            return p.split(/\/+/);
                                  +        }
                                  +    }
                                  +    match(f, 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;
                                  +        }
                                  +        const options = this.options;
                                  +        // windows: need to use /, not \
                                  +        if (this.isWindows) {
                                  +            f = f.split('\\').join('/');
                                  +        }
                                  +        // treat the test path as a set of pathparts.
                                  +        const ff = this.slashSplit(f);
                                  +        this.debug(this.pattern, 'split', ff);
                                  +        // 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.
                                  +        const set = this.set;
                                  +        this.debug(this.pattern, 'set', set);
                                  +        // Find the basename of the path by looking for the last non-empty segment
                                  +        let filename = ff[ff.length - 1];
                                  +        if (!filename) {
                                  +            for (let i = ff.length - 2; !filename && i >= 0; i--) {
                                  +                filename = ff[i];
                                  +            }
                                  +        }
                                  +        for (let i = 0; i < set.length; i++) {
                                  +            const pattern = set[i];
                                  +            let file = ff;
                                  +            if (options.matchBase && pattern.length === 1) {
                                  +                file = [filename];
                                  +            }
                                  +            const 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;
                                  +    }
                                  +    static defaults(def) {
                                  +        return minimatch.defaults(def).Minimatch;
                                  +    }
                                  +}
                                  +/* c8 ignore start */
                                  +export { AST } from './ast.js';
                                  +export { escape } from './escape.js';
                                  +export { unescape } from './unescape.js';
                                  +/* c8 ignore stop */
                                  +minimatch.AST = AST;
                                  +minimatch.Minimatch = Minimatch;
                                  +minimatch.escape = escape;
                                  +minimatch.unescape = unescape;
                                  +//# sourceMappingURL=index.js.map
                                  \ No newline at end of file
                                  diff --git a/node_modules/minimatch/dist/esm/index.js.map b/node_modules/minimatch/dist/esm/index.js.map
                                  new file mode 100644
                                  index 000000000..933299155
                                  --- /dev/null
                                  +++ b/node_modules/minimatch/dist/esm/index.js.map
                                  @@ -0,0 +1 @@
                                  +{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,MAAM,MAAM,iBAAiB,CAAA;AACpC,OAAO,EAAE,kBAAkB,EAAE,MAAM,2BAA2B,CAAA;AAC9D,OAAO,EAAE,GAAG,EAAe,MAAM,UAAU,CAAA;AAC3C,OAAO,EAAE,MAAM,EAAE,MAAM,aAAa,CAAA;AACpC,OAAO,EAAE,QAAQ,EAAE,MAAM,eAAe,CAAA;AAsCxC,MAAM,CAAC,MAAM,SAAS,GA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C1C,CAAC;CACF;AACD,qBAAqB;AACrB,OAAO,EAAE,GAAG,EAAE,MAAM,UAAU,CAAA;AAC9B,OAAO,EAAE,MAAM,EAAE,MAAM,aAAa,CAAA;AACpC,OAAO,EAAE,QAAQ,EAAE,MAAM,eAAe,CAAA;AACxC,oBAAoB;AACpB,SAAS,CAAC,GAAG,GAAG,GAAG,CAAA;AACnB,SAAS,CAAC,SAAS,GAAG,SAAS,CAAA;AAC/B,SAAS,CAAC,MAAM,GAAG,MAAM,CAAA;AACzB,SAAS,CAAC,QAAQ,GAAG,QAAQ,CAAA","sourcesContent":["import expand from 'brace-expansion'\nimport { assertValidPattern } from './assert-valid-pattern.js'\nimport { AST, ExtglobType } from './ast.js'\nimport { escape } from './escape.js'\nimport { unescape } from './unescape.js'\n\ntype Platform =\n  | 'aix'\n  | 'android'\n  | 'darwin'\n  | 'freebsd'\n  | 'haiku'\n  | 'linux'\n  | 'openbsd'\n  | 'sunos'\n  | 'win32'\n  | 'cygwin'\n  | 'netbsd'\n\nexport interface MinimatchOptions {\n  nobrace?: boolean\n  nocomment?: boolean\n  nonegate?: boolean\n  debug?: boolean\n  noglobstar?: boolean\n  noext?: boolean\n  nonull?: boolean\n  windowsPathsNoEscape?: boolean\n  allowWindowsEscape?: boolean\n  partial?: boolean\n  dot?: boolean\n  nocase?: boolean\n  nocaseMagicOnly?: boolean\n  magicalBraces?: boolean\n  matchBase?: boolean\n  flipNegate?: boolean\n  preserveMultipleSlashes?: boolean\n  optimizationLevel?: number\n  platform?: Platform\n  windowsNoMagicRoot?: boolean\n}\n\nexport const minimatch = (\n  p: string,\n  pattern: string,\n  options: MinimatchOptions = {}\n) => {\n  assertValidPattern(pattern)\n\n  // shortcut: comments match nothing.\n  if (!options.nocomment && pattern.charAt(0) === '#') {\n    return false\n  }\n\n  return new Minimatch(pattern, options).match(p)\n}\n\n// Optimized checking for the most common glob patterns.\nconst starDotExtRE = /^\\*+([^+@!?\\*\\[\\(]*)$/\nconst starDotExtTest = (ext: string) => (f: string) =>\n  !f.startsWith('.') && f.endsWith(ext)\nconst starDotExtTestDot = (ext: string) => (f: string) => f.endsWith(ext)\nconst starDotExtTestNocase = (ext: string) => {\n  ext = ext.toLowerCase()\n  return (f: string) => !f.startsWith('.') && f.toLowerCase().endsWith(ext)\n}\nconst starDotExtTestNocaseDot = (ext: string) => {\n  ext = ext.toLowerCase()\n  return (f: string) => f.toLowerCase().endsWith(ext)\n}\nconst starDotStarRE = /^\\*+\\.\\*+$/\nconst starDotStarTest = (f: string) => !f.startsWith('.') && f.includes('.')\nconst starDotStarTestDot = (f: string) =>\n  f !== '.' && f !== '..' && f.includes('.')\nconst dotStarRE = /^\\.\\*+$/\nconst dotStarTest = (f: string) => f !== '.' && f !== '..' && f.startsWith('.')\nconst starRE = /^\\*+$/\nconst starTest = (f: string) => f.length !== 0 && !f.startsWith('.')\nconst starTestDot = (f: string) => f.length !== 0 && f !== '.' && f !== '..'\nconst qmarksRE = /^\\?+([^+@!?\\*\\[\\(]*)?$/\nconst qmarksTestNocase = ([$0, ext = '']: RegExpMatchArray) => {\n  const noext = qmarksTestNoExt([$0])\n  if (!ext) return noext\n  ext = ext.toLowerCase()\n  return (f: string) => noext(f) && f.toLowerCase().endsWith(ext)\n}\nconst qmarksTestNocaseDot = ([$0, ext = '']: RegExpMatchArray) => {\n  const noext = qmarksTestNoExtDot([$0])\n  if (!ext) return noext\n  ext = ext.toLowerCase()\n  return (f: string) => noext(f) && f.toLowerCase().endsWith(ext)\n}\nconst qmarksTestDot = ([$0, ext = '']: RegExpMatchArray) => {\n  const noext = qmarksTestNoExtDot([$0])\n  return !ext ? noext : (f: string) => noext(f) && f.endsWith(ext)\n}\nconst qmarksTest = ([$0, ext = '']: RegExpMatchArray) => {\n  const noext = qmarksTestNoExt([$0])\n  return !ext ? noext : (f: string) => noext(f) && f.endsWith(ext)\n}\nconst qmarksTestNoExt = ([$0]: RegExpMatchArray) => {\n  const len = $0.length\n  return (f: string) => f.length === len && !f.startsWith('.')\n}\nconst qmarksTestNoExtDot = ([$0]: RegExpMatchArray) => {\n  const len = $0.length\n  return (f: string) => f.length === len && f !== '.' && f !== '..'\n}\n\n/* c8 ignore start */\nconst defaultPlatform: Platform = (\n  typeof process === 'object' && process\n    ? (typeof process.env === 'object' &&\n        process.env &&\n        process.env.__MINIMATCH_TESTING_PLATFORM__) ||\n      process.platform\n    : 'posix'\n) as Platform\ntype Sep = '\\\\' | '/'\nconst path: { [k: string]: { sep: Sep } } = {\n  win32: { sep: '\\\\' },\n  posix: { sep: '/' },\n}\n/* c8 ignore stop */\n\nexport const sep = defaultPlatform === 'win32' ? path.win32.sep : path.posix.sep\nminimatch.sep = sep\n\nexport const GLOBSTAR = Symbol('globstar **')\nminimatch.GLOBSTAR = GLOBSTAR\n\n// any single thing other than /\n// don't need to escape / when using new RegExp()\nconst qmark = '[^/]'\n\n// * => any number of characters\nconst star = qmark + '*?'\n\n// ** when dots are allowed.  Anything goes, except .. and .\n// not (^ or / followed by one or two dots followed by $ or /),\n// followed by anything, any number of times.\nconst twoStarDot = '(?:(?!(?:\\\\/|^)(?:\\\\.{1,2})($|\\\\/)).)*?'\n\n// not a ^ or / followed by a dot,\n// followed by anything, any number of times.\nconst twoStarNoDot = '(?:(?!(?:\\\\/|^)\\\\.).)*?'\n\nexport const filter =\n  (pattern: string, options: MinimatchOptions = {}) =>\n  (p: string) =>\n    minimatch(p, pattern, options)\nminimatch.filter = filter\n\nconst ext = (a: MinimatchOptions, b: MinimatchOptions = {}) =>\n  Object.assign({}, a, b)\n\nexport const defaults = (def: MinimatchOptions): typeof minimatch => {\n  if (!def || typeof def !== 'object' || !Object.keys(def).length) {\n    return minimatch\n  }\n\n  const orig = minimatch\n\n  const m = (p: string, pattern: string, options: MinimatchOptions = {}) =>\n    orig(p, pattern, ext(def, options))\n\n  return Object.assign(m, {\n    Minimatch: class Minimatch extends orig.Minimatch {\n      constructor(pattern: string, options: MinimatchOptions = {}) {\n        super(pattern, ext(def, options))\n      }\n      static defaults(options: MinimatchOptions) {\n        return orig.defaults(ext(def, options)).Minimatch\n      }\n    },\n\n    AST: class AST extends orig.AST {\n      /* c8 ignore start */\n      constructor(\n        type: ExtglobType | null,\n        parent?: AST,\n        options: MinimatchOptions = {}\n      ) {\n        super(type, parent, ext(def, options))\n      }\n      /* c8 ignore stop */\n\n      static fromGlob(pattern: string, options: MinimatchOptions = {}) {\n        return orig.AST.fromGlob(pattern, ext(def, options))\n      }\n    },\n\n    unescape: (\n      s: string,\n      options: Pick = {}\n    ) => orig.unescape(s, ext(def, options)),\n\n    escape: (\n      s: string,\n      options: Pick = {}\n    ) => orig.escape(s, ext(def, options)),\n\n    filter: (pattern: string, options: MinimatchOptions = {}) =>\n      orig.filter(pattern, ext(def, options)),\n\n    defaults: (options: MinimatchOptions) => orig.defaults(ext(def, options)),\n\n    makeRe: (pattern: string, options: MinimatchOptions = {}) =>\n      orig.makeRe(pattern, ext(def, options)),\n\n    braceExpand: (pattern: string, options: MinimatchOptions = {}) =>\n      orig.braceExpand(pattern, ext(def, options)),\n\n    match: (list: string[], pattern: string, options: MinimatchOptions = {}) =>\n      orig.match(list, pattern, ext(def, options)),\n\n    sep: orig.sep,\n    GLOBSTAR: GLOBSTAR as typeof GLOBSTAR,\n  })\n}\nminimatch.defaults = defaults\n\n// Brace expansion:\n// a{b,c}d -> abd acd\n// a{b,}c -> abc ac\n// a{0..3}d -> a0d a1d a2d a3d\n// a{b,c{d,e}f}g -> abg acdfg acefg\n// a{b,c}d{e,f}g -> abdeg acdeg abdeg abdfg\n//\n// Invalid sets are not expanded.\n// a{2..}b -> a{2..}b\n// a{b}c -> a{b}c\nexport const braceExpand = (\n  pattern: string,\n  options: MinimatchOptions = {}\n) => {\n  assertValidPattern(pattern)\n\n  // Thanks to Yeting Li  for\n  // improving this regexp to avoid a ReDOS vulnerability.\n  if (options.nobrace || !/\\{(?:(?!\\{).)*\\}/.test(pattern)) {\n    // shortcut. no need to expand.\n    return [pattern]\n  }\n\n  return expand(pattern)\n}\nminimatch.braceExpand = braceExpand\n\n// parse a component of the expanded set.\n// At this point, no pattern may contain \"/\" in it\n// so we're going to return a 2d array, where each entry is the full\n// pattern, split on '/', and then turned into a regular expression.\n// A regexp is made at the end which joins each array with an\n// escaped /, and another full one which joins each regexp with |.\n//\n// Following the lead of Bash 4.1, note that \"**\" only has special meaning\n// when it is the *only* thing in a path portion.  Otherwise, any series\n// of * is equivalent to a single *.  Globstar behavior is enabled by\n// default, and can be disabled by setting options.noglobstar.\n\nexport const makeRe = (pattern: string, options: MinimatchOptions = {}) =>\n  new Minimatch(pattern, options).makeRe()\nminimatch.makeRe = makeRe\n\nexport const match = (\n  list: string[],\n  pattern: string,\n  options: MinimatchOptions = {}\n) => {\n  const mm = new Minimatch(pattern, options)\n  list = list.filter(f => mm.match(f))\n  if (mm.options.nonull && !list.length) {\n    list.push(pattern)\n  }\n  return list\n}\nminimatch.match = match\n\n// replace stuff like \\* with *\nconst globMagic = /[?*]|[+@!]\\(.*?\\)|\\[|\\]/\nconst regExpEscape = (s: string) =>\n  s.replace(/[-[\\]{}()*+?.,\\\\^$|#\\s]/g, '\\\\$&')\n\nexport type MMRegExp = RegExp & {\n  _src?: string\n  _glob?: string\n}\n\nexport type ParseReturnFiltered = string | MMRegExp | typeof GLOBSTAR\nexport type ParseReturn = ParseReturnFiltered | false\n\nexport class Minimatch {\n  options: MinimatchOptions\n  set: ParseReturnFiltered[][]\n  pattern: string\n\n  windowsPathsNoEscape: boolean\n  nonegate: boolean\n  negate: boolean\n  comment: boolean\n  empty: boolean\n  preserveMultipleSlashes: boolean\n  partial: boolean\n  globSet: string[]\n  globParts: string[][]\n  nocase: boolean\n\n  isWindows: boolean\n  platform: Platform\n  windowsNoMagicRoot: boolean\n\n  regexp: false | null | MMRegExp\n  constructor(pattern: string, options: MinimatchOptions = {}) {\n    assertValidPattern(pattern)\n\n    options = options || {}\n    this.options = options\n    this.pattern = pattern\n    this.platform = options.platform || defaultPlatform\n    this.isWindows = this.platform === 'win32'\n    this.windowsPathsNoEscape =\n      !!options.windowsPathsNoEscape || options.allowWindowsEscape === false\n    if (this.windowsPathsNoEscape) {\n      this.pattern = this.pattern.replace(/\\\\/g, '/')\n    }\n    this.preserveMultipleSlashes = !!options.preserveMultipleSlashes\n    this.regexp = null\n    this.negate = false\n    this.nonegate = !!options.nonegate\n    this.comment = false\n    this.empty = false\n    this.partial = !!options.partial\n    this.nocase = !!this.options.nocase\n    this.windowsNoMagicRoot =\n      options.windowsNoMagicRoot !== undefined\n        ? options.windowsNoMagicRoot\n        : !!(this.isWindows && this.nocase)\n\n    this.globSet = []\n    this.globParts = []\n    this.set = []\n\n    // make the set of regexps etc.\n    this.make()\n  }\n\n  hasMagic(): boolean {\n    if (this.options.magicalBraces && this.set.length > 1) {\n      return true\n    }\n    for (const pattern of this.set) {\n      for (const part of pattern) {\n        if (typeof part !== 'string') return true\n      }\n    }\n    return false\n  }\n\n  debug(..._: any[]) {}\n\n  make() {\n    const pattern = this.pattern\n    const options = this.options\n\n    // empty patterns and comments match nothing.\n    if (!options.nocomment && pattern.charAt(0) === '#') {\n      this.comment = true\n      return\n    }\n\n    if (!pattern) {\n      this.empty = true\n      return\n    }\n\n    // step 1: figure out negation, etc.\n    this.parseNegate()\n\n    // step 2: expand braces\n    this.globSet = [...new Set(this.braceExpand())]\n\n    if (options.debug) {\n      this.debug = (...args: any[]) => console.error(...args)\n    }\n\n    this.debug(this.pattern, this.globSet)\n\n    // step 3: now we have a set, so turn each one into a series of\n    // path-portion matching patterns.\n    // These will be regexps, except in the case of \"**\", which is\n    // set to the GLOBSTAR object for globstar behavior,\n    // and will not contain any / characters\n    //\n    // First, we preprocess to make the glob pattern sets a bit simpler\n    // and deduped.  There are some perf-killing patterns that can cause\n    // problems with a glob walk, but we can simplify them down a bit.\n    const rawGlobParts = this.globSet.map(s => this.slashSplit(s))\n    this.globParts = this.preprocess(rawGlobParts)\n    this.debug(this.pattern, this.globParts)\n\n    // glob --> regexps\n    let set = this.globParts.map((s, _, __) => {\n      if (this.isWindows && this.windowsNoMagicRoot) {\n        // check if it's a drive or unc path.\n        const isUNC =\n          s[0] === '' &&\n          s[1] === '' &&\n          (s[2] === '?' || !globMagic.test(s[2])) &&\n          !globMagic.test(s[3])\n        const isDrive = /^[a-z]:/i.test(s[0])\n        if (isUNC) {\n          return [...s.slice(0, 4), ...s.slice(4).map(ss => this.parse(ss))]\n        } else if (isDrive) {\n          return [s[0], ...s.slice(1).map(ss => this.parse(ss))]\n        }\n      }\n      return s.map(ss => this.parse(ss))\n    })\n\n    this.debug(this.pattern, set)\n\n    // filter out everything that didn't compile properly.\n    this.set = set.filter(\n      s => s.indexOf(false) === -1\n    ) as ParseReturnFiltered[][]\n\n    // do not treat the ? in UNC paths as magic\n    if (this.isWindows) {\n      for (let i = 0; i < this.set.length; i++) {\n        const p = this.set[i]\n        if (\n          p[0] === '' &&\n          p[1] === '' &&\n          this.globParts[i][2] === '?' &&\n          typeof p[3] === 'string' &&\n          /^[a-z]:$/i.test(p[3])\n        ) {\n          p[2] = '?'\n        }\n      }\n    }\n\n    this.debug(this.pattern, this.set)\n  }\n\n  // various transforms to equivalent pattern sets that are\n  // faster to process in a filesystem walk.  The goal is to\n  // eliminate what we can, and push all ** patterns as far\n  // to the right as possible, even if it increases the number\n  // of patterns that we have to process.\n  preprocess(globParts: string[][]) {\n    // if we're not in globstar mode, then turn all ** into *\n    if (this.options.noglobstar) {\n      for (let i = 0; i < globParts.length; i++) {\n        for (let j = 0; j < globParts[i].length; j++) {\n          if (globParts[i][j] === '**') {\n            globParts[i][j] = '*'\n          }\n        }\n      }\n    }\n\n    const { optimizationLevel = 1 } = this.options\n\n    if (optimizationLevel >= 2) {\n      // aggressive optimization for the purpose of fs walking\n      globParts = this.firstPhasePreProcess(globParts)\n      globParts = this.secondPhasePreProcess(globParts)\n    } else if (optimizationLevel >= 1) {\n      // just basic optimizations to remove some .. parts\n      globParts = this.levelOneOptimize(globParts)\n    } else {\n      // just collapse multiple ** portions into one\n      globParts = this.adjascentGlobstarOptimize(globParts)\n    }\n\n    return globParts\n  }\n\n  // just get rid of adjascent ** portions\n  adjascentGlobstarOptimize(globParts: string[][]) {\n    return globParts.map(parts => {\n      let gs: number = -1\n      while (-1 !== (gs = parts.indexOf('**', gs + 1))) {\n        let i = gs\n        while (parts[i + 1] === '**') {\n          i++\n        }\n        if (i !== gs) {\n          parts.splice(gs, i - gs)\n        }\n      }\n      return parts\n    })\n  }\n\n  // get rid of adjascent ** and resolve .. portions\n  levelOneOptimize(globParts: string[][]) {\n    return globParts.map(parts => {\n      parts = parts.reduce((set: string[], part) => {\n        const prev = set[set.length - 1]\n        if (part === '**' && prev === '**') {\n          return set\n        }\n        if (part === '..') {\n          if (prev && prev !== '..' && prev !== '.' && prev !== '**') {\n            set.pop()\n            return set\n          }\n        }\n        set.push(part)\n        return set\n      }, [])\n      return parts.length === 0 ? [''] : parts\n    })\n  }\n\n  levelTwoFileOptimize(parts: string | string[]) {\n    if (!Array.isArray(parts)) {\n      parts = this.slashSplit(parts)\n    }\n    let didSomething: boolean = false\n    do {\n      didSomething = false\n      // 
                                  // -> 
                                  /\n      if (!this.preserveMultipleSlashes) {\n        for (let i = 1; i < parts.length - 1; i++) {\n          const p = parts[i]\n          // don't squeeze out UNC patterns\n          if (i === 1 && p === '' && parts[0] === '') continue\n          if (p === '.' || p === '') {\n            didSomething = true\n            parts.splice(i, 1)\n            i--\n          }\n        }\n        if (\n          parts[0] === '.' &&\n          parts.length === 2 &&\n          (parts[1] === '.' || parts[1] === '')\n        ) {\n          didSomething = true\n          parts.pop()\n        }\n      }\n\n      // 
                                  /

                                  /../ ->

                                  /\n      let dd: number = 0\n      while (-1 !== (dd = parts.indexOf('..', dd + 1))) {\n        const p = parts[dd - 1]\n        if (p && p !== '.' && p !== '..' && p !== '**') {\n          didSomething = true\n          parts.splice(dd - 1, 2)\n          dd -= 2\n        }\n      }\n    } while (didSomething)\n    return parts.length === 0 ? [''] : parts\n  }\n\n  // First phase: single-pattern processing\n  // 
                                   is 1 or more portions\n  //  is 1 or more portions\n  // 

                                  is any portion other than ., .., '', or **\n // is . or ''\n //\n // **/.. is *brutal* for filesystem walking performance, because\n // it effectively resets the recursive walk each time it occurs,\n // and ** cannot be reduced out by a .. pattern part like a regexp\n // or most strings (other than .., ., and '') can be.\n //\n //

                                  /**/../

                                  /

                                  / -> {

                                  /../

                                  /

                                  /,

                                  /**/

                                  /

                                  /}\n //

                                  // -> 
                                  /\n  // 
                                  /

                                  /../ ->

                                  /\n  // **/**/ -> **/\n  //\n  // **/*/ -> */**/ <== not valid because ** doesn't follow\n  // this WOULD be allowed if ** did follow symlinks, or * didn't\n  firstPhasePreProcess(globParts: string[][]) {\n    let didSomething = false\n    do {\n      didSomething = false\n      // 
                                  /**/../

                                  /

                                  / -> {

                                  /../

                                  /

                                  /,

                                  /**/

                                  /

                                  /}\n for (let parts of globParts) {\n let gs: number = -1\n while (-1 !== (gs = parts.indexOf('**', gs + 1))) {\n let gss: number = gs\n while (parts[gss + 1] === '**') {\n //

                                  /**/**/ -> 
                                  /**/\n            gss++\n          }\n          // eg, if gs is 2 and gss is 4, that means we have 3 **\n          // parts, and can remove 2 of them.\n          if (gss > gs) {\n            parts.splice(gs + 1, gss - gs)\n          }\n\n          let next = parts[gs + 1]\n          const p = parts[gs + 2]\n          const p2 = parts[gs + 3]\n          if (next !== '..') continue\n          if (\n            !p ||\n            p === '.' ||\n            p === '..' ||\n            !p2 ||\n            p2 === '.' ||\n            p2 === '..'\n          ) {\n            continue\n          }\n          didSomething = true\n          // edit parts in place, and push the new one\n          parts.splice(gs, 1)\n          const other = parts.slice(0)\n          other[gs] = '**'\n          globParts.push(other)\n          gs--\n        }\n\n        // 
                                  // -> 
                                  /\n        if (!this.preserveMultipleSlashes) {\n          for (let i = 1; i < parts.length - 1; i++) {\n            const p = parts[i]\n            // don't squeeze out UNC patterns\n            if (i === 1 && p === '' && parts[0] === '') continue\n            if (p === '.' || p === '') {\n              didSomething = true\n              parts.splice(i, 1)\n              i--\n            }\n          }\n          if (\n            parts[0] === '.' &&\n            parts.length === 2 &&\n            (parts[1] === '.' || parts[1] === '')\n          ) {\n            didSomething = true\n            parts.pop()\n          }\n        }\n\n        // 
                                  /

                                  /../ ->

                                  /\n        let dd: number = 0\n        while (-1 !== (dd = parts.indexOf('..', dd + 1))) {\n          const p = parts[dd - 1]\n          if (p && p !== '.' && p !== '..' && p !== '**') {\n            didSomething = true\n            const needDot = dd === 1 && parts[dd + 1] === '**'\n            const splin = needDot ? ['.'] : []\n            parts.splice(dd - 1, 2, ...splin)\n            if (parts.length === 0) parts.push('')\n            dd -= 2\n          }\n        }\n      }\n    } while (didSomething)\n\n    return globParts\n  }\n\n  // second phase: multi-pattern dedupes\n  // {
                                  /*/,
                                  /

                                  /} ->

                                  /*/\n  // {
                                  /,
                                  /} -> 
                                  /\n  // {
                                  /**/,
                                  /} -> 
                                  /**/\n  //\n  // {
                                  /**/,
                                  /**/

                                  /} ->

                                  /**/\n  // ^-- not valid because ** doens't follow symlinks\n  secondPhasePreProcess(globParts: string[][]): string[][] {\n    for (let i = 0; i < globParts.length - 1; i++) {\n      for (let j = i + 1; j < globParts.length; j++) {\n        const matched = this.partsMatch(\n          globParts[i],\n          globParts[j],\n          !this.preserveMultipleSlashes\n        )\n        if (!matched) continue\n        globParts[i] = matched\n        globParts[j] = []\n      }\n    }\n    return globParts.filter(gs => gs.length)\n  }\n\n  partsMatch(\n    a: string[],\n    b: string[],\n    emptyGSMatch: boolean = false\n  ): false | string[] {\n    let ai = 0\n    let bi = 0\n    let result: string[] = []\n    let which: string = ''\n    while (ai < a.length && bi < b.length) {\n      if (a[ai] === b[bi]) {\n        result.push(which === 'b' ? b[bi] : a[ai])\n        ai++\n        bi++\n      } else if (emptyGSMatch && a[ai] === '**' && b[bi] === a[ai + 1]) {\n        result.push(a[ai])\n        ai++\n      } else if (emptyGSMatch && b[bi] === '**' && a[ai] === b[bi + 1]) {\n        result.push(b[bi])\n        bi++\n      } else if (\n        a[ai] === '*' &&\n        b[bi] &&\n        (this.options.dot || !b[bi].startsWith('.')) &&\n        b[bi] !== '**'\n      ) {\n        if (which === 'b') return false\n        which = 'a'\n        result.push(a[ai])\n        ai++\n        bi++\n      } else if (\n        b[bi] === '*' &&\n        a[ai] &&\n        (this.options.dot || !a[ai].startsWith('.')) &&\n        a[ai] !== '**'\n      ) {\n        if (which === 'a') return false\n        which = 'b'\n        result.push(b[bi])\n        ai++\n        bi++\n      } else {\n        return false\n      }\n    }\n    // if we fall out of the loop, it means they two are identical\n    // as long as their lengths match\n    return a.length === b.length && result\n  }\n\n  parseNegate() {\n    if (this.nonegate) return\n\n    const pattern = this.pattern\n    let negate = false\n    let negateOffset = 0\n\n    for (let i = 0; i < pattern.length && pattern.charAt(i) === '!'; i++) {\n      negate = !negate\n      negateOffset++\n    }\n\n    if (negateOffset) this.pattern = pattern.slice(negateOffset)\n    this.negate = negate\n  }\n\n  // set partial to true to test if, for example,\n  // \"/a/b\" matches the start of \"/*/b/*/d\"\n  // Partial means, if you run out of file before you run\n  // out of pattern, then that's fine, as long as all\n  // the parts match.\n  matchOne(file: string[], pattern: ParseReturn[], partial: boolean = false) {\n    const options = this.options\n\n    // UNC paths like //?/X:/... can match X:/... and vice versa\n    // Drive letters in absolute drive or unc paths are always compared\n    // case-insensitively.\n    if (this.isWindows) {\n      const fileDrive = typeof file[0] === 'string' && /^[a-z]:$/i.test(file[0])\n      const fileUNC =\n        !fileDrive &&\n        file[0] === '' &&\n        file[1] === '' &&\n        file[2] === '?' &&\n        /^[a-z]:$/i.test(file[3])\n\n      const patternDrive =\n        typeof pattern[0] === 'string' && /^[a-z]:$/i.test(pattern[0])\n      const patternUNC =\n        !patternDrive &&\n        pattern[0] === '' &&\n        pattern[1] === '' &&\n        pattern[2] === '?' &&\n        typeof pattern[3] === 'string' &&\n        /^[a-z]:$/i.test(pattern[3])\n\n      const fdi = fileUNC ? 3 : fileDrive ? 0 : undefined\n      const pdi = patternUNC ? 3 : patternDrive ? 0 : undefined\n      if (typeof fdi === 'number' && typeof pdi === 'number') {\n        const [fd, pd]: [string, string] = [file[fdi], pattern[pdi] as string]\n        if (fd.toLowerCase() === pd.toLowerCase()) {\n          pattern[pdi] = fd\n          if (pdi > fdi) {\n            pattern = pattern.slice( pdi)\n          } else if (fdi > pdi) {\n            file = file.slice(fdi)\n          }\n        }\n      }\n    }\n\n    // resolve and reduce . and .. portions in the file as well.\n    // dont' need to do the second phase, because it's only one string[]\n    const { optimizationLevel = 1 } = this.options\n    if (optimizationLevel >= 2) {\n      file = this.levelTwoFileOptimize(file)\n    }\n\n    this.debug('matchOne', this, { file, pattern })\n    this.debug('matchOne', file.length, pattern.length)\n\n    for (\n      var fi = 0, pi = 0, fl = file.length, pl = pattern.length;\n      fi < fl && pi < pl;\n      fi++, pi++\n    ) {\n      this.debug('matchOne loop')\n      var p = pattern[pi]\n      var f = file[fi]\n\n      this.debug(pattern, p, f)\n\n      // should be impossible.\n      // some invalid regexp stuff in the set.\n      /* c8 ignore start */\n      if (p === false) {\n        return false\n      }\n      /* c8 ignore stop */\n\n      if (p === GLOBSTAR) {\n        this.debug('GLOBSTAR', [pattern, p, f])\n\n        // \"**\"\n        // a/**/b/**/c would match the following:\n        // a/b/x/y/z/c\n        // a/x/y/z/b/c\n        // a/b/x/b/x/c\n        // a/b/c\n        // To do this, take the rest of the pattern after\n        // the **, and see if it would match the file remainder.\n        // If so, return success.\n        // If not, the ** \"swallows\" a segment, and try again.\n        // This is recursively awful.\n        //\n        // a/**/b/**/c matching a/b/x/y/z/c\n        // - a matches a\n        // - doublestar\n        //   - matchOne(b/x/y/z/c, b/**/c)\n        //     - b matches b\n        //     - doublestar\n        //       - matchOne(x/y/z/c, c) -> no\n        //       - matchOne(y/z/c, c) -> no\n        //       - matchOne(z/c, c) -> no\n        //       - matchOne(c, c) yes, hit\n        var fr = fi\n        var pr = pi + 1\n        if (pr === pl) {\n          this.debug('** at the end')\n          // a ** at the end will just swallow the rest.\n          // We have found a match.\n          // however, it will not swallow /.x, unless\n          // options.dot is set.\n          // . and .. are *never* matched by **, for explosively\n          // exponential reasons.\n          for (; fi < fl; fi++) {\n            if (\n              file[fi] === '.' ||\n              file[fi] === '..' ||\n              (!options.dot && file[fi].charAt(0) === '.')\n            )\n              return false\n          }\n          return true\n        }\n\n        // ok, let's see if we can swallow whatever we can.\n        while (fr < fl) {\n          var swallowee = file[fr]\n\n          this.debug('\\nglobstar while', file, fr, pattern, pr, swallowee)\n\n          // XXX remove this slice.  Just pass the start index.\n          if (this.matchOne(file.slice(fr), pattern.slice(pr), partial)) {\n            this.debug('globstar found match!', fr, fl, swallowee)\n            // found a match.\n            return true\n          } else {\n            // can't swallow \".\" or \"..\" ever.\n            // can only swallow \".foo\" when explicitly asked.\n            if (\n              swallowee === '.' ||\n              swallowee === '..' ||\n              (!options.dot && swallowee.charAt(0) === '.')\n            ) {\n              this.debug('dot detected!', file, fr, pattern, pr)\n              break\n            }\n\n            // ** swallows a segment, and continue.\n            this.debug('globstar swallow a segment, and continue')\n            fr++\n          }\n        }\n\n        // no match was found.\n        // However, in partial mode, we can't say this is necessarily over.\n        /* c8 ignore start */\n        if (partial) {\n          // ran out of file\n          this.debug('\\n>>> no match, partial?', file, fr, pattern, pr)\n          if (fr === fl) {\n            return true\n          }\n        }\n        /* c8 ignore stop */\n        return false\n      }\n\n      // something other than **\n      // non-magic patterns just have to match exactly\n      // patterns with magic have been turned into regexps.\n      let hit: boolean\n      if (typeof p === 'string') {\n        hit = f === p\n        this.debug('string match', p, f, hit)\n      } else {\n        hit = p.test(f)\n        this.debug('pattern match', p, f, hit)\n      }\n\n      if (!hit) return false\n    }\n\n    // Note: ending in / means that we'll get a final \"\"\n    // at the end of the pattern.  This can only match a\n    // corresponding \"\" at the end of the file.\n    // If the file ends in /, then it can only match a\n    // a pattern that ends in /, unless the pattern just\n    // doesn't have any more for it. But, a/b/ should *not*\n    // match \"a/b/*\", even though \"\" matches against the\n    // [^/]*? pattern, except in partial mode, where it might\n    // simply not be reached yet.\n    // However, a/b/ should still satisfy a/*\n\n    // now either we fell off the end of the pattern, or we're done.\n    if (fi === fl && pi === pl) {\n      // ran out of pattern and filename at the same time.\n      // an exact hit!\n      return true\n    } else if (fi === fl) {\n      // ran out of file, but still had pattern left.\n      // this is ok if we're doing the match as part of\n      // a glob fs traversal.\n      return partial\n    } else if (pi === pl) {\n      // ran out of pattern, still have file left.\n      // this is only acceptable if we're on the very last\n      // empty segment of a file with a trailing slash.\n      // a/* should match a/b/\n      return fi === fl - 1 && file[fi] === ''\n\n      /* c8 ignore start */\n    } else {\n      // should be unreachable.\n      throw new Error('wtf?')\n    }\n    /* c8 ignore stop */\n  }\n\n  braceExpand() {\n    return braceExpand(this.pattern, this.options)\n  }\n\n  parse(pattern: string): ParseReturn {\n    assertValidPattern(pattern)\n\n    const options = this.options\n\n    // shortcuts\n    if (pattern === '**') return GLOBSTAR\n    if (pattern === '') return ''\n\n    // far and away, the most common glob pattern parts are\n    // *, *.*, and *.  Add a fast check method for those.\n    let m: RegExpMatchArray | null\n    let fastTest: null | ((f: string) => boolean) = null\n    if ((m = pattern.match(starRE))) {\n      fastTest = options.dot ? starTestDot : starTest\n    } else if ((m = pattern.match(starDotExtRE))) {\n      fastTest = (\n        options.nocase\n          ? options.dot\n            ? starDotExtTestNocaseDot\n            : starDotExtTestNocase\n          : options.dot\n          ? starDotExtTestDot\n          : starDotExtTest\n      )(m[1])\n    } else if ((m = pattern.match(qmarksRE))) {\n      fastTest = (\n        options.nocase\n          ? options.dot\n            ? qmarksTestNocaseDot\n            : qmarksTestNocase\n          : options.dot\n          ? qmarksTestDot\n          : qmarksTest\n      )(m)\n    } else if ((m = pattern.match(starDotStarRE))) {\n      fastTest = options.dot ? starDotStarTestDot : starDotStarTest\n    } else if ((m = pattern.match(dotStarRE))) {\n      fastTest = dotStarTest\n    }\n\n    const re = AST.fromGlob(pattern, this.options).toMMPattern()\n    if (fastTest && typeof re === 'object') {\n      // Avoids overriding in frozen environments\n      Reflect.defineProperty(re, 'test', { value: fastTest })\n    }\n    return re\n  }\n\n  makeRe() {\n    if (this.regexp || this.regexp === false) return this.regexp\n\n    // at this point, this.set is a 2d array of partial\n    // pattern strings, or \"**\".\n    //\n    // It's better to use .match().  This function shouldn't\n    // be used, really, but it's pretty convenient sometimes,\n    // when you just want to work with a regex.\n    const set = this.set\n\n    if (!set.length) {\n      this.regexp = false\n      return this.regexp\n    }\n    const options = this.options\n\n    const twoStar = options.noglobstar\n      ? star\n      : options.dot\n      ? twoStarDot\n      : twoStarNoDot\n    const flags = new Set(options.nocase ? ['i'] : [])\n\n    // regexpify non-globstar patterns\n    // if ** is only item, then we just do one twoStar\n    // if ** is first, and there are more, prepend (\\/|twoStar\\/)? to next\n    // if ** is last, append (\\/twoStar|) to previous\n    // if ** is in the middle, append (\\/|\\/twoStar\\/) to previous\n    // then filter out GLOBSTAR symbols\n    let re = set\n      .map(pattern => {\n        const pp: (string | typeof GLOBSTAR)[] = pattern.map(p => {\n          if (p instanceof RegExp) {\n            for (const f of p.flags.split('')) flags.add(f)\n          }\n          return typeof p === 'string'\n            ? regExpEscape(p)\n            : p === GLOBSTAR\n            ? GLOBSTAR\n            : p._src\n        }) as (string | typeof GLOBSTAR)[]\n        pp.forEach((p, i) => {\n          const next = pp[i + 1]\n          const prev = pp[i - 1]\n          if (p !== GLOBSTAR || prev === GLOBSTAR) {\n            return\n          }\n          if (prev === undefined) {\n            if (next !== undefined && next !== GLOBSTAR) {\n              pp[i + 1] = '(?:\\\\/|' + twoStar + '\\\\/)?' + next\n            } else {\n              pp[i] = twoStar\n            }\n          } else if (next === undefined) {\n            pp[i - 1] = prev + '(?:\\\\/|' + twoStar + ')?'\n          } else if (next !== GLOBSTAR) {\n            pp[i - 1] = prev + '(?:\\\\/|\\\\/' + twoStar + '\\\\/)' + next\n            pp[i + 1] = GLOBSTAR\n          }\n        })\n        return pp.filter(p => p !== GLOBSTAR).join('/')\n      })\n      .join('|')\n\n    // need to wrap in parens if we had more than one thing with |,\n    // otherwise only the first will be anchored to ^ and the last to $\n    const [open, close] = set.length > 1 ? ['(?:', ')'] : ['', '']\n    // must match entire pattern\n    // ending in a * or ** will make it less strict.\n    re = '^' + open + re + close + '$'\n\n    // can match anything, as long as it's not this.\n    if (this.negate) re = '^(?!' + re + ').+$'\n\n    try {\n      this.regexp = new RegExp(re, [...flags].join(''))\n      /* c8 ignore start */\n    } catch (ex) {\n      // should be impossible\n      this.regexp = false\n    }\n    /* c8 ignore stop */\n    return this.regexp\n  }\n\n  slashSplit(p: string) {\n    // if p starts with // on windows, we preserve that\n    // so that UNC paths aren't broken.  Otherwise, any number of\n    // / characters are coalesced into one, unless\n    // preserveMultipleSlashes is set to true.\n    if (this.preserveMultipleSlashes) {\n      return p.split('/')\n    } else if (this.isWindows && /^\\/\\/[^\\/]+/.test(p)) {\n      // add an extra '' for the one we lose\n      return ['', ...p.split(/\\/+/)]\n    } else {\n      return p.split(/\\/+/)\n    }\n  }\n\n  match(f: string, partial = this.partial) {\n    this.debug('match', f, this.pattern)\n    // short-circuit in the case of busted things.\n    // comments, etc.\n    if (this.comment) {\n      return false\n    }\n    if (this.empty) {\n      return f === ''\n    }\n\n    if (f === '/' && partial) {\n      return true\n    }\n\n    const options = this.options\n\n    // windows: need to use /, not \\\n    if (this.isWindows) {\n      f = f.split('\\\\').join('/')\n    }\n\n    // treat the test path as a set of pathparts.\n    const ff = this.slashSplit(f)\n    this.debug(this.pattern, 'split', ff)\n\n    // just ONE of the pattern sets in this.set needs to match\n    // in order for it to be valid.  If negating, then just one\n    // match means that we have failed.\n    // Either way, return on the first hit.\n\n    const set = this.set\n    this.debug(this.pattern, 'set', set)\n\n    // Find the basename of the path by looking for the last non-empty segment\n    let filename: string = ff[ff.length - 1]\n    if (!filename) {\n      for (let i = ff.length - 2; !filename && i >= 0; i--) {\n        filename = ff[i]\n      }\n    }\n\n    for (let i = 0; i < set.length; i++) {\n      const pattern = set[i]\n      let file = ff\n      if (options.matchBase && pattern.length === 1) {\n        file = [filename]\n      }\n      const hit = this.matchOne(file, pattern, partial)\n      if (hit) {\n        if (options.flipNegate) {\n          return true\n        }\n        return !this.negate\n      }\n    }\n\n    // didn't get any hits.  this is success if it's a negative\n    // pattern, failure otherwise.\n    if (options.flipNegate) {\n      return false\n    }\n    return this.negate\n  }\n\n  static defaults(def: MinimatchOptions) {\n    return minimatch.defaults(def).Minimatch\n  }\n}\n/* c8 ignore start */\nexport { AST } from './ast.js'\nexport { escape } from './escape.js'\nexport { unescape } from './unescape.js'\n/* c8 ignore stop */\nminimatch.AST = AST\nminimatch.Minimatch = Minimatch\nminimatch.escape = escape\nminimatch.unescape = unescape\n"]}
                                  \ No newline at end of file
                                  diff --git a/node_modules/minimatch/dist/esm/package.json b/node_modules/minimatch/dist/esm/package.json
                                  new file mode 100644
                                  index 000000000..3dbc1ca59
                                  --- /dev/null
                                  +++ b/node_modules/minimatch/dist/esm/package.json
                                  @@ -0,0 +1,3 @@
                                  +{
                                  +  "type": "module"
                                  +}
                                  diff --git a/node_modules/minimatch/dist/esm/unescape.d.ts b/node_modules/minimatch/dist/esm/unescape.d.ts
                                  new file mode 100644
                                  index 000000000..23a7b387c
                                  --- /dev/null
                                  +++ b/node_modules/minimatch/dist/esm/unescape.d.ts
                                  @@ -0,0 +1,17 @@
                                  +import { MinimatchOptions } from './index.js';
                                  +/**
                                  + * Un-escape a string that has been escaped with {@link escape}.
                                  + *
                                  + * If the {@link windowsPathsNoEscape} option is used, then square-brace
                                  + * escapes are removed, but not backslash escapes.  For example, it will turn
                                  + * the string `'[*]'` into `*`, but it will not turn `'\\*'` into `'*'`,
                                  + * becuase `\` is a path separator in `windowsPathsNoEscape` mode.
                                  + *
                                  + * When `windowsPathsNoEscape` is not set, then both brace escapes and
                                  + * backslash escapes are removed.
                                  + *
                                  + * Slashes (and backslashes in `windowsPathsNoEscape` mode) cannot be escaped
                                  + * or unescaped.
                                  + */
                                  +export declare const unescape: (s: string, { windowsPathsNoEscape, }?: Pick) => string;
                                  +//# sourceMappingURL=unescape.d.ts.map
                                  \ No newline at end of file
                                  diff --git a/node_modules/minimatch/dist/esm/unescape.d.ts.map b/node_modules/minimatch/dist/esm/unescape.d.ts.map
                                  new file mode 100644
                                  index 000000000..7ace07013
                                  --- /dev/null
                                  +++ b/node_modules/minimatch/dist/esm/unescape.d.ts.map
                                  @@ -0,0 +1 @@
                                  +{"version":3,"file":"unescape.d.ts","sourceRoot":"","sources":["../../src/unescape.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,gBAAgB,EAAE,MAAM,YAAY,CAAA;AAC7C;;;;;;;;;;;;;GAaG;AACH,eAAO,MAAM,QAAQ,MAChB,MAAM,8BAGN,KAAK,gBAAgB,EAAE,sBAAsB,CAAC,WAKlD,CAAA"}
                                  \ No newline at end of file
                                  diff --git a/node_modules/minimatch/dist/esm/unescape.js b/node_modules/minimatch/dist/esm/unescape.js
                                  new file mode 100644
                                  index 000000000..0faf9a2b7
                                  --- /dev/null
                                  +++ b/node_modules/minimatch/dist/esm/unescape.js
                                  @@ -0,0 +1,20 @@
                                  +/**
                                  + * Un-escape a string that has been escaped with {@link escape}.
                                  + *
                                  + * If the {@link windowsPathsNoEscape} option is used, then square-brace
                                  + * escapes are removed, but not backslash escapes.  For example, it will turn
                                  + * the string `'[*]'` into `*`, but it will not turn `'\\*'` into `'*'`,
                                  + * becuase `\` is a path separator in `windowsPathsNoEscape` mode.
                                  + *
                                  + * When `windowsPathsNoEscape` is not set, then both brace escapes and
                                  + * backslash escapes are removed.
                                  + *
                                  + * Slashes (and backslashes in `windowsPathsNoEscape` mode) cannot be escaped
                                  + * or unescaped.
                                  + */
                                  +export const unescape = (s, { windowsPathsNoEscape = false, } = {}) => {
                                  +    return windowsPathsNoEscape
                                  +        ? s.replace(/\[([^\/\\])\]/g, '$1')
                                  +        : s.replace(/((?!\\).|^)\[([^\/\\])\]/g, '$1$2').replace(/\\([^\/])/g, '$1');
                                  +};
                                  +//# sourceMappingURL=unescape.js.map
                                  \ No newline at end of file
                                  diff --git a/node_modules/minimatch/dist/esm/unescape.js.map b/node_modules/minimatch/dist/esm/unescape.js.map
                                  new file mode 100644
                                  index 000000000..eb146c20d
                                  --- /dev/null
                                  +++ b/node_modules/minimatch/dist/esm/unescape.js.map
                                  @@ -0,0 +1 @@
                                  +{"version":3,"file":"unescape.js","sourceRoot":"","sources":["../../src/unescape.ts"],"names":[],"mappings":"AACA;;;;;;;;;;;;;GAaG;AACH,MAAM,CAAC,MAAM,QAAQ,GAAG,CACtB,CAAS,EACT,EACE,oBAAoB,GAAG,KAAK,MACsB,EAAE,EACtD,EAAE;IACF,OAAO,oBAAoB;QACzB,CAAC,CAAC,CAAC,CAAC,OAAO,CAAC,gBAAgB,EAAE,IAAI,CAAC;QACnC,CAAC,CAAC,CAAC,CAAC,OAAO,CAAC,2BAA2B,EAAE,MAAM,CAAC,CAAC,OAAO,CAAC,YAAY,EAAE,IAAI,CAAC,CAAA;AAChF,CAAC,CAAA","sourcesContent":["import { MinimatchOptions } from './index.js'\n/**\n * Un-escape a string that has been escaped with {@link escape}.\n *\n * If the {@link windowsPathsNoEscape} option is used, then square-brace\n * escapes are removed, but not backslash escapes.  For example, it will turn\n * the string `'[*]'` into `*`, but it will not turn `'\\\\*'` into `'*'`,\n * becuase `\\` is a path separator in `windowsPathsNoEscape` mode.\n *\n * When `windowsPathsNoEscape` is not set, then both brace escapes and\n * backslash escapes are removed.\n *\n * Slashes (and backslashes in `windowsPathsNoEscape` mode) cannot be escaped\n * or unescaped.\n */\nexport const unescape = (\n  s: string,\n  {\n    windowsPathsNoEscape = false,\n  }: Pick = {}\n) => {\n  return windowsPathsNoEscape\n    ? s.replace(/\\[([^\\/\\\\])\\]/g, '$1')\n    : s.replace(/((?!\\\\).|^)\\[([^\\/\\\\])\\]/g, '$1$2').replace(/\\\\([^\\/])/g, '$1')\n}\n"]}
                                  \ No newline at end of file
                                  diff --git a/node_modules/object.entries/test/native.js b/node_modules/object.entries/test/native.js
                                  new file mode 100644
                                  index 000000000..2063e3a4c
                                  --- /dev/null
                                  +++ b/node_modules/object.entries/test/native.js
                                  @@ -0,0 +1,16 @@
                                  +'use strict';
                                  +
                                  +var test = require('tape');
                                  +var runTests = require('./tests');
                                  +
                                  +test('as a function', function (t) {
                                  +	t.test('bad array/this value', function (st) {
                                  +		st['throws'](function () { Object.entries(undefined); }, TypeError, 'undefined is not an object');
                                  +		st['throws'](function () { Object.entries(null); }, TypeError, 'null is not an object');
                                  +		st.end();
                                  +	});
                                  +
                                  +	runTests(Object.entries, t);
                                  +
                                  +	t.end();
                                  +});
                                  diff --git a/node_modules/semver/internal/lrucache.js b/node_modules/semver/internal/lrucache.js
                                  new file mode 100644
                                  index 000000000..6d89ec948
                                  --- /dev/null
                                  +++ b/node_modules/semver/internal/lrucache.js
                                  @@ -0,0 +1,40 @@
                                  +class LRUCache {
                                  +  constructor () {
                                  +    this.max = 1000
                                  +    this.map = new Map()
                                  +  }
                                  +
                                  +  get (key) {
                                  +    const value = this.map.get(key)
                                  +    if (value === undefined) {
                                  +      return undefined
                                  +    } else {
                                  +      // Remove the key from the map and add it to the end
                                  +      this.map.delete(key)
                                  +      this.map.set(key, value)
                                  +      return value
                                  +    }
                                  +  }
                                  +
                                  +  delete (key) {
                                  +    return this.map.delete(key)
                                  +  }
                                  +
                                  +  set (key, value) {
                                  +    const deleted = this.delete(key)
                                  +
                                  +    if (!deleted && value !== undefined) {
                                  +      // If cache is full, delete the least recently used item
                                  +      if (this.map.size >= this.max) {
                                  +        const firstKey = this.map.keys().next().value
                                  +        this.delete(firstKey)
                                  +      }
                                  +
                                  +      this.map.set(key, value)
                                  +    }
                                  +
                                  +    return this
                                  +  }
                                  +}
                                  +
                                  +module.exports = LRUCache
                                  diff --git a/node_modules/word-wrap/LICENSE b/node_modules/word-wrap/LICENSE
                                  new file mode 100644
                                  index 000000000..842218cf0
                                  --- /dev/null
                                  +++ b/node_modules/word-wrap/LICENSE
                                  @@ -0,0 +1,21 @@
                                  +The MIT License (MIT)
                                  +
                                  +Copyright (c) 2014-2016, Jon Schlinkert
                                  +
                                  +Permission is hereby granted, free of charge, to any person obtaining a copy
                                  +of this software and associated documentation files (the "Software"), to deal
                                  +in the Software without restriction, including without limitation the rights
                                  +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
                                  +copies of the Software, and to permit persons to whom the Software is
                                  +furnished to do so, subject to the following conditions:
                                  +
                                  +The above copyright notice and this permission notice shall be included in
                                  +all copies or substantial portions of the Software.
                                  +
                                  +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
                                  +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
                                  +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
                                  +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
                                  +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
                                  +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
                                  +THE SOFTWARE.
                                  diff --git a/node_modules/word-wrap/README.md b/node_modules/word-wrap/README.md
                                  new file mode 100644
                                  index 000000000..330595383
                                  --- /dev/null
                                  +++ b/node_modules/word-wrap/README.md
                                  @@ -0,0 +1,201 @@
                                  +# word-wrap [![NPM version](https://img.shields.io/npm/v/word-wrap.svg?style=flat)](https://www.npmjs.com/package/word-wrap) [![NPM monthly downloads](https://img.shields.io/npm/dm/word-wrap.svg?style=flat)](https://npmjs.org/package/word-wrap) [![NPM total downloads](https://img.shields.io/npm/dt/word-wrap.svg?style=flat)](https://npmjs.org/package/word-wrap) [![Linux Build Status](https://img.shields.io/travis/jonschlinkert/word-wrap.svg?style=flat&label=Travis)](https://travis-ci.org/jonschlinkert/word-wrap)
                                  +
                                  +> Wrap words to a specified length.
                                  +
                                  +Please consider following this project's author, [Jon Schlinkert](https://github.com/jonschlinkert), and consider starring the project to show your :heart: and support.
                                  +
                                  +## Install
                                  +
                                  +Install with [npm](https://www.npmjs.com/):
                                  +
                                  +```sh
                                  +$ npm install --save word-wrap
                                  +```
                                  +
                                  +## Usage
                                  +
                                  +```js
                                  +var wrap = require('word-wrap');
                                  +
                                  +wrap('Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat.');
                                  +```
                                  +
                                  +Results in:
                                  +
                                  +```
                                  +  Lorem ipsum dolor sit amet, consectetur adipiscing
                                  +  elit, sed do eiusmod tempor incididunt ut labore
                                  +  et dolore magna aliqua. Ut enim ad minim veniam,
                                  +  quis nostrud exercitation ullamco laboris nisi ut
                                  +  aliquip ex ea commodo consequat.
                                  +```
                                  +
                                  +## Options
                                  +
                                  +![image](https://cloud.githubusercontent.com/assets/383994/6543728/7a381c08-c4f6-11e4-8b7d-b6ba197569c9.png)
                                  +
                                  +### options.width
                                  +
                                  +Type: `Number`
                                  +
                                  +Default: `50`
                                  +
                                  +The width of the text before wrapping to a new line.
                                  +
                                  +**Example:**
                                  +
                                  +```js
                                  +wrap(str, {width: 60});
                                  +```
                                  +
                                  +### options.indent
                                  +
                                  +Type: `String`
                                  +
                                  +Default: `` (two spaces)
                                  +
                                  +The string to use at the beginning of each line.
                                  +
                                  +**Example:**
                                  +
                                  +```js
                                  +wrap(str, {indent: '      '});
                                  +```
                                  +
                                  +### options.newline
                                  +
                                  +Type: `String`
                                  +
                                  +Default: `\n`
                                  +
                                  +The string to use at the end of each line.
                                  +
                                  +**Example:**
                                  +
                                  +```js
                                  +wrap(str, {newline: '\n\n'});
                                  +```
                                  +
                                  +### options.escape
                                  +
                                  +Type: `function`
                                  +
                                  +Default: `function(str){return str;}`
                                  +
                                  +An escape function to run on each line after splitting them.
                                  +
                                  +**Example:**
                                  +
                                  +```js
                                  +var xmlescape = require('xml-escape');
                                  +wrap(str, {
                                  +  escape: function(string){
                                  +    return xmlescape(string);
                                  +  }
                                  +});
                                  +```
                                  +
                                  +### options.trim
                                  +
                                  +Type: `Boolean`
                                  +
                                  +Default: `false`
                                  +
                                  +Trim trailing whitespace from the returned string. This option is included since `.trim()` would also strip the leading indentation from the first line.
                                  +
                                  +**Example:**
                                  +
                                  +```js
                                  +wrap(str, {trim: true});
                                  +```
                                  +
                                  +### options.cut
                                  +
                                  +Type: `Boolean`
                                  +
                                  +Default: `false`
                                  +
                                  +Break a word between any two letters when the word is longer than the specified width.
                                  +
                                  +**Example:**
                                  +
                                  +```js
                                  +wrap(str, {cut: true});
                                  +```
                                  +
                                  +## About
                                  +
                                  +
                                  +Contributing + +Pull requests and stars are always welcome. For bugs and feature requests, [please create an issue](../../issues/new). + +
                                  + +
                                  +Running Tests + +Running and reviewing unit tests is a great way to get familiarized with a library and its API. You can install dependencies and run tests with the following command: + +```sh +$ npm install && npm test +``` + +
                                  + +
                                  +Building docs + +_(This project's readme.md is generated by [verb](https://github.com/verbose/verb-generate-readme), please don't edit the readme directly. Any changes to the readme must be made in the [.verb.md](.verb.md) readme template.)_ + +To generate the readme, run the following command: + +```sh +$ npm install -g verbose/verb#dev verb-generate-readme && verb +``` + +
                                  + +### Related projects + +You might also be interested in these projects: + +* [common-words](https://www.npmjs.com/package/common-words): Updated list (JSON) of the 100 most common words in the English language. Useful for… [more](https://github.com/jonschlinkert/common-words) | [homepage](https://github.com/jonschlinkert/common-words "Updated list (JSON) of the 100 most common words in the English language. Useful for excluding these words from arrays.") +* [shuffle-words](https://www.npmjs.com/package/shuffle-words): Shuffle the words in a string and optionally the letters in each word using the… [more](https://github.com/jonschlinkert/shuffle-words) | [homepage](https://github.com/jonschlinkert/shuffle-words "Shuffle the words in a string and optionally the letters in each word using the Fisher-Yates algorithm. Useful for creating test fixtures, benchmarking samples, etc.") +* [unique-words](https://www.npmjs.com/package/unique-words): Returns an array of unique words, or the number of occurrences of each word in… [more](https://github.com/jonschlinkert/unique-words) | [homepage](https://github.com/jonschlinkert/unique-words "Returns an array of unique words, or the number of occurrences of each word in a string or list.") +* [wordcount](https://www.npmjs.com/package/wordcount): Count the words in a string. Support for english, CJK and Cyrillic. | [homepage](https://github.com/jonschlinkert/wordcount "Count the words in a string. Support for english, CJK and Cyrillic.") + +### Contributors + +| **Commits** | **Contributor** | +| --- | --- | +| 47 | [jonschlinkert](https://github.com/jonschlinkert) | +| 7 | [OlafConijn](https://github.com/OlafConijn) | +| 3 | [doowb](https://github.com/doowb) | +| 2 | [aashutoshrathi](https://github.com/aashutoshrathi) | +| 2 | [lordvlad](https://github.com/lordvlad) | +| 2 | [hildjj](https://github.com/hildjj) | +| 1 | [danilosampaio](https://github.com/danilosampaio) | +| 1 | [2fd](https://github.com/2fd) | +| 1 | [leonard-thieu](https://github.com/leonard-thieu) | +| 1 | [mohd-akram](https://github.com/mohd-akram) | +| 1 | [toddself](https://github.com/toddself) | +| 1 | [wolfgang42](https://github.com/wolfgang42) | +| 1 | [zachhale](https://github.com/zachhale) | + +### Author + +**Jon Schlinkert** + +* [GitHub Profile](https://github.com/jonschlinkert) +* [Twitter Profile](https://twitter.com/jonschlinkert) +* [LinkedIn Profile](https://linkedin.com/in/jonschlinkert) + +### License + +Copyright © 2023, [Jon Schlinkert](https://github.com/jonschlinkert). +Released under the [MIT License](LICENSE). + +*** + +_This file was generated by [verb-generate-readme](https://github.com/verbose/verb-generate-readme), v0.8.0, on July 22, 2023._ \ No newline at end of file diff --git a/node_modules/word-wrap/index.d.ts b/node_modules/word-wrap/index.d.ts new file mode 100644 index 000000000..07e06f816 --- /dev/null +++ b/node_modules/word-wrap/index.d.ts @@ -0,0 +1,50 @@ +/** + * Wrap words to a specified length. + */ +export = wrap; + +declare function wrap(str: string, options?: wrap.IOptions): string; + +declare namespace wrap { + export interface IOptions { + + /** + * The width of the text before wrapping to a new line. + * @default ´50´ + */ + width?: number; + + /** + * The string to use at the beginning of each line. + * @default ´ ´ (two spaces) + */ + indent?: string; + + /** + * The string to use at the end of each line. + * @default ´\n´ + */ + newline?: string; + + /** + * An escape function to run on each line after splitting them. + * @default (str: string) => string; + */ + escape?: (str: string) => string; + + /** + * Trim trailing whitespace from the returned string. + * This option is included since .trim() would also strip + * the leading indentation from the first line. + * @default true + */ + trim?: boolean; + + /** + * Break a word between any two letters when the word is longer + * than the specified width. + * @default false + */ + cut?: boolean; + } +} diff --git a/node_modules/word-wrap/index.js b/node_modules/word-wrap/index.js new file mode 100644 index 000000000..08f1e41d7 --- /dev/null +++ b/node_modules/word-wrap/index.js @@ -0,0 +1,61 @@ +/*! + * word-wrap + * + * Copyright (c) 2014-2023, Jon Schlinkert. + * Released under the MIT License. + */ + +function trimEnd(str) { + let lastCharPos = str.length - 1; + let lastChar = str[lastCharPos]; + while(lastChar === ' ' || lastChar === '\t') { + lastChar = str[--lastCharPos]; + } + return str.substring(0, lastCharPos + 1); +} + +function trimTabAndSpaces(str) { + const lines = str.split('\n'); + const trimmedLines = lines.map((line) => trimEnd(line)); + return trimmedLines.join('\n'); +} + +module.exports = function(str, options) { + options = options || {}; + if (str == null) { + return str; + } + + var width = options.width || 50; + var indent = (typeof options.indent === 'string') + ? options.indent + : ' '; + + var newline = options.newline || '\n' + indent; + var escape = typeof options.escape === 'function' + ? options.escape + : identity; + + var regexString = '.{1,' + width + '}'; + if (options.cut !== true) { + regexString += '([\\s\u200B]+|$)|[^\\s\u200B]+?([\\s\u200B]+|$)'; + } + + var re = new RegExp(regexString, 'g'); + var lines = str.match(re) || []; + var result = indent + lines.map(function(line) { + if (line.slice(-1) === '\n') { + line = line.slice(0, line.length - 1); + } + return escape(line); + }).join(newline); + + if (options.trim === true) { + result = trimTabAndSpaces(result); + } + return result; +}; + +function identity(str) { + return str; +} diff --git a/node_modules/word-wrap/package.json b/node_modules/word-wrap/package.json new file mode 100644 index 000000000..459246d54 --- /dev/null +++ b/node_modules/word-wrap/package.json @@ -0,0 +1,77 @@ +{ + "name": "word-wrap", + "description": "Wrap words to a specified length.", + "version": "1.2.5", + "homepage": "https://github.com/jonschlinkert/word-wrap", + "author": "Jon Schlinkert (https://github.com/jonschlinkert)", + "contributors": [ + "Danilo Sampaio (localhost:8080)", + "Fede Ramirez (https://2fd.github.io)", + "Joe Hildebrand (https://twitter.com/hildjj)", + "Jon Schlinkert (http://twitter.com/jonschlinkert)", + "Todd Kennedy (https://tck.io)", + "Waldemar Reusch (https://github.com/lordvlad)", + "Wolfgang Faust (http://www.linestarve.com)", + "Zach Hale (http://zachhale.com)" + ], + "repository": "jonschlinkert/word-wrap", + "bugs": { + "url": "https://github.com/jonschlinkert/word-wrap/issues" + }, + "license": "MIT", + "files": [ + "index.js", + "index.d.ts" + ], + "main": "index.js", + "engines": { + "node": ">=0.10.0" + }, + "scripts": { + "test": "mocha" + }, + "devDependencies": { + "gulp-format-md": "^0.1.11", + "mocha": "^3.2.0" + }, + "keywords": [ + "break", + "carriage", + "line", + "new-line", + "newline", + "return", + "soft", + "text", + "word", + "word-wrap", + "words", + "wrap" + ], + "typings": "index.d.ts", + "verb": { + "toc": false, + "layout": "default", + "tasks": [ + "readme" + ], + "plugins": [ + "gulp-format-md" + ], + "lint": { + "reflinks": true + }, + "related": { + "list": [ + "common-words", + "shuffle-words", + "unique-words", + "wordcount" + ] + }, + "reflinks": [ + "verb", + "verb-generate-readme" + ] + } +} diff --git a/variables/DEFAULT_EXCEPTION_CODE.html b/variables/DEFAULT_EXCEPTION_CODE.html new file mode 100644 index 000000000..59aa0effa --- /dev/null +++ b/variables/DEFAULT_EXCEPTION_CODE.html @@ -0,0 +1,17 @@ +DEFAULT_EXCEPTION_CODE | Jira.js - Jira Cloud API library +

                                  Variable DEFAULT_EXCEPTION_CODEConst

                                  DEFAULT_EXCEPTION_CODE: "INTERNAL_SERVER_ERROR" = 'INTERNAL_SERVER_ERROR'

                                  Generated using TypeDoc v0.25.13
                                  + + +

                                  \ No newline at end of file diff --git a/variables/DEFAULT_EXCEPTION_MESSAGE.html b/variables/DEFAULT_EXCEPTION_MESSAGE.html new file mode 100644 index 000000000..a6a77e00b --- /dev/null +++ b/variables/DEFAULT_EXCEPTION_MESSAGE.html @@ -0,0 +1,17 @@ +DEFAULT_EXCEPTION_MESSAGE | Jira.js - Jira Cloud API library +

                                  Variable DEFAULT_EXCEPTION_MESSAGEConst

                                  DEFAULT_EXCEPTION_MESSAGE: "Something went wrong" = 'Something went wrong'

                                  Generated using TypeDoc v0.25.13
                                  + + +

                                  \ No newline at end of file diff --git a/variables/DEFAULT_EXCEPTION_STATUS.html b/variables/DEFAULT_EXCEPTION_STATUS.html new file mode 100644 index 000000000..57e748870 --- /dev/null +++ b/variables/DEFAULT_EXCEPTION_STATUS.html @@ -0,0 +1,17 @@ +DEFAULT_EXCEPTION_STATUS | Jira.js - Jira Cloud API library +

                                  Variable DEFAULT_EXCEPTION_STATUSConst

                                  DEFAULT_EXCEPTION_STATUS: 500 = 500

                                  Generated using TypeDoc v0.25.13
                                  + + +

                                  \ No newline at end of file diff --git a/variables/DEFAULT_EXCEPTION_STATUS_TEXT.html b/variables/DEFAULT_EXCEPTION_STATUS_TEXT.html new file mode 100644 index 000000000..bece7d9ae --- /dev/null +++ b/variables/DEFAULT_EXCEPTION_STATUS_TEXT.html @@ -0,0 +1,17 @@ +DEFAULT_EXCEPTION_STATUS_TEXT | Jira.js - Jira Cloud API library +

                                  Variable DEFAULT_EXCEPTION_STATUS_TEXTConst

                                  DEFAULT_EXCEPTION_STATUS_TEXT: "Internal server error" = 'Internal server error'

                                  Generated using TypeDoc v0.25.13
                                  + + +

                                  \ No newline at end of file