Skip to content

Commit

Permalink
fix(experimental-utils): add literal types to global option
Browse files Browse the repository at this point in the history
  • Loading branch information
dora1998 committed Jul 14, 2021
1 parent 75dcf69 commit ec0eaac
Showing 1 changed file with 9 additions and 1 deletion.
10 changes: 9 additions & 1 deletion packages/experimental-utils/src/ts-eslint/Linter.ts
Expand Up @@ -119,6 +119,14 @@ namespace Linter {
export type RuleEntry = RuleLevel | RuleLevelAndOptions;
export type RulesRecord = Partial<Record<string, RuleEntry>>;

export type GlobalVariableOption =
| 'readonly'
| 'writable'
| 'readable'
| 'writeable'
| 'off'
| boolean;

// https://github.com/eslint/eslint/blob/v6.8.0/conf/config-schema.js
interface BaseConfig {
$schema?: string;
Expand All @@ -133,7 +141,7 @@ namespace Linter {
/**
* The global variable settings.
*/
globals?: { [name: string]: boolean };
globals?: { [name: string]: GlobalVariableOption };
/**
* The flag that disables directive comments.
*/
Expand Down

0 comments on commit ec0eaac

Please sign in to comment.