Skip to content

Commit

Permalink
Monorepo: add package.json linter
Browse files Browse the repository at this point in the history
  • Loading branch information
simison committed Oct 14, 2019
1 parent 6caf8ae commit 562d998
Show file tree
Hide file tree
Showing 25 changed files with 364 additions and 21 deletions.
2 changes: 1 addition & 1 deletion apps/full-site-editing/package.json
Expand Up @@ -9,7 +9,7 @@
"directory": "apps/full-site-editing"
},
"private": true,
"author": "Automattic, Inc.",
"author": "Automattic Inc.",
"license": "GPL-2.0-or-later",
"bugs": {
"url": "https://github.com/Automattic/wp-calypso/issues"
Expand Down
2 changes: 1 addition & 1 deletion apps/notifications/package.json
Expand Up @@ -10,7 +10,7 @@
"directory": "apps/notifications"
},
"private": true,
"author": "Automattic, Inc.",
"author": "Automattic Inc.",
"license": "GPL-2.0-or-later",
"bugs": {
"url": "https://github.com/Automattic/wp-calypso/issues"
Expand Down
2 changes: 1 addition & 1 deletion apps/o2-blocks/package.json
Expand Up @@ -10,7 +10,7 @@
"directory": "packages/o2-blocks"
},
"private": true,
"author": "Automattic, Inc.",
"author": "Automattic Inc.",
"license": "GPL-2.0-or-later",
"bugs": {
"url": "https://github.com/Automattic/wp-calypso/issues"
Expand Down
2 changes: 1 addition & 1 deletion apps/wpcom-block-editor/package.json
Expand Up @@ -9,7 +9,7 @@
"directory": "apps/wpcom-block-editor"
},
"private": true,
"author": "Automattic, Inc.",
"author": "Automattic Inc.",
"license": "GPL-2.0-or-later",
"bugs": {
"url": "https://github.com/Automattic/wp-calypso/issues"
Expand Down
4 changes: 3 additions & 1 deletion docs/monorepo.md
Expand Up @@ -51,7 +51,7 @@ The only exception are `devDependencies` which _must be declared in the wp-calyp
"module": "dist/esm/index.js",
"sideEffects": false,
"keywords": [ "wordpress" ],
"author": "Your Name <you@example.com> (https://yoursite.wordpress.com/)",
"author": "Automattic Inc.",
"contributors": [],
"homepage": "https://github.com/Automattic/wp-calypso",
"license": "GPL-2.0-or-later",
Expand All @@ -77,6 +77,8 @@ The only exception are `devDependencies` which _must be declared in the wp-calyp

If your package requires compilation, the `package.json` `prepare` script should compile the package. If it contains ES6+ code that needs to be transpiled, use `transpile` (from `@automattic/calypso-build`) which will automatically compile code in `src/` to `dist/cjs` (CommonJS) and `dist/esm` (ECMAScript Modules) by running `babel` over any source files it finds.

Running `npm run lint:package-json` will lint all `package.json`'s under `./packages|apps/**` based on [`npmpackagejsonlint.config.js`](../npmpackagejsonlint.config.js).

## Running Tests

To run all of the package tests:
Expand Down
275 changes: 275 additions & 0 deletions npm-shrinkwrap.json

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

0 comments on commit 562d998

Please sign in to comment.