Last active
December 3, 2020 04:41
-
-
Save rlam3/057536d826099905ad24fbb2ac1fe5bd to your computer and use it in GitHub Desktop.
Update your @nuxtjs/eslint-module from v2 to v3. nuxt.config.js
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Before | |
export default { | |
build: { | |
extend(config, { isDev, isClient }) { | |
if (isDev && isClient) { | |
config.module.rules.push({ | |
enforce: 'pre', | |
test: /\.(js|vue)$/, | |
loader: 'eslint-loader', | |
exclude: /(node_modules)/ | |
}) | |
} | |
} | |
} | |
} | |
// After | |
export default { | |
// Run ESLint on save | |
build: { | |
extend(config, { isDev, isClient }) { | |
if (ctx.isDev && ctx.isClient) { | |
const options = { | |
exclude: ['node_modules'] | |
} | |
const EslintPlugin = require('eslint-webpack-plugin') | |
config.plugins.push(new EslintPlugin(options)) | |
} | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment