Check that a package extends a base tsconfig.json

You might find that your project has groups of packages that require similar configuration. Use checks to create ensure they extend a common base configuration or have specific properties.

Create custom checks for your project by using the commonality-checks-recommended package.

.commonality/extends-tsconfig-next
import { hasJsonFile } from 'commonality-checks-recommended';

export default hasJsonFile('tsconfig.json', {
  extends: ['@tsconfig/next'],
});
.commonality/extends-tsconfig-react
import { hasJsonFile } from 'commonality-checks-recommended';

export default hasJsonFile('tsconfig.json', {
  extends: ['@tsconfig/react'],
});

Selectively apply them to groups of packages in your project using selectors.

.commonality/config.json
{
  "checks": [
    "ui": [
      "extends-tsconfig-react"
    ],
    "application": [
      "extends-tsconfig-next"
    ]
  ]
}