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

Grunt: Respect local .stylelintignore, .eslintignore

    • Icon: Bug Bug
    • Resolution: Unresolved
    • Icon: Minor Minor
    • None
    • 4.1.9, 4.2.6, 4.3, 4.4, 4.5
    • JavaScript
    • MOODLE_401_STABLE, MOODLE_402_STABLE, MOODLE_403_STABLE, MOODLE_404_STABLE, MOODLE_405_STABLE
    • MDL-81263-main
    • Hide
      1. Install plugin mootimeter from https://github.com/mebis-lp/moodle-mod_mootimeter with branch "stylelintignore-demo"
      2. The branch already contains demo files for .stylelintignore and .eslintignore.
      3. Run grunt ignorefiles
      4. Verify that file /.stylelintignore (in moodle code base directory, not in mod/mootimeter) contains entry "mod/mootimeter/styles.css"
      5. Verify that file /.stylelintignore (in moodle code base directory, not in mod/mootimeter) contains entry "mod/mootimeter/stylelinttest.txt"
      6. Verify that file /.stylelintignore (in moodle code base directory, not in mod/mootimeter) does not contain entry "mod/mootimeter/stylelinttest2.txt"
      7. Verify that file /.stylelintignore (in moodle code base directory, not in mod/mootimeter) does not contain entry "mod/mootimeter/stylelinttest3.txt"
      8. Verify that file /.eslintignore (in moodle code base directory, not in mod/mootimeter) contains entry "mod/mootimeter/eslinttest.txt"
      9. Verify that file /.eslintignore (in moodle code base directory, not in mod/mootimeter) does not contain entry "mod/mootimeter/eslinttest2.txt"
      10. Verify that file /.eslintignore (in moodle code base directory, not in mod/mootimeter) does not contain entry "mod/mootimeter/eslinttest3.txt"
      11. Run grunt stylelint
      12. Verify that there are no errors
      Show
      Install plugin mootimeter from https://github.com/mebis-lp/moodle-mod_mootimeter with branch "stylelintignore-demo" The branch already contains demo files for .stylelintignore and .eslintignore. Run grunt ignorefiles Verify that file /.stylelintignore (in moodle code base directory, not in mod/mootimeter) contains entry "mod/mootimeter/styles.css" Verify that file /.stylelintignore (in moodle code base directory, not in mod/mootimeter) contains entry "mod/mootimeter/stylelinttest.txt" Verify that file /.stylelintignore (in moodle code base directory, not in mod/mootimeter) does not contain entry "mod/mootimeter/stylelinttest2.txt" Verify that file /.stylelintignore (in moodle code base directory, not in mod/mootimeter) does not contain entry "mod/mootimeter/stylelinttest3.txt" Verify that file /.eslintignore (in moodle code base directory, not in mod/mootimeter) contains entry "mod/mootimeter/eslinttest.txt" Verify that file /.eslintignore (in moodle code base directory, not in mod/mootimeter) does not contain entry "mod/mootimeter/eslinttest2.txt" Verify that file /.eslintignore (in moodle code base directory, not in mod/mootimeter) does not contain entry "mod/mootimeter/eslinttest3.txt" Run grunt stylelint Verify that there are no errors
    • Hide

      Code verified against automated checks.

      Checked MDL-81263 using repository: https://github.com/phmemmel/moodle

      More information about this report

      Built on: Tue Apr 22 05:39:43 UTC 2025

      Show
      Code verified against automated checks. Checked MDL-81263 using repository: https://github.com/phmemmel/moodle main (0 errors / 0 warnings) [branch: MDL-81263-main | CI Job ] More information about this report Built on: Tue Apr 22 05:39:43 UTC 2025
    • Show
      Launching automatic jobs for branch MDL-81263 -main https://ci.moodle.org/view/Testing/job/DEV.02%20-%20Developer-requested%20PHPUnit/18465/ PHPUnit (sqlsrv) https://ci.moodle.org/view/Testing/job/DEV.01%20-%20Developer-requested%20Behat/63235/ Behat (NonJS - boost and classic) https://ci.moodle.org/view/Testing/job/DEV.01%20-%20Developer-requested%20Behat/63236/ Behat (Firefox - boost) https://ci.moodle.org/view/Testing/job/DEV.01%20-%20Developer-requested%20Behat/63237/ Behat (Firefox - classic) https://ci.moodle.org/view/Testing/job/DEV.01%20-%20Developer-requested%20Behat/63238/ App tests (stable app version) Built on: Fri Mar 7 06:26:14 UTC 2025

      Currently it is not possible to exclude plugin files from being checked by grunt eslint and stylelint, because grunt will only collect library files declared in thirdpartylibs.xml

      Grunt should respect the ignore files in the plugin directories, for example mod/myplugin/.stylelintignore and mod/myplugin/.eslintignore

            phmemmel PhMemmel
            phmemmel PhMemmel
            Stefan Hanauska Stefan Hanauska
            Votes:
            2 Vote for this issue
            Watchers:
            7 Start watching this issue

              Created:
              Updated:

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