Add JSONLint schema

This commit is contained in:
birjolaxew 2017-09-13 16:21:34 +02:00
parent 6e5f68d3b7
commit 9c0039d121
No known key found for this signature in database
GPG key ID: 548A6D4C439CC3DD
2 changed files with 35 additions and 1 deletions

34
.jsonlintschema Normal file
View file

@ -0,0 +1,34 @@
{
"title": "SimpleIcons icons",
"type": "object",
"properties": {
"icons": {
"description": "The actual icons",
"type": "array",
"items": {
"description": "A single icon",
"type": "object",
"properties": {
"title": {
"description": "The icons name",
"type": "string",
"required": true
},
"hex": {
"description": "The icons color, as HEX (without #)",
"type": "string",
"pattern": "^[0-9A-F]{6}$",
"required": true
},
"source": {
"description": "The website from which the icon originated",
"type": "string",
"pattern": "^https?://",
"required": true
}
},
"required": true
}
}
}
}

View file

@ -15,6 +15,6 @@
"jsonlint": "^1.6.2" "jsonlint": "^1.6.2"
}, },
"scripts": { "scripts": {
"jsonlint": "jsonlint _data/simple-icons.json -q" "jsonlint": "jsonlint _data/simple-icons.json -q -V .jsonlintschema"
} }
} }