I'm using the extension "Interactive Linter", but it doesn't seem to understand ES6, resulting with a lot of lint errors.
Also I'm using the extension "React (.jsx) language mode for Brackets" to write JSX in brackets. Basically this allows me to set the file type to "jsx" in the bottom right corner, and then it works. But with the file type set to jsx, the lint doesn't work at all.
Is it possible to add ES6 to the lint, and if so, how? And also make it work when the file type is set to jsx?
You can change the ES version of JSHint by modifying your project .brackets.json
file or add a comment in the first line of your file like so /* jslint es6:true */
. However the former is a better solution as you won't have to edit every file with a comment directive.
To make changes to your project settings open preferences in Brackets. There you'll be able to add an esversion: 6
option to the jshint.options { .. }
. To see a full list of JSHint options you can use to configure your project settings go to the official JSHint docs.