Bug Tracker

Ticket #10692 (closed enhancement: fixed)

Opened 3 years ago

Last modified 3 years ago

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:
Blocking: Blocked by:

Description (last modified by mikesherov) (diff)

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?

Change History

comment:1 Changed 3 years ago by rwaldron

  • Keywords 1.8-discuss added
  • Priority changed from undecided to low
  • Status changed from new to open
  • Component changed from unfiled to misc

+1 "onevar" changes are DEFINITELY welcome.

comment:2 follow-up: ↓ 4 Changed 3 years ago by dmethvin

  • Component changed from misc to build
  • Milestone changed from None to 1.7.1

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

comment:3 Changed 3 years ago by dmethvin

+1, Yeah!

comment:4 in reply to: ↑ 2 Changed 3 years ago by rwaldron

Replying to dmethvin:

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

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

comment:5 Changed 3 years ago by rwaldron

@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.

comment:6 Changed 3 years ago by dmethvin

  • Milestone changed from 1.7.1 to 1.8

comment:7 Changed 3 years ago by timmywil

  • Summary changed from use JSHint for the build instead of JSLint to Configure the jshint options to more accurately match the style guide

comment:8 Changed 3 years ago by timmywil

+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.

comment:9 Changed 3 years ago by mikesherov

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

comment:10 Changed 3 years ago by timmywil

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

comment:11 Changed 3 years ago by timmywil

And I've edited that file several times.

comment:12 Changed 3 years ago by mikesherov

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.

comment:15 Changed 3 years ago by mikesherov

  • Owner set to mikesherov
  • Status changed from open to assigned

comment:16 Changed 3 years ago by mikesherov

  • Description modified (diff)

comment:17 Changed 3 years ago by Mike Sherov

  • Status changed from assigned to closed
  • Resolution set to fixed

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

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

Changeset: 98386cfd775fdfa7837ccbec173b04f1e6d57896

comment:18 Changed 3 years ago by dmethvin

  • Keywords 1.8-discuss removed
  • Milestone changed from 1.8 to 1.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.

Note: See TracTickets for help on using tickets.