Skip to main content

Script Variables

This page serves as a place to centralize the location where the "special" variables used to customize the behavior of our scripts. This is important to us so that things like having to set both the DEBUG and DEBUG_MODE environment variables to turn on debug mode do not happen.

Before integrating scripts that leverage environment variables to modify their side effects, this table should be referred to so as to avoid collisions and maintain a consistent naming format.

Shell Script Environment Variables

Shell scripts (i.e. Bash in most cases) should use a snake case format. They should also be short, yet descriptive and avoid collisions with variables that might be used by third party scripts.

VariableDescription
DISABLE_LINTDisables linting (leveraged by the remark-preset-strict-lint NPM package)
ESLINT_STAGED_ONLYRuns ESLint only on staged git changes.
REMARK_BEHEADEnsures no H1 / # header exists in a markdown file that is processed using the remark-preset-strict-lint NPM package configuration (i.e. any single # header gets turned into a ## header)
REMARK_HTMLEnable this variable to have the resulting markdown file generated by remark-preset-strict-lint converted to HTML format
REMARK_MANEnable this variable to have the resulting markdown file generated by the remark-preset-strict-lint configuration into a Linux man page style document
REMARK_REMOVEWhen working with the remark-preset-strict-lint NPM configuration, set this variable to a string that you would like to dictate the string that is searched for while removing sections of a markdown file that are wrapped with a comment using the <-- ${REMARK_REMOVE}:START and ${REMARK_REMOVE} --> value
MERMAID_CHROME_EXEWhen leveraging the remark-preset-strict-lint configuration, this variable defines the path to the Chrome executable you would like to use for the Puppeteer instance necessary to render markdown charts with MermaidJS. Generally, you can set this to MERMAID_CHROME_EXE="$(which chrome)"