mediawiki-skins-MinervaNeue/resources
Timo Tijhof c1fe42fede Hygiene: Use early returns in a few places for special cases
When handling special cases that are logically distinct from
the function's main branch, it improves code quality (through
readability and maintainability) to place those first and with
an early return.

The has the benefit of the main return statement being easy to
find at the end of the function. (Not early and/or in a block).

It also means when working on the code, there is generally a
less complexity and fewer nesting levels, given that most code
is in the main branch. This makes is easier and quicker to verify
that code does what it should, as well as making it easy to
extend in the future. When considering to add code to end of a
function's main scope, it should relate to the function's main
branch by default, not a special case. For example, a getName()
method should not end with a top-level statement 'return false'
(unless it is a stub). Rather, one would expect it to end with
`return name`.

Change-Id: I1f3088f2409c82dd3bf757fc8fa27dc97ae2767b
2018-09-04 21:08:00 +00:00
..
skins.minerva.backtotop Docs: Present classes rather than modules 2018-08-20 16:43:41 -07:00
skins.minerva.base.reset Limit editor text area styles to where they are needed 2018-07-26 10:35:16 +08:00
skins.minerva.base.styles Hygiene: replace header and content divs 2018-08-10 20:44:14 +00:00
skins.minerva.categories Make Deferreds promise compatible 2018-08-22 14:27:48 -07:00
skins.minerva.content.styles Add bottom margin to page issues 2018-08-30 19:22:49 +00:00
skins.minerva.content.styles.images Correct search icon 2018-08-14 14:20:00 -07:00
skins.minerva.editor Hygiene: Use early returns in a few places for special cases 2018-09-04 21:08:00 +00:00
skins.minerva.icons.images Don't ship 2 magnifying glass icons 2018-07-24 11:55:41 -06:00
skins.minerva.icons.images.scripts Update: page issue icons 2018-07-17 15:54:17 -05:00
skins.minerva.icons.images.scripts.misc Remove fancy block info popups (move to MobileFrontend) 2018-07-26 23:44:28 +02:00
skins.minerva.icons.images.variants
skins.minerva.icons.loggedin
skins.minerva.icons.page.issues.default.color Update: page issue icons 2018-07-17 15:54:17 -05:00
skins.minerva.icons.page.issues.medium.color Update: page issue icons 2018-07-17 15:54:17 -05:00
skins.minerva.icons.page.issues.uncolored Update: page issue icons 2018-07-17 15:54:17 -05:00
skins.minerva.loggedin.styles Remove minerva.less from global import path 2018-05-29 12:19:00 +00:00
skins.minerva.mainMenu Docs: Present classes rather than modules 2018-08-20 16:43:41 -07:00
skins.minerva.mainMenu.icons
skins.minerva.mainMenu.styles Remove minerva.less from global import path 2018-05-29 12:19:00 +00:00
skins.minerva.mainPage.styles Remove minerva.less from global import path 2018-05-29 12:19:00 +00:00
skins.minerva.newusers Docs: Present classes rather than modules 2018-08-20 16:43:41 -07:00
skins.minerva.notifications Make Deferreds promise compatible 2018-08-22 14:27:48 -07:00
skins.minerva.notifications.badge Make Deferreds promise compatible 2018-08-22 14:27:48 -07:00
skins.minerva.scripts Hygiene: Use early returns in a few places for special cases 2018-09-04 21:08:00 +00:00
skins.minerva.scripts.top
skins.minerva.tablet.scripts Only render table of contents on pages with a table of contents 2018-06-19 18:18:03 +00:00
skins.minerva.tablet.styles Do not restrict images to 320px at tablet resolution 2018-07-05 18:05:07 +00:00
skins.minerva.talk Make Deferreds promise compatible 2018-08-22 14:27:48 -07:00
skins.minerva.toggling Hygiene: update JSDoc boxed and JQuery types 2018-07-03 11:10:12 -05:00
skins.minerva.userpage.icons
skins.minerva.userpage.styles Remove minerva.less from global import path 2018-05-29 12:19:00 +00:00
skins.minerva.watchstar