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

Add eslint config/package definition to earlier branches (partial backport of MDL-52127)

XMLWordPrintable

    • MOODLE_30_STABLE, MOODLE_31_STABLE
    • MOODLE_30_STABLE, MOODLE_31_STABLE
    • Hide
      1. VERIFY: no built js files have been affected by patch
      2. npm install
      3. Run node_modules/.bin/eslint lib/amd/src/first.js
      4. VERIFY: the file is checked and some warnings are printed
      5. Run node_modules/.bin/eslint lib/amd/src/mustache.js
      6. VERIFY: the file is ignored
      Show
      VERIFY: no built js files have been affected by patch npm install Run node_modules/.bin/eslint lib/amd/src/first.js VERIFY: the file is checked and some warnings are printed Run node_modules/.bin/eslint lib/amd/src/mustache.js VERIFY: the file is ignored

      It's been requested by a few different people that we backport the eslint to earlier branches.

      I don't think we should do a straight backport though cos:

      • Adding eslint into the grunt toolchain is a nono - we can't break peoples production builds
      • The eslint version in master requires node 4, we can't raise that on stables either

      So instead I propose:

      • We backport the config file
      • We add a package.json entry for eslint so its installed with npm
      • We backport the eslint ignore/global definitions comments to reduce noise

      There will still be a lot of complaints in existing code but:
      https://docs.moodle.org/dev/Coding_Style#Policy_about_coding-style_only_fixes

            poltawski Dan Poltawski
            poltawski Dan Poltawski
            Andrew Lyons Andrew Lyons
            Rajesh Taneja Rajesh Taneja
            Votes:
            1 Vote for this issue
            Watchers:
            5 Start watching this issue

              Created:
              Updated:
              Resolved:

                Error rendering 'clockify-timesheets-time-tracking-reports:timer-sidebar'. Please contact your Jira administrators.