From d93570a6195d2be5fe448bb0d33d4f64e839676e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bartek=20Iwa=C5=84czuk?= Date: Fri, 3 Sep 2021 17:01:58 +0200 Subject: feat(lint): add support for config file and CLI flags for rules (#11776) This commit adds support for following flags in deno lint subcommand: --config - allows to load configuration file and parses "lint" object --rules-tags= - allows specifying which set of tagged rules should be run --rules-include= - allow specifying which rules should be run --rules-exclude= - allow specifying which rules should not be run --- cli/tests/testdata/lint/Deno.malformed2.jsonc | 13 +++++++++++++ 1 file changed, 13 insertions(+) create mode 100644 cli/tests/testdata/lint/Deno.malformed2.jsonc (limited to 'cli/tests/testdata/lint/Deno.malformed2.jsonc') diff --git a/cli/tests/testdata/lint/Deno.malformed2.jsonc b/cli/tests/testdata/lint/Deno.malformed2.jsonc new file mode 100644 index 000000000..473dafc4b --- /dev/null +++ b/cli/tests/testdata/lint/Deno.malformed2.jsonc @@ -0,0 +1,13 @@ +{ + "lint": { + "files": { + "include": ["lint/lint_with_config/"], + "exclude": ["lint/lint_with_config/b.ts"], + "dont_know_this_field": {} + }, + "rules": { + "tags": ["recommended"], + "include": ["ban-untagged-todo"] + } + } +} -- cgit v1.2.3