Skip to content

Commit

Permalink
Updated dependencies: jest, npm-package-json-lint and `read-pkg-u…
Browse files Browse the repository at this point in the history
…p` (#8596)

## Description

This PR updates `npm-package-json-lint` to the latest version and adds newly introduced rules. Props to @tclindner for making it possible:

> Hey! I just released v3.3.0 of npm-package-json-lint with a new description-format rule. It has two options:
> 
> requireCapitalFirstLetter - Throws an error if the first character in the description isn't capitalized.
> requireEndingPeriod - Throws an error if the description doesn't end with a period.
> Hopefully this works well for your team!

With this change, we can integrate new linting rule which will ensure that `description` inside `package.json` file will have proper formatting.

I took advantage of the fact that we are changing deps and bumped also `jest` which had also minor release.

I also downgraded `read-pkg-up` to avoid having it installed locally in the package. Instead, we can use the older version which is used with other packages. It doesn't break anything and keeps our setup simpler.

## How has this been tested?
`npm test` should cover all tools.
  • Loading branch information
gziolo authored and ntwb committed Aug 7, 2018
1 parent f6fd8e5 commit c1ddfb2
Show file tree
Hide file tree
Showing 4 changed files with 24 additions and 102 deletions.
109 changes: 10 additions & 99 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

7 changes: 7 additions & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -120,6 +120,13 @@
"npmPackageJsonLintConfig": {
"extends": "@wordpress/npm-package-json-lint-config",
"rules": {
"description-format": [
"error",
{
"requireCapitalFirstLetter": true,
"requireEndingPeriod": true
}
],
"require-publishConfig": "error",
"valid-values-author": [
"error",
Expand Down
4 changes: 4 additions & 0 deletions packages/scripts/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
## 2.1.0 (Unreleased)

- Updated dependencies: `jest`, `npm-package-json-lint` and `read-pkg-up`

## 2.0.0 (2018-07-12)

- Breaking: Updated code to work with Babel 7 ([#7832](https://github.com/WordPress/gutenberg/pull/7832))
Expand Down
6 changes: 3 additions & 3 deletions packages/scripts/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -35,9 +35,9 @@
"@wordpress/jest-preset-default": "file:../jest-preset-default",
"@wordpress/npm-package-json-lint-config": "file:../npm-package-json-lint-config",
"cross-spawn": "^5.1.0",
"jest": "^23.3.0",
"npm-package-json-lint": "^3.0.1",
"read-pkg-up": "^4.0.0",
"jest": "^23.4.2",
"npm-package-json-lint": "^3.3.0",
"read-pkg-up": "^1.0.1",
"resolve-bin": "^0.4.0"
},
"publishConfig": {
Expand Down

0 comments on commit c1ddfb2

Please sign in to comment.