piuccio / sublime-esformatter

JavaScript formatter plugin for Sublime Text
MIT License
28 stars 20 forks source link

SyntaxError: Unexpected end of input #63

Open unlight opened 8 years ago

unlight commented 8 years ago

v1.6.5, node v5.3.0, win8-64, sublime3

My javascript is valid. When trying to format sublime throws:

SyntaxError: Unexpected end of input
    at Object.parse (native)
    at D:\Progs\Sublime-Text-3\Data\Packages\EsFormatter\lib\esformatter.js:22131:20
    at Object.<anonymous> (D:\Progs\Sublime-Text-3\Data\Packages\EsFormatter\lib\esformatter.js:22160:3)
    at Module._compile (module.js:398:26)
    at Object.Module._extensions..js (module.js:405:10)
    at Module.load (module.js:344:32)
    at Function.Module._load (module.js:301:12)
    at Function.Module.runMain (module.js:430:10)
    at startup (node.js:141:18)
    at node.js:980:3
piuccio commented 8 years ago

how big is the file?

unlight commented 8 years ago

It happens with any file. ~ 17 Lines, 805 chars

leobalter commented 8 years ago

It seems this error is happening while parsing the config settings in JSON.

you might need to double check it.

unlight commented 8 years ago

I will check. But it was clean install, I didn't do anything with settings.