diff --git a/.eslintrc.js b/.eslintrc.js index 7f66651011..18d1fb6447 100644 --- a/.eslintrc.js +++ b/.eslintrc.js @@ -53,6 +53,7 @@ module.exports = { "ignoreReadBeforeAssign": false }], + 'dot-notation': 2, // Do not allow console.logs etc... 'no-console': 2, 'space-before-function-paren': [2, { diff --git a/bin/common/utils.js b/bin/common/utils.js index da2fafb9f9..957e5f85be 100644 --- a/bin/common/utils.js +++ b/bin/common/utils.js @@ -41,7 +41,7 @@ exports.loadNuxtConfig = (argv) => { // Nuxt Mode options.mode = - (argv['spa'] && 'spa') || (argv['universal'] && 'universal') || options.mode + (argv.spa && 'spa') || (argv.universal && 'universal') || options.mode return options } diff --git a/bin/nuxt-generate b/bin/nuxt-generate index d32cc6df90..23aa9802c8 100755 --- a/bin/nuxt-generate +++ b/bin/nuxt-generate @@ -45,7 +45,7 @@ const generator = new Generator(nuxt, builder) const generateOptions = { init: true, - build: argv['build'] + build: argv.build } generator diff --git a/lib/common/options.js b/lib/common/options.js index e671e5f0cb..b647c7de9f 100644 --- a/lib/common/options.js +++ b/lib/common/options.js @@ -166,7 +166,7 @@ Options.from = function (_options) { } // Apply mode preset - const modePreset = modes[options.mode || 'universal'] || modes['universal'] + const modePreset = modes[options.mode || 'universal'] || modes.universal _.defaultsDeep(options, modePreset) // If no server-side rendering, add appear true transition