Skip to content

Commit

Permalink
fix(experimental-utils): Treat RuleTester arrays as readonly
Browse files Browse the repository at this point in the history
  • Loading branch information
danielnixon committed Sep 25, 2020
1 parent 39c45f3 commit d9bfd64
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions packages/experimental-utils/src/ts-eslint/RuleTester.ts
Expand Up @@ -64,7 +64,7 @@ interface InvalidTestCase<
/**
* Expected errors.
*/
readonly errors: TestCaseError<TMessageIds>[];
readonly errors: readonly TestCaseError<TMessageIds>[];
/**
* The expected code after autofixes are applied. If set to `null`, the test runner will assert that no autofix is suggested.
*/
Expand Down Expand Up @@ -114,8 +114,8 @@ interface RunTests<
TOptions extends Readonly<unknown[]>
> {
// RuleTester.run also accepts strings for valid cases
readonly valid: (ValidTestCase<TOptions> | string)[];
readonly invalid: InvalidTestCase<TMessageIds, TOptions>[];
readonly valid: readonly (ValidTestCase<TOptions> | string)[];
readonly invalid: readonly InvalidTestCase<TMessageIds, TOptions>[];
}
interface RuleTesterConfig {
// should be require.resolve(parserPackageName)
Expand Down

0 comments on commit d9bfd64

Please sign in to comment.