storybookjs/vue-cli-plugin-storybook

Prettier warnings in default installation with storybook@5.3.1

Closed this issue · 1 comments

Today I found this addon and made a fresh install using @vue/cli@4.x.
This is the preset I used:

{
      "useConfigFiles": true,
      "plugins": {
        "@vue/cli-plugin-babel": {},
        "@vue/cli-plugin-typescript": {
          "classComponent": false,
          "useTsWithBabel": true
        },
        "@vue/cli-plugin-eslint": {
          "config": "prettier",
          "lintOn": [ "save"]
        }
      },
      "cssPreprocessor": "dart-sass"
 }

I then run npm run storybook:serve which got me here (many more warnings, just an excerpt):

WARNING in ./config/storybook/generated-entry.js
Module Warning (from ./node_modules/eslint-loader/index.js):
warning: Replace `⏎··············import·{·configure·}·from·'@storybook/vue'` with `import·{·configure·}·from·"@storybook/vue"` (prettier/prettier) at config/storybook/generated-entry.js:1:1:
> 1 | 
    | ^
  2 |               import { configure } from '@storybook/vue';
  3 |               module._StorybookPreserveDecorators = true;
  4 | 

Not sure if the source of this evil is within this plugin. I just wanted to let you know.
I made those warnings go away by adding the following to my vue.config.js:

module.exports = {
  chainWebpack: config => {
    config.module
      .rule("eslint")
      .exclude.add(/generated-entry\.js/)
      .end();
  }
};

It seems the issue was resolved in 5.3.3