eslint process returning incorrect exit/error codes
See original GitHub issueVersion
3.4.1
Reproduction link
https://github.com/ffxsam/repro-errors-passing-build
Environment info
System:
OS: macOS 10.14.3
CPU: (12) x64 Intel(R) Core(TM) i7-8700B CPU @ 3.20GHz
Binaries:
Node: 10.15.0 - ~/.nvm/versions/node/v10.15.0/bin/node
Yarn: 1.13.0 - /usr/local/bin/yarn
npm: 6.8.0 - ~/.nvm/versions/node/v10.15.0/bin/npm
Browsers:
Chrome: 72.0.3626.119
Firefox: 65.0.1
Safari: 12.0.3
npmPackages:
@vue/babel-helper-vue-jsx-merge-props: 1.0.0-beta.2
@vue/babel-plugin-transform-vue-jsx: 1.0.0-beta.2
@vue/babel-preset-app: 3.4.1
@vue/babel-preset-jsx: 1.0.0-beta.2
@vue/babel-sugar-functional-vue: 1.0.0-beta.2
@vue/babel-sugar-inject-h: 1.0.0-beta.2
@vue/babel-sugar-v-model: 1.0.0-beta.2
@vue/babel-sugar-v-on: 1.0.0-beta.2
@vue/cli-overlay: 3.4.1
@vue/cli-plugin-babel: ^3.4.0 => 3.4.1
@vue/cli-plugin-eslint: ^3.4.0 => 3.4.1
@vue/cli-service: ^3.4.0 => 3.4.1
@vue/cli-shared-utils: 3.4.1
@vue/component-compiler-utils: 2.6.0
@vue/preload-webpack-plugin: 1.1.0
@vue/web-component-wrapper: 1.2.0
eslint-plugin-vue: ^5.2.2 => 5.2.2
vue: ^2.6.6 => 2.6.8
vue-eslint-parser: 5.0.0
vue-hot-reload-api: 2.3.3
vue-loader: 15.7.0
vue-style-loader: 4.1.2
vue-template-compiler: ^2.5.21 => 2.6.8
vue-template-es2015-compiler: 1.9.1
npmGlobalPackages:
@vue/cli: 3.4.1
Steps to reproduce
- yarn
- yarn build
What is expected?
I expect an error return code (so the CI build would fail)
What is actually happening?
Return code 0 (success) is returned, so app deploys
Issue Analytics
- State:
- Created 5 years ago
- Reactions:1
- Comments:16 (15 by maintainers)
Top Results From Across the Web
no-process-exit - ESLint - Pluggable JavaScript Linter
As such, it warns whenever process.exit() is found in code. Examples of incorrect code for this rule: /*eslint no-process-exit: "error"*/ process.exit(1); ...
Read more >How to Configure and Fix Files Gulp ESLint? - eduCBA
As per our covalence, we can set the code 0 for rule off, 1 for rule on, and 2 for rule on but...
Read more >sitemap-questions-31.xml - Stack Overflow
... /java-io-ioexception-server-returned-http-response-code-500 2022-04-25 ... /i-want-to-test-a-private-method-is-there-something-wrong-with-my-design ...
Read more >Introduction to Python
We will use operators and functions to compute numbers, process text, ... and hit [Return] exit('error: input required') # string argument passed to...
Read more >solid-ink - npm
Solid JS for CLI. Latest version: 0.0.6, last published: 9 months ago. Start using solid-ink in your project by running `npm i solid-ink`....
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
To avoid breaking changes I think it’s better to adjust it to the following:
"default"
: emit warnings and warnings and errors as errors (what @ffxsam wants)"warnings"
: emit everything as warnings (avoid errors to pop up in overlay during development)"errors"
: emit everything as errorstrue
: same as"warnings"
(also same as current behavior so it doesn’t have to be breaking, can be deprecated in next major)The implementation has a few pounds of historic baggage from the old days of the webpack template, and some issues in making both eslint-loader and friendly-errors-webpack-plugin play nice together.
Additionally, the default of not emitting any errors was chosen so the linting errors doesn’t halt HMR updates during development (See: https://github.com/webpack-contrib/eslint-loader#emitwarning-default-false)
But I think we could try and improve the behaviour for production builds.