@bubblydoo/eslint-plugin-uxp
v0.0.3
Published
Custom ESLint plugin for UXP development with Photoshop.
Keywords
Readme
@bubblydoo/eslint-plugin-uxp
Custom ESLint plugin for UXP development with Photoshop.
Installation
pnpm add -D @bubblydoo/eslint-plugin-uxpUsage
ESLint Flat Config (ESLint 9+)
import uxpPlugin from '@bubblydoo/eslint-plugin-uxp';
export default [
{
plugins: {
uxp: uxpPlugin,
},
rules: {
'uxp/no-constants-import': 'error',
},
},
// Or use the recommended config
uxpPlugin.configs.recommended,
];Legacy ESLint Config
{
"plugins": ["@bubblydoo/uxp"],
"rules": {
"@bubblydoo/uxp/no-constants-import": "error"
}
}Rules
no-constants-import
Disallows importing from "photoshop/dom/Constants".
❌ Incorrect:
import { BlendMode } from 'photoshop/dom/Constants';const { BlendMode } = require('photoshop/dom/Constants');✅ Correct:
import { constants } from 'photoshop';
const { BlendMode } = constants;const { constants } = require('photoshop');
const { BlendMode } = constants;License
MIT
