rsnext/packages/next/build/webpack/plugins/webpack-conformance-plugin/TestInterface.ts
Tim Neutkens cf4ba8d705
Upgrade eslint to the latest version (#24377)
## Bug

- [ ] Related issues linked using `fixes #number`
- [ ] Integration tests added

## Feature

- [ ] Implements an existing feature request or RFC. Make sure the feature request has been accepted for implementation before opening a PR.
- [ ] Related issues linked using `fixes #number`
- [ ] Integration tests added
- [ ] Documentation added
- [ ] Telemetry added. In case of a feature if it's used or not.

## Documentation / Examples

- [ ] Make sure the linting passes
2021-04-25 18:34:36 +00:00

39 lines
948 B
TypeScript

// eslint-disable-next-line import/no-extraneous-dependencies
import { NodePath } from 'ast-types/lib/node-path'
export interface IConformanceAnomaly {
message: string
stack_trace?: string
}
// eslint typescript has a bug with TS enums
/* eslint-disable no-shadow */
export enum IConformanceTestStatus {
SUCCESS,
FAILED,
}
export interface IConformanceTestResult {
result: IConformanceTestStatus
warnings?: Array<IConformanceAnomaly>
errors?: Array<IConformanceAnomaly>
}
export interface IParsedModuleDetails {
request: string
}
export type NodeInspector = (
node: NodePath,
details: IParsedModuleDetails
) => IConformanceTestResult
export interface IGetAstNodeResult {
visitor: string
inspectNode: NodeInspector
}
export interface IWebpackConformanceTest {
buildStared?: (options: any) => IConformanceTestResult
getAstNode?: () => IGetAstNodeResult[]
buildCompleted?: (assets: any) => IConformanceTestResult
}