diff --git a/.eslintrc b/.eslintrc index 5a2485e5ad..5abb6ed8d2 100644 --- a/.eslintrc +++ b/.eslintrc @@ -24,7 +24,15 @@ "navigator": true }, "rules": { + "array-bracket-newline": ["error", "consistent"], "array-bracket-spacing": ["error", "never", { "objectsInArrays": false }], + // "array-element-newline": ["error", + // { + // "multiline": true, + // "minItems": 2 + // } + // ], + "comma-spacing": ["error", { "before": false, "after": true }], "comma-dangle": ["error", "never"], "eol-last": ["error", "always"], // "eqeqeq": ["warn", "smart"], @@ -36,8 +44,9 @@ "max-len": ["error", { "code": 200, "comments": 250, - "ignoreStrings": true, + // "ignoreStrings": true, "ignoreTemplateLiterals": true + // "ignorePattern": false }], "no-console": "error", "no-empty-function": "error", diff --git a/fec/data/templates/layouts/main.jinja b/fec/data/templates/layouts/main.jinja index f1e9d6cb8b..99680f7593 100644 --- a/fec/data/templates/layouts/main.jinja +++ b/fec/data/templates/layouts/main.jinja @@ -43,9 +43,12 @@ DISTRICT_MAP_CUTOFF = '{{ constants.DISTRICT_MAP_CUTOFF }}'; WEBMANAGER_EMAIL = '{{ WEBMANAGER_EMAIL }}'; CANONICAL_BASE = '{{ CANONICAL_BASE }}'; - TRANSITION_URL = '{{ TRANSITION_URL }}'; + {% if TRANSITION_URL %}TRANSITION_URL = '{{ TRANSITION_URL }}';{% endif %} {% if election_year %}ELECTION_YEAR = '{{ election_year }}';{% endif %} + useTt = {% if FEATURES.use_tt == False %}false{% else %}true{% endif %}; + {# TODO: remove useTt with the use_tt feature flag #} + function trackMetric(name, imagesSelector) { if (imagesSelector) { var images = document.querySelectorAll(imagesSelector); @@ -89,11 +92,14 @@ diff --git a/fec/data/templates/macros/search.jinja b/fec/data/templates/macros/search.jinja index 1cf2adfd74..9882fb78cf 100644 --- a/fec/data/templates/macros/search.jinja +++ b/fec/data/templates/macros/search.jinja @@ -2,11 +2,16 @@ {% if location == 'hero' %} {% set size = 'combo--search--medium' %} {% endif %} -