Loading ...
Sorry, an error occurred while loading the content.

2008[jslint] Re: /*jslint is seen as a reserved word

Expand Messages
  • Douglas Crockford
    Mar 4, 2011
      --- In jslint_com@yahoogroups.com, Joshua Bell <josh@...> wrote:
      >
      > On Fri, Mar 4, 2011 at 8:29 AM, Douglas Crockford <douglas@...>
      > wrote:
      > >
      > >
      > > No it shouldn't. JSLint allows those directives at statement position only.
      > >
      >
      > Does the jslint directive apply within a lexical scope, or does it function
      > like a pre-processor directive irrespective of lexical structure?
      >
      > i.e. which should be used:
      >
      > function twiddle(a, b) {
      > /*jslint bitwise: false*/ // allow bitwise operators for this lexical
      > scope
      > return a & b;
      > }


      It acts as a pragma. I do not recommend this use. I regret having allowed it.
    • Show all 8 messages in this topic