3.0.1
Node 10.9.0 / yarn 1.9.4 / MacOS 10.13.6
yarn add @vue/cli-plugin-typescript
vue-cli-service lint --format junit --out tslint.xml
Save tslint's output in file using '--out' option.
'tslint.xml' file does not produce.
'--out' option supported in existing tslint(https://palantir.github.io/tslint/usage/cli/) does not work with tslint in @vue/cli-plugin-typescript.
Is the cli lint command even running tslint? Or is it running eslint? I get no errors when running vue-cli-service lint but plenty of tslint errors when running vue-cli-service serve?
Is the cli lint command even running tslint? Or is it running eslint?
If you have installed the eslint plugin as well, lint will use eslint. If you haven't, it will use tslint:
https://github.com/vuejs/vue-cli/blob/dev/packages/%40vue/cli-plugin-typescript/index.js#L81-L93
This behaviour isn't really what the README says:
If opted to use TSLint during project creation,
vue-cli-service lint willbe injected.
I get no errors when running vue-cli-service lint but plenty of tslint errors when running vue-cli-service serve?
tslint is used by the fork-ts-checker plugin if lintOnServe: true is set in the config and a tslint.json is found.
https://github.com/vuejs/vue-cli/blob/dev/packages/%40vue/cli-plugin-typescript/index.js#L73
I think we really need to better document this behaviour, but it's unrelated to the current issue.
Please consider opening a separate issue to track improvment of docs for this.
Happy to make a new issue, but where I was going with my question, is like the original issue, I was hoping to be able to provide command line arguments to the lint command, specifically, to change the formatter to the verbose version, because otherwise I can't see which rules to modify in order to customize the tslinting. Is that possible? Or is there a better way?
Well then it's two things:
lint command, uninstall the eslint plugin2. If you have additional requests for tslint options, we can consider extending this issue to mean: forward all additional args to tslint.
This would be very helpful :)
Now that TSLint is officially deprecated, TSLint support will be fully dropped in the next major version; as for the current major version, no more bug fixes or features will be implemented except for security reasons. So I'm closing this issue now.
Any idea why --out is ignored by the vue cli?
vue-cli-service lint --max-warnings 0 --no-fix --format junit --out lint-junit.xml
The following should produce the results in lint-junit.xml but writes to stdout instead.
Also the options -o or --output-file for the ESLint plugin are ignored and output is on stdout instead of to the file.
Most helpful comment
Is the cli lint command even running tslint? Or is it running eslint? I get no errors when running
vue-cli-service lintbut plenty of tslint errors when runningvue-cli-service serve?