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

Config test fails if home dir has .eslintrc file #6559

Closed
gyandeeps opened this issue Jun 29, 2016 · 4 comments
Closed

Config test fails if home dir has .eslintrc file #6559

gyandeeps opened this issue Jun 29, 2016 · 4 comments
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 chore This change is not user-facing

Comments

@gyandeeps
Copy link
Member

gyandeeps commented Jun 29, 2016

While i was working on master this config unit test fails if you have a .eslintrc file inside your home directory. I think this test was introduced with #6538.

To reproduce just create a .eslintrc file inside your HOME directory and then run the tests.

{
    "env" : {
        "es6" : true
    }
}

output:

 11186 passing (48s)
  1 failing

  1) Config getConfig() should throw an error when an invalid path is given:
     AssertionError: expected [Function] to throw an error
      at Function.assert.throws (C:\Users\gs025879\Documents\webstrom\eslint\node_modules\chai\lib\chai\interface\assert.js:1120:52)
      at Context.<anonymous> (C:\Users\gs025879\Documents\webstrom\eslint\tests\lib\config.js:271:20)
      at callFn (C:\Users\gs025879\Documents\webstrom\eslint\node_modules\mocha\lib\runnable.js:326:21)
      at Test.Runnable.run (C:\Users\gs025879\Documents\webstrom\eslint\node_modules\mocha\lib\runnable.js:319:7)
      at Runner.runTest (C:\Users\gs025879\Documents\webstrom\eslint\node_modules\mocha\lib\runner.js:422:10)
      at C:\Users\gs025879\Documents\webstrom\eslint\node_modules\mocha\lib\runner.js:528:12
      at next (C:\Users\gs025879\Documents\webstrom\eslint\node_modules\mocha\lib\runner.js:342:14)
      at C:\Users\gs025879\Documents\webstrom\eslint\node_modules\mocha\lib\runner.js:352:7
      at next (C:\Users\gs025879\Documents\webstrom\eslint\node_modules\mocha\lib\runner.js:284:14)
      at Immediate._onImmediate (C:\Users\gs025879\Documents\webstrom\eslint\node_modules\mocha\lib\runner.js:320:5)

Note: This issue is similar to what was happening here #6206

@gyandeeps gyandeeps added bug ESLint is working incorrectly accepted There is consensus among the team that this change meets the criteria for inclusion chore This change is not user-facing labels Jun 29, 2016
@platinumazure
Copy link
Member

platinumazure commented Jun 29, 2016

Ack, probably needs a mock filesystem setup in that test. Sorry about this.

I'm happy to look at this but I will probably need some guidance.

@gyandeeps
Copy link
Member Author

no worries @platinumazure . Let me know if you need more help since i did the work on mock before.

@platinumazure
Copy link
Member

I'll work on this tonight (i.e., soon) and have either a PR or an update here soon.

@platinumazure
Copy link
Member

@gyandeeps Any chance you could try my branch (see PR #6566) and see if that test passes for you? Thanks!

@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
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 chore This change is not user-facing
Projects
None yet
Development

No branches or pull requests

2 participants