Ghost/core/server/models
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
..
base Updated var declarations to const/let and no lists 2020-04-29 16:51:13 +01:00
plugins Updated var declarations to const/let and no lists 2020-04-29 16:51:13 +01:00
relations Updated var declarations to const/let and no lists 2020-04-29 16:51:13 +01:00
action.js Added model implementation for actions 2019-02-06 21:36:09 +01:00
api-key.js Created DB Backup integration (#10974) 2019-08-02 17:28:02 +08:00
author.js Added plugin based author and public tag models in API v2 (#10284) 2019-01-03 20:30:35 +01:00
email.js Added default stats object to email model 2019-11-08 17:11:54 +07:00
index.js Updated var declarations to const/let and no lists 2020-04-29 16:51:13 +01:00
integration.js Ensured Admin API cannot fetch internal integrations (#10501) 2019-07-24 11:52:55 +02:00
invite.js Updated var declarations to const/let and no lists 2020-04-29 16:51:13 +01:00
label.js Updated var declarations to const/let and no lists 2020-04-29 16:51:13 +01:00
member-stripe-customer.js Added upsert method to stripe models 2019-10-09 16:24:51 +07:00
member.js Added `member.avatar_image` for member gravatars in themes (#11584) 2020-02-19 10:08:12 +00:00
mobiledoc-revision.js Added mobiledoc revisions functionality 2018-10-09 15:31:09 +02:00
permission.js Updated var declarations to const/let and no lists 2020-04-29 16:51:13 +01:00
post.js Updated var declarations to const/let and no lists 2020-04-29 16:51:13 +01:00
posts-meta.js Updated post model url transforms for posts/posts_meta split (#11223) 2019-10-09 13:38:08 +01:00
role.js Updated var declarations to const/let and no lists 2020-04-29 16:51:13 +01:00
session.js Removed user_id constraint when upserting session (#10085) 2018-10-30 16:15:48 +07:00
settings.js Updated var declarations to const/let and no lists 2020-04-29 16:51:13 +01:00
stripe-customer-subscription.js Prefixed stripe_customers_subscriptions with members 2019-10-09 16:24:51 +07:00
tag-public.js Added plugin based author and public tag models in API v2 (#10284) 2019-01-03 20:30:35 +01:00
tag.js Updated var declarations to const/let and no lists 2020-04-29 16:51:13 +01:00
user.js Updated var declarations to const/let and no lists 2020-04-29 16:51:13 +01:00
webhook.js Updated var declarations to const/let and no lists 2020-04-29 16:51:13 +01:00