1
0
mirror of https://github.com/badges/shields.git synced 2025-11-09 12:40:59 +03:00

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

@@ -12,10 +12,6 @@ module.exports = class PypiImplementation extends PypiBase {
return this.buildRoute('pypi/implementation')
}
static get defaultBadgeData() {
return { label: 'implementation' }
}
static get examples() {
return [
{
@@ -28,6 +24,10 @@ module.exports = class PypiImplementation extends PypiBase {
]
}
static get defaultBadgeData() {
return { label: 'implementation' }
}
static render({ implementations }) {
return {
message: implementations.sort().join(' | '),