From 88892ae5ef4221020c887ea67ffbc92bd379f85f Mon Sep 17 00:00:00 2001 From: Arthur Denner Date: Mon, 27 Jan 2020 17:22:13 +0100 Subject: [PATCH 1/2] feat(eslint): add errorOnUnmatchedPattern to CLIEngine Options --- types/eslint/eslint-tests.ts | 1 + types/eslint/index.d.ts | 1 + types/eslint/ts3.1/index.d.ts | 1 + 3 files changed, 3 insertions(+) diff --git a/types/eslint/eslint-tests.ts b/types/eslint/eslint-tests.ts index c85f44bc3aacbc..283f67103ad91a 100644 --- a/types/eslint/eslint-tests.ts +++ b/types/eslint/eslint-tests.ts @@ -507,6 +507,7 @@ cli = new CLIEngine({ resolvePluginsRelativeTo: 'test' }); cli = new CLIEngine({ rules: { 'test/example-rule': 1 } }); cli = new CLIEngine({ rulePaths: ['foo'] }); cli = new CLIEngine({ reportUnusedDisableDirectives: true }); +cli = new CLIEngine({ errorOnUnmatchedPattern: false }); let cliReport = cli.executeOnFiles(['myfile.js', 'lib/']); diff --git a/types/eslint/index.d.ts b/types/eslint/index.d.ts index f7acd9f797a22c..f19ae6aa938d2a 100644 --- a/types/eslint/index.d.ts +++ b/types/eslint/index.d.ts @@ -509,6 +509,7 @@ export namespace CLIEngine { configFile?: string; cwd?: string; envs?: string[]; + errorOnUnmatchedPattern?: boolean; extensions?: string[]; fix?: boolean; globals?: string[]; diff --git a/types/eslint/ts3.1/index.d.ts b/types/eslint/ts3.1/index.d.ts index 1fdc7632ea22bd..ab598f8886b931 100644 --- a/types/eslint/ts3.1/index.d.ts +++ b/types/eslint/ts3.1/index.d.ts @@ -505,6 +505,7 @@ export namespace CLIEngine { configFile?: string; cwd?: string; envs?: string[]; + errorOnUnmatchedPattern?: boolean; extensions?: string[]; fix?: boolean; globals?: string[]; From 0fde079069a72cb1fa4e83b977540e189e4f1702 Mon Sep 17 00:00:00 2001 From: Arthur Denner Date: Tue, 4 Feb 2020 18:16:36 +0100 Subject: [PATCH 2/2] test(eslint): add test for errorOnUnmatchedPattern option on CLIEngine for ts3.1 --- types/eslint/ts3.1/eslint-tests.ts | 1 + 1 file changed, 1 insertion(+) diff --git a/types/eslint/ts3.1/eslint-tests.ts b/types/eslint/ts3.1/eslint-tests.ts index 1e9a6a03aab345..a283eca1af34ab 100644 --- a/types/eslint/ts3.1/eslint-tests.ts +++ b/types/eslint/ts3.1/eslint-tests.ts @@ -507,6 +507,7 @@ cli = new CLIEngine({ plugins: ['foo'] }); cli = new CLIEngine({ rules: { 'test/example-rule': 1 } }); cli = new CLIEngine({ rulePaths: ['foo'] }); cli = new CLIEngine({ reportUnusedDisableDirectives: true }); +cli = new CLIEngine({ errorOnUnmatchedPattern: false }); let cliReport = cli.executeOnFiles(['myfile.js', 'lib/']);