-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathchecks.js
95 lines (85 loc) · 2.2 KB
/
checks.js
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
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
module.exports = {
checkList: {
content_readme: {
config: 'base',
kind: 'content_contain_string',
file: 'README.md',
contains: ['Voxgig'],
},
exist_codeconduct: {
config: 'base',
kind: 'file_exist',
file: 'CODE_OF_CONDUCT.md',
},
exist_dist: {
config: 'ts',
kind: 'fileX_exist_if_contain_json',
fileX: '',
file: 'package.json',
contains: ['main'],
contains_type: 'key',
contains_is_not: 'dist/index.js',
},
exist_entry: {
config: 'js',
kind: 'fileX_exist_if_contain_json',
fileX: '',
file: 'package.json',
contains: ['main'],
contains_type: 'key',
contains_is_not: 'index.js',
},
exist_license: {
config: 'base',
kind: 'file_exist',
file: 'LICENSE',
},
exist_pkgjson: {
config: 'base',
kind: 'file_exist',
file: 'package.json',
},
exist_readme: {
config: 'base',
kind: 'file_exist',
file: 'README.md',
},
readme_headings: {
config: 'base',
kind: 'content_contain_markdown',
file: 'README.md',
contains: [
{ type: 'heading', depth: 1, text: '<package.name>' },
{ type: 'heading', depth: 2, text: 'Install' },
{ type: 'heading', depth: 2, text: 'Quick Example' },
{ type: 'heading', depth: 2, text: 'More Examples' },
{ type: 'heading', depth: 2, text: 'Motivation' },
{ type: 'heading', depth: 2, text: 'Support' },
{ type: 'heading', depth: 2, text: 'API' },
{ type: 'heading', depth: 2, text: 'Contributing' },
{ type: 'heading', depth: 2, text: 'Background' },
],
},
test_pkgjson: {
config: 'base',
kind: 'content_contain_json',
file: 'package.json',
contains: ['scripts', 'test'],
contains_type: 'key',
},
check_default: {
config: 'base',
kind: 'check_branch',
branch: 'main',
},
version_codeconduct: {
config: 'base',
kind: 'content_contain_string',
file: 'CODE_OF_CONDUCT.md',
contains: [
'version 2.1',
'https://www.contributor-covenant.org/version/2/1/',
],
},
},
}