Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add cypress/recommended config failed with eslint 4.X #11

Closed
ignoreswing opened this issue Nov 26, 2018 · 1 comment
Closed

Add cypress/recommended config failed with eslint 4.X #11

ignoreswing opened this issue Nov 26, 2018 · 1 comment
Assignees
Milestone

Comments

@ignoreswing
Copy link

{
   extends: [
       'plugin:cypress/recommended'
   ]
}

is the new feature after Release 2.1.0
and the dependency said it requires peerDependencies: { eslint: '>= 3.2.1' }

When I use eslint 5.9.0 and add this config, everything is fine.
However, when I use eslint 4.6.1, it throw

Cannot read property 'replace' of undefined
TypeError: Cannot read property 'replace' of undefined

at messages.map.message (/Users/Sean/Desktop/ocr/frontend-src/node_modules/eslint/lib/formatters/stylish.js:68:36)
at Array.map (native)
at results.forEach.result (/Users/Sean/Desktop/ocr/frontend-src/node_modules/eslint/lib/formatters/stylish.js:53:22)
at Array.forEach (native)
at module.exports (/Users/Sean/Desktop/ocr/frontend-src/node_modules/eslint/lib/formatters/stylish.js:38:13)
at printResults (/Users/Sean/Desktop/ocr/frontend-src/node_modules/eslint/lib/cli.js:90:20)
at Object.execute (/Users/Sean/Desktop/ocr/frontend-src/node_modules/eslint/lib/cli.js:193:17)
at Object.<anonymous> (/Users/Sean/Desktop/ocr/frontend-src/node_modules/eslint/bin/eslint.js:74:28)
at Module._compile (module.js:570:32)
at Object.Module._extensions..js (module.js:579:10)

It only works if I remove the config plugin:cypress/recommended

@chrisbreiding
Copy link
Contributor

chrisbreiding commented Dec 13, 2018

Thanks for bringing this to our attention. I hesitate to bump up the peer dependency requirement, since features other than the rules can work with older versions of eslint.

To address that, I added a caveat to the readme concerning the eslint 5 requirement for rules. I also created an issue to track support for eslint 4.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants