mirror of
https://github.com/facebook/docusaurus.git
synced 2025-05-12 08:37:25 +02:00
refactor: fix a lot of errors in type-aware linting (#7477)
This commit is contained in:
parent
222bf3c091
commit
bf1513a3e3
120 changed files with 407 additions and 364 deletions
|
@ -70,17 +70,15 @@ describe('packages', () => {
|
|||
packageJsonFile.content.name?.startsWith('@'),
|
||||
)
|
||||
.forEach((packageJsonFile) => {
|
||||
if (packageJsonFile) {
|
||||
// Unfortunately jest custom message do not exist in loops,
|
||||
// so using an exception instead to show failing package file
|
||||
// (see https://github.com/facebook/jest/issues/3293)
|
||||
// expect(packageJsonFile.content.publishConfig?.access)
|
||||
// .toEqual('public');
|
||||
if (packageJsonFile.content.publishConfig?.access !== 'public') {
|
||||
throw new Error(
|
||||
`Package ${packageJsonFile.file} does not have publishConfig.access: 'public'`,
|
||||
);
|
||||
}
|
||||
// Unfortunately jest custom message do not exist in loops,
|
||||
// so using an exception instead to show failing package file
|
||||
// (see https://github.com/facebook/jest/issues/3293)
|
||||
// expect(packageJsonFile.content.publishConfig?.access)
|
||||
// .toEqual('public');
|
||||
if (packageJsonFile.content.publishConfig?.access !== 'public') {
|
||||
throw new Error(
|
||||
`Package ${packageJsonFile.file} does not have publishConfig.access: 'public'`,
|
||||
);
|
||||
}
|
||||
});
|
||||
});
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue