Opened 5 years ago

Closed 5 years ago

#7863 closed defect (fixed)

Remove lint from auxiliary JS files

Reported by: mpatel Owned by: was
Priority: minor Milestone: sage-4.3.1
Component: notebook Keywords:
Cc: timdumol Merged in: sagenb-0.6
Authors: Mitesh Patel Reviewers: Tim Dumol
Report Upstream: N/A Work issues:
Branch: Commit:
Dependencies: Stopgaps:

Description (last modified by mpatel)

JSLint on "The Good Parts" setting, applied to sagenb/data/sage/js/*.js but not notebook_lib.js. The latter will have its own ticket.

For now, I've disabled strict mode, since most (all?) current browsers don't yet have it.

Given the present architecture of the notebook JS library --- use lots of global variables, etc. --- I haven't implemented all of JSLint's suggestions. More generally:

"If you're writing javascript code, JSLint is a really fine piece of software, too. You don't have to follow its recommendations blindly, but understanding what it says about your code can greatly improve your skills." -- http://jsbeautifier.org/

Attachments (2)

trac_7863-declare_vars_aux_js.patch (13.7 KB) - added by mpatel 5 years ago.
Declare vars in functions, etc., in aux JS files. Depends on #7786. sagenb repo.
trac_7863-declare_vars_aux_js_v2.patch (13.5 KB) - added by mpatel 5 years ago.
Rebased vs. #7786 v11. Replaces previous.

Download all attachments as: .zip

Change History (6)

comment:1 Changed 5 years ago by mpatel

  • Description modified (diff)
  • Status changed from new to needs_review

Changed 5 years ago by mpatel

Declare vars in functions, etc., in aux JS files. Depends on #7786. sagenb repo.

Changed 5 years ago by mpatel

Rebased vs. #7786 v11. Replaces previous.

comment:2 Changed 5 years ago by timdumol

  • Status changed from needs_review to positive_review

Looks good to me. Nice style changes.

comment:3 Changed 5 years ago by timdumol

  • Merged in set to sagenb-0.6
  • Reviewers set to Tim Dumol

comment:4 Changed 5 years ago by timdumol

  • Resolution set to fixed
  • Status changed from positive_review to closed
Note: See TracTickets for help on using tickets.