Ghost/core/frontend/helpers
Hannah Wolfe 22e13acd65 Updated var declarations to const/let and no lists
- All var declarations are now const or let as per ES6
- All comma-separated lists / chained declarations are now one declaration per line
- This is for clarity/readability but also made running the var-to-const/let switch smoother
- ESLint rules updated to match

How this was done:

- npm install -g jscodeshift
- git clone https://github.com/cpojer/js-codemod.git
- git clone git@github.com:TryGhost/Ghost.git shallow-ghost
- cd shallow-ghost
- jscodeshift -t ../js-codemod/transforms/unchain-variables.js . -v=2
- jscodeshift -t ../js-codemod/transforms/no-vars.js . -v=2
- yarn
- yarn test
- yarn lint / fix various lint errors (almost all indent) by opening files and saving in vscode
- grunt test-regression
- sorted!
2020-04-29 16:51:13 +01:00
..
tpl Added member's subscription cancellation helper {{cancel_link}} (#11434) 2019-12-12 19:59:15 +07:00
asset.js Moved helper proxy into a service 2020-04-08 17:22:44 +01:00
author.js Moved helper proxy into a service 2020-04-08 17:22:44 +01:00
authors.js Moved helper proxy into a service 2020-04-08 17:22:44 +01:00
body_class.js Moved helper proxy into a service 2020-04-08 17:22:44 +01:00
cancel_link.js Moved labs usage into cancel_link helper file 2020-04-08 19:31:55 +01:00
concat.js Moved helper proxy into a service 2020-04-08 17:22:44 +01:00
content.js Moved helper proxy into a service 2020-04-08 17:22:44 +01:00
date.js Moved helper proxy into a service 2020-04-08 17:22:44 +01:00
encode.js Moved helper proxy into a service 2020-04-08 17:22:44 +01:00
excerpt.js Moved helper proxy into a service 2020-04-08 17:22:44 +01:00
facebook_url.js Moved helper proxy into a service 2020-04-08 17:22:44 +01:00
foreach.js Moved helper proxy into a service 2020-04-08 17:22:44 +01:00
get.js Updated var declarations to const/let and no lists 2020-04-29 16:51:13 +01:00
ghost_foot.js Updated var declarations to const/let and no lists 2020-04-29 16:51:13 +01:00
ghost_head.js Updated var declarations to const/let and no lists 2020-04-29 16:51:13 +01:00
has.js Updated var declarations to const/let and no lists 2020-04-29 16:51:13 +01:00
img_url.js Moved helper proxy into a service 2020-04-08 17:22:44 +01:00
index.js Improved helper index, use glob to read directory 2020-04-10 13:08:41 +01:00
is.js Updated var declarations to const/let and no lists 2020-04-29 16:51:13 +01:00
lang.js Moved helper proxy into a service 2020-04-08 17:22:44 +01:00
link_class.js Moved non-helper code out of helpers 2020-04-10 12:27:43 +01:00
link.js Moved non-helper code out of helpers 2020-04-10 12:27:43 +01:00
meta_description.js Moved helper proxy into a service 2020-04-08 17:22:44 +01:00
meta_title.js Moved helper proxy into a service 2020-04-08 17:22:44 +01:00
navigation.js Updated var declarations to const/let and no lists 2020-04-29 16:51:13 +01:00
page_url.js Moved helper proxy into a service 2020-04-08 17:22:44 +01:00
pagination.js Moved helper proxy into a service 2020-04-08 17:22:44 +01:00
plural.js Moved helper proxy into a service 2020-04-08 17:22:44 +01:00
post_class.js Updated var declarations to const/let and no lists 2020-04-29 16:51:13 +01:00
prev_post.js Updated var declarations to const/let and no lists 2020-04-29 16:51:13 +01:00
price.js Moved helper proxy into a service 2020-04-08 17:22:44 +01:00
raw.js Added raw handlebars helper 2020-04-06 17:26:50 +01:00
reading_time.js Moved helper proxy into a service 2020-04-08 17:22:44 +01:00
t.js Updated var declarations to const/let and no lists 2020-04-29 16:51:13 +01:00
tags.js Updated var declarations to const/let and no lists 2020-04-29 16:51:13 +01:00
title.js Moved helper proxy into a service 2020-04-08 17:22:44 +01:00
twitter_url.js Moved helper proxy into a service 2020-04-08 17:22:44 +01:00
url.js Updated var declarations to const/let and no lists 2020-04-29 16:51:13 +01:00