{
  "rulesDirectory": [
    "node_modules/tslint-microsoft-contrib"
  ],
  "rules": {
    "arrow-return-shorthand": true,
    "callable-types": true,
    "class-name": true,
    "comment-format": [
      true,
      "check-space"
    ],
    "curly": true,
    "eofline": true,
    "forin": true,
    "import-blacklist": [
      true,
      "rxjs"
    ],
    "import-spacing": true,
    "indent": [
      true,
      "spaces"
    ],
    "interface-over-type-literal": true,
    "label-position": true,
    "max-line-length": [
      true,
      140
    ],
    "member-access": false,
    "member-ordering": [
      true, {
        "order": "fields-first"
      }
    ],
    "no-arg": true,
    "no-bitwise": true,
    "no-console": [
      true,
      "debug",
      "info",
      "time",
      "timeEnd",
      "trace"
    ],
    "no-construct": true,
    "no-debugger": true,
    "no-duplicate-variable": true,
    "no-eval": true,
    "no-inferrable-types": [
      true,
      "ignore-params"
    ],
    "no-misused-new": true,
    "no-non-null-assertion": true,
    "no-shadowed-variable": true,
    "no-string-literal": false,
    "no-string-throw": true,
    "no-switch-case-fall-through": true,
    "no-trailing-whitespace": true,
    "no-unnecessary-initializer": true,
    "no-unused-expression": true,
    "no-use-before-declare": true,
    "no-var-keyword": true,
    "object-literal-sort-keys": false,
    "one-line": [
      true,
      "check-open-brace",
      "check-catch",
      "check-else",
      "check-whitespace"
    ],
    "prefer-const": true,
    "quotemark": [
      true,
      "single",
      "jsx-double"
    ],
    "radix": true,
    "semicolon": [
      true,
      "always"
    ],
    "triple-equals": [
      true,
      "allow-null-check"
    ],
    "typedef-whitespace": [
      true,
      {
        "call-signature": "nospace",
        "index-signature": "nospace",
        "parameter": "nospace",
        "property-declaration": "nospace",
        "variable-declaration": "nospace"
      }
    ],
    "unified-signatures": true,
    "whitespace": [
      true,
      "check-branch",
      "check-decl",
      "check-operator",
      "check-separator",
      "check-type"
    ],
    // TS general rules
    /**
      * Security Rules. The following rules should be turned on because they find security issues
      * or are recommended in the Microsoft Secure Development Lifecycle (SDL)
      */
    "insecure-random": true,
    "no-banned-terms": true,
    "no-cookies": true,
    "no-delete-expression": true,
    "no-disable-auto-sanitization": true,
    "no-document-domain": true,
    "no-document-write": true,
    "no-exec-script": true,
    "no-function-constructor-with-string-args": true,
    "no-http-string": [true, "localhost:8080/?.*"],
    "no-inner-html": true,
    "no-octal-literal": true,
    "no-reserved-keywords": [true, "type"],
    "no-string-based-set-immediate": true,
    "no-string-based-set-interval": true,
    "no-string-based-set-timeout": true,
    "non-literal-require": true,
    "possible-timing-attack": true,
    "react-anchor-blank-noopener": true,
    "react-iframe-missing-sandbox": true,
    "react-no-dangerous-html": true,
    /**
      * Common Bugs and Correctness. The following rules should be turned on because they find
      * common bug patterns in the code or enforce type safety.
      */
    "jquery-deferred-must-complete": true,
    "mocha-avoid-only": true,
    "mocha-no-side-effect-code": true,
    "no-any": true,
    "no-backbone-get-set-outside-model": false,
    "no-conditional-assignment": true,
    "no-constant-condition": true,
    "no-control-regex": true,
    "no-duplicate-switch-case": true,
    "no-empty": true,
    "no-increment-decrement": true,
    "no-invalid-regexp": true,
    "no-invalid-this": true,
    "no-jquery-raw-elements": true,
    "no-regex-spaces": true,
    "no-sparse-arrays": true,
    /* Angular 2 uses empty classes with decorators */
    "no-stateless-class": false,
    "no-unnecessary-bind": true,
    "no-unnecessary-override": true,
    "no-unsafe-finally": true,
    "no-with-statement": true,
    "promise-must-complete": true,
    "react-this-binding-issue": true,
    "react-unused-props-and-state": true,
    "switch-default": true,
    "use-isnan": true,
    "use-named-parameter": true,
    /**
      * Code Clarity. The following rules should be turned on because they make the code
      * generally more clear to the reader.
      */
    "adjacent-overload-signatures": true,
    "array-type": [true, "array"],
    "arrow-parens": false, // for simple functions the parens on arrow functions are not needed
    "chai-prefer-contains-to-index-of": true,
    "chai-vague-errors": true,
    "function-name": true,
    "import-name": true,
    "interface-name": [false],
    "jsdoc-format": true,
    "max-classes-per-file": [true, 3],  // we generally recommend making one public class per file 
    "max-file-line-count": [true],
    "max-func-body-length": [true, 100, {"ignore-parameters-to-function-regex": "describe"}],
    "missing-jsdoc": true,
    "mocha-unneeded-done": true,
    "new-parens": true,
    "no-default-export": true,
    "no-empty-interface": true,
    "no-for-in": true,
    "no-function-expression": true,
    "no-multiline-string": false, // multiline-strings often introduce unnecessary whitespace into the string literals
    "no-null-keyword": false, // turn no-null-keyword off and use undefined to mean not initialized and null to mean without a value
    "no-relative-imports": true,
    "no-require-imports": true,
    "no-suspicious-comment": true,
    "no-typeof-undefined": true,
    "no-unnecessary-field-initialization": true,
    "no-unnecessary-local-variable": true,
    "no-unsupported-browser-code": true,
    "no-var-requires": true,
    "no-this-assignment": true,
    "one-variable-per-declaration": [true],
    "only-arrow-functions": [false],  // there are many valid reasons to declare a function
    "ordered-imports": [true],
    "prefer-array-literal": true,
    "prefer-for-of": true,
    "typedef": [false, "call-signature", "arrow-parameter", "parameter", "property-declaration", "variable-declaration", "member-variable-declaration"],
    "underscore-consistent-invocation": true,
    "variable-name": [true, "allow-leading-underscore"],
    /**
      * Accessibility. The following rules should be turned on to guarantee the best user
      * experience for keyboard and screen reader users.
      */
    "react-a11y-anchors": true,
    "react-a11y-aria-unsupported-elements": true,
    "react-a11y-event-has-role": true,
    "react-a11y-image-button-has-alt": true,
    "react-a11y-img-has-alt": true,
    "react-a11y-lang": true,
    "react-a11y-meta": true,
    "react-a11y-props": true,
    "react-a11y-proptypes": true,
    "react-a11y-role": true,
    "react-a11y-role-has-required-aria-props": true,
    "react-a11y-role-supports-aria-props": true,
    "react-a11y-tabindex-no-positive": true,
    "react-a11y-titles": true,
    /**
      * Whitespace related rules. The only recommended whitespace strategy is to pick a single format and
      * be consistent.
      */
    "align": [false, "parameters", "arguments", "statements"],
    "linebreak-style": [true],
    "no-consecutive-blank-lines": [true],
    "no-empty-line-after-opening-brace": false,
    "no-single-line-block-comment": true,
    "no-unnecessary-semicolons": true,
    "react-tsx-curly-spacing": false,
    "trailing-comma": [true, {"singleline": "never", "multiline": "always"}], // forcing trailing commas for multi-line
                // lists results in lists that are easier to reorder and version control diffs that are more clear.
                // Many teams like to have multiline be 'always'. There is no clear consensus on this rule but the
                // internal MS JavaScript coding standard does discourage it.
    "cyclomatic-complexity": [true, 10]
  }
}
