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

def.split is not a function #1047

Closed
emnloc opened this issue Jan 22, 2018 · 6 comments

Comments

@emnloc
Copy link

commented Jan 22, 2018

Unexpectedly standard stop to work

standard: Unexpected linter output:

TypeError: def.split is not a function
    at Config.globals.reduce (/Users/eoc/workspace/web/node_modules/standard/node_modules/eslint/lib/config.js:215:31)
    at Array.reduce (native)
    at new Config (/Users/eoc/workspace/web/node_modules/standard/node_modules/eslint/lib/config.js:214:48)
    at CLIEngine.executeOnFiles (/Users/eoc/workspace/web/node_modules/standard/node_modules/eslint/lib/cli-engine.js:590:28)
    at /Users/eoc/workspace/web/node_modules/standard-engine/index.js:109:61
    at /Users/eoc/workspace/web/node_modules/deglob/index.js:51:12
    at end (/Users/eoc/workspace/web/node_modules/run-parallel/index.js:16:15)
    at done (/Users/eoc/workspace/web/node_modules/run-parallel/index.js:20:10)
    at each (/Users/eoc/workspace/web/node_modules/run-parallel/index.js:26:7)
    at /Users/eoc/workspace/web/node_modules/run-parallel/index.js:41:37

If you think this is a bug in `standard`, open an issue: https://github.com/standard/standard/issues

Any idea?

@standard standard deleted a comment Jan 26, 2018

@standard standard deleted a comment Jan 26, 2018

@LinusU

This comment has been minimized.

Copy link
Member

commented Jan 26, 2018

(removed some spam)

@catdaddy23

This comment has been minimized.

Copy link

commented Jan 26, 2018

Thanks for the removal

@bcomnes

This comment has been minimized.

Copy link
Member

commented Jan 26, 2018

@emnloc can you provide a file that triggers the problem?

@TeffenEllis

This comment has been minimized.

Copy link

commented Jan 31, 2018

@bcomnes @emnloc,

This seems to be an error with the change to the package.json global declaration:

{
  "standard": {
    "globals": {
      "foo": true,
      "bar": true
    }
  }
}

This can be fixed with an array instead:

{
  "standard": {
    "globals": [
      "foo",
      "bar"
    ]
  }
}

Given how many existing setups there are, can we keep support for the old format?

Cheers 🍻

@emnloc

This comment has been minimized.

Copy link
Author

commented Feb 15, 2018

@bcomnes @TeffenEllis I changed my package.json and it works now but I agree about the idea of keep support for the old format

@feross

This comment has been minimized.

Copy link
Member

commented May 16, 2018

I don't think we explicitly changed this ourselves (unless I'm forgetting). This probably happened in an update to ESLint. It seems like a sufficiently niche issue that I'm not going to worry about it.

@feross feross closed this May 16, 2018

@feross feross added the question label May 16, 2018

@lock lock bot locked as resolved and limited conversation to collaborators Aug 14, 2018

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
6 participants
You can’t perform that action at this time.