tav / nodelint

DEPRECATED: Please use an alternative like ESLint instead: https://github.com/eslint/eslint. Thanks.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Deal with new JSLint options

Sannis opened this issue · comments

There is some changes in JSLint defaults. I updated some of them as in @clebert fork (Sannis@7b033c5).

But there is some options, that I've revert and what to discuss:

  • regexp: false, that disallow . in regexps
  • sloppy: true, that need 'use strict' for all files
  • stupid: true, that disallow ...Sync Node.js methods

There is no problem to fix this in nodelint sources, but what about users that will be affected by such update? I need some help to decide.

// cc: @tav, @mkitt, @cliffano, @paularmstrong, @codenothing, @mranney, @azatoth

I'm thinking all need to be set to false and allow end user to change.

sloppy is actually a tough one to support, since it (if I remember correctly) requires you to wrap every file in a method and place use strict at the top of that method.

Output from jslint.com is Problem at line 1 character 1: Use the function form of 'use strict'.

That will affect every file that everyone has written. And is really crappy in the node.js world, since the common pattern is to not wrap everything in a function form.

regexp seems fine to support, as it's one of those things that you should only turn off if you know what you're doing.

I can go either way on stupid.

Thanks!

@paularmstrong, I've create an issue in JSLint repo to discuss this: jslint-org/jslint#124