Skip to content
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

When a crash occurs, the error message is printed twice #8964

Closed
not-an-aardvark opened this issue Jul 18, 2017 · 2 comments
Closed

When a crash occurs, the error message is printed twice #8964

not-an-aardvark opened this issue Jul 18, 2017 · 2 comments
Assignees
Labels
accepted There is consensus among the team that this change meets the criteria for inclusion archived due to age This issue has been archived; please open a new issue for any further discussion bug ESLint is working incorrectly cli Relates to ESLint's command-line interface

Comments

@not-an-aardvark
Copy link
Member

Tell us about your environment

  • ESLint Version: 4.2.0
  • Node Version: 8.1.4
  • npm Version: 5.0.3

What parser (default, Babel-ESLint, etc.) are you using?

default

Please show your full configuration:

Configuration
rules:
  no-restricted-syntax: [error, 'Invalid selector [[[[']

What did you do? Please include the actual source code causing the issue.

a;

What did you expect to happen?

The configuration isn't valid (it includes an invalid selector), so I expected ESLint to output an error message.

What actually happened? Please include the actual, raw output from ESLint.

ESLint outputted the same error message twice, once with the stack trace and once without:

Output
Syntax error in selector "Invalid selector [[[[" at position 18: Expected " ", "." or [^ [\],():#!=><~+.] but "[" found.
Error: Syntax error in selector "Invalid selector [[[[" at position 18: Expected " ", "." or [^ [\],():#!=><~+.] but "[" found.
    at tryParseSelector (/path/to/node_modules/eslint/lib/util/node-event-generator.js:163:19)
    at lodash.memoize.rawSelector (/path/to/node_modules/eslint/lib/util/node-event-generator.js:175:28)
    at memoized (/path/to/node_modules/lodash/lodash.js:10566:27)
    at NodeEventGenerator.eventNames.forEach.rawSelector (/path/to/node_modules/eslint/lib/util/node-event-generator.js:235:30)
    at Array.forEach (native)
    at new NodeEventGenerator (/path/to/node_modules/eslint/lib/util/node-event-generator.js:234:20)
    at Linter.verify (/path/to/node_modules/eslint/lib/linter.js:909:34)
    at processText (/path/to/node_modules/eslint/lib/cli-engine.js:203:31)
    at processFile (/path/to/node_modules/eslint/lib/cli-engine.js:245:18)
    at executeOnFile (/path/to/node_modules/eslint/lib/cli-engine.js:585:25)

This isn't specific to the no-restricted-syntax rule -- it seems to occur whenever any error is thrown from anywhere.

@not-an-aardvark not-an-aardvark added accepted There is consensus among the team that this change meets the criteria for inclusion bug ESLint is working incorrectly cli Relates to ESLint's command-line interface labels Jul 18, 2017
@not-an-aardvark
Copy link
Member Author

Reopening because a5fd101 was effectively reverted in #9041 due to #9011.

VictorHom added a commit to VictorHom/eslint that referenced this issue Sep 17, 2017
@nzakas
Copy link
Member

nzakas commented Sep 17, 2018

Looks like @VictorHom has a fix on his fork; I'll create a pull request for that.

@nzakas nzakas self-assigned this Sep 17, 2018
@eslint-deprecated eslint-deprecated bot locked and limited conversation to collaborators Mar 20, 2019
@eslint-deprecated eslint-deprecated bot added the archived due to age This issue has been archived; please open a new issue for any further discussion label Mar 20, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
accepted There is consensus among the team that this change meets the criteria for inclusion archived due to age This issue has been archived; please open a new issue for any further discussion bug ESLint is working incorrectly cli Relates to ESLint's command-line interface
Projects
None yet
Development

No branches or pull requests

2 participants