@kablamo/eslint-plugin
`yarn add -D @kablamo/eslint-plugin`
Last updated 5 months ago by ojkelly .
MIT · Repository · Bugs · Original npm · Tarball · package.json
$ cnpm install @kablamo/eslint-plugin 
SYNC missed versions from official npm registry.

Kablamo eslint plugin

yarn add -D @kablamo/eslint-plugin

Add the following to your .eslintrc.js.

module.exports = {
  plugins: ["@kablamo"],
  extends: ["plugin:@kablamo/recommended"],
};

Rules

test-id-prefix-match-path

This rule fixes the first argument of createTestIds(prefix, [ ...ids]) to be a prefix derived from the files current directory. This ensures consistent unique prefixes per component.

You can still suffix variables to the end of your test id for example data-test-id={\${testId.myId}-${uuid}`}`.

test-id-consistent-naming

This rule ensures common misspellings always get fixed to the kebab-case data-test-id by default.

This can be configured to data-testid.

module.exports = {
  plugins: ["@kablamo"],
  extends: ["plugin:@kablamo/recommended"],
  rules: {
    "test-id-consistent-naming": ["error", "data-testid"],
  },
};

Configurations

This plugin contains a reccomended elsint ruleset to enable the included rules.

Developing

Run yarn test from the root of the project.

Current Tags

  • 1.0.1                                ...           latest (5 months ago)

2 Versions

  • 1.0.1                                ...           5 months ago
  • 1.0.0                                ...           5 months ago
Downloads
Today 0
This Week 0
This Month 0
Last Day 0
Last Week 0
Last Month 0
Dependencies (0)
None
Dev Dependencies (0)
None
Dependents (0)
None

Copyright 2014 - 2016 © taobao.org |