Ticket #7863 (closed defect: fixed)

Opened 3 years ago

Last modified 3 years ago

Remove lint from auxiliary JS files

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

Description (last modified by mpatel) (diff)

 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

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

Change History

comment:1 Changed 3 years ago by mpatel

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

Changed 3 years ago by mpatel

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

Changed 3 years ago by mpatel

Rebased vs. #7786 v11. Replaces previous.

comment:2 Changed 3 years ago by timdumol

  • Status changed from needs_review to positive_review

Looks good to me. Nice style changes.

comment:3 Changed 3 years ago by timdumol

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

comment:4 Changed 3 years ago by timdumol

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