-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- fixes #1085 - include core, extensions, platform-bible-utils, platform-bible-react - fix existing type checking errors - add typecheck to pre-commit - use `noImplicitReturns` instead of `consistent-return` - type check in CI - fix jsdom type check errors - also make VS Code use the repo TS version - remember to remove the patch and the type overrides when the BNF types are fixed
- Loading branch information
1 parent
4221b37
commit ef5a034
Showing
46 changed files
with
175 additions
and
337 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,11 +1,14 @@ | ||
#!/bin/sh | ||
. "$(dirname "$0")/_/husky.sh" | ||
|
||
echo "Running Lint check..." | ||
|
||
echo "Lint checking..." | ||
# generate papi.d.ts as part of lint:staged | ||
npm run lint:staged | ||
echo "Lint check finished" | ||
|
||
echo "Type checking..." | ||
npm run typecheck | ||
echo "Type check finished" | ||
|
||
echo "If the following fails run npm run editor:unlink" | ||
npx yalc check |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
2 changes: 1 addition & 1 deletion
2
extensions/src/hello-world/src/web-views/hello-world.web-view.tsx
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
65 changes: 65 additions & 0 deletions
65
...ons/src/platform-scripture-editor/src/types/@biblionexus-foundation__platform-editor.d.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,65 @@ | ||
/** | ||
* Work-around until the `@biblionexus-foundation/platform-editor` package fully includes its types. | ||
* Note there is also a patch that should be removed when this is fixed. | ||
*/ | ||
|
||
declare module 'shared-react/annotation/selection.model' { | ||
type UsjLocation = { | ||
jsonPath: string; | ||
offset: number; | ||
}; | ||
|
||
export type SelectionRange = { | ||
start: UsjLocation; | ||
end?: UsjLocation; | ||
}; | ||
|
||
export type AnnotationRange = { | ||
start: UsjLocation; | ||
end: UsjLocation; | ||
}; | ||
} | ||
|
||
declare module 'shared-react/nodes/scripture/usj/ImmutableNoteCallerNode' { | ||
export const immutableNoteCallerNodeName = 'ImmutableNoteCallerNode'; | ||
} | ||
|
||
declare module 'shared-react/plugins/logger-basic.model' { | ||
export type LoggerBasic = { | ||
error(message: string): void; | ||
warn(message: string): void; | ||
info(message: string): void; | ||
}; | ||
} | ||
|
||
declare module 'shared-react/plugins/text-direction.model' { | ||
/** Left-to-right or Right-to-left or Automatically determined from the content. */ | ||
export type TextDirection = 'ltr' | 'rtl' | 'auto'; | ||
} | ||
|
||
declare module 'shared-react/nodes/scripture/usj/usj-node-options.model' { | ||
import { SyntheticEvent } from 'react'; | ||
|
||
/** Option properties to use with each node. */ | ||
type NodeOptions = { [nodeClassName: string]: { [prop: string]: unknown } | undefined }; | ||
type OnClick = (event: SyntheticEvent) => void; | ||
const immutableNoteCallerNodeName = 'ImmutableNoteCallerNode'; | ||
|
||
export const MarkNodeName = 'MarkNode'; | ||
|
||
export type AddMissingComments = (usjCommentIds: string[]) => void; | ||
|
||
/** Options for each editor node. */ | ||
export interface UsjNodeOptions extends NodeOptions { | ||
[immutableNoteCallerNodeName]?: { | ||
/** Possible note callers to use when caller is '+'. */ | ||
noteCallers?: string[]; | ||
/** Click handler method. */ | ||
onClick?: OnClick; | ||
}; | ||
[MarkNodeName]?: { | ||
/** Method to add missing comments. */ | ||
addMissingComments?: AddMissingComments; | ||
}; | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,10 @@ | ||
{ | ||
"extends": "./tsconfig", | ||
"files": [".eslintrc.cjs", "edit-papi-d-ts.ts", "papi.d.ts"] | ||
"extends": "../../tsconfig", | ||
"compilerOptions": { | ||
"module": "ESNext", | ||
"baseUrl": "./", | ||
"noEmit": true | ||
}, | ||
"include": [".eslintrc.cjs", "edit-papi-d-ts.ts", "papi.d.ts"], | ||
"exclude": [] | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
Oops, something went wrong.