Standardize boolean values and fix pattern for .env file
Title: Standardize boolean values and fix pattern for .env file
Describe the bug
The .env file contains some inconsistencies in how boolean values and specific strings are represented. For instance, the variable POST_IMMEDIATELY uses the string "NO", while a boolean value like TWITTER_SEARCH_ENABLE uses false. This inconsistency could lead to parsing issues and is prone to human error.
To Reproduce
- Open the
.envfile. 2. Observe thatPOST_IMMEDIATELY=NOis used instead of the expectedfalse.
Expected behavior
Boolean variables should consistently use true or false, and all string-based boolean values such as POST_IMMEDIATELY should use true/false instead of "YES"/"NO".
Additional context
This change will standardize boolean values, making the .env file easier to parse and reducing the risk of errors. The parseBooleanFromText function, declared as const parseBooleanFromText: (text: string) => boolean;, can be used outside the .env context to ensure boolean parsing is consistent across the codebase.
Guidelines for .env values
- Boolean values: Always use
trueorfalse(not"YES"or"NO"). Example:TWITTER_SEARCH_ENABLE=true POST_IMMEDIATELY=false
Adhering to these guidelines will ensure consistency and make it easier for automated scripts to process the .env file while reduce human error.