Skip to main content

Bug Tracker

Side navigation

#10692 closed enhancement (fixed)

Opened November 06, 2011 04:24AM UTC

Closed December 09, 2011 02:06AM UTC

Last modified March 08, 2012 09:18PM UTC

Configure the jshint options to more accurately match the style guide

Reported by: mikesherov Owned by: mikesherov
Priority: low Milestone: 1.7.2
Component: build Version: 1.7
Keywords: Cc:
Blocked by: Blocking:
Description

JSHint's configuration options are way better than JSLint's.

In particular, the "undef" option is useful, and would only require minor changes to core code.

1.8?

Attachments (0)
Change History (18)

Changed November 06, 2011 04:26AM UTC by rwaldron comment:1

component: unfiledmisc
keywords: → 1.8-discuss
priority: undecidedlow
status: newopen

+1 "onevar" changes are DEFINITELY welcome.

Changed November 06, 2011 01:53PM UTC by dmethvin comment:2

component: miscbuild
milestone: None1.7.1

Yeah I would love to have a way to catch undeclared variables. Scary.

Changed November 06, 2011 01:53PM UTC by dmethvin comment:3

+1, Yeah!

Changed November 06, 2011 04:06PM UTC by rwaldron comment:4

Replying to [comment:2 dmethvin]:

Yeah I would love to have a way to catch undeclared variables. Scary.

That's another option we can switch on: "undef"

Changed November 06, 2011 04:08PM UTC by rwaldron comment:5

@mikesherov - before any code gets written for this... I want to show you a "build tool" system that @cowboy has been developing, it might make easy work of this.

Changed November 14, 2011 04:10PM UTC by dmethvin comment:6

milestone: 1.7.11.8

Changed November 14, 2011 07:20PM UTC by timmywil comment:7

summary: use JSHint for the build instead of JSLintConfigure the jshint options to more accurately match the style guide

Changed November 14, 2011 07:22PM UTC by timmywil comment:8

+1, We already use JSHint, but the options need to be configured to match the styleguide. Code should be reorganized so onevar and other available options will pass.

Changed November 14, 2011 10:44PM UTC by mikesherov comment:9

Are you sure? Git version seems to indicate that we're using JSLint instead of JSHint:

https://github.com/jquery/jquery/blob/master/build/lib/jslint.js

https://github.com/jquery/jquery/blob/master/build/jslint-check.js

Changed November 15, 2011 01:46AM UTC by timmywil comment:10

You know what, I use jshint locally so often, I couldn't believe we didn't use it. woooops.

Changed November 15, 2011 01:50AM UTC by timmywil comment:11

And I've edited that file several times.

Changed November 15, 2011 01:54AM UTC by mikesherov comment:12

I'll have a PR with just an in place change shortly. After the change is in place, I'll go immediately to work on onevar and undef.

Changed November 15, 2011 04:11AM UTC by mikesherov comment:13

Changed November 15, 2011 01:05PM UTC by mikesherov comment:14

Changed November 30, 2011 02:52AM UTC by mikesherov comment:15

owner: → mikesherov
status: openassigned

Changed November 30, 2011 02:53AM UTC by mikesherov comment:16

description: JSHint's configuration options are way better than JSLint's. \ \ In particular, the "onevar" option is useful, and would only require minor changes to core code. \ \ 1.8?JSHint's configuration options are way better than JSLint's. \ \ In particular, the "undef" option is useful, and would only require minor changes to core code. \ \ 1.8?

Changed December 09, 2011 02:06AM UTC by Mike Sherov comment:17

resolution: → fixed
status: assignedclosed

Fix #10692. JSLint is dead! Long live JSHint!

Still needs this sizzle PR: https://github.com/jquery/sizzle/pull/82

Changeset: 98386cfd775fdfa7837ccbec173b04f1e6d57896

Changed December 10, 2011 06:38PM UTC by dmethvin comment:18

keywords: 1.8-discuss
milestone: 1.81.7.2

There was no reason to wait until 1.8 for this, probably true for any of the build or behind-the-scenes changes if they're easy to do.