Registry / testing / eslint-plugin-protractor

eslint-plugin-protractor

JSON →
library2.1.1jsnpmunverified

ESLint plugin providing lint rules specific to Protractor end-to-end tests for AngularJS applications. Current stable version is 2.1.1, last released in September 2019, with infrequent updates. It helps catch common Protractor errors, enforce best practices for element locators, and avoid deprecated API usage. Differentiates from general ESLint by focusing on Protractor-specific patterns, including rules for correct chaining, promise handling, and locator quality. The plugin is intended to be integrated into IDEs for real-time feedback during test development.

testing
Install & Compatibility
Where this runs
tested against v? · npm install
Install × environment matrix
Each cell = how many times install + import succeeded across repeated harness runs. Partial = flaky.
glibc = Debian/Ubuntu slim · musl = Alpine Linux
musl
node 18226 runs
build_error
glibc
node 18226 runs
build_error
Code
Verified usage

Verified import paths — ran on the pinned version, not inferred.

Plugin is typically used in .eslintrc config, not imported directly. If used programmatically, CommonJS require is expected. ESM import may not work without interop.

const protractorPlugin = require('eslint-plugin-protractor');

When configuring rules in .eslintrc, always prefix rule names with 'protractor/' to avoid conflicts with other plugins.

rules: { 'protractor/no-promise-in-if': 'error' }

Use the 'plugin:' prefix to reference plugin configs. Omitting it will not load the config correctly.

extends: ['plugin:protractor/recommended']

Shows installation and basic configuration of eslint-plugin-protractor in .eslintrc to enable rules for Protractor test files.

// Install: npm install --save-dev eslint eslint-plugin-protractor // .eslintrc.yml plugins: - protractor rules: protractor/no-promise-in-if: error protractor/missing-perform: warn protractor/no-array-finder-methods: error
Debug
Known footguns
breakingVersion 2.0.0 requires ESLint >= 6.x; older ESLint versions are incompatible.
deprecatedRule 'no-get-inner-outer-html' warns about deprecated Protractor methods getInnerHtml() and getOuterHtml() which are removed in newer Protractor versions.
gotchaRule 'array-callback-return' may produce false positives if used with non-standard ElementArrayFinder methods that do not require return values.
gotchaPlugin is designed for Protractor test files only; applying to non-test code may cause spurious warnings.
Upgrade
Version history

Breaking-change detection hasn't run for this library yet.

Audit
Security & dependencies

CVE tracking and dependency tree are planned for a later release.

Agent activity
9 hits · last 30 days
gptbot
4
ahrefsbot
4
script
1
Resources