This repository has been archived by the owner. It is now read-only.

isEmpty of null #1816

Closed
danielstjules opened this Issue Sep 28, 2015 · 6 comments

Comments

Projects
None yet
3 participants
@danielstjules

danielstjules commented Sep 28, 2015

With 2.2.0, I'm getting:

TypeError: Cannot read property 'isEmpty' of null
    at /Users/dstjules/git/project/node_modules/jscs/lib/reporters/console.js:10:20
    at Array.forEach (native)
    at Object.module.exports [as writer] (/Users/dstjules/git/project/node_modules/jscs/lib/reporters/console.js:9:22)
    at /Users/dstjules/git/project/node_modules/jscs/lib/cli.js:151:18
    at Array.<anonymous> (/Users/dstjules/git/project/node_modules/jscs/node_modules/vow/lib/vow.js:711:56)
    at Immediate.callFns [as _onImmediate] (/Users/dstjules/git/project/node_modules/jscs/node_modules/vow/lib/vow.js:23:35)
    at processImmediate [as _immediateCallback] (timers.js:357:17)

However, fixing that reveals another issue:

TypeError: Cannot read property 'isEmpty' of null
    at /Users/dstjules/git/project/node_modules/jscs/lib/cli.js:155:24

Can't right now, but hopefully I can come up with a small example later tonight.

@hzoo

This comment has been minimized.

Show comment
Hide comment
@hzoo

hzoo Sep 28, 2015

Member

Thanks for the report - yeah please add a snippet to reproduce and your config. If you run with --verbose then we can see what rule is erroring

Member

hzoo commented Sep 28, 2015

Thanks for the report - yeah please add a snippet to reproduce and your config. If you run with --verbose then we can see what rule is erroring

@danielstjules

This comment has been minimized.

Show comment
Hide comment
@danielstjules

danielstjules Sep 28, 2015

Config I'm using:

{
  "disallowEmptyBlocks": true,
  "disallowMixedSpacesAndTabs": true,
  "disallowSpaceBeforeComma": true,
  "disallowSpaceBeforeSemicolon": true,
  "disallowTrailingWhitespace": true,
  "disallowTrailingComma": true,
  "disallowSpacesInsideParentheses": true,
  "requireCapitalizedConstructors": true,
  "requireLineFeedAtFileEnd": true,
  "requireSemicolons": true,
  "requireSpaceBetweenArguments": true,
  "disallowYodaConditions": [
    "==",
    "===",
    "!=",
    "!=="
  ],
  "requireSpaceAfterKeywords": [
    "do",
    "for",
    "if",
    "else",
    "switch",
    "case",
    "try",
    "catch",
    "void",
    "while",
    "with",
    "return",
    "typeof"
  ],
  "excludeFiles": [
    "path/to/file.js"
  ]
}

Unfortunately, --verbose doesn't seem to reveal much:

> jscs --verbose test lib scripts

TypeError: Cannot read property 'isEmpty' of null
    at /Users/dstjules/git/project/node_modules/jscs/lib/reporters/console.js:10:20
    at Array.forEach (native)
    at Object.module.exports [as writer] (/Users/dstjules/git/project/node_modules/jscs/lib/reporters/console.js:9:22)
    at /Users/dstjules/git/project/node_modules/jscs/lib/cli.js:151:18
    at Array.<anonymous> (/Users/dstjules/git/project/node_modules/jscs/node_modules/vow/lib/vow.js:711:56)
    at Immediate.callFns [as _onImmediate] (/Users/dstjules/git/project/node_modules/jscs/node_modules/vow/lib/vow.js:23:35)
    at processImmediate [as _immediateCallback] (timers.js:357:17)

danielstjules commented Sep 28, 2015

Config I'm using:

{
  "disallowEmptyBlocks": true,
  "disallowMixedSpacesAndTabs": true,
  "disallowSpaceBeforeComma": true,
  "disallowSpaceBeforeSemicolon": true,
  "disallowTrailingWhitespace": true,
  "disallowTrailingComma": true,
  "disallowSpacesInsideParentheses": true,
  "requireCapitalizedConstructors": true,
  "requireLineFeedAtFileEnd": true,
  "requireSemicolons": true,
  "requireSpaceBetweenArguments": true,
  "disallowYodaConditions": [
    "==",
    "===",
    "!=",
    "!=="
  ],
  "requireSpaceAfterKeywords": [
    "do",
    "for",
    "if",
    "else",
    "switch",
    "case",
    "try",
    "catch",
    "void",
    "while",
    "with",
    "return",
    "typeof"
  ],
  "excludeFiles": [
    "path/to/file.js"
  ]
}

Unfortunately, --verbose doesn't seem to reveal much:

> jscs --verbose test lib scripts

TypeError: Cannot read property 'isEmpty' of null
    at /Users/dstjules/git/project/node_modules/jscs/lib/reporters/console.js:10:20
    at Array.forEach (native)
    at Object.module.exports [as writer] (/Users/dstjules/git/project/node_modules/jscs/lib/reporters/console.js:9:22)
    at /Users/dstjules/git/project/node_modules/jscs/lib/cli.js:151:18
    at Array.<anonymous> (/Users/dstjules/git/project/node_modules/jscs/node_modules/vow/lib/vow.js:711:56)
    at Immediate.callFns [as _onImmediate] (/Users/dstjules/git/project/node_modules/jscs/node_modules/vow/lib/vow.js:23:35)
    at processImmediate [as _immediateCallback] (timers.js:357:17)
@markelog

This comment has been minimized.

Show comment
Hide comment
@markelog

markelog Sep 28, 2015

Member

Hm, i think i know what the issue is, we would need to release again though

Member

markelog commented Sep 28, 2015

Hm, i think i know what the issue is, we would need to release again though

markelog added a commit to markelog/node-jscs that referenced this issue Sep 28, 2015

@markelog markelog added the bug label Sep 28, 2015

markelog added a commit to markelog/node-jscs that referenced this issue Sep 28, 2015

@markelog markelog closed this in f12830a Sep 29, 2015

@hzoo

This comment has been minimized.

Show comment
Hide comment
@hzoo

hzoo Sep 29, 2015

Member

Ok shouldn't of closed that - @danielstjules can you check if that PR/commit (f12830a) fixes it?

Member

hzoo commented Sep 29, 2015

Ok shouldn't of closed that - @danielstjules can you check if that PR/commit (f12830a) fixes it?

@hzoo

This comment has been minimized.

Show comment
Hide comment
@hzoo

hzoo Sep 30, 2015

Member

2.2.1 is released! Hopefully fixes it?

Member

hzoo commented Sep 30, 2015

2.2.1 is released! Hopefully fixes it?

@danielstjules

This comment has been minimized.

Show comment
Hide comment
@danielstjules

danielstjules Sep 30, 2015

That fixed it, thank you! :)

danielstjules commented Sep 30, 2015

That fixed it, thank you! :)

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.