Eslint Plugin ExtendScript
Add environment globals for extendscript
Table of Contents
Installation
This module is distributed via npm which comes bundled
with node. Install it as one of your projects
devDependencies
.
npm i --save-dev eslint-plugin-extendscript
yarn add --dev eslint-plugin-extendscript
Setup
Remember to first install Eslint as well, otherwise this
plugin will be utterly useless!
Then define extendscript
as one of the plugins inside .eslintrc
and add the
environments you like.
{
"extends": "eslint:recommended",
"plugins": ["extendscript"],
"env": {
"extendscript/base": true,
"extendscript/scriptui": true,
"extendscript/indesign": true,
"extendscript/photoshop": true,
"extendscript/illustrator": true,
}
}
If you don't know or want to work on all environments you can use the
environment "extendscript/extendscript"
instead. This will give you all
environment globals form all the ExtendScript environments.
{
"extends": "eslint:recommended",
"plugins": ["extendscript"],
"env": {
"extendscript/extendscript": true,
}
}
Contributions
Contributions are more than welcome. Especially if you like to add more
environments to this setup.
The globals are generated autotaically from ExtendScript documentation which
might be quite hard to find sometimes. Reach out to me via issues or email and
we might get something working.
All globals are found in src/globals.json
. They are generated by running npm run get-globals
.
Contributors
License
MIT