From e3c213eccf934d487f38c2d106ea7f20cc5638c3 Mon Sep 17 00:00:00 2001 From: Axel Hecht Date: Wed, 6 Mar 2024 15:19:10 +0100 Subject: [PATCH] Add the deprecation plugin to the default linter setup, switched off. This allows to disable deprecation warnings for `backstage-cli repo list-deprecations` with inline comments. Signed-off-by: Axel Hecht --- .changeset/polite-toys-camp.md | 7 +++++++ packages/cli/config/eslint-factory.js | 3 ++- 2 files changed, 9 insertions(+), 1 deletion(-) create mode 100644 .changeset/polite-toys-camp.md diff --git a/.changeset/polite-toys-camp.md b/.changeset/polite-toys-camp.md new file mode 100644 index 0000000000..b77695f06b --- /dev/null +++ b/.changeset/polite-toys-camp.md @@ -0,0 +1,7 @@ +--- +'@backstage/cli': patch +--- + +Add the deprecation plugin to the default linter setup, switched off. + +This allows to disable deprecation warnings for `backstage-cli repo list-deprecations` with inline comments. diff --git a/packages/cli/config/eslint-factory.js b/packages/cli/config/eslint-factory.js index 3717943427..6bc200cade 100644 --- a/packages/cli/config/eslint-factory.js +++ b/packages/cli/config/eslint-factory.js @@ -66,7 +66,7 @@ function createConfig(dir, extraConfig = {}) { ...(extraExtends ?? []), ], parser: '@typescript-eslint/parser', - plugins: ['import', 'unused-imports', ...(plugins ?? [])], + plugins: ['import', 'unused-imports', 'deprecation', ...(plugins ?? [])], env: { jest: true, ...env, @@ -84,6 +84,7 @@ function createConfig(dir, extraConfig = {}) { ...(ignorePatterns ?? []), ], rules: { + 'deprecation/deprecation': 'off', 'no-shadow': 'off', 'no-redeclare': 'off', '@typescript-eslint/no-shadow': 'error',