This repository was archived by the owner on May 7, 2024. It is now read-only.
Merged
Conversation
Implemented a profanity filter under utility directory. This includes a ProfanityFilterUtil.ts file consisting of functions to check strings and objects for profane words. It is accompanied by a WordList.ts file that contains a list of bad word patterns. These additions are aimed at preventing misuse of our platform by limiting language that could be offensive or inappropriate.
Introduced a profanity checker logic to screen the content of roadmaps during creation or update. The created or updated roadmap is set to 'public' only when it passes through the profanity check. This validation is done by the new validation functions added to 'validateRoadmapData.ts'. Aimed at maintaining a more cordial environment on the platform.
Enhanced profanity filter with 'checkWordProfanity' to check individual words in a string, ensuring a more accurate filtering. Applied this new filter to roadmap titles and descriptions in 'validateRoadmapIsProfane.ts' to prevent posting inappropriate content. Filter now also functions with case-insensitive regex, addressing variability in text case. Effort to uphold a respectful community environment.
To promote a respectful community, roadmaps containing profanity are now automatically flagged as drafts. A new condition has been added to roadmapController to implement this. If a roadmap fails the profanity check (isPublic equals false), it's marked as draft and will require a manual review before being visible publicly. This applies universally to all instances where a roadmap is created or updated.
| if (typeof value === 'object') { | ||
| // justified by the fact that value is already checked to be an object | ||
| // eslint-disable-next-line @typescript-eslint/ban-ts-comment | ||
| // @ts-ignore |
Check failure
Code scanning / ESLint
Disallow `@ts-<directive>` comments or require descriptions after directives
| if (typeof value === 'object') { | ||
| // justified by the fact that value is already checked to be an object | ||
| // eslint-disable-next-line @typescript-eslint/no-unsafe-argument | ||
| return checkObjectProfanity(value); |
Check failure
Code scanning / ESLint
Disallow calling a function with a value with type `any`
This file contains hidden or 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
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
No description provided.