polyfill global variables & provide some awesome rules
npm install eslint-plugin-extendscript-plus -D
# pnpm
pnpm add eslint-plugin-extendscript-plus -D
# pnpm monorepo
pnpm -w add eslint-plugin-extendscript-plus -D
Add extendscript-plus
to the plugins section of your .eslintrc
configuration file.
{
"extends": [...others, "plugin:extendscript-plus/photoshop"]
}
Then configure the rules you want to use under the rules section.
{
"rules": {
"extendscript-plus/no-let": 0
}
}
- AE support
- prefer-const-to-var
- no-redeclare-const
Each rule has emojis denoting:
- ✅ if it is enable by default
- 🔧 if some problems reported by the rule are automatically fixable by the
--fix
command line option - 💡 if some problems reported by the rule are manually fixable by editor suggestions
Name | Description | ✅ | 🔧 | 💡 |
---|---|---|---|---|
no-let | Improve regexes by making them shorter, consistent, and safer. | ✅ | 🔧 | |
no-console | Enforce a specific parameter name in catch clauses. | ✅ | 🔧 | |
no-arrow-func | Use destructured variables over properties. | ✅ | 🔧 | |
no-property-shorthand | Move function definitions to the highest possible scope. | ✅ | 🔧 |
I learn a lot from these awesome projects: