@aligent/eslint-plugin-no-shared-talons
v1.0.0
Published
Linting rule for use of talons in PWA projects
Keywords
Readme
No Shared Talons eslint plugin
An eslint rule that restricts talons so that they can only be used by components with the same name. This is designed to be used with Adobe's PWA Studio. Their description of a talon is:
Peregrine Talons are the logic component counterparts for Venia UI components. A Talon is a PWA Studio term for a custom React hook that provides data or performs side effects for a specific UI component. Since they are closely coupled to a specific UI component, these hooks are not re-usable.
Installation
npm install --save-dev @aligent/eslint-plugin-no-shared-talons
# or
yarn add --dev @aligent/eslint-plugin-no-shared-talonsUsage
Add no-shared-talons to the plugins section of your .eslintrc configuration file.
You can omit the eslint-plugin prefix:
{
"plugins": ["@aligent/no-shared-talons"]
}Then configure the rule within the rules section of your .eslintrc:
{
"rules": {
"@aligent/no-shared-talons/no-shared-talons": "error"
}
}