Unify order of properties and methods in services (#3353)

I find having these in a consistent order makes the services much faster to read.

This is the order I’ve generally been using:

1. Category
2. Route
3. Examples
4. Rendering
5. Other helpers (`fetch()`, `transform()`)
6. `handle()`
This commit is contained in:
Paul Melnikow
2019-04-23 21:36:04 -04:00
committed by GitHub
parent 12191e20c4
commit 1cdcaabd38
48 changed files with 769 additions and 740 deletions

View File

@@ -22,10 +22,6 @@ module.exports = class PubVersion extends BaseJsonService {
}
}
static get defaultBadgeData() {
return { label: 'pub' }
}
static get examples() {
return [
{
@@ -45,6 +41,10 @@ module.exports = class PubVersion extends BaseJsonService {
]
}
static get defaultBadgeData() {
return { label: 'pub' }
}
async fetch({ packageName }) {
return this._requestJson({
schema,