This repository was archived by the owner on Mar 7, 2025. It is now read-only.
File tree Expand file tree Collapse file tree 1 file changed +21
-3
lines changed Expand file tree Collapse file tree 1 file changed +21
-3
lines changed Original file line number Diff line number Diff line change 1
- import type { Linter } from 'eslint' ;
2
1
import type { LiteralUnion } from './utility-types' ;
3
2
3
+ // Some types copied from `@types/eslint` `Linter.ParserOptions`
4
+
4
5
/**
5
6
* Any valid ECMAScript version number or 'latest':
6
7
*
@@ -10,12 +11,29 @@ import type { LiteralUnion } from './utility-types';
10
11
*
11
12
* @see https://github.com/typescript-eslint/typescript-eslint/tree/master/packages/parser#parseroptionsecmaversion
12
13
*/
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' ;
14
32
15
33
/**
16
34
* Set to "script" (default) or "module" if your code is in ECMAScript modules.
17
35
*/
18
- export type SourceType = NonNullable < Linter . ParserOptions [ 'sourceType' ] > ;
36
+ export type SourceType = 'script' | 'module' ;
19
37
20
38
/**
21
39
* An object indicating which additional language features you'd like to use.
You can’t perform that action at this time.
0 commit comments