Skip to content

Commit

Permalink
[MegaLinter] Apply linters fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
wesley-dean-gsa committed Nov 19, 2024
1 parent 47ee176 commit e1eef95
Show file tree
Hide file tree
Showing 2 changed files with 20 additions and 6 deletions.
24 changes: 19 additions & 5 deletions .eleventy.js
Original file line number Diff line number Diff line change
Expand Up @@ -83,11 +83,17 @@ module.exports = function (config) {
config.addGlobalData("baseUrl", baseUrl);
config.addGlobalData("site.baseUrl", baseUrl);

if (process.env.TWITTER && environmentValidators.isValidTwitterHandle(process.env.TWITTER)) {
if (
process.env.TWITTER &&
environmentValidators.isValidTwitterHandle(process.env.TWITTER)
) {
config.addGlobalData("site.twitter", process.env.TWITTER);
}

if (process.env.DAP_AGENCY && environmentValidators.isValidDapAgency(process.env.DAP_AGENCY)) {
if (
process.env.DAP_AGENCY &&
environmentValidators.isValidDapAgency(process.env.DAP_AGENCY)
) {
config.addGlobalData("site.dap.agency", process.env.DAP_AGENCY);
}

Expand All @@ -98,15 +104,23 @@ module.exports = function (config) {
config.addGlobalData("site.dap.subagency", process.env.DAP_SUBAGENCY);
}

if (process.env.GA && environmentValidators.isValidAnalyticsId(process.env.GA)) {
if (
process.env.GA &&
environmentValidators.isValidAnalyticsId(process.env.GA)
) {
config.addGlobalData("site.ga", process.env.GA);
}

if (
process.env.GOOGLE_VERIFICATION_TOKEN &&
environmentValidators.isValidVerificationToken (process.env.GOOGLE_VERIFICATION_TOKEN)
environmentValidators.isValidVerificationToken(
process.env.GOOGLE_VERIFICATION_TOKEN,
)
) {
config.addGlobalData("site.google_verification_token", process.env.GOOGLE_VERIFICATION_TOKEN)
config.addGlobalData(
"site.google_verification_token",
process.env.GOOGLE_VERIFICATION_TOKEN,
);
}

if (
Expand Down
2 changes: 1 addition & 1 deletion js/environmentValidators.js
Original file line number Diff line number Diff line change
Expand Up @@ -40,5 +40,5 @@ module.exports = {
isValidAnalyticsId,
isValidVerificationToken,
isValidSearchKey,
isValidSearchAffiliate
isValidSearchAffiliate,
};

0 comments on commit e1eef95

Please sign in to comment.