question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

How to get "should.be.true" pass in jslint?

See original GitHub issue

I like to use the should syntax. But when I try myvalue.should.be.true, my JS file cannot pass jslint validation. Because true is a keyword. Any idea how can I get should syntax work with jslint?

Issue Analytics

  • State:closed
  • Created 11 years ago
  • Reactions:1
  • Comments:5 (2 by maintainers)

github_iconTop GitHub Comments

1reaction
justindujardincommented, Feb 18, 2013

@davidshen84 If you use JSHint instead of JSLint, you can specify the expr option to suppress this warning:

 /*jshint expr:true */
0reactions
davidshen84commented, Dec 11, 2012

Thanks 😃

Read more comments on GitHub >

github_iconTop Results From Across the Web

How to get "should.be.false" syntax pass jslint? - Stack Overflow
Just to make it clear to other readers: You can add /*jshint expr: true*/ to the top of the test files, so it...
Read more >
How to get should be false syntax pass jslint - Edureka
Now I have a problem with jslint and Chai. In Chai, you can use: myvalue.should.be.true;. But jslint give me:
Read more >
Help - JSLint
Assume Node.js environment. node, true if Node.js globals should be predefined. It will predefine globals that are used in the Node ...
Read more >
JavaScript Static Analysis - Linting with JSLint, JSHint, and ...
Here we take a look at some external tools and see how that can help us write better code. Covered here are JSLint,...
Read more >
JSHint Documentation
A directive for telling JSHint about global variables that are defined elsewhere. If value is false (default), JSHint will consider that variable as...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found