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

Cannot finish file scan in eslint --init #5992

Closed
victor-homyakov opened this issue Apr 28, 2016 · 7 comments
Closed

Cannot finish file scan in eslint --init #5992

victor-homyakov opened this issue Apr 28, 2016 · 7 comments
Labels
archived due to age This issue has been archived; please open a new issue for any further discussion bug ESLint is working incorrectly core Relates to ESLint's core APIs and features evaluating The team will evaluate this issue to decide whether it meets the criteria for inclusion

Comments

@victor-homyakov
Copy link
Contributor

What version of ESLint are you using?
2.8.0
What parser (default, Babel-ESLint, etc.) are you using?
default
Please show your full configuration:
none yet
What did you do? Please include the actual source code causing the issue.

  1. eslint --init scripts on existing project
  2. I choose to scan my files to determine the best configuration
    What did you expect to happen?
    successful finish
    What actually happened? Please include the actual, raw output from ESLint.
Determining Config: 31% [=========---------------------] 57.2s elapsed, eta 130.1s Cannot read property 'errorCount' of undefined
TypeError: Cannot read property 'errorCount' of undefined
    at C:\Users\khomyackov\AppData\Roaming\npm\node_modules\eslint\lib\config\autoconfig.js:315:68
    at Array.forEach (native)
    at C:\Users\khomyackov\AppData\Roaming\npm\node_modules\eslint\lib\config\autoconfig.js:314:29
    at Array.forEach (native)
    at C:\Users\khomyackov\AppData\Roaming\npm\node_modules\eslint\lib\config\autoconfig.js:310:22
    at Array.forEach (native)
    at Registry.lintSourceCode (C:\Users\khomyackov\AppData\Roaming\npm\node_modules\eslint\lib\config\autoconfig.js:305:19)
    at configureRules (C:\Users\khomyackov\AppData\Roaming\npm\node_modules\eslint\lib\config\config-initializer.js:146:25)
    at processAnswers (C:\Users\khomyackov\AppData\Roaming\npm\node_modules\eslint\lib\config\config-initializer.js:250:18)
    at null.completed (C:\Users\khomyackov\AppData\Roaming\npm\node_modules\eslint\lib\config\config-initializer.js:404:30)
@eslintbot eslintbot added the triage An ESLint team member will look at this issue soon label Apr 28, 2016
@victor-homyakov
Copy link
Contributor Author

Additional info for autoconfig.js:315:

result.ruleId: max-len
ruleSetIdx: 9
lintedRegistry.rules[result.ruleId]: [
  { config: 2, specificity: 1, errorCount: 2186 },
  { config: [ 2, [Object] ], specificity: 2, errorCount: 2045 },
  { config: [ 2, [Object] ], specificity: 2, errorCount: 2045 },
  { config: [ 2, [Object] ], specificity: 2, errorCount: 2047 },
  { config: [ 2, [Object] ], specificity: 2, errorCount: 2047 },
  { config: [ 2, [Object] ], specificity: 2, errorCount: 2092 },
  { config: [ 2, [Object] ], specificity: 2, errorCount: 2184 },
  { config: [ 2, [Object] ], specificity: 2, errorCount: 2094 },
  { config: [ 2, [Object] ], specificity: 2, errorCount: 2186 }
]

@ilyavolodin
Copy link
Member

@IanVS Could you take a look please?

@ilyavolodin ilyavolodin added bug ESLint is working incorrectly core Relates to ESLint's core APIs and features evaluating The team will evaluate this issue to decide whether it meets the criteria for inclusion and removed triage An ESLint team member will look at this issue soon labels Apr 29, 2016
@IanVS
Copy link
Member

IanVS commented Apr 29, 2016

@victor-homyakov thanks for the good information. Is it possible that you have an eslint configuration comment in one of your files which is enabling max-len? You could use eslint --init --debug to see which file is the last one it attempts before it crashes.

@IanVS
Copy link
Member

IanVS commented Apr 29, 2016

I believe I have a fix in #5999.

@victor-homyakov
Copy link
Contributor Author

@IanVS yes, the file contains /*eslint max-len:[1,140,4]*/

@victor-homyakov
Copy link
Contributor Author

@IanVS I confirm that your fix solves this issue

@IanVS
Copy link
Member

IanVS commented Apr 29, 2016

Getting good, detailed bug reports makes me so happy. 😃 Thanks for taking the time to do a little extra troubleshooting.

Hopefully we can squeeze this fix into today's release.

@eslint-deprecated eslint-deprecated bot locked and limited conversation to collaborators Feb 6, 2018
@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 Feb 6, 2018
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
archived due to age This issue has been archived; please open a new issue for any further discussion bug ESLint is working incorrectly core Relates to ESLint's core APIs and features evaluating The team will evaluate this issue to decide whether it meets the criteria for inclusion
Projects
None yet
Development

No branches or pull requests

4 participants