From 32ac8009994e91e98a2444dfb91b11312bd93931 Mon Sep 17 00:00:00 2001 From: Mikael Korpela Date: Fri, 4 Oct 2019 17:30:18 +0300 Subject: [PATCH 01/12] Monorepo: add package.json linter --- apps/full-site-editing/package.json | 2 +- apps/notifications/package.json | 2 +- apps/o2-blocks/package.json | 2 +- apps/wpcom-block-editor/package.json | 2 +- docs/monorepo.md | 4 +- npm-shrinkwrap.json | 275 ++++++++++++++++++ npmpackagejsonlint.config.js | 48 +++ package.json | 4 + packages/README.md | 3 + .../babel-plugin-i18n-calypso/package.json | 2 +- .../package.json | 10 +- packages/calypso-build/package.json | 2 +- packages/calypso-color-schemes/package.json | 2 +- packages/components/package.json | 2 +- packages/eslint-config-wpcalypso/package.json | 2 +- packages/eslint-plugin-wpcalypso/package.json | 2 +- packages/format-currency/package.json | 2 +- packages/i18n-calypso/package.json | 2 +- packages/load-script/package.json | 2 +- packages/material-design-icons/package.json | 2 +- packages/muriel-style/package.json | 5 +- packages/photon/package.json | 2 +- packages/tree-select/package.json | 2 +- .../package.json | 1 + .../package.json | 3 +- 25 files changed, 364 insertions(+), 21 deletions(-) create mode 100644 npmpackagejsonlint.config.js diff --git a/apps/full-site-editing/package.json b/apps/full-site-editing/package.json index b7de1a2fb90e0..79cca48fc4b7b 100644 --- a/apps/full-site-editing/package.json +++ b/apps/full-site-editing/package.json @@ -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" diff --git a/apps/notifications/package.json b/apps/notifications/package.json index ba8404a53d8dd..bd9446fdd2ac4 100644 --- a/apps/notifications/package.json +++ b/apps/notifications/package.json @@ -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" diff --git a/apps/o2-blocks/package.json b/apps/o2-blocks/package.json index 231b281cb650c..3e038d9ad7cdf 100644 --- a/apps/o2-blocks/package.json +++ b/apps/o2-blocks/package.json @@ -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" diff --git a/apps/wpcom-block-editor/package.json b/apps/wpcom-block-editor/package.json index 688710cbfa47f..a53ea48c14a23 100644 --- a/apps/wpcom-block-editor/package.json +++ b/apps/wpcom-block-editor/package.json @@ -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" diff --git a/docs/monorepo.md b/docs/monorepo.md index bfa4c84d77f0c..a9abdab91926e 100644 --- a/docs/monorepo.md +++ b/docs/monorepo.md @@ -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 (https://yoursite.wordpress.com/)", + "author": "Automattic Inc.", "contributors": [], "homepage": "https://github.com/Automattic/wp-calypso", "license": "GPL-2.0-or-later", @@ -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: diff --git a/npm-shrinkwrap.json b/npm-shrinkwrap.json index e1b337c7420dc..0f1d4596066f1 100644 --- a/npm-shrinkwrap.json +++ b/npm-shrinkwrap.json @@ -2653,11 +2653,39 @@ "glob-to-regexp": "^0.3.0" } }, + "@nodelib/fs.scandir": { + "version": "2.1.3", + "resolved": "https://registry.npmjs.org/@nodelib/fs.scandir/-/fs.scandir-2.1.3.tgz", + "integrity": "sha512-eGmwYQn3gxo4r7jdQnkrrN6bY478C3P+a/y72IJukF8LjB6ZHeB3c+Ehacj3sYeSmUXGlnA67/PmbM9CVwL7Dw==", + "dev": true, + "requires": { + "@nodelib/fs.stat": "2.0.3", + "run-parallel": "^1.1.9" + }, + "dependencies": { + "@nodelib/fs.stat": { + "version": "2.0.3", + "resolved": "https://registry.npmjs.org/@nodelib/fs.stat/-/fs.stat-2.0.3.tgz", + "integrity": "sha512-bQBFruR2TAwoevBEd/NWMoAAtNGzTRgdrqnYCc7dhzfoNvqPzLyqlEQnzZ3kVnNrSp25iyxE00/3h2fqGAGArA==", + "dev": true + } + } + }, "@nodelib/fs.stat": { "version": "1.1.3", "resolved": "https://registry.npmjs.org/@nodelib/fs.stat/-/fs.stat-1.1.3.tgz", "integrity": "sha512-shAmDyaQC4H92APFoIaVDHCx5bStIocgvbwQyxPRrbUY20V1EYTbSDchWbuwlMG3V17cprZhA6+78JfB+3DTPw==" }, + "@nodelib/fs.walk": { + "version": "1.2.4", + "resolved": "https://registry.npmjs.org/@nodelib/fs.walk/-/fs.walk-1.2.4.tgz", + "integrity": "sha512-1V9XOY4rDW0rehzbrcqAmHnz8e7SKvX27gh8Gt2WgB0+pdzdiLV83p72kZPU+jvMbS1qU5mauP2iOvO8rhmurQ==", + "dev": true, + "requires": { + "@nodelib/fs.scandir": "2.1.3", + "fastq": "^1.6.0" + } + }, "@octokit/endpoint": { "version": "5.5.0", "resolved": "https://registry.npmjs.org/@octokit/endpoint/-/endpoint-5.5.0.tgz", @@ -4140,6 +4168,12 @@ "lodash": "^4.17.15" } }, + "@wordpress/npm-package-json-lint-config": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/@wordpress/npm-package-json-lint-config/-/npm-package-json-lint-config-2.1.0.tgz", + "integrity": "sha512-NSwcK7GtlmW5O5ZMG7elRKBa9sPws17Sadjlztig6ShOuhlLFeHYk99tUenpmJ/PYOZex4fSJ5e9mqjPyKunjw==", + "dev": true + }, "@wordpress/nux": { "version": "3.7.2", "resolved": "https://registry.npmjs.org/@wordpress/nux/-/nux-3.7.2.tgz", @@ -9943,6 +9977,15 @@ "resolved": "https://registry.npmjs.org/fastparse/-/fastparse-1.1.2.tgz", "integrity": "sha512-483XLLxTVIwWK3QTrMGRqUfUpoOs/0hbQrl2oz4J0pAcm3A3bu84wxTFqGqkJzewCLdME38xJLJAxBABfQT8sQ==" }, + "fastq": { + "version": "1.6.0", + "resolved": "https://registry.npmjs.org/fastq/-/fastq-1.6.0.tgz", + "integrity": "sha512-jmxqQ3Z/nXoeyDmWAzF9kH1aGZSis6e/SbfPmJpUnyZ0ogr6iscHQaml4wsEepEWSdtmpy+eVXmCRIMpxaXqOA==", + "dev": true, + "requires": { + "reusify": "^1.0.0" + } + }, "faye-websocket": { "version": "0.10.0", "resolved": "https://registry.npmjs.org/faye-websocket/-/faye-websocket-0.10.0.tgz", @@ -12071,6 +12114,12 @@ "resolved": "https://registry.npmjs.org/ipaddr.js/-/ipaddr.js-1.9.0.tgz", "integrity": "sha512-M4Sjn6N/+O6/IXSJseKqHoFc+5FdGJ22sXqnjTpdZweHK64MzEPAyQZyEU3R/KRv2GLoa7nNtg/C2Ev6m7z+eA==" }, + "irregular-plurals": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/irregular-plurals/-/irregular-plurals-2.0.0.tgz", + "integrity": "sha512-Y75zBYLkh0lJ9qxeHlMjQ7bSbyiSqNW/UOPWDmzC7cXskL1hekSITh1Oc6JV0XCWWZ9DE8VYSB71xocLk3gmGw==", + "dev": true + }, "is-absolute-url": { "version": "2.1.0", "resolved": "https://registry.npmjs.org/is-absolute-url/-/is-absolute-url-2.1.0.tgz", @@ -16559,6 +16608,211 @@ "validate-npm-package-name": "^3.0.0" } }, + "npm-package-json-lint": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/npm-package-json-lint/-/npm-package-json-lint-4.0.0.tgz", + "integrity": "sha512-Eu2qCMCOv5/ZlpsXs9LV5bLFHLIWvDsnTj2sN2CYbQHM77F+DnxlFLB7AQD1MF3+xR6+Iy7EykFKGwFuGakRnA==", + "dev": true, + "requires": { + "ajv": "^6.10.2", + "ajv-errors": "^1.0.1", + "chalk": "^2.4.2", + "cosmiconfig": "^5.2.1", + "debug": "^4.1.1", + "globby": "^10.0.1", + "ignore": "^5.1.4", + "is-plain-obj": "^2.0.0", + "log-symbols": "^3.0.0", + "meow": "^5.0.0", + "plur": "^3.1.1", + "semver": "^6.3.0", + "strip-json-comments": "^3.0.1" + }, + "dependencies": { + "@nodelib/fs.stat": { + "version": "2.0.3", + "resolved": "https://registry.npmjs.org/@nodelib/fs.stat/-/fs.stat-2.0.3.tgz", + "integrity": "sha512-bQBFruR2TAwoevBEd/NWMoAAtNGzTRgdrqnYCc7dhzfoNvqPzLyqlEQnzZ3kVnNrSp25iyxE00/3h2fqGAGArA==", + "dev": true + }, + "array-union": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/array-union/-/array-union-2.1.0.tgz", + "integrity": "sha512-HGyxoOTYUyCM6stUe6EJgnd4EoewAI7zMdfqO+kGjnlZmBDz/cR5pf8r/cR4Wq60sL/p0IkcjUEEPwS3GFrIyw==", + "dev": true + }, + "braces": { + "version": "3.0.2", + "resolved": "https://registry.npmjs.org/braces/-/braces-3.0.2.tgz", + "integrity": "sha512-b8um+L1RzM3WDSzvhm6gIz1yfTbBt6YTlcEKAvsmqCZZFw46z626lVj9j1yEPW33H5H+lBQpZMP1k8l+78Ha0A==", + "dev": true, + "requires": { + "fill-range": "^7.0.1" + } + }, + "debug": { + "version": "4.1.1", + "resolved": "https://registry.npmjs.org/debug/-/debug-4.1.1.tgz", + "integrity": "sha512-pYAIzeRo8J6KPEaJ0VWOh5Pzkbw/RetuzehGM7QRRX5he4fPHx2rdKMB256ehJCkX+XRQm16eZLqLNS8RSZXZw==", + "dev": true, + "requires": { + "ms": "^2.1.1" + } + }, + "dir-glob": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/dir-glob/-/dir-glob-3.0.1.tgz", + "integrity": "sha512-WkrWp9GR4KXfKGYzOLmTuGVi1UWFfws377n9cc55/tb6DuqyF6pcQ5AbiHEshaDpY9v6oaSr2XCDidGmMwdzIA==", + "dev": true, + "requires": { + "path-type": "^4.0.0" + } + }, + "fast-glob": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/fast-glob/-/fast-glob-3.1.0.tgz", + "integrity": "sha512-TrUz3THiq2Vy3bjfQUB2wNyPdGBeGmdjbzzBLhfHN4YFurYptCKwGq/TfiRavbGywFRzY6U2CdmQ1zmsY5yYaw==", + "dev": true, + "requires": { + "@nodelib/fs.stat": "^2.0.2", + "@nodelib/fs.walk": "^1.2.3", + "glob-parent": "^5.1.0", + "merge2": "^1.3.0", + "micromatch": "^4.0.2" + } + }, + "fill-range": { + "version": "7.0.1", + "resolved": "https://registry.npmjs.org/fill-range/-/fill-range-7.0.1.tgz", + "integrity": "sha512-qOo9F+dMUmC2Lcb4BbVvnKJxTPjCm+RRpe4gDuGrzkL7mEVl/djYSu2OdQ2Pa302N4oqkSg9ir6jaLWJ2USVpQ==", + "dev": true, + "requires": { + "to-regex-range": "^5.0.1" + } + }, + "glob-parent": { + "version": "5.1.0", + "resolved": "https://registry.npmjs.org/glob-parent/-/glob-parent-5.1.0.tgz", + "integrity": "sha512-qjtRgnIVmOfnKUE3NJAQEdk+lKrxfw8t5ke7SXtfMTHcjsBfOfWXCQfdb30zfDoZQ2IRSIiidmjtbHZPZ++Ihw==", + "dev": true, + "requires": { + "is-glob": "^4.0.1" + } + }, + "globby": { + "version": "10.0.1", + "resolved": "https://registry.npmjs.org/globby/-/globby-10.0.1.tgz", + "integrity": "sha512-sSs4inE1FB2YQiymcmTv6NWENryABjUNPeWhOvmn4SjtKybglsyPZxFB3U1/+L1bYi0rNZDqCLlHyLYDl1Pq5A==", + "dev": true, + "requires": { + "@types/glob": "^7.1.1", + "array-union": "^2.1.0", + "dir-glob": "^3.0.1", + "fast-glob": "^3.0.3", + "glob": "^7.1.3", + "ignore": "^5.1.1", + "merge2": "^1.2.3", + "slash": "^3.0.0" + } + }, + "ignore": { + "version": "5.1.4", + "resolved": "https://registry.npmjs.org/ignore/-/ignore-5.1.4.tgz", + "integrity": "sha512-MzbUSahkTW1u7JpKKjY7LCARd1fU5W2rLdxlM4kdkayuCwZImjkpluF9CM1aLewYJguPDqewLam18Y6AU69A8A==", + "dev": true + }, + "is-number": { + "version": "7.0.0", + "resolved": "https://registry.npmjs.org/is-number/-/is-number-7.0.0.tgz", + "integrity": "sha512-41Cifkg6e8TylSpdtTpeLVMqvSBEVzTttHvERD741+pnZ8ANv0004MRL43QKPDlK9cGvNp6NZWZUBlbGXYxxng==", + "dev": true + }, + "is-plain-obj": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/is-plain-obj/-/is-plain-obj-2.0.0.tgz", + "integrity": "sha512-EYisGhpgSCwspmIuRHGjROWTon2Xp8Z7U03Wubk/bTL5TTRC5R1rGVgyjzBrk9+ULdH6cRD06KRcw/xfqhVYKQ==", + "dev": true + }, + "log-symbols": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/log-symbols/-/log-symbols-3.0.0.tgz", + "integrity": "sha512-dSkNGuI7iG3mfvDzUuYZyvk5dD9ocYCYzNU6CYDE6+Xqd+gwme6Z00NS3dUh8mq/73HaEtT7m6W+yUPtU6BZnQ==", + "dev": true, + "requires": { + "chalk": "^2.4.2" + } + }, + "meow": { + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/meow/-/meow-5.0.0.tgz", + "integrity": "sha512-CbTqYU17ABaLefO8vCU153ZZlprKYWDljcndKKDCFcYQITzWCXZAVk4QMFZPgvzrnUQ3uItnIE/LoUOwrT15Ig==", + "dev": true, + "requires": { + "camelcase-keys": "^4.0.0", + "decamelize-keys": "^1.0.0", + "loud-rejection": "^1.0.0", + "minimist-options": "^3.0.1", + "normalize-package-data": "^2.3.4", + "read-pkg-up": "^3.0.0", + "redent": "^2.0.0", + "trim-newlines": "^2.0.0", + "yargs-parser": "^10.0.0" + } + }, + "micromatch": { + "version": "4.0.2", + "resolved": "https://registry.npmjs.org/micromatch/-/micromatch-4.0.2.tgz", + "integrity": "sha512-y7FpHSbMUMoyPbYUSzO6PaZ6FyRnQOpHuKwbo1G+Knck95XVU4QAiKdGEnj5wwoS7PlOgthX/09u5iFJ+aYf5Q==", + "dev": true, + "requires": { + "braces": "^3.0.1", + "picomatch": "^2.0.5" + } + }, + "path-type": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/path-type/-/path-type-4.0.0.tgz", + "integrity": "sha512-gDKb8aZMDeD/tZWs9P6+q0J9Mwkdl6xMV8TjnGP3qJVJ06bdMgkbBlLU8IdfOsIsFz2BW1rNVT3XuNEl8zPAvw==", + "dev": true + }, + "semver": { + "version": "6.3.0", + "resolved": "https://registry.npmjs.org/semver/-/semver-6.3.0.tgz", + "integrity": "sha512-b39TBaTSfV6yBrapU89p5fKekE2m/NwnDocOVruQFS1/veMgdzuPcnOM34M6CwxW8jH/lxEa5rBoDeUwu5HHTw==", + "dev": true + }, + "slash": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/slash/-/slash-3.0.0.tgz", + "integrity": "sha512-g9Q1haeby36OSStwb4ntCGGGaKsaVSjQ68fBxoQcutl5fS1vuY18H3wSt3jFyFtrkx+Kz0V1G85A4MyAdDMi2Q==", + "dev": true + }, + "strip-json-comments": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/strip-json-comments/-/strip-json-comments-3.0.1.tgz", + "integrity": "sha512-VTyMAUfdm047mwKl+u79WIdrZxtFtn+nBxHeb844XBQ9uMNTuTHdx2hc5RiAJYqwTj3wc/xe5HLSdJSkJ+WfZw==", + "dev": true + }, + "to-regex-range": { + "version": "5.0.1", + "resolved": "https://registry.npmjs.org/to-regex-range/-/to-regex-range-5.0.1.tgz", + "integrity": "sha512-65P7iz6X5yEr1cwcgvQxbbIw7Uk3gOy5dIdtZ4rDveLqhrdJP+Li/Hx6tyK0NEb+2GCyneCMJiGqrADCSNk8sQ==", + "dev": true, + "requires": { + "is-number": "^7.0.0" + } + }, + "yargs-parser": { + "version": "10.1.0", + "resolved": "https://registry.npmjs.org/yargs-parser/-/yargs-parser-10.1.0.tgz", + "integrity": "sha512-VCIyR1wJoEBZUqk5PA+oOBF6ypbwh5aNB3I50guxAL/quggdfs4TtNHQrSazFA3fYZ+tEqfs0zIGlv0c/rgjbQ==", + "dev": true, + "requires": { + "camelcase": "^4.1.0" + } + } + } + }, "npm-packlist": { "version": "1.4.6", "resolved": "https://registry.npmjs.org/npm-packlist/-/npm-packlist-1.4.6.tgz", @@ -17377,6 +17631,12 @@ "url": "^0.11.0" } }, + "picomatch": { + "version": "2.0.7", + "resolved": "https://registry.npmjs.org/picomatch/-/picomatch-2.0.7.tgz", + "integrity": "sha512-oLHIdio3tZ0qH76NybpeneBhYVj0QFTfXEFTc/B3zKQspYfYYkWYgFsmzo+4kvId/bQRcNkVeguI3y+CD22BtA==", + "dev": true + }, "pidtree": { "version": "0.3.0", "resolved": "https://registry.npmjs.org/pidtree/-/pidtree-0.3.0.tgz", @@ -17466,6 +17726,15 @@ "semver-compare": "^1.0.0" } }, + "plur": { + "version": "3.1.1", + "resolved": "https://registry.npmjs.org/plur/-/plur-3.1.1.tgz", + "integrity": "sha512-t1Ax8KUvV3FFII8ltczPn2tJdjqbd1sIzu6t4JL7nQ3EyeL/lTrj5PWKb06ic5/6XYDr65rQ4uzQEGN70/6X5w==", + "dev": true, + "requires": { + "irregular-plurals": "^2.0.0" + } + }, "pn": { "version": "1.1.0", "resolved": "https://registry.npmjs.org/pn/-/pn-1.1.0.tgz", @@ -20787,6 +21056,12 @@ "resolved": "https://registry.npmjs.org/retry/-/retry-0.10.1.tgz", "integrity": "sha1-52OI0heZLCUnUCQdPTlW/tmNj/Q=" }, + "reusify": { + "version": "1.0.4", + "resolved": "https://registry.npmjs.org/reusify/-/reusify-1.0.4.tgz", + "integrity": "sha512-U9nH88a3fc/ekCF1l0/UP1IosiuIjyTh7hBvXVMHYgVcfGvt897Xguj2UOLDeI5BG2m7/uwyaLVT6fbtCwTyzw==", + "dev": true + }, "rgb-regex": { "version": "1.0.1", "resolved": "https://registry.npmjs.org/rgb-regex/-/rgb-regex-1.0.1.tgz", diff --git a/npmpackagejsonlint.config.js b/npmpackagejsonlint.config.js new file mode 100644 index 0000000000000..3c719ae7d9a95 --- /dev/null +++ b/npmpackagejsonlint.config.js @@ -0,0 +1,48 @@ +module.exports = { + // See https://www.npmjs.com/package/@wordpress/npm-package-json-lint-config + extends: '@wordpress/npm-package-json-lint-config', + rules: { + 'prefer-no-devDependencies': 'error', + 'prefer-property-order': 'off', + 'require-author': 'error', + 'require-bugs': 'off', + 'require-homepage': 'off', + 'require-keywords': 'off', + 'require-license': 'error', + 'require-name': 'error', + 'require-version': 'error', + 'valid-values-author': [ 'error', [ 'Automattic Inc.' ] ], + 'valid-values-license': [ 'error', [ 'GPL-2.0-or-later' ] ], + 'valid-values-name-scope': [ 'error', [ '@automattic' ] ], + }, + overrides: [ + { + patterns: [ + '/package.json', + 'packages/eslint-config-wpcalypso/package.json', + 'packages/eslint-plugin-wpcalypso/package.json', + 'packages/i18n-calypso/package.json', + 'packages/photon/package.json', + ], + rules: { + 'valid-values-name-scope': 'off', + }, + }, + { + patterns: [ + '/apps/full-site-editing/package.json', + '/apps/wpcom-block-editor/package.json', + '/package.json', + ], + rules: { + 'prefer-no-devDependencies': 'off', + }, + }, + { + patterns: [ 'packages/material-design-icons/package.json' ], + rules: { + 'valid-values-license': 'off', + }, + }, + ], +}; diff --git a/package.json b/package.json index 29580d0640b63..b59d8eddc1db4 100644 --- a/package.json +++ b/package.json @@ -1,5 +1,6 @@ { "name": "wp-calypso", + "author": "Automattic Inc.", "version": "0.17.0", "description": "A pure REST-API and JS based version of the WordPress.com admin", "private": true, @@ -256,6 +257,7 @@ "lint:css": "stylelint \"**/*.scss\" --syntax scss", "lint:js": "npm run -s install-if-deps-outdated && eslint --ext .js --ext .jsx --ext .ts --ext .tsx --cache .", "lint:mixedindent": "mixedindentlint --ignore-comments \"client/**/*.scss\" \"assets/**/*.scss\" \"**/*.js\" \"**/*.jsx\" \"**/*.tsx\" \"**/*.tsx\" \"!build/**\" \"!node_modules/**\" \"!public/**\" \"!client/config/index.js\"", + "lint:package-json": "npmPkgJsonLint ./package.json ./packages/**/package.json ./apps/**/package.json", "prestart": "npx check-node-version --package && npm run -s install-if-deps-outdated && node bin/welcome.js", "start": "npm run -s build", "poststart": "run-p -s start-build-if-web start-build-if-desktop", @@ -320,6 +322,7 @@ "@wordpress/babel-plugin-makepot": "3.2.1", "@wordpress/browserslist-config": "2.6.0", "@wordpress/dependency-extraction-webpack-plugin": "2.0.0", + "@wordpress/npm-package-json-lint-config": "2.1.0", "babel-eslint": "10.0.3", "babel-jest": "24.9.0", "babel-plugin-dynamic-import-node": "2.3.0", @@ -352,6 +355,7 @@ "ncp": "2.0.0", "nock": "10.0.6", "npm-merge-driver": "2.3.5", + "npm-package-json-lint": "4.0.0", "prettier": "npm:wp-prettier@1.18.2", "react-test-renderer": "16.10.2", "readline-sync": "1.4.9", diff --git a/packages/README.md b/packages/README.md index 3d26bbff96fd0..845016e11cff9 100644 --- a/packages/README.md +++ b/packages/README.md @@ -17,3 +17,6 @@ If you must manually build a single package, run: ```bash npx lerna run prepare --scope="@automattic/package-name" ``` + +## Validating package.json +Running `npm run lint:package-json` will lint all package.json's under `./packages/**` based on [`npmpackagejsonlint.config.js`](../npmpackagejsonlint.config.js). diff --git a/packages/babel-plugin-i18n-calypso/package.json b/packages/babel-plugin-i18n-calypso/package.json index c91ebf8ae93fe..3812590def88f 100644 --- a/packages/babel-plugin-i18n-calypso/package.json +++ b/packages/babel-plugin-i18n-calypso/package.json @@ -19,7 +19,7 @@ "directory": "packages/babel-plugin-i18n-calypso" }, "keywords": [], - "author": "Alex Kirk (https://automattic.com)", + "author": "Automattic Inc.", "license": "GPL-2.0-or-later", "scripts": { "clean": "npx rimraf dist", diff --git a/packages/babel-plugin-transform-wpcalypso-async/package.json b/packages/babel-plugin-transform-wpcalypso-async/package.json index 56c109655e1b8..c4fae373655b9 100644 --- a/packages/babel-plugin-transform-wpcalypso-async/package.json +++ b/packages/babel-plugin-transform-wpcalypso-async/package.json @@ -1,5 +1,13 @@ { "name": "@automattic/babel-plugin-transform-wpcalypso-async", "version": "1.0.1", - "private": true + "private": true, + "license": "GPL-2.0-or-later", + "author": "Automattic Inc.", + "description": "A Babel plugin to facilitate optional code-splitting by applying transformations to a `asyncRequire` global function or the `` React component", + "repository": { + "type": "git", + "url": "git://github.com/Automattic/wp-calypso.git", + "directory": "packages/babel-plugin-transform-wpcalypso-async" + } } diff --git a/packages/calypso-build/package.json b/packages/calypso-build/package.json index ae9d86974b96f..b55a5e086971e 100644 --- a/packages/calypso-build/package.json +++ b/packages/calypso-build/package.json @@ -11,7 +11,7 @@ "webpack", "wordpress" ], - "author": "Automattic", + "author": "Automattic Inc.", "homepage": "https://github.com/Automattic/wp-calypso", "license": "GPL-2.0-or-later", "repository": { diff --git a/packages/calypso-color-schemes/package.json b/packages/calypso-color-schemes/package.json index 5cb9f2558f596..9ded013ce26bf 100644 --- a/packages/calypso-color-schemes/package.json +++ b/packages/calypso-color-schemes/package.json @@ -2,7 +2,7 @@ "name": "@automattic/calypso-color-schemes", "version": "2.1.0", "description": "Calypso Shared Style Bits", - "author": "Automattic", + "author": "Automattic Inc.", "license": "GPL-2.0-or-later", "keywords": [ "calypso", diff --git a/packages/components/package.json b/packages/components/package.json index 4588c68075fca..9bc34324dc4b3 100644 --- a/packages/components/package.json +++ b/packages/components/package.json @@ -4,7 +4,7 @@ "description": "Automattic Components", "homepage": "https://github.com/Automattic/wp-calypso", "license": "GPL-2.0-or-later", - "author": "Automattic", + "author": "Automattic Inc.", "main": "dist/cjs/index.js", "module": "dist/esm/index.js", "sideEffects": [ diff --git a/packages/eslint-config-wpcalypso/package.json b/packages/eslint-config-wpcalypso/package.json index 7b3c8149f155f..13278b746414d 100644 --- a/packages/eslint-config-wpcalypso/package.json +++ b/packages/eslint-config-wpcalypso/package.json @@ -5,7 +5,7 @@ "keywords": [ "eslint" ], - "author": "Automattic", + "author": "Automattic Inc.", "contributors": [ { "name": "Andrew Duthie", diff --git a/packages/eslint-plugin-wpcalypso/package.json b/packages/eslint-plugin-wpcalypso/package.json index 4bea360ef1eac..9166483551db2 100644 --- a/packages/eslint-plugin-wpcalypso/package.json +++ b/packages/eslint-plugin-wpcalypso/package.json @@ -13,7 +13,7 @@ "eslintplugin", "eslint-plugin" ], - "author": "Automattic", + "author": "Automattic Inc.", "main": "lib/index.js", "files": [ "lib/" diff --git a/packages/format-currency/package.json b/packages/format-currency/package.json index d0969135331c7..eea4c2bded562 100644 --- a/packages/format-currency/package.json +++ b/packages/format-currency/package.json @@ -17,7 +17,7 @@ "currency", "internationalization" ], - "author": "Automattic, Inc.", + "author": "Automattic Inc.", "license": "GPL-2.0-or-later", "bugs": { "url": "https://github.com/Automattic/wp-calypso/issues" diff --git a/packages/i18n-calypso/package.json b/packages/i18n-calypso/package.json index 76199b8878b35..a3c30a4ef7232 100644 --- a/packages/i18n-calypso/package.json +++ b/packages/i18n-calypso/package.json @@ -11,7 +11,7 @@ "url": "git+https://github.com/Automattic/wp-calypso.git", "directory": "packages/i18n-calypso" }, - "author": "@automattic", + "author": "Automattic Inc.", "license": "GPL-2.0-or-later", "bugs": { "url": "https://github.com/Automattic/wp-calypso/issues" diff --git a/packages/load-script/package.json b/packages/load-script/package.json index 7c09b8aa1e38f..142a135a967d2 100644 --- a/packages/load-script/package.json +++ b/packages/load-script/package.json @@ -7,7 +7,7 @@ "keywords": [ "wordpress" ], - "author": "Automattic", + "author": "Automattic Inc.", "homepage": "https://github.com/Automattic/wp-calypso", "license": "GPL-2.0-or-later", "repository": { diff --git a/packages/material-design-icons/package.json b/packages/material-design-icons/package.json index d44336b610ff6..aae11a48e758e 100644 --- a/packages/material-design-icons/package.json +++ b/packages/material-design-icons/package.json @@ -8,7 +8,7 @@ "keywords": [ "wordpress" ], - "author": "Brad Griffith ", + "author": "Automattic Inc.", "contributors": [], "homepage": "https://github.com/Automattic/wp-calypso", "license": "Apache-2.0", diff --git a/packages/muriel-style/package.json b/packages/muriel-style/package.json index 5c26ed22d3557..a87ebc252349e 100644 --- a/packages/muriel-style/package.json +++ b/packages/muriel-style/package.json @@ -11,7 +11,7 @@ "typography", "sass" ], - "author": "@automattic", + "author": "Automattic Inc.", "repository": { "type": "git", "url": "git+https://github.com/Automattic/wp-calypso.git", @@ -21,5 +21,6 @@ "url": "https://github.com/Automattic/wp-calypso/issues" }, "homepage": "https://github.com/Automattic/wp-calypso/tree/master/packages/muriel-style#readme", - "private": true + "private": true, + "license": "GPL-2.0-or-later" } diff --git a/packages/photon/package.json b/packages/photon/package.json index 365a30eceded1..36e33e6c1fa21 100644 --- a/packages/photon/package.json +++ b/packages/photon/package.json @@ -21,7 +21,7 @@ "api", "library" ], - "author": "Automattic, Inc.", + "author": "Automattic Inc.", "contributors": [ "Nathan Rajlich " ], diff --git a/packages/tree-select/package.json b/packages/tree-select/package.json index 62368e5a08da0..56ed59435a54e 100644 --- a/packages/tree-select/package.json +++ b/packages/tree-select/package.json @@ -6,7 +6,7 @@ "redux", "selector" ], - "author": "Jake Fried ", + "author": "Automattic Inc.", "homepage": "https://github.com/Automattic/wp-calypso", "license": "GPL-2.0-or-later", "main": "dist/cjs/index.js", diff --git a/packages/webpack-extensive-lodash-replacement-plugin/package.json b/packages/webpack-extensive-lodash-replacement-plugin/package.json index fcf6a7487f7a8..df17ef29fade3 100644 --- a/packages/webpack-extensive-lodash-replacement-plugin/package.json +++ b/packages/webpack-extensive-lodash-replacement-plugin/package.json @@ -2,6 +2,7 @@ "name": "@automattic/webpack-extensive-lodash-replacement-plugin", "private": true, "version": "0.0.2", + "author": "Automattic Inc.", "description": "Webpack plugin to replace lodash, lodash/foo and lodash.foo imports with lodash-es", "keywords": [ "Webpack", diff --git a/packages/webpack-inline-constant-exports-plugin/package.json b/packages/webpack-inline-constant-exports-plugin/package.json index c3be230a72bfe..bcfff88a4e246 100644 --- a/packages/webpack-inline-constant-exports-plugin/package.json +++ b/packages/webpack-inline-constant-exports-plugin/package.json @@ -1,12 +1,13 @@ { "name": "@automattic/webpack-inline-constant-exports-plugin", "version": "0.0.1", + "author": "Automattic Inc.", "description": "Webpack plugin to inline constant exports from modules", + "license": "GPL-2.0-or-later", "keywords": [ "Webpack" ], "homepage": "https://github.com/Automattic/wp-calypso/tree/master/packages/webpack-inline-constant-exports-plugin", - "license": "GPL-2.0-or-later", "publishConfig": { "access": "public" }, From 2faf97e8076c545f20f26056c115e0a9242900a4 Mon Sep 17 00:00:00 2001 From: Mikael Korpela Date: Tue, 8 Oct 2019 19:20:57 +0300 Subject: [PATCH 02/12] docs --- apps/README.md | 5 +++++ packages/README.md | 4 +++- 2 files changed, 8 insertions(+), 1 deletion(-) diff --git a/apps/README.md b/apps/README.md index c15bf8d870c81..e0eb4d8995c0a 100644 --- a/apps/README.md +++ b/apps/README.md @@ -17,3 +17,8 @@ You must manually build apps by running: ```bash npx lerna run build --scope="@automattic/app-name" ``` + +## Validating package.json +Running `npm run lint:package-json` will lint all `package.json`'s under `./apps/**` based on [`npmpackagejsonlint.config.js`](../npmpackagejsonlint.config.js). + +If you need exceptions to linting rules, add them to overrides section in the config file. diff --git a/packages/README.md b/packages/README.md index 845016e11cff9..e85d95363e6f1 100644 --- a/packages/README.md +++ b/packages/README.md @@ -19,4 +19,6 @@ npx lerna run prepare --scope="@automattic/package-name" ``` ## Validating package.json -Running `npm run lint:package-json` will lint all package.json's under `./packages/**` based on [`npmpackagejsonlint.config.js`](../npmpackagejsonlint.config.js). +Running `npm run lint:package-json` will lint all `package.json`'s under `./packages/**` based on [`npmpackagejsonlint.config.js`](../npmpackagejsonlint.config.js). + +If you need exceptions to linting rules, add them to overrides section in the config file. From 43883dcc25f0205744524cabf4c5a05bfd891f8f Mon Sep 17 00:00:00 2001 From: Mikael Korpela Date: Sat, 19 Oct 2019 22:28:27 +0300 Subject: [PATCH 03/12] npm-package-json-lint@4.0.1 --- npm-shrinkwrap.json | 6 +++--- package.json | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/npm-shrinkwrap.json b/npm-shrinkwrap.json index 0f1d4596066f1..5b27a99ee96bc 100644 --- a/npm-shrinkwrap.json +++ b/npm-shrinkwrap.json @@ -16609,9 +16609,9 @@ } }, "npm-package-json-lint": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/npm-package-json-lint/-/npm-package-json-lint-4.0.0.tgz", - "integrity": "sha512-Eu2qCMCOv5/ZlpsXs9LV5bLFHLIWvDsnTj2sN2CYbQHM77F+DnxlFLB7AQD1MF3+xR6+Iy7EykFKGwFuGakRnA==", + "version": "4.0.1", + "resolved": "https://registry.npmjs.org/npm-package-json-lint/-/npm-package-json-lint-4.0.1.tgz", + "integrity": "sha512-sMX6Qh/C1C7P5LYN2R3pNnRi4Iagl0YfvyCOToR7twRyYd4Ek5iok665PnKZvw+w8u8veP0C0PER++THvvkGUg==", "dev": true, "requires": { "ajv": "^6.10.2", diff --git a/package.json b/package.json index b59d8eddc1db4..ab2d1b319efd4 100644 --- a/package.json +++ b/package.json @@ -355,7 +355,7 @@ "ncp": "2.0.0", "nock": "10.0.6", "npm-merge-driver": "2.3.5", - "npm-package-json-lint": "4.0.0", + "npm-package-json-lint": "4.0.1", "prettier": "npm:wp-prettier@1.18.2", "react-test-renderer": "16.10.2", "readline-sync": "1.4.9", From b77cad11e327b970b3633f3c196eebf18e55dc78 Mon Sep 17 00:00:00 2001 From: Mikael Korpela Date: Sat, 19 Oct 2019 22:35:21 +0300 Subject: [PATCH 04/12] Handle i18n-calypso-cli --- npmpackagejsonlint.config.js | 1 + packages/i18n-calypso-cli/package.json | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/npmpackagejsonlint.config.js b/npmpackagejsonlint.config.js index 3c719ae7d9a95..757c1168e5170 100644 --- a/npmpackagejsonlint.config.js +++ b/npmpackagejsonlint.config.js @@ -21,6 +21,7 @@ module.exports = { '/package.json', 'packages/eslint-config-wpcalypso/package.json', 'packages/eslint-plugin-wpcalypso/package.json', + 'packages/i18n-calypso-cli/package.json', 'packages/i18n-calypso/package.json', 'packages/photon/package.json', ], diff --git a/packages/i18n-calypso-cli/package.json b/packages/i18n-calypso-cli/package.json index ff980fd3e2a7b..bc56f950021b9 100644 --- a/packages/i18n-calypso-cli/package.json +++ b/packages/i18n-calypso-cli/package.json @@ -8,7 +8,7 @@ "url": "git+https://github.com/Automattic/wp-calypso.git", "directory": "packages/i18n-calypso-cli" }, - "author": "@automattic", + "author": "Automattic Inc.", "license": "GPL-2.0-or-later", "bin": { "i18n-calypso": "cli.js" From 849cadd4af043c960c458284c25e8edbd9099424 Mon Sep 17 00:00:00 2001 From: Mikael Korpela Date: Sat, 19 Oct 2019 22:37:04 +0300 Subject: [PATCH 05/12] Sort out config --- npmpackagejsonlint.config.js | 24 ++++++++++++------------ 1 file changed, 12 insertions(+), 12 deletions(-) diff --git a/npmpackagejsonlint.config.js b/npmpackagejsonlint.config.js index 757c1168e5170..e802a8318f5b7 100644 --- a/npmpackagejsonlint.config.js +++ b/npmpackagejsonlint.config.js @@ -18,29 +18,29 @@ module.exports = { overrides: [ { patterns: [ - '/package.json', - 'packages/eslint-config-wpcalypso/package.json', - 'packages/eslint-plugin-wpcalypso/package.json', - 'packages/i18n-calypso-cli/package.json', - 'packages/i18n-calypso/package.json', - 'packages/photon/package.json', + './apps/full-site-editing/package.json', + './apps/wpcom-block-editor/package.json', + './package.json', ], rules: { - 'valid-values-name-scope': 'off', + 'prefer-no-devDependencies': 'off', }, }, { patterns: [ - '/apps/full-site-editing/package.json', - '/apps/wpcom-block-editor/package.json', - '/package.json', + './package.json', + './packages/eslint-config-wpcalypso/package.json', + './packages/eslint-plugin-wpcalypso/package.json', + './packages/i18n-calypso-cli/package.json', + './packages/i18n-calypso/package.json', + './packages/photon/package.json', ], rules: { - 'prefer-no-devDependencies': 'off', + 'valid-values-name-scope': 'off', }, }, { - patterns: [ 'packages/material-design-icons/package.json' ], + patterns: [ './packages/material-design-icons/package.json' ], rules: { 'valid-values-license': 'off', }, From 8be120122f7ab468f27bfd0f47eb2ef486db207a Mon Sep 17 00:00:00 2001 From: Mikael Korpela Date: Mon, 21 Oct 2019 16:20:23 +0300 Subject: [PATCH 06/12] =?UTF-8?q?4.0.1=20=E2=86=92=204.0.2?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- npm-shrinkwrap.json | 6 +++--- package.json | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/npm-shrinkwrap.json b/npm-shrinkwrap.json index 5b27a99ee96bc..c8d390e7d5070 100644 --- a/npm-shrinkwrap.json +++ b/npm-shrinkwrap.json @@ -16609,9 +16609,9 @@ } }, "npm-package-json-lint": { - "version": "4.0.1", - "resolved": "https://registry.npmjs.org/npm-package-json-lint/-/npm-package-json-lint-4.0.1.tgz", - "integrity": "sha512-sMX6Qh/C1C7P5LYN2R3pNnRi4Iagl0YfvyCOToR7twRyYd4Ek5iok665PnKZvw+w8u8veP0C0PER++THvvkGUg==", + "version": "4.0.2", + "resolved": "https://registry.npmjs.org/npm-package-json-lint/-/npm-package-json-lint-4.0.2.tgz", + "integrity": "sha512-xlahvfRgZcsawUPzKaJvcQSs4K0EzDgQ9YEe7VODo1XbLMWwS0IEXiywHlKPAvo1fmWBvovIdoAqhe0Gk4InHA==", "dev": true, "requires": { "ajv": "^6.10.2", diff --git a/package.json b/package.json index ab2d1b319efd4..79df7fd708953 100644 --- a/package.json +++ b/package.json @@ -355,7 +355,7 @@ "ncp": "2.0.0", "nock": "10.0.6", "npm-merge-driver": "2.3.5", - "npm-package-json-lint": "4.0.1", + "npm-package-json-lint": "4.0.2", "prettier": "npm:wp-prettier@1.18.2", "react-test-renderer": "16.10.2", "readline-sync": "1.4.9", From 849e268f8d47f1519111822df260726e24559e9f Mon Sep 17 00:00:00 2001 From: Jon Surrell Date: Tue, 22 Oct 2019 11:33:25 +0200 Subject: [PATCH 07/12] Alphabetize dependencies --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index 79df7fd708953..b7e0e55b42f01 100644 --- a/package.json +++ b/package.json @@ -34,8 +34,8 @@ ] }, "dependencies": { - "@automattic/components": "file:./packages/components", "@automattic/color-studio": "2.2.0", + "@automattic/components": "file:./packages/components", "@automattic/format-currency": "file:./packages/format-currency", "@automattic/load-script": "file:./packages/load-script", "@automattic/material-design-icons": "file:./packages/material-design-icons", From ee1543acd871ed98ee1e77de7b1c56c874011aae Mon Sep 17 00:00:00 2001 From: Mikael Korpela Date: Tue, 22 Oct 2019 15:26:50 +0300 Subject: [PATCH 08/12] Add quotes to globs --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index b7e0e55b42f01..25747a8f18d7b 100644 --- a/package.json +++ b/package.json @@ -257,7 +257,7 @@ "lint:css": "stylelint \"**/*.scss\" --syntax scss", "lint:js": "npm run -s install-if-deps-outdated && eslint --ext .js --ext .jsx --ext .ts --ext .tsx --cache .", "lint:mixedindent": "mixedindentlint --ignore-comments \"client/**/*.scss\" \"assets/**/*.scss\" \"**/*.js\" \"**/*.jsx\" \"**/*.tsx\" \"**/*.tsx\" \"!build/**\" \"!node_modules/**\" \"!public/**\" \"!client/config/index.js\"", - "lint:package-json": "npmPkgJsonLint ./package.json ./packages/**/package.json ./apps/**/package.json", + "lint:package-json": "npmPkgJsonLint './package.json' './packages/**/package.json' './apps/**/package.json'", "prestart": "npx check-node-version --package && npm run -s install-if-deps-outdated && node bin/welcome.js", "start": "npm run -s build", "poststart": "run-p -s start-build-if-web start-build-if-desktop", From e3cc8cba339095a8532b77e051b0aff0c2ff43f6 Mon Sep 17 00:00:00 2001 From: Mikael Korpela Date: Tue, 29 Oct 2019 14:49:44 +0200 Subject: [PATCH 09/12] =?UTF-8?q?4.0.2=20=E2=86=92=204.0.3?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- npm-shrinkwrap.json | 6 +++--- package.json | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/npm-shrinkwrap.json b/npm-shrinkwrap.json index c8d390e7d5070..f6db71ecb1df0 100644 --- a/npm-shrinkwrap.json +++ b/npm-shrinkwrap.json @@ -16609,9 +16609,9 @@ } }, "npm-package-json-lint": { - "version": "4.0.2", - "resolved": "https://registry.npmjs.org/npm-package-json-lint/-/npm-package-json-lint-4.0.2.tgz", - "integrity": "sha512-xlahvfRgZcsawUPzKaJvcQSs4K0EzDgQ9YEe7VODo1XbLMWwS0IEXiywHlKPAvo1fmWBvovIdoAqhe0Gk4InHA==", + "version": "4.0.3", + "resolved": "https://registry.npmjs.org/npm-package-json-lint/-/npm-package-json-lint-4.0.3.tgz", + "integrity": "sha512-cuvTR2l5dOjjlRR3a1CCp+mh2A2HyQRxydwdcYi0Z77NRlADpf7wF3Jf8XFLGZM7J6afXNRBofBjQ1UWFyOtKA==", "dev": true, "requires": { "ajv": "^6.10.2", diff --git a/package.json b/package.json index 25747a8f18d7b..6d49656fdee65 100644 --- a/package.json +++ b/package.json @@ -355,7 +355,7 @@ "ncp": "2.0.0", "nock": "10.0.6", "npm-merge-driver": "2.3.5", - "npm-package-json-lint": "4.0.2", + "npm-package-json-lint": "4.0.3", "prettier": "npm:wp-prettier@1.18.2", "react-test-renderer": "16.10.2", "readline-sync": "1.4.9", From 0fe8ff7f26b93c4861a0de5b6ef40ad93794aed6 Mon Sep 17 00:00:00 2001 From: Mikael Korpela Date: Tue, 29 Oct 2019 14:50:54 +0200 Subject: [PATCH 10/12] Fix lint error --- packages/composite-checkout/package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/composite-checkout/package.json b/packages/composite-checkout/package.json index 5923196c61e15..9ee0387605b0e 100644 --- a/packages/composite-checkout/package.json +++ b/packages/composite-checkout/package.json @@ -27,7 +27,7 @@ "url": "git+https://github.com/Automattic/wp-calypso.git", "directory": "packages/composite-checkout" }, - "author": "@automattic", + "author": "Automattic Inc.", "license": "GPL-2.0-or-later", "bugs": { "url": "https://github.com/Automattic/wp-calypso/issues" From 8d5566647a6a788ad45e3b561dcb30528f9694a8 Mon Sep 17 00:00:00 2001 From: Mikael Korpela Date: Tue, 29 Oct 2019 15:49:55 +0200 Subject: [PATCH 11/12] Remove duplicates already in config we extend https://github.com/WordPress/gutenberg/blob/3febc48d8240a0f8b04b11201a30178b14534c5d/packages/npm-package-json-lint-config/index.js --- npmpackagejsonlint.config.js | 5 ----- 1 file changed, 5 deletions(-) diff --git a/npmpackagejsonlint.config.js b/npmpackagejsonlint.config.js index e802a8318f5b7..057214b8a3d2f 100644 --- a/npmpackagejsonlint.config.js +++ b/npmpackagejsonlint.config.js @@ -4,15 +4,10 @@ module.exports = { rules: { 'prefer-no-devDependencies': 'error', 'prefer-property-order': 'off', - 'require-author': 'error', 'require-bugs': 'off', 'require-homepage': 'off', 'require-keywords': 'off', - 'require-license': 'error', - 'require-name': 'error', - 'require-version': 'error', 'valid-values-author': [ 'error', [ 'Automattic Inc.' ] ], - 'valid-values-license': [ 'error', [ 'GPL-2.0-or-later' ] ], 'valid-values-name-scope': [ 'error', [ '@automattic' ] ], }, overrides: [ From 42834ea2d1005445c52a7cdc42c41b6d3ad3667d Mon Sep 17 00:00:00 2001 From: Mikael Korpela Date: Tue, 29 Oct 2019 15:52:14 +0200 Subject: [PATCH 12/12] Update package.json Co-Authored-By: Jon Surrell --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index 6d49656fdee65..ed37643b8872b 100644 --- a/package.json +++ b/package.json @@ -257,7 +257,7 @@ "lint:css": "stylelint \"**/*.scss\" --syntax scss", "lint:js": "npm run -s install-if-deps-outdated && eslint --ext .js --ext .jsx --ext .ts --ext .tsx --cache .", "lint:mixedindent": "mixedindentlint --ignore-comments \"client/**/*.scss\" \"assets/**/*.scss\" \"**/*.js\" \"**/*.jsx\" \"**/*.tsx\" \"**/*.tsx\" \"!build/**\" \"!node_modules/**\" \"!public/**\" \"!client/config/index.js\"", - "lint:package-json": "npmPkgJsonLint './package.json' './packages/**/package.json' './apps/**/package.json'", + "lint:package-json": "npmPkgJsonLint './package.json' './packages/*/package.json' './apps/*/package.json'", "prestart": "npx check-node-version --package && npm run -s install-if-deps-outdated && node bin/welcome.js", "start": "npm run -s build", "poststart": "run-p -s start-build-if-web start-build-if-desktop",