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

Does not read env specified in package.json #171

Closed
aeruhxi opened this issue Mar 11, 2017 · 7 comments · Fixed by #175
Closed

Does not read env specified in package.json #171

aeruhxi opened this issue Mar 11, 2017 · 7 comments · Fixed by #175

Comments

@aeruhxi
Copy link

aeruhxi commented Mar 11, 2017

I am running the latest version 3.9.0 of the plugin.
I have specified env for jest in package.json

  "standard": {
    "env": [ "jest" ]
  },

If I use standard regularly on shell, it works as expected.
But the plugin still shows warning in atom like

'describe' is not defined.at line 3 col 1
'it' is not defined.at line 4 col 3
@AlecRust
Copy link
Contributor

I have the same problem, with mocha.

"standard": {
  "env": [ "mocha" ]
}

screenshot

@dereke
Copy link

dereke commented Mar 31, 2017

I think you can fix this by changing this

      settings.env = {}
      Object.keys(styleSettings.env).forEach(function (key) {
        settings.env[key] = styleSettings.env[key]
      })

to this:

      settings.env = [].concat(styleSettings.env || [])

as standard uses an array of env values rather than a hash.
I don't actually use atom though so am hesitant to submit a PR for this!

@AlecRust
Copy link
Contributor

That works great! Opening a PR.

@epeterson320
Copy link

Is this deployed yet? I'm still getting these errors in my editor, when running Standard from the CLI returns no errors.

@AlecRust
Copy link
Contributor

AlecRust commented May 2, 2017

I don't think so - @ricardofbarros?

@ricardofbarros
Copy link
Owner

Sorry @epeterson320 and @AlecRust it wasn't. It is published now 3.9.1, thanks

@ricardofbarros ricardofbarros reopened this May 3, 2017
@sonicdoe
Copy link
Collaborator

It seems like this was unintentionally reopened.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

6 participants