Questions tagged [eslint-loader]

10 questions
46
votes
2 answers

Failed to load plugin @typescript-eslint: Cannot find module 'eslint-plugin-@typescript-eslint'

I am reconfiguring my project from tslint to eslint. I can run eslint manually, but webpack fails to run with this error message: Module build failed (from /path/node_modules/eslint-loader/index.js): Error: Failed to load plugin @typescript-eslint:…
Thilak Rao
  • 1,841
  • 2
  • 19
  • 26
5
votes
1 answer

Module build failed (from ./node_modules/eslint-loader/index.js): Error: Cannot find module 'eslint/lib/formatters/stylish'

npm run serve was working fine, suddenly it started giving the same error. I am not able to understand the root cause of it and why it isn't working. Can anyone suggest how to resolve this issue? "devDependencies": { "@vue/cli-plugin-babel":…
Sameer
  • 91
  • 1
  • 4
  • 9
2
votes
0 answers

run eslint in a separate process in webpack

I'm using eslint and eslint-loader with webpack. My eslint has so many rules that its execution takes up to 50% of the whole build time. I wonder if there's a way to run eslint in a separate process like similar to ForkTsCheckerWebpackPlugin. I…
deathangel908
  • 8,601
  • 8
  • 47
  • 81
1
vote
1 answer

How can I debug eslint rules?

I wanted to debug eslint rules for performance optimization. Is there any way I can debug it using browser/command-line/tool?
1
vote
1 answer

eslint-loader failOnError option doesn't work with ts-loader and webpack-dev-server

Abstract To compile TypeScript with webpack, I use ts-loader. When using webpack-dev-server, the error message may be displayed incorrectly. Repository: https://github.com/pvcresin/eslint-ts-loader-error. Problems eslint-loader does not stop…
1
vote
1 answer

ESLint: set custom formatter in .eslintrc.js

I am using create-react-app with craco (Create-React-App-Configuration-Override) Craco is not very exotic. It simply allows me to use my own eslintrc file with create-react-app. I am trying to use a custom eslint formatter, specifically…
Devin Rhode
  • 23,026
  • 8
  • 58
  • 72
1
vote
1 answer

eslint on dynamically changing file list

I'd like to run eslint on modified files only. I've created a new run target in package.json to run eslint from command line (git diff --name-only --relative | grep -E '.*\\.(vue|js)$' | xargs eslint --ext .js,.vue). In theory, this should work…
orange
  • 7,755
  • 14
  • 75
  • 139
0
votes
1 answer

Apply eslint-loader options in Vue-cli project so eslint configuration is respected

My Vue-Cli project is based on the Vuexy template (not open source). The problem I'm experiencing is eslint rules that I have disabled are breaking the build. When I first run vue-cli-service serve, it builds and runs fine. Any change to source…
Steve Bennett
  • 114,604
  • 39
  • 168
  • 219
0
votes
1 answer

Webpack eslint-loader ignore .eslintrc parser

I'm having an issue with webpack, specifically eslint-loader. I have a JS file, with code like: class Test { MyProp = "MyValue" } export default Test; Initially, when I called npx eslint ., I got: D:\repro\src\main\js\index.js 3:12 error…
0
votes
1 answer

Enable --color for eslint-loader

How can i enable color for eslint-loader's console output? When i run eslint --color --quiet --cache --format=node_modules/eslint-formatter-pretty . for example, the output will be colored with nice white/yellow/red/green colors. I am trying to find…
Neta Meta
  • 4,001
  • 9
  • 42
  • 67