Skip to content

femanzo/eslint-plugin-data-cy

Repository files navigation

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

About

Eslint rule to enforce data-cy on configured VUE components

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published