forked from webhintio/hint
/
meta.ts
31 lines (29 loc) 路 941 Bytes
/
meta.ts
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
import { Category } from 'hint/dist/src/lib/enums/category';
import { HintScope } from 'hint/dist/src/lib/enums/hint-scope';
import { HintMetadata } from 'hint/dist/src/lib/types';
const meta: HintMetadata = {
docs: {
category: Category.performance,
description: `Checks if your cache-control header and asset strategy follows best practices`,
name: 'HTTP cache'
},
id: 'http-cache',
schema: [{
additionalProperties: false,
definitions: {
'string-array': {
items: { type: 'string' },
minItems: 1,
type: 'array',
uniqueItems: true
}
},
properties: {
maxAgeResource: { type: 'number' },
maxAgeTarget: { type: 'number' },
revvingPatterns: { $ref: '#/definitions/string-array' }
}
}],
scope: HintScope.site
};
export default meta;