Repository: digitalocean/nginxconfig.io
File: src/nginxconfig/util/angular_backwards_compatibility.js (JavaScript)

Code before:
    log_not_found:              ['logging', 'logNotFound', oldBool],

    directory_nginx:            ['nginx', 'nginxConfigDirectory'],
    worker_processes:           ['nginx', 'workerProcesses'],
    user:                       ['nginx', 'user'],
    pid:                        ['nginx', 'pid'],
    client_max_body_size:       ['nginx', 'clientMaxBodySize'],

    file_structure:             ['tools', 'modularizedStructure', val => val.toLowerCase().trim() === 'modularized'],
    symlink:                    ['tools', 'symlinkVhost', oldBool],
};

const domainMap = {
    domain:                 ['server', 'domain'],
    path:                   ['server', 'path'],
    document_root:          ['server', 'documentRoot'],
    non_www:                ['server', 'wwwSubdomain', val => !oldBool(val)],
    cdn:                    ['server', 'cdnSubdomain', oldBool],
    redirect:               ['server', 'redirectSubdomains', oldBool],
    ipv4:                   ['server', 'listenIpv4'],
    ipv6:                   ['server', 'listenIpv6'],

    https:                  ['https', 'https', oldBool],
    http2:                  ['https', 'http2', oldBool],
    http3:                  ['https', 'http3', oldBool],
    port_reuse:             ['https', 'portReuse', oldBool],
    force_https:            ['https', 'forceHttps', oldBool],
    hsts:                   ['https', 'hsts', oldBool],
    hsts_subdomains:        ['https', 'hstsSubdomains', oldBool],
    hsts_preload:           ['https', 'hstsPreload', oldBool],
    cert_type:              ['https', 'certType', val => val.toLowerCase().trim() === 'custom' ? 'custom' : 'letsEncrypt'],
    email:                  ['https', 'letsEncryptEmail'],
    ssl_certificate:        ['https', 'sslCertificate'],
    ssl_certificate_key:    ['https', 'sslCertificateKey'],

    php:                    ['php', 'php', oldBool],
    wordpress:              ['php', 'wordPressRules', oldBool],
    drupal:                 ['php', 'drupalRules', oldBool],
    magento:                ['php', 'magentoRules', oldBool],

    python:                 ['python', 'python', oldBool],
    django:                 ['python', 'djangoRules', oldBool],

    proxy:                  ['reverseProxy', 'reverseProxy', oldBool],
    proxy_path:             ['reverseProxy', 'path'],
    proxy_pass:             ['reverseProxy', 'proxyPass'],

    root:                   ['routing', 'root', oldBool],
    index:                  ['routing', 'index'],
    fallback_html:          ['routing', 'fallbackHtml', oldBool],
    fallback_php:           ['routing', 'fallbackPhp', oldBool],

Review comment (suggestion):
```suggestion
```
These aren't needed as these options weren't present in the angular version of the tool :)

Code after:
    log_not_found:              ['logging', 'logNotFound', oldBool],

    directory_nginx:            ['nginx', 'nginxConfigDirectory'],
    worker_processes:           ['nginx', 'workerProcesses'],
    user:                       ['nginx', 'user'],
    pid:                        ['nginx', 'pid'],
    client_max_body_size:       ['nginx', 'clientMaxBodySize'],

    file_structure:             ['tools', 'modularizedStructure', val => val.toLowerCase().trim() === 'modularized'],
    symlink:                    ['tools', 'symlinkVhost', oldBool],
};

const domainMap = {
    domain:                 ['server', 'domain'],
    path:                   ['server', 'path'],
    document_root:          ['server', 'documentRoot'],
    non_www:                ['server', 'wwwSubdomain', val => !oldBool(val)],
    cdn:                    ['server', 'cdnSubdomain', oldBool],
    redirect:               ['server', 'redirectSubdomains', oldBool],
    ipv4:                   ['server', 'listenIpv4'],
    ipv6:                   ['server', 'listenIpv6'],

    https:                  ['https', 'https', oldBool],
    http2:                  ['https', 'http2', oldBool],
    force_https:            ['https', 'forceHttps', oldBool],
    hsts:                   ['https', 'hsts', oldBool],
    hsts_subdomains:        ['https', 'hstsSubdomains', oldBool],
    hsts_preload:           ['https', 'hstsPreload', oldBool],
    cert_type:              ['https', 'certType', val => val.toLowerCase().trim() === 'custom' ? 'custom' : 'letsEncrypt'],
    email:                  ['https', 'letsEncryptEmail'],
    ssl_certificate:        ['https', 'sslCertificate'],
    ssl_certificate_key:    ['https', 'sslCertificateKey'],

    php:                    ['php', 'php', oldBool],
    wordpress:              ['php', 'wordPressRules', oldBool],
    drupal:                 ['php', 'drupalRules', oldBool],
    magento:                ['php', 'magentoRules', oldBool],

    python:                 ['python', 'python', oldBool],
    django:                 ['python', 'djangoRules', oldBool],

    proxy:                  ['reverseProxy', 'reverseProxy', oldBool],
    proxy_path:             ['reverseProxy', 'path'],
    proxy_pass:             ['reverseProxy', 'proxyPass'],

    root:                   ['routing', 'root', oldBool],
    index:                  ['routing', 'index'],
    fallback_html:          ['routing', 'fallbackHtml', oldBool],
    fallback_php:           ['routing', 'fallbackPhp', oldBool],
    fallback_php_path:      ['routing', 'fallbackPhpPath'],
    php_legacy_routing:     ['routing', 'legacyPhpRouting', oldBool],