Skip to content

ESLint --output-file option not supported in @vue/cli-plugin-eslint #4849

Closed
@ataylorme

Description

@ataylorme

Version

4.0.5

Reproduction link

https://github.com/ataylorme/vue-cli-lint-output-file-issue

Environment info

System:
    OS: macOS Mojave 10.14.6
    CPU: (8) x64 Intel(R) Core(TM) i5-8279U CPU @ 2.40GHz
  Binaries:
    Node: 12.13.0 - /usr/local/bin/node
    Yarn: Not Found
    npm: 6.13.0 - /usr/local/bin/npm
  Browsers:
    Chrome: 78.0.3904.97
    Firefox: Not Found
    Safari: 13.0.3
  npmPackages:
    @vue/babel-helper-vue-jsx-merge-props:  1.0.0
    @vue/babel-plugin-transform-vue-jsx:  1.1.2
    @vue/babel-preset-app:  4.0.5
    @vue/babel-preset-jsx:  1.1.2
    @vue/babel-sugar-functional-vue:  1.1.2
    @vue/babel-sugar-inject-h:  1.1.2
    @vue/babel-sugar-v-model:  1.1.2
    @vue/babel-sugar-v-on:  1.1.2
    @vue/cli-overlay:  4.0.5
    @vue/cli-plugin-babel: ^4.0.0 => 4.0.5
    @vue/cli-plugin-eslint: ^4.0.0 => 4.0.5
    @vue/cli-plugin-router:  4.0.5
    @vue/cli-plugin-vuex:  4.0.5
    @vue/cli-service: ^4.0.0 => 4.0.5
    @vue/cli-shared-utils:  4.0.5
    @vue/component-compiler-utils:  3.0.2
    @vue/preload-webpack-plugin:  1.1.1
    @vue/web-component-wrapper:  1.2.0
    eslint-plugin-vue: ^5.0.0 => 5.2.3
    vue: ^2.6.10 => 2.6.10
    vue-eslint-parser:  5.0.0
    vue-hot-reload-api:  2.3.4
    vue-loader:  15.7.2
    vue-style-loader:  4.1.2
    vue-template-compiler: ^2.6.10 => 2.6.10
    vue-template-es2015-compiler:  1.9.1
  npmGlobalPackages:
    @vue/cli: 4.0.5

Steps to reproduce

Clone the ataylorme/vue-cli-lint-output-file-issue repository
Run npm install to download dependencies
Run npm run lint, which is an npm script alias for vue-cli-service lint --format json --output-file lint_results.json

What is expected?

The results of vue-cli-service lint are saved to the file lint_results.json in JSON format

What is actually happening?

The results of vue-cli-service lint are displayed as terminal output and the lint_results.json is not created


The Vue CLI ESLint plugin documentation says "Other ESLint CLI options are also supported."

--output-file is a valid ESLint CLI option.

My end goal is to save the Vue lint results in JSON format to a file, which can then be analyzed.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions