jquery/jquery — pull request #1219 by scottgonzalez (2013-04-04 19:54:22+00:00)
Title: JSHint Option Discussion

Ignore the commit. I just wanted to have this discussion in GitHub and we don't have issues turned on :-)

The following options are currently used in our various code repos:

option
jquery
jquery-ui
jquery-mobile
sizzle
qunit

bitwise

✓
✓

boss

✓

✓

✓

camelcase

✓
✓

curly

✓
✓
✓

✓
✓
✓

✓
✓

✓
✓
✓

✓
✓

eqnull

✓
✓

✓
✓
✓

✓
✓

✓
✓
✓

eqeqeq

✓
✓

✓
✓
✓

✓
✓

✓

✓
✓

expr

✓
✓

✓
✓
✓

✓

✓
✓
✓

forin

✓
✓

immed

✓
✓

latedef

✓
✘

✓
✓

✓

✘

✘
✘

newcap

✘

✓

✘

✓
✓

noarg

✓

✓
✓
✓

✓
✓

✓
✓

noempty

✓

✓
✓

nonew

✓
✓

onevar

✓
✓
✓

✓

✓
✘

plusplus

✘
✘

proto

✓

quotmark

✓
✓
✓

✓
✓

✓

✓

✓
✘

smarttabs

✓

✓
✓
✓

sub

✓
✓

✓

✓
✓
✓

✓

trailing

✓
✓
✓

✓
✓
✓

✓

✓
✓
✓

✓
✓

undef

✓
✓
✓

✓
✓
✓

✓
✓

✓
✓
✓

✓
✓

unused

✓
✓

✓
✓
✓

✓

✓
✓

✓
✓

The three columns for each project are: root, js source, tests.
* jquery-mobile doesn't have a `.jshintrc` specifically for tests.
* sizzle is root, speed, tests.
* qunit doesn't have a `.jshintrc` specifically for js source.

✘ means the option is explicitly disabled (set to `false`).

---

I'd like us to agree on a baseline of options that must be enabled in all projects. Once we have that list, we should update our `.jshintrc` files to have the options alphabetized and grouped:

```json
{
"common1": true,
"common2": true,
"common3": true,

"repoSpecific1": true,
"repoSpecific2": true,

"globals": {
"repoGlobal1": true,
"repoGlobal2": false
}
}
```

---

Proposed common options:

```json
{
"boss": true,
"curly": true,
"eqeqeq": true,
"eqnull": true,
"expr": true,
"immed": true,
"noarg": true,
"onevar": true,
"quotmark": "double",
"smarttabs": true,
"trailing": true,
"undef": true,
"unused": true
}
```