diff --git a/frontend/apps/remark42/app/common/constants.ts b/frontend/apps/remark42/app/common/constants.ts index e02643a6..cbf0f497 100644 --- a/frontend/apps/remark42/app/common/constants.ts +++ b/frontend/apps/remark42/app/common/constants.ts @@ -38,7 +38,7 @@ export const IS_STORAGE_AVAILABLE: boolean = (() => { })(); /** - * Defines whether iframe loaded in cross origin environment + * Defines whether iframe loaded in cross-origin environment * Useful for checking if some privacy restriction may be applied */ export const IS_THIRD_PARTY: boolean = (() => { diff --git a/frontend/apps/remark42/app/common/fetcher.ts b/frontend/apps/remark42/app/common/fetcher.ts index 800bae82..c812e17f 100644 --- a/frontend/apps/remark42/app/common/fetcher.ts +++ b/frontend/apps/remark42/app/common/fetcher.ts @@ -23,7 +23,7 @@ type Methods = { delete: BodylessMethod; }; -/** JWT token received from server and will be send by each request, if it present */ +/** JWT token received from server and will be sent by each request, if it is present */ let activeJwtToken: string | undefined; const createFetcher = (baseUrl: string = ''): Methods => { diff --git a/frontend/apps/remark42/app/components/comment/comment.tsx b/frontend/apps/remark42/app/components/comment/comment.tsx index 253b55c6..8a7de072 100644 --- a/frontend/apps/remark42/app/components/comment/comment.tsx +++ b/frontend/apps/remark42/app/components/comment/comment.tsx @@ -88,7 +88,7 @@ export class Comment extends Component { }; /** - * Defines whether comment made by logged in user + * Defines whether comment made by logged-in user */ isCurrentUser = (): boolean => { return !this.isGuest() && this.props.data.user.id === this.props.user?.id; diff --git a/frontend/apps/remark42/app/components/profile/profile.tsx b/frontend/apps/remark42/app/components/profile/profile.tsx index 5b4fead2..d6b15a66 100644 --- a/frontend/apps/remark42/app/components/profile/profile.tsx +++ b/frontend/apps/remark42/app/components/profile/profile.tsx @@ -40,7 +40,7 @@ export function Profile() { const [error, setError] = useState(false); const [comments, setComments] = useState(null); const [commentsAmount, setCommentsAmount] = useState(0); - // store skip count in ref because it don't affect the view + // store skip count in ref because it doesn't affect the view const commentsSkipCountsRef = useRef(0); const [isSigningOut, setSigningOut] = useState(false); @@ -179,7 +179,7 @@ export function Profile() { return (
{/* disable jsx-a11y/no-static-element-interactions and jsx-a11y/click-events-have-key-events */} - {/* that's fine because inside of the element we have button that will throw all events and provide all of the interactions */} + {/* that's fine because inside the element we have button that will throw all events and provide all the interactions */} {/* eslint-disable-next-line */}
diff --git a/frontend/apps/remark42/app/store/thread/utils.ts b/frontend/apps/remark42/app/store/thread/utils.ts index 537fabc2..0dc6c3a1 100644 --- a/frontend/apps/remark42/app/store/thread/utils.ts +++ b/frontend/apps/remark42/app/store/thread/utils.ts @@ -20,6 +20,8 @@ export const getCollapsedComments = (): string[] => }, []); /** + * @param siteId site id + * @param url url of the page with comments * @param info list of string of type "site-id_url_comment-id */ export const saveCollapsedComments = (siteId: string, url: string, info: Comment['id'][]): void => { diff --git a/frontend/apps/remark42/app/utils/post-message.ts b/frontend/apps/remark42/app/utils/post-message.ts index fb219299..cfd006b9 100644 --- a/frontend/apps/remark42/app/utils/post-message.ts +++ b/frontend/apps/remark42/app/utils/post-message.ts @@ -36,7 +36,7 @@ export function postMessageToParent(data: ParentMessage): boolean { * Sends message to target iframe * * @param target iframe to send data - * @param data that will be send to iframe + * @param data that will be sent to iframe * @returns request success of fail */ export function postMessageToIframe(target: HTMLIFrameElement, data: ChildMessage): boolean { diff --git a/frontend/apps/remark42/templates/privacy.html b/frontend/apps/remark42/templates/privacy.html index 367e92e9..5b6e9ee7 100644 --- a/frontend/apps/remark42/templates/privacy.html +++ b/frontend/apps/remark42/templates/privacy.html @@ -77,7 +77,7 @@

Our Services do not address anyone under the age of 13. We do not knowingly collect personal identifiable information from children under 13. In the case we discover that a child under 13 has provided us with personal - information, we immediately delete this from our servers. If you are a parent or guardian and you are aware that + information, we immediately delete this from our servers. If you are a parent or guardian, and you are aware that your child has provided us with personal information, please contact us so that we will be able to do necessary actions.

diff --git a/frontend/apps/remark42/webpack.config.js b/frontend/apps/remark42/webpack.config.js index db18c1bf..8c85f1ae 100644 --- a/frontend/apps/remark42/webpack.config.js +++ b/frontend/apps/remark42/webpack.config.js @@ -48,7 +48,7 @@ function getLocalIdent(loaderContext, _, localName, options) { * Generates excludes for babel-loader * * Exclude is a module that has >=es6 code and resides in node_modules. - * By default babel-loader ignores everything from node_modules, + * By default, babel-loader ignores everything from node_modules, * so we have to exclude from ignore these modules */ const exclude = [ diff --git a/site/src/docs/contributing/frontend/index.md b/site/src/docs/contributing/frontend/index.md index 249ad429..323b78d8 100644 --- a/site/src/docs/contributing/frontend/index.md +++ b/site/src/docs/contributing/frontend/index.md @@ -14,7 +14,7 @@ TLDR: Preact replicates React API and compatible with its libraries. In order to inject Remark42 widgets into websites we use `iframe` and `postMessage` for communication between a site and the widget. Simple widgets like [counter widget](https://remark42.com/docs/configuration/frontend/#counter-widget) can be injected as a script because it doesn't have its own interface. -While development we setup environment which imitates real world example. We serve the page which uses Remark42 config and inject all of the widgets on it. You can check it on our [demo site](https://demo.remark42.com/web/). After successful installation you should have the same page running locally. +While developing, we set up environment which imitates real world example. We serve the page which uses Remark42 config and inject all the widgets on it. You can check it on our [demo site](https://demo.remark42.com/web/). After successful installation you should have the same page running locally. ## Installation @@ -92,7 +92,7 @@ Run `pnpm build` inside `./frontend`, and result files will be saved in `./front - The project uses TypeScript to analyze code statically - The project uses Eslint and Stylelint to check the frontend code. You can manually run via `pnpm lint` - Git Hooks (via husky) installed automatically on `pnpm i`. They check and try to fix code style if possible, otherwise commit will be rejected -- If you want IDE integration, you need Eslint and Stylelint plugins to be installed. Also, you have configure Eslint for work in subdirectory. For example you have to add configuration for VSCode like that `"eslint.workingDirectories": ["frontend/apps/remark42"]` +- If you want IDE integration, you need Eslint and Stylelint plugins to be installed. Also, you have configured Eslint for work in subdirectory. For example, you have to add configuration for VSCode like that `"eslint.workingDirectories": ["frontend/apps/remark42"]` ## CSS Styles @@ -111,7 +111,7 @@ Run `pnpm build` inside `./frontend`, and result files will be saved in `./front ## Testing - Project uses [Jest](https://jestjs.io) as test framework -- [Testing Library](https://testing-library.com) is used as UI test utilities (there are still tests with Enzyme but we are in process of migration) +- [Testing Library](https://testing-library.com) is used as UI test utilities (there are still tests with Enzyme, but we are in process of migration) - Jest checks files that match regex `\.(test|spec)\.ts(x?)$`, i.e., `comment.test.tsx`, `comment.spec.ts` - Tests are running on push attempt - Example tests can be found in `./app/components/auth/auth.spec.ts`, `./app/store/user/reducers.test.ts`