JSLint “insecure ^” in regular expression

后端 未结 3 1306
后悔当初
后悔当初 2020-11-29 09:55

JSLint reports Insecure \'^\' for the following line. Why is that? Or is it just going to complain any time I want to negate a character class?

// r         


        
3条回答
  •  失恋的感觉
    2020-11-29 10:24

    regexp: true

    in your lint options, will allow

    . and [^...] in /RegExp/

    you can configure the rules you would like to use here

    http://www.jslint.com/

提交回复
热议问题