Closed moso closed 4 years ago
Doesn't work for me, it just generates a lot of errors.
I suppose this happens because this module try validate node_modules
content.
UPDATE: files
options support array of strings. This helps when srcDir is .
export default {
eslint: {
files: ['.', '!node_modules']
}
}
@zoxon eslint still not working
@starzou any details?
Same here, updating "@nuxtjs/eslint-module": "^2.0.0",
to "@nuxtjs/eslint-module": "^3.0.0",
blows up everything and causes hundreds of errors
Doesn't work for me, it just generates a lot of errors. I suppose this happens because this module try validate
node_modules
content.Errors UPDATE:
files
options support array of strings. This helps when srcDir is.
export default { eslint: { files: ['.', '!node_modules'] } }
This fixed it for me.
@zoxon Hello
Run the command in the terminal
> eslint --ext .vue,.js --ignore-path .gitignore .
/Users/test-user/the-nuxt-app/components/c-logo.vue
3:7 error Delete `⏎·····` prettier/prettier
5:11 error Replace `⏎········class="img"·` with `·class="img"` prettier/prettier
✖ 2 problems (2 errors, 0 warnings)
2 errors and 0 warnings potentially fixable with the `--fix` option.
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! the-nuxt-app@1.0.0 eslint: `eslint --ext .vue,.js --ignore-path .gitignore .`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the the-nuxt-app@1.0.0 eslint script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.
Run with nuxt: No error output
> the-nuxt-app@1.0.0 dev /Users/test-user/the-nuxt-app
> nuxt
╭───────────────────────────────────────╮
│ │
│ Nuxt.js @ v2.14.7 │
│ │
│ ▸ Environment: development │
│ ▸ Rendering: client-side │
│ ▸ Target: server │
│ │
│ Listening: http://localhost:3000/ │
│ │
╰───────────────────────────────────────╯
ℹ Preparing project for development 11:55:23
ℹ Initial build may take a while 11:55:23
✔ Builder initialized 11:55:23
✔ Nuxt files generated 11:55:23
✔ Client
Compiled successfully in 2.70s
ℹ Waiting for file changes 11:55:27
ℹ Memory usage: 240 MB (RSS: 327 MB) 11:55:27
ℹ Listening on: http://localhost:3000/ 11:55:27
↻ Updated components/c-logo.vue 11:55:38
✔ Client
Compiled successfully in 957.65ms
↻ Updated components/c-logo.vue 12:05:23
✔ Client
Compiled successfully in 115.19ms
↻ Updated components/c-logo.vue 12:05:26
✔ Client
Compiled successfully in 84.04ms
nuxt.config.js
module.exports = {
// Modules for dev and build (recommended) (https://go.nuxtjs.dev/config-modules)
buildModules: [
// https://github.com/nuxt-community/style-resources-module
'@nuxtjs/style-resources',
// https://go.nuxtjs.dev/eslint
'@nuxtjs/eslint-module',
// https://go.nuxtjs.dev/stylelint
'@nuxtjs/stylelint-module',
],
styleResources: {
scss: ['~assets/scss/variables.scss'],
},
eslint: {
files: ['.', '!node_modules'],
},
stylelint: {
fix: true,
lintDirtyModulesOnly: true,
},
};
@starzou You right this module do not work's properly and don't lint any files. Looks like a bug in eslint-webpack-plugin
Problem on https://github.com/webpack-contrib/eslint-webpack-plugin I'm solving now
Fixed on v3.0.1
Thank you very much
I recently upgraded devDepencencies in a project, and discovered the following issue when running
yarn dev
:As I narrowed it down, I came to the conclusion that this error only happens when this package is installed in version 3.0.0.
As this was an upgrade, I have no idea whether or not this exists in a new project. But I've upgraded all other packages used in the project. If I need extra/new packages of other packages, I assue the
yarn install
warning messages would tell me.