Skip to content

Commit 66b748c

Browse files
authored
Fixes #48 - Define valid-values-license as an array field (#49)
1 parent 498d329 commit 66b748c

File tree

4 files changed

+8
-2
lines changed

4 files changed

+8
-2
lines changed

CHANGELOG.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,10 @@ This project adheres to [Semantic Versioning](http://semver.org/).
1111

1212
### Removed
1313

14+
## [2.7.1] - 2017-08-15
15+
### Fixed
16+
- [Issue #48](https://github.com/tclindner/npm-package-json-lint/issues/48) [valid-values-license](https://github.com/tclindner/npm-package-json-lint/wiki/valid-values-license)
17+
1418
## [2.7.0] - 2017-08-08
1519
### Added
1620
- The ability to pass config using:

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "npm-package-json-lint",
3-
"version": "2.7.0",
3+
"version": "2.7.1",
44
"description": "CLI app for linting package.json files.",
55
"keywords": [
66
"lint",

src/Config.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,7 @@ class Config {
1919
this.arrayRules = [
2020
'valid-values-author',
2121
'valid-values-private',
22+
'valid-values-license',
2223
'no-restricted-dependencies',
2324
'no-restricted-devDependencies',
2425
'no-restricted-pre-release-dependencies',

tests/unit/Config.test.js

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -386,7 +386,8 @@ describe('Config Unit Tests', function() {
386386
'require-author': 'error',
387387
'require-version': 'warning',
388388
'valid-values-author': ['error', ['Thomas', 'Lindner', 'Thomas Lindner']],
389-
'valid-values-private': ['warning', [true, false]]
389+
'valid-values-private': ['warning', [true, false]],
390+
'valid-values-license': ['error', ['private', 'unlicensed']]
390391
};
391392
const config = new Config(rcFileObj);
392393

0 commit comments

Comments
 (0)