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' ;
21import 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.
You can’t perform that action at this time.
0 commit comments