Uploaded image for project: 'Moodle'
  1. Moodle
  2. MDL-54889

Stop using jshint for everything but shifter

    XMLWordPrintable

Details

    • Task
    • Status: Closed
    • Minor
    • Resolution: Fixed
    • 3.1
    • 3.2
    • JavaScript
    • MOODLE_31_STABLE
    • MOODLE_32_STABLE
    • MDL-54889-master
    • Hide
      1. Run grunt amd
      2. VERIFY that jshint task is no longer run, just uglify and eslint
      3. Run grunt shifter and verify that the task passes
      4. Introduce a jshint lint error into a YUI module (e.g. introduce a variable which is defined but never used, remove a trailing semi-colon, etc)
      5. Run grunt shifter
      6. VERIFY the shifter output picks up the lint error e.g:

        shifter [err] /Users/danp/moodles/pm/moodle/lib/yui/src/dock/js/dockeditem.js contains 1 lint errors
        

      7. remove the entire node_modules directory, and run npm install
      8. repeat the grunt shifter run and confirm that the same lint error was picked up
      Show
      Run grunt amd VERIFY that jshint task is no longer run, just uglify and eslint Run grunt shifter and verify that the task passes Introduce a jshint lint error into a YUI module (e.g. introduce a variable which is defined but never used, remove a trailing semi-colon, etc) Run grunt shifter VERIFY the shifter output picks up the lint error e.g: shifter [err] /Users/danp/moodles/pm/moodle/lib/yui/src/dock/js/dockeditem.js contains 1 lint errors remove the entire node_modules directory, and run npm install repeat the grunt shifter run and confirm that the same lint error was picked up

    Description

      Once MDL-52127 lands, we should stop using using jshint for everything but shifter because eslint is doing the same job plus more. This task is for that.

      General work required:

      • Completely remove jshint from grunt builds
      • Stop using jshint in prechecker and switch to eslint (MDLSITE-3782 will enable eslint when available in core)
      • Consider if we need to leave the .jshintrc in place (probably yes, so we get the results from shifter)

      Attachments

        Issue Links

          Activity

            People

              poltawski Dan Poltawski
              poltawski Dan Poltawski
              Eloy Lafuente (stronk7) Eloy Lafuente (stronk7)
              Andrew Lyons Andrew Lyons
              Jake Dallimore Jake Dallimore
              David Woloszyn, Huong Nguyen, Jake Dallimore, Meirza, Michael Hawkins, Raquel Ortega, Safat Shahin, Stevani Andolo
              Votes:
              0 Vote for this issue
              Watchers:
              5 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:
                5/Dec/16