diff --git a/rules/gitlab-ci.yml b/rules/gitlab-ci.yml index e7e1101..d8ff38d 100644 --- a/rules/gitlab-ci.yml +++ b/rules/gitlab-ci.yml @@ -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 diff --git a/rules/npm-package.yml b/rules/npm-package.yml new file mode 100644 index 0000000..c7977f7 --- /dev/null +++ b/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 \ No newline at end of file