@cerner/terra-toolkit-docs
Version:
Contains documentation for packages in the terra-toolkit monorepo
49 lines (31 loc) • 1.24 kB
text/mdx
import { Badge } from '@cerner/package-json-lint/package.json?dev-site-package';
<Badge />
# Package Json Lint
The package provide lint rules that can be used to flag problems that are present in a package.json.
## Installation
To install the module:
```shell
npm install @cerner/package-json-lint --save-dev
npm install @cerner/package-json-lint-config-terra --save-dev
```
## Usage
### package.json
```js
"package-json-lint": {
"extends": "./packages/package-json-lint-config-terra/package-json-lint.config.js",
"projectType": "devModule | module | application",
},
```
### npm script
```js
"lint:package-json": "npm run terra -- package-json-lint",
```
## Upgrade Guide for package-json-lint
### Upgrading to version 2
Package JSON Lint v2 mainly removes rules for IE10 support since it is no longer supported.
If you have IE10 based dependencies in your project, please upgrade or remove them.
Otherwise, no additional action is needed to upgrade to v2.
## Upgrade Guide for package-json-lint-config-terra
### Upgrading to version 2
`package-json-lint-config-terra@2` now requires `package-json-lint@2` as a peer dependency.
Make sure the correct version is used to prevent any peer dependency conflicts.