Thursday, June 6, 2024
 Popular · Latest · Hot · Upcoming
178
rated 0 times [  182] [ 4]  / answers: 1 / hits: 16946  / 11 Years ago, sat, november 23, 2013, 12:00:00

I love syntastic for javascript but I am using the new ES6 module tranpiler and syntastic is not happy about these type of statements:



import Typeahead from './lib/components/ember-typeahead';


Is there anyway that I can keep syntastic quiet about this type of statement?


More From » vim

 Answers
19

Syntastic will use JSHint to check JavaScript syntax if it's available (which I recommend over jslint).



JSHint supports es6 syntax with the esnext flag, which includes support for the export and import module syntax.



I suggest adding a .jshintrc file to your project to control JSHint's behavior (and thus Syntastic's) for your entire project:



{
esnext: true
}


Note: be careful, since using the esnext flag will add support for all of es6's new language sytax that JSHint currently supports, not just the module syntax.



Note: esnext has now been deprecated in favour of the esversion syntax.



{
esversion: 6
}

[#74107] Thursday, November 21, 2013, 11 Years  [reply] [flag answer]
Only authorized users can answer the question. Please sign in first, or register a free account.
reecep

Total Points: 141
Total Questions: 95
Total Answers: 113

Location: Finland
Member since Mon, Nov 8, 2021
3 Years ago
;