[META] Javascript and YML coding standards

Created on 4 January 2023, over 1 year ago
Updated 22 January 2024, 5 months ago

Clean coding standards are beneficial for readability, maintainability and code re-use, so we should try to remove these messages. The outcome should be that we do not see these any coding standards faults as a matter of course, as they can mask new faults that would be introduced without alert.

"As of Drupal 8, we use ESLint to make sure our JavaScript code is consistent and free from syntax error and leaking variables and that it can be properly minified" as stated on https://www.drupal.org/docs/develop/standards/javascript/eslint-settings β†’

As at 3 Jan 2023 there are 770 coding standards faults on the 4.x branch (and same on 8.x-3.x). Following the successful php clean-up on πŸ“Œ Drupal PHP coding standards Fixed the remaining errors are only within the javascript files:

πŸ“Œ Javascript coding standards (uninstall, permissions, update status) Fixed
cover module_filter.modules_uninstall.js, module_filter.permissions.js and module_filter.update_status.js

πŸ“Œ Javascript coding standards (winnow.js and module_filter.js) Fixed
cover jquery.winnow.js and module_filter.js

πŸ“Œ Javascript coding standard (modules, modules_bare, modules_tab) Fixed
covers module_filter.modules.js, module_filter.modules_bare.js and module_filter.modules_tabs.js

Eslint also executes 'prettier' formatting, a subset of the coding standards. This runs on .js and .yml files
πŸ“Œ Fix prettier formating warnings in javascript files Active
πŸ“Œ Check prettier formatting in .yml files Active

Tasks

  1. Verify which coding standards are being used to generate these problems
  2. Be able to re-create the report locally to enable fixing and checking
  3. Decide whether we fix the files or simply remove the coding checks
πŸ“Œ Task
Status

Fixed

Version

4.0

Component

Code

Created by

πŸ‡¬πŸ‡§United Kingdom jonathan1055

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Comments & Activities

Not all content is available!

It's likely this issue predates Contrib.social: some issue and comment data are missing.

Production build 0.69.0 2024