diff --git a/template/build/webpack.base.conf.js b/template/build/webpack.base.conf.js index 1f6057d611..16e6c0ca63 100644 --- a/template/build/webpack.base.conf.js +++ b/template/build/webpack.base.conf.js @@ -8,7 +8,7 @@ function resolve (dir) { return path.join(__dirname, '..', dir) } -const createLintingRule = () => ({ +{{#lint}}const createLintingRule = () => ({ test: /\.(js|vue)$/, loader: 'eslint-loader', enforce: 'pre', @@ -17,7 +17,7 @@ const createLintingRule = () => ({ formatter: require('eslint-friendly-formatter'), emitWarning: !config.dev.showEslintErrorsInOverlay } -}) +}){{/lint}} module.exports = { context: path.resolve(__dirname, '../'), diff --git a/template/config/index.js b/template/config/index.js index 05c69c1620..2fc8572769 100644 --- a/template/config/index.js +++ b/template/config/index.js @@ -20,13 +20,14 @@ module.exports = { notifyOnErrors: true, poll: false, // https://webpack.js.org/configuration/dev-server/#devserver-watchoptions- - // Use Eslint Loader? + {{#lint}}// Use Eslint Loader? // If true, your code will be linted during bundling and // linting errors and warnings will be shown in the console. useEslint: true, // If true, eslint errors and warnings will also be shown in the error overlay // in the browser. showEslintErrorsInOverlay: false, + {{/lint}} /** * Source Maps