1
0
Fork 0

feat(rules): add npm package

This commit is contained in:
ssube 2019-11-11 19:55:57 -06:00
parent b84e7b80c6
commit 42ddb3ecd7
Signed by: ssube
GPG Key ID: 3EED7B957D362AF1
2 changed files with 56 additions and 1 deletions

View File

@ -79,7 +79,7 @@ rules:
type: string
- name: gitlab-top-level
desc: should only have includes and stages at the top level scope
desc: should only have includes and stages at the top level
level: info
tags:
- gitlab

55
rules/npm-package.yml Normal file
View File

@ -0,0 +1,55 @@
name: npm-package
rules:
- name: npm-package-license
desc: packages should have attribution information
level: info
tags:
- npm-package
- important
check:
type: object
required: [author, license, main, version]
properties:
author:
type: string
license:
type: string
main:
type: string
version:
type: string
- name: npm-package-publish
desc: packages should specify the registry to which they publish
level: info
tags:
- npm-package
- optional
check:
type: object
required: [publishConfig]
properties:
publishConfig:
type: object
required: [registry]
properties:
registry:
type: string
- name: npm-package-keywords
desc: packages should have normalized keywords
level: info
tags:
- npm-package
- optional
check:
type: object
required: [keywords]
properties:
keywords:
type: array
items:
type: string