eslint-plugin-vue-data-testid

An ESLint plugin to enforce consistent usage of 'data-testid' attributes in Vue.js components for better testability
147,849 3
Install
npm install eslint-plugin-vue-data-testid
Latest Version:1.1.2
License:MIT
Last Updated:Jul 24, 2023
Links: GitHub  ·  npm
Maintainer: xyos

eslint-plugin-vue-data-testid

An ESLint plugin to enforce consistent usage of custom 'data-testid' attributes in Vue.js components for better testability.

Install

You should have eslint and eslint-plugin-vue set up first.

yarn add eslint-plugin-vue-data-testid -D
# OR
npm install eslint-plugin-vue-data-testid --save-dev
// .eslintrc.js
module.exports = {
  extends: ["plugin:vue-data-testid/base"],
};

or if you want to configure rules manually:

module.exports = {
  plugins: ["vue-data-testid"],
  rules: {
    // add your rules here
  },
};

Rules

tag-element

Enforces the inclusion of a custom 'data-testid' attribute in specified Vue.js components.

event-attribute:

Enforces the inclusion of a custom 'data-testid' attribute in specified Vue.js components with testable events.

Contributing

Pull requests are welcome. For major changes, please open an issue first to discuss what you would like to change.

Please make sure to update tests as appropriate.

License

MIT

Related Packages

eslint-plugin-vue-storefront

ESLint rules for Vue Storefront

39,292
eslint-plugin-vue-composable

ESLint plugin providing Vue composable related rules

551,160
@scayle/eslint-plugin-vue-composable

Rules to avoid unpleasant composable problems

207,394 4
eslint-plugin-vue-kuzzle

Kuzzle Vue Coding Standard

83,068 0
@component-hook/eslint-plugin

ESLint config for component hook

8,834 4

Version History

Version Released License
1.1.2 MIT
1.1.1 MIT
1.1.0 MIT
1.0.1 MIT