-
Notifications
You must be signed in to change notification settings - Fork 33
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* #43 Add test fixtures for new config loading options * Bump version and dependencies * Pass package.json file contents to Config class * #43 Update config class with new options 1. a `npmPackageJsonLintConfig` property in `package.json` 2. a `.npmpackagejsonlintrc` file in the current working directory 3. a `npmpackagejsonlint.config.js` file that exports a config object in the current working directory. 4. a global `.npmpackagejsonlintrc` file in the root of your user directory 5. a global `npmpackagejsonlint.config.js` file that exports a config object in the root of your user directory * #43 Update changelog with new config options * #43 Update README with documentation on configuration * Fix case typo in file page * Adjusting coverage for require methods
- Loading branch information
Showing
10 changed files
with
428 additions
and
46 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
28 changes: 28 additions & 0 deletions
28
tests/fixtures/configJavaScriptFile/npmpackagejsonlint.config.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
'use strict'; | ||
|
||
module.exports = { | ||
rules: { | ||
'require-author': 'error', | ||
'require-description': 'error', | ||
'require-devDependencies': 'error', | ||
'require-homepage': 'error', | ||
'require-keywords': 'error', | ||
'require-license': 'warning', | ||
'require-name': 'error', | ||
'require-repository': 'error', | ||
'require-scripts': 'error', | ||
'require-version': 'error', | ||
'description-type': 'error', | ||
'devDependencies-type': 'error', | ||
'homepage-type': 'error', | ||
'keywords-type': 'error', | ||
'name-type': 'error', | ||
'repository-type': 'error', | ||
'version-type': 'error', | ||
'valid-values-author': ['error', [ | ||
'Thomas Lindner' | ||
]], | ||
'name-format': 'error', | ||
'version-format': 'error' | ||
} | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
{ | ||
"name": "npm-package-json-lint", | ||
"version": "0.1.0", | ||
"description": "CLI app for linting package.json files.", | ||
"keywords": [ | ||
"lint" | ||
], | ||
"homepage": "https://github.com/tclindner/npm-package-json-lint", | ||
"author": "Thomas Lindner", | ||
"repository": { | ||
"type": "git", | ||
"url": "https://github.com/tclindner/npm-package-json-lint" | ||
}, | ||
"devDependencies": { | ||
"mocha": "^2.4.5" | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,43 @@ | ||
{ | ||
"name": "npm-package-json-lint", | ||
"version": "0.1.0", | ||
"description": "CLI app for linting package.json files.", | ||
"keywords": [ | ||
"lint" | ||
], | ||
"homepage": "https://github.com/tclindner/npm-package-json-lint", | ||
"author": "Thomas Lindner", | ||
"repository": { | ||
"type": "git", | ||
"url": "https://github.com/tclindner/npm-package-json-lint" | ||
}, | ||
"devDependencies": { | ||
"mocha": "^2.4.5" | ||
}, | ||
"npmPackageJsonLintConfig": { | ||
"rules": { | ||
"require-author": "error", | ||
"require-description": "error", | ||
"require-devDependencies": "error", | ||
"require-homepage": "error", | ||
"require-keywords": "error", | ||
"require-license": "warning", | ||
"require-name": "error", | ||
"require-repository": "error", | ||
"require-scripts": "error", | ||
"require-version": "error", | ||
"description-type": "error", | ||
"devDependencies-type": "error", | ||
"homepage-type": "error", | ||
"keywords-type": "error", | ||
"name-type": "error", | ||
"repository-type": "error", | ||
"version-type": "error", | ||
"valid-values-author": ["error", [ | ||
"Thomas Lindner" | ||
]], | ||
"name-format": "error", | ||
"version-format": "error" | ||
} | ||
} | ||
} |
Oops, something went wrong.