0.3.0 • Published 2 years ago

eslint-plugin-prodperfectqa v0.3.0

Weekly downloads
2,536
License
NONE
Repository
-
Last release
2 years ago

eslint-plugin-prodperfectqa

ESLint plugin with rules for ProdPerfect customer test suites

Build Status

Installation

You'll first need to install ESLint:

$ npm i eslint --save-dev

Next, install eslint-plugin-prodperfectqa:

$ npm install "https://github.com/ProdPerfect/eslint-plugin-prodperfectqa" --save-dev

Usage

Add prodperfectqa to the plugins section of your .eslintrc configuration file. You can omit the eslint-plugin- prefix:

{
  "plugins": ["prodperfectqa"]
}

To use the recommended configuration for customer test suites, add plugin:prodperfectqa/recommended to the extends

{
  "extends": ["plugin:prodperfectqa/recommended"]
}

Alternately, configure the specific rules you want to use under the rules section.

{
  "rules": {
    "prodperfectqa/no-only": "error",
    "prodperfectqa/no-skip": "warn",
    "prodperfectqa/no-debug": "error"
  }
}

Supported Rules

Name✔️🛠Description
no-debug✔️Prevent use of .debug method on tests and fixtures
no-native-test✔️Prevent use of TestCafe's native test function
no-only✔️Prevent use of .only method on tests and fixtures
no-p2-tracking✔️Prevent use of deprecated methods setProdPerfectTracking and setProdPerfectCookie
no-skip✔️Prevent use of .skip method on tests and fixtures
valid-test-name✔️Validate test name
valid-test-metadata✔️Validate test metadata

Best practices

The rules set for best practices are based off eslint and unicorn recommended rules:

Override rules by configuring specific rules in your eslint configuration file

{
  "rules": {
    "no-undef": "off",
    "semi": "warn",
    "unicorn/filename-case": ["error", { case: "camelCase" }],
  }
}
0.3.0

2 years ago

0.2.7

2 years ago

0.2.6

2 years ago

0.2.8

2 years ago

0.2.1

2 years ago

0.2.3

2 years ago

0.2.2

2 years ago

0.2.5

2 years ago

0.2.4

2 years ago

0.1.0

4 years ago