Skip to content

Commit 820965c

Browse files
authored
feat(experimental-utils): add literal types to global option (typescript-eslint#3634)
1 parent fa35e22 commit 820965c

File tree

1 file changed

+3
-1
lines changed
  • packages/experimental-utils/src/ts-eslint

1 file changed

+3
-1
lines changed

packages/experimental-utils/src/ts-eslint/Linter.ts

+3-1
Original file line numberDiff line numberDiff line change
@@ -119,6 +119,8 @@ namespace Linter {
119119
export type RuleEntry = RuleLevel | RuleLevelAndOptions;
120120
export type RulesRecord = Partial<Record<string, RuleEntry>>;
121121

122+
export type GlobalVariableOption = 'readonly' | 'writable' | 'off' | boolean;
123+
122124
// https://github.com/eslint/eslint/blob/v6.8.0/conf/config-schema.js
123125
interface BaseConfig {
124126
$schema?: string;
@@ -133,7 +135,7 @@ namespace Linter {
133135
/**
134136
* The global variable settings.
135137
*/
136-
globals?: { [name: string]: boolean };
138+
globals?: { [name: string]: GlobalVariableOption };
137139
/**
138140
* The flag that disables directive comments.
139141
*/

0 commit comments

Comments
 (0)