-
-
Notifications
You must be signed in to change notification settings - Fork 6.3k
@vue/cli-plugin-eslint - Other ESLint CLI options are *not* also supported. #4007
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
Comments
This is mostly a documentation issue. Since we don't run the eslint cli, but instead use its Node API, we indeed only support options that are not related to the eslint CLI output. So you can pass options like |
We can specify |
No, I'm not aware of a way to do that. |
@cjackson You can simply use stdout syntax like Maybe a feature request ? |
@DaedalusDev That's what I ended up doing using a bash script to clean up the output a bit. I'll make a feature request for this later today or tomorrow. |
This would be nice for collecting linting metadata in CI. |
I ran into this issue when I wanted to output the lint results to a file. Found out its not supported. Any advancements with respect to this? |
I'm also interested in this, I would love to push the ESLint report into SonarQube because the linting in SonarQube is not so configurable as ESLint is. As far as I understand now, it appears there's no work around yet? At least with the suggestions above I'm not able to get a usable file. I just browsed the code for the eslint plugin a bit. What is the general idea? Should all parameters be implemented one to one or is there just a selection of parameters that need to be implemented since there are currently only a couple? |
I would say that running eslint directly is a totally fine workaroud. Even though lint.js seems to do a lot of stuff, most of that is about either
The latter can be done quickly by adding your own globs when running eslint via cli. So in summary: The Given that, and given that there are eslint options that only work with eslint CLI, not with eslint CLIEngine, I don't think that it's worth re-creating these options in our codebase, as it doesn't take much to run eslint "manually" and use the options directly. I think it would make more sense to document how to run eslint manually (with which globs etc) to make it work exactly like |
Thanks @LinusBorg I fixed it this way // package.json
"lint": "npx eslint src test *.js" Then during CI: npm run lint -- --format junit -o /tmp/test-results/code-style-test-results.xml |
I thought the whole point of this plugin is that it makes ESLint work for .vue files? How is ESLint going to lint .vue files on it's own? |
Version
3.7.0
Environment info
Steps to reproduce
run
vue-cli-service lint
with extra options (ex:node ./node_modules/.bin/vue-cli-service lint -o report.json -f json
)What is expected?
Extra params would be proxied to eslint cli
What is actually happening?
No extra options are supported.
The text was updated successfully, but these errors were encountered: