Skip to content

Commit

Permalink
Update the npm-package-json-lint configuration and runner
Browse files Browse the repository at this point in the history
Allow `devDependencies` only in the root `package.json` and not anywhere else.
  • Loading branch information
jsnajdr committed Jan 15, 2020
1 parent 1f5bc3e commit 5db1083
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 6 deletions.
8 changes: 3 additions & 5 deletions npmpackagejsonlint.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -12,18 +12,16 @@ module.exports = {
},
overrides: [
{
patterns: [
'./apps/full-site-editing/package.json',
'./apps/wpcom-block-editor/package.json',
'./package.json',
],
patterns: [ './package.json' ],
rules: {
'prefer-no-devDependencies': 'off',
},
},
{
patterns: [
'./package.json',
'./client/package.json',
'./packages/calypso-codemods/package.json',
'./packages/eslint-config-wpcalypso/package.json',
'./packages/eslint-plugin-wpcalypso/package.json',
'./packages/i18n-calypso-cli/package.json',
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,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' './client/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 build-packages:watch",
Expand Down

0 comments on commit 5db1083

Please sign in to comment.