From 55dd9e76e2617448f1928fd748c6790d195f2649 Mon Sep 17 00:00:00 2001 From: Clark Du Date: Wed, 21 Mar 2018 09:52:08 +0800 Subject: [PATCH] refactor: enable lint in storybook --- .eslintignore | 1 + examples/storybook/.storybook/webpack.config.js | 11 +++++------ 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/.eslintignore b/.eslintignore index 75a030c95e..5a2a00d1ee 100644 --- a/.eslintignore +++ b/.eslintignore @@ -3,3 +3,4 @@ node_modules dist .nuxt examples/coffeescript/pages/index.vue +!examples/storybook/.storybook diff --git a/examples/storybook/.storybook/webpack.config.js b/examples/storybook/.storybook/webpack.config.js index 47c6ed8720..c1fcd43e39 100644 --- a/examples/storybook/.storybook/webpack.config.js +++ b/examples/storybook/.storybook/webpack.config.js @@ -1,14 +1,13 @@ -const webpack = require('webpack') const path = require('path') -const nxtConf = require('../nuxt.config') +const nuxtConf = require('../nuxt.config') module.exports = (sBaseConfig, configType, defaultConfig) => { - const srcDir = `../${nxtConf.srcDir||''}` - const rootDir = `../${nxtConf.rootDir||''}` + const srcDir = `../${nuxtConf.srcDir || ''}` + const rootDir = `../${nuxtConf.rootDir || ''}` Object.assign(defaultConfig.resolve.alias, { - '~~': path.resolve(__dirname, rootDir), - '~': path.resolve(__dirname, srcDir) + '~~': path.resolve(__dirname, rootDir), + '~': path.resolve(__dirname, srcDir) }) return defaultConfig