I'm trying to write extendscript scripts for Adobe After Effects, using VSCode. I'd like to get some linting happening (not too fussed if it's ESLint or any other linter), but I can't convince ESLint to lint my files.
Extendscript is a dialect of the ECMAScript standard and therefore similar to JavaScript and ActionScript. The files have the extension .jsx
. There are some extendscript plugins for VSCode, this one provides language support, so that VSCode sees my .jsx files as extendscript files. So I was hoping that this would work in my settings.json
:
{
"eslint.options": {
"extensions": [".jsx", ".js"]
},
"eslint.validate": [
"javascript",
"javascriptreact",
"extendscript"
]
}
If I try the command ESLint.ShowOutputChannel I get the error:
ESLint is not running. By default only JavaScript files are validated. If you want to validate other file types please specify them in the 'eslint.validate' setting.
edit I also tried replacing "extendscript"
in line 10 with
{ "language": "extendscript", "autofix": false }
But no luck.
This worked for me:
{
"eslint.options": {
"extensions": [".jsx", ".js"]
},
"eslint.validate": [
"javascript",
"javascriptreact",
"jsx"
]
}
Looking on the github repo for the Extendscript Language, I've found out that the language id is registered as jsx, instead of extendscript.