Handle 'no-unused-expressions' violations due to use of Chai expect
See original GitHub issueUsing a Chai expect expression in a test with the StandardJS ESLint config will throw the ESLint error:
error Expected an assignment or function call and instead saw an expression no-unused-expressions
Since Chai is bundled with Cypress I think it only makes sense that eslint-plugin-cypress handle this without the user having to install a separate plugin to handle Chai expressions.
Issue Analytics
- State:
- Created 6 years ago
- Reactions:12
- Comments:7 (3 by maintainers)
Top Results From Across the Web
Nice way to get rid of no-unused-expressions linter error with ...
I've made a small plugin called eslint-plugin-chai-friendly that overrides the default ...
Read more >tslint-no-unused-expression-chai - npm
Custom tslint no-unused-expression rule supports chai's expect assertion. ... Other type of property based assertion still may not work.
Read more >Terms & Conditions - LILACS & CHAI
These Terms of Service state the terms and conditions of use of the services of Lilacs ... There is no refund for any...
Read more >Testing Workflow for Web Components - DEV Community
eslint-disable no-unused-expressions */ import { html, fixture, expect } ... loads the @open-wc/semantic-dom-diff chai plugin for us to use.
Read more >ESLint, Don't Write JavaScript Without It! | Object Computing, Inc.
Error messages identify the violated rules, making it easy to adjust their ... No ? Do you use JSX? Yes ? Do you...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Eslint decided to not address this issue as it is library specific. It seems that the best fix for this would be to add the eslint-plugin-chai-friendly plugin to our eslint config or some similar configuration to ignore chai’s
no-unused-expressions
. @chrisbreiding thoughts?Sure: