Skip to content

Instantly share code, notes, and snippets.

@rlam3
Last active December 3, 2020 04:41
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save rlam3/057536d826099905ad24fbb2ac1fe5bd to your computer and use it in GitHub Desktop.
Save rlam3/057536d826099905ad24fbb2ac1fe5bd to your computer and use it in GitHub Desktop.
Update your @nuxtjs/eslint-module from v2 to v3. nuxt.config.js
// 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