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:
@@ -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,
|
||||
|
||||
Reference in New Issue
Block a user