eslint-plugin-data-cy
v1.0.7
Published
A VUE ESLint plugin to enforce the presence of `data-cy` attribute on configured components.
Downloads
8
Readme
eslint-plugin-data-cy
A VUE ESLint plugin to enforce the presence of data-cy
attribute on configured components.
Installation
Choose one:
npm install eslint-plugin-data-cy --save-dev
yarn add eslint-plugin-data-cy --dev
pnpm add eslint-plugin-data-cy -D
Usage
Add data-cy to the plugins section of your .eslintrc configuration file:
{
"plugins": ["data-cy"]
}
Supported Rules
{
rules: {
'data-cy/vue-enforce-data-cy': [
'warn',
{
components: ['MyCheckbox', 'MyButton'],
testAttributes: ['data-cy', 'v-data-cy'],
},
]
}
}
License MIT