Package for javascript


#1

i faced such type of problem . i use javascript-snippets,language-javascript package. any solutions


#2

These are messages from a linter package you have installed (most likely linter-jscs).

You can either fix those errors or disable the any rules you don’t like.

Example:

// .jscsrc
{
    "validateIndentation": null 
}

As an alternative to having a .jscsrc file, you can pick a different preset in the linter-jscs settings or define block-wise disable rules directly in your code.

Following the majority of style-guides, you would write your code like this:

if (a > b) {
  alert('true');
} else {
  alert('false');
}

The error for the variable declarations can have many reasons (e.g. block-scope declarations vs constants, or joined variable declarations), depending on the preset you’re using, so I left that part out.