Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat!: use eslint-webpack-plugin #40

Merged
merged 2 commits into from
Oct 7, 2020
Merged

feat!: use eslint-webpack-plugin #40

merged 2 commits into from
Oct 7, 2020

Conversation

ricardogobbosouza
Copy link
Collaborator

@ricardogobbosouza ricardogobbosouza commented Sep 29, 2020

Resolve #38

BREAKING CHANGE:

  • Enabled cache by default
  • Enabled lintDirtyModulesOnly by default
  • Use eslint-webpack-plugin instead of eslint-loader deprecated.

BREAKING CHANGE: Use `eslint-webpack-plugin` instead of `eslint-loader` deprecated.
@ricardogobbosouza ricardogobbosouza changed the title perf: cache enabled by default [v3] perf: cache enabled by default Sep 29, 2020
@codecov
Copy link

codecov bot commented Sep 29, 2020

Codecov Report

Merging #40 into master will not change coverage.
The diff coverage is 100.00%.

Impacted file tree graph

@@            Coverage Diff            @@
##            master       #40   +/-   ##
=========================================
  Coverage   100.00%   100.00%           
=========================================
  Files            3         3           
  Lines           21        22    +1     
  Branches         2         2           
=========================================
+ Hits            21        22    +1     
Impacted Files Coverage Δ
lib/module.js 100.00% <100.00%> (ø)

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 8e64f1d...5b5e6f5. Read the comment docs.

@ricardogobbosouza ricardogobbosouza changed the title [v3] perf: cache enabled by default [v3] perf: cache enabled by default Sep 29, 2020
README.md Outdated Show resolved Hide resolved
README.md Outdated Show resolved Hide resolved
README.md Outdated Show resolved Hide resolved
README.md Outdated Show resolved Hide resolved
README.md Outdated Show resolved Hide resolved
README.md Outdated Show resolved Hide resolved
README.md Outdated Show resolved Hide resolved
README.md Outdated Show resolved Hide resolved
@pi0 pi0 changed the title [v3] perf: cache enabled by default feat!: use eslint-webpack-plugin Oct 6, 2020
@ricardogobbosouza ricardogobbosouza merged commit 3a21afd into master Oct 7, 2020
@zoxon
Copy link

zoxon commented Nov 12, 2020

Do you test it before merging? Looks like module completely broken

@rlam3
Copy link
Contributor

rlam3 commented Nov 26, 2020

Do you test it before merging? Looks like module completely broken

mines breaking too... idk where the upgrade guide is for this module... have you found a resolution or a work around?

@toddheslin
Copy link

Looks to be a problem with the cache. If pass:

eslint: {
    cache: false,
  },

In my nuxt.config.js then it won't generate the .eslintcache file which seems to be causing the trouble.

I like the idea of the cache but something has gone wrong through the upgrade.

@rlam3
Copy link
Contributor

rlam3 commented Dec 3, 2020

@zoxon @toddheslin I did a quick doc for this upgrade. I believe upgrading from v2 to v3 was causing the problem.
IDK if you are facing the same problem I was. But I got it to work after configuring the nuxt.config.js with eslint-webpack-plugin. It certainly was lacking in documentation.

https://aznric3boi91.medium.com/update-your-nuxtjs-eslint-module-from-v2-to-v3-20b5f0bcdb68

I also created a PR to update the docs as well. nuxt/website-v2#1057

@toddheslin
Copy link

Awesome @rlam3 thanks for the article. Just a note for your 'after': you already destructured isDev and isClient so it should be (without ctx):

export default {
	// Run ESLint on save
  build: {
    extend(config, { isDev, isClient }) {
      if (isDev && 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
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[v3] Use eslint-webpack-plugin
6 participants