Skip to content

Commit

Permalink
feat(rules): add npm package
Browse files Browse the repository at this point in the history
  • Loading branch information
ssube committed Nov 12, 2019
1 parent b84e7b8 commit 42ddb3e
Show file tree
Hide file tree
Showing 2 changed files with 56 additions and 1 deletion.
2 changes: 1 addition & 1 deletion rules/gitlab-ci.yml
Expand Up @@ -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
Expand Down
55 changes: 55 additions & 0 deletions rules/npm-package.yml
@@ -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

0 comments on commit 42ddb3e

Please sign in to comment.