From 84972540b0f2a05975c68184c5701c4e9c97522e Mon Sep 17 00:00:00 2001 From: Patrik Oldsberg Date: Wed, 10 Mar 2021 16:04:01 +0100 Subject: [PATCH] cli: lint storybook file dependencies as if they were tests Co-authored-by: Juan Lulkin Signed-off-by: Patrik Oldsberg --- .changeset/khaki-avocados-remain.md | 5 +++++ packages/cli/config/eslint.js | 2 +- 2 files changed, 6 insertions(+), 1 deletion(-) create mode 100644 .changeset/khaki-avocados-remain.md diff --git a/.changeset/khaki-avocados-remain.md b/.changeset/khaki-avocados-remain.md new file mode 100644 index 0000000000000..b4d8f7a9254e1 --- /dev/null +++ b/.changeset/khaki-avocados-remain.md @@ -0,0 +1,5 @@ +--- +'@backstage/cli': patch +--- + +Lint storybook files, i.e. `*.stories.*`, as if they were tests. diff --git a/packages/cli/config/eslint.js b/packages/cli/config/eslint.js index 37bd7bed94021..fe45f264b5767 100644 --- a/packages/cli/config/eslint.js +++ b/packages/cli/config/eslint.js @@ -100,7 +100,7 @@ module.exports = { }, }, { - files: ['*.test.*', 'src/setupTests.*', 'dev/**'], + files: ['*.test.*', '*.stories.*', 'src/setupTests.*', 'dev/**'], rules: { // Tests are allowed to import dev dependencies 'import/no-extraneous-dependencies': [