Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Latest commit

 

History

History
History
15 lines (8 loc) · 1.11 KB

File metadata and controls

15 lines (8 loc) · 1.11 KB
Copy raw file
Download raw file
Edit and raw actions

Javascript in Joomla 4

Joomla 4 uses ES6 syntax where possible. As part of this change we decided to use an industry standard codestyle rules for our JavaScript - the AirBNB coding standards. These can be found on their GitHub page.

We have four modifications to the defaults:

  1. We allow parameter reassignment of function parameters to allow easier setting of defaults (for examples please see the ESLint rules here)

  2. We only allow the imports of dependencies from NPM in our build directory (build/) (rather than in all files)

  3. We currently allow browser alerts using the alert() function (the long term intention is to disable this as we move to our custom element alerts)

  4. We always enable JavaScript strict mode as we aren't using JavaScript modules at this time

We also use ESLint to enforce these rules. If you are familiar with JavaScript from other projects you've worked on you can find our ESLint rules on GitHub

Morty Proxy This is a proxified and sanitized view of the page, visit original site.