Skip to content
This repository was archived by the owner on Mar 7, 2025. It is now read-only.

Commit 70bd54a

Browse files
author
Christopher Quadflieg
committed
Don't use types from other dependencies
1 parent 92c78c4 commit 70bd54a

File tree

1 file changed

+21
-3
lines changed

1 file changed

+21
-3
lines changed

src/parser-options.d.ts

Lines changed: 21 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
1-
import type { Linter } from 'eslint';
21
import type { LiteralUnion } from './utility-types';
32

3+
// Some types copied from `@types/eslint` `Linter.ParserOptions`
4+
45
/**
56
* Any valid ECMAScript version number or 'latest':
67
*
@@ -10,12 +11,29 @@ import type { LiteralUnion } from './utility-types';
1011
*
1112
* @see https://github.com/typescript-eslint/typescript-eslint/tree/master/packages/parser#parseroptionsecmaversion
1213
*/
13-
export type EcmaVersion = NonNullable<Linter.ParserOptions['ecmaVersion']>;
14+
export type EcmaVersion =
15+
| 3
16+
| 5
17+
| 6
18+
| 7
19+
| 8
20+
| 9
21+
| 10
22+
| 11
23+
| 12
24+
| 2015
25+
| 2016
26+
| 2017
27+
| 2018
28+
| 2019
29+
| 2020
30+
| 2021
31+
| 'latest';
1432

1533
/**
1634
* Set to "script" (default) or "module" if your code is in ECMAScript modules.
1735
*/
18-
export type SourceType = NonNullable<Linter.ParserOptions['sourceType']>;
36+
export type SourceType = 'script' | 'module';
1937

2038
/**
2139
* An object indicating which additional language features you'd like to use.

0 commit comments

Comments
 (0)