From d931a0ceb66239d7cbb0a77f613aa257c754f2f0 Mon Sep 17 00:00:00 2001 From: Saad Quadri Date: Tue, 24 Apr 2018 19:00:18 -0400 Subject: [PATCH] [eslint] CLIEngine ignorePattern can be a string or string[] (#25197) --- types/eslint/eslint-tests.ts | 1 + types/eslint/index.d.ts | 3 ++- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/types/eslint/eslint-tests.ts b/types/eslint/eslint-tests.ts index 376cdf0a92..a281991918 100644 --- a/types/eslint/eslint-tests.ts +++ b/types/eslint/eslint-tests.ts @@ -456,6 +456,7 @@ cli = new CLIEngine({ globals: ['foo'] }); cli = new CLIEngine({ ignore: true }); cli = new CLIEngine({ ignorePath: 'foo' }); cli = new CLIEngine({ ignorePattern: 'foo' }); +cli = new CLIEngine({ ignorePattern: ['foo', 'bar'] }); cli = new CLIEngine({ useEslintrc: false }); cli = new CLIEngine({ parserOptions: {} }); cli = new CLIEngine({ plugins: ['foo'] }); diff --git a/types/eslint/index.d.ts b/types/eslint/index.d.ts index 9e0e68af0b..76f04617d8 100644 --- a/types/eslint/index.d.ts +++ b/types/eslint/index.d.ts @@ -2,6 +2,7 @@ // Project: https://eslint.org // Definitions by: Pierre-Marie Dartus // Jed Fox +// Saad Quadri // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped // TypeScript Version: 2.2 @@ -491,7 +492,7 @@ export namespace CLIEngine { globals?: string[]; ignore?: boolean; ignorePath?: string; - ignorePattern?: string; + ignorePattern?: string | string[]; useEslintrc?: boolean; parser?: string; parserOptions?: Linter.ParserOptions;