{"id":19960,"library":"eslint-plugin-testcafe","title":"eslint-plugin-testcafe","description":"ESLint plugin providing rules for TestCafe end-to-end testing framework. Current version 0.2.1 (pre-1.0) allows referencing `t` variable from TestCafe test context. Installation requires ESLint (peer dependency). Plugin exports a recommended configuration that enforces good practices. Differentiator: avoids false positives from TestCafe globals and supports TestCafe-specific patterns like `t.expect()`.","status":"active","version":"0.2.1","language":"javascript","source_language":"en","source_url":"git://github.com/miherlosev/eslint-plugin-testcafe","tags":["javascript","eslint","eslintplugin","eslint-plugin","testcafe"],"install":[{"cmd":"npm install eslint-plugin-testcafe","lang":"bash","label":"npm"},{"cmd":"yarn add eslint-plugin-testcafe","lang":"bash","label":"yarn"},{"cmd":"pnpm add eslint-plugin-testcafe","lang":"bash","label":"pnpm"}],"dependencies":[{"reason":"peer dependency required for linting","package":"eslint","optional":false}],"imports":[{"note":"The recommended config is accessed via 'plugin:' prefix in ESLint extends. Must also add 'testcafe' to plugins array.","wrong":"extends: 'testcafe/recommended' (missing 'plugin:' prefix)","symbol":"plugin:testcafe/recommended","correct":"extends: 'plugin:testcafe/recommended'"},{"note":"ESLint plugin rules must be prefixed with the plugin name (testcafe/) when configured in rules section.","wrong":"rules: { 'no-valid-testcafe-pattern': 'error' } (missing namespace)","symbol":"no-valid-testcafe-pattern","correct":"rules: { 'testcafe/no-valid-testcafe-pattern': 'error' }"},{"note":"The plugin is registered as 'testcafe' in the plugins array; it's not scoped.","wrong":"using the plugin name with scope (e.g., '@testcafe/eslint-plugin') which is not the package name","symbol":"plugin import","correct":"plugins: ['testcafe']"}],"quickstart":{"code":"// .eslintrc.js\nmodule.exports = {\n  plugins: ['testcafe'],\n  extends: 'plugin:testcafe/recommended',\n  rules: {\n    'testcafe/no-valid-testcafe-pattern': 'error',\n  },\n};\n\n// Example TestCafe test that will pass ESLint with the plugin\nfixture('Example fixture')\n  .page('https://example.com');\n\ntest('Example test', async t => {\n  await t\n    .click('#button')\n    .typeText('#input', 'hello')\n    .expect('#result').eql('hello');\n});","lang":"javascript","description":"Configures ESLint with the testcafe plugin and recommended rules, then shows a TestCafe test using common patterns."},"warnings":[{"fix":"Switch to a more maintained ESLint plugin for TestCafe, or contribute to this one.","message":"Plugin version 0.2.1 is outdated and may not support newer TestCafe features (e.g., Role, RequestMock). Consider using more actively maintained alternatives.","severity":"deprecated","affected_versions":"0.x"},{"fix":"Review rule configs and consider disabling the rule if it causes false positives.","message":"The 'no-valid-testcafe-pattern' rule might incorrectly flag valid TestCafe code if the rule is not updated for newer TestCafe APIs.","severity":"gotcha","affected_versions":">=0.0.0"},{"fix":"Run: npm install eslint eslint-plugin-testcafe --save-dev","message":"Install both eslint and eslint-plugin-testcafe as devDependencies, not globally, unless you prefer global install. Global installs can cause conflicts.","severity":"gotcha","affected_versions":">=0.0.0"}],"env_vars":null,"last_verified":"2026-04-25T00:00:00.000Z","next_check":"2026-07-24T00:00:00.000Z","problems":[{"fix":"Install locally: npm install eslint-plugin-testcafe --save-dev. Ensure ESLint and the plugin are installed in the same scope (both global or both local).","cause":"eslint-plugin-testcafe is not installed or is installed globally while ESLint is local (or vice versa).","error":"ESLint: Failed to load plugin 'testcafe': Cannot find module 'eslint-plugin-testcafe'"},{"fix":"Ensure 'testcafe' is in the plugins array and the rule is prefixed with 'testcafe/'.","cause":"The rule name might be incorrect or the plugin is not specified in plugins array.","error":"ESLint: Error while loading rule 'testcafe/no-valid-testcafe-pattern': Could not find rule"},{"fix":"Use 'testcafe/no-valid-testcafe-pattern' in rules configuration.","cause":"Missing namespace prefix 'testcafe/' on the rule.","error":"Definition for rule 'no-valid-testcafe-pattern' was not found"}],"ecosystem":"npm","meta_description":null,"install_score":null,"install_tag":null,"quickstart_score":null,"quickstart_tag":null}