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

Stop using jshint for everything but shifter

    XMLWordPrintable

    Details

    • Type: Task
    • Status: Closed
    • Priority: Minor
    • Resolution: Fixed
    • Affects Version/s: 3.1
    • Fix Version/s: 3.2
    • Component/s: JavaScript
    • Labels:
    • Testing Instructions:
      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
    • Affected Branches:
      MOODLE_31_STABLE
    • Fixed Branches:
      MOODLE_32_STABLE
    • Pull Master Branch:
      MDL-54889-master

      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

              • Votes:
                0 Vote for this issue
                Watchers:
                5 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved:
                  Fix Release Date:
                  5/Dec/16