Use file's grammar to detect if it can be formatted.
Use file's grammar to detect if it can be formatted.

Because the file extension may not always accurately describe a file's contents,
use the file's grammar. The user can now manually set the grammar of a file that
doesn't end with .json or .js and it can be formatted.

Also using the grammar to detect validity covers other javascript file
extensions such as .es6 and .jsx.

jdc0589/jsformat-atom,gupta-tarun/jsformat-atom