From ff388a3fa3ccf4bbc5d22bcfed9cfea10aa278aa Mon Sep 17 00:00:00 2001 From: Arthur Denner Date: Tue, 4 Feb 2020 18:45:00 +0100 Subject: [PATCH] feat(eslint): add errorOnUnmatchedPattern to CLIEngine Options (#41889) * feat(eslint): add errorOnUnmatchedPattern to CLIEngine Options * test(eslint): add test for errorOnUnmatchedPattern option on CLIEngine for ts3.1 --- types/eslint/eslint-tests.ts | 1 + types/eslint/index.d.ts | 1 + types/eslint/ts3.1/eslint-tests.ts | 1 + types/eslint/ts3.1/index.d.ts | 1 + 4 files changed, 4 insertions(+) diff --git a/types/eslint/eslint-tests.ts b/types/eslint/eslint-tests.ts index c85f44bc3a..283f67103a 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 f7acd9f797..f19ae6aa93 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/eslint-tests.ts b/types/eslint/ts3.1/eslint-tests.ts index 1e9a6a03aa..a283eca1af 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/']); diff --git a/types/eslint/ts3.1/index.d.ts b/types/eslint/ts3.1/index.d.ts index 1fdc7632ea..ab598f8886 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[];