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.
npm install eslint-plugin-protractorVerified import paths — ran on the pinned version, not inferred.
Shows installation and basic configuration of eslint-plugin-protractor in .eslintrc to enable rules for Protractor test files.
Upgrade ESLint to version 6 or later, or use plugin version 1.x for ESLint <6.
Use Protractor's getAttribute('innerHTML') or similar alternatives. The rule will flag usage.Disable rule for specific patterns or file globs if false positives occur.
Scope ESLint configuration to test file patterns using overrides in .eslintrc.
Run npm install --save-dev eslint-plugin-protractor and ensure it is in the project's devDependencies.
Use valid severity: 'off', 'warn', or 'error'.
Check rule names in the plugin documentation and ensure correct spelling (e.g., 'no-promise-in-if').