From f36944a5a2644dd7212bd35f0085c9059a2462fb Mon Sep 17 00:00:00 2001 From: dora <31735614+dora1998@users.noreply.github.com> Date: Wed, 14 Jul 2021 17:25:19 +0900 Subject: [PATCH] fix(experimental-utils): add literal types to `global` option --- packages/experimental-utils/src/ts-eslint/Linter.ts | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/packages/experimental-utils/src/ts-eslint/Linter.ts b/packages/experimental-utils/src/ts-eslint/Linter.ts index 56476834cc03..77c338f5a753 100644 --- a/packages/experimental-utils/src/ts-eslint/Linter.ts +++ b/packages/experimental-utils/src/ts-eslint/Linter.ts @@ -119,6 +119,8 @@ namespace Linter { export type RuleEntry = RuleLevel | RuleLevelAndOptions; export type RulesRecord = Partial>; + export type GlobalVariableOption = 'readonly' | 'writable' | 'off' | boolean; + // https://github.com/eslint/eslint/blob/v6.8.0/conf/config-schema.js interface BaseConfig { $schema?: string; @@ -133,7 +135,7 @@ namespace Linter { /** * The global variable settings. */ - globals?: { [name: string]: boolean }; + globals?: { [name: string]: GlobalVariableOption }; /** * The flag that disables directive comments. */