/*
 * Licensed to the Apache Software Foundation (ASF) under one or more
 * contributor license agreements.  See the NOTICE file distributed with this
 * work for additional information regarding copyright ownership.  The ASF
 * licenses this file to you under the Apache License, Version 2.0 (the
 * "License"); you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *   http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
 * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.  See the
 * License for the specific language governing permissions and limitations under
 * the License.
 */
{
	"env": {
		"browser": false,
		"es6": true,
		"node": true
	},
	"parser": "@typescript-eslint/parser",
	"parserOptions": {
		"project": "tsconfig.json",
		"sourceType": "module"
	},
	"plugins": [
		"eslint-plugin-jsdoc",
		"eslint-plugin-import",
		"@typescript-eslint",
		"@typescript-eslint/tslint"
	],
	"rules": {
		"@typescript-eslint/array-type": "off",
		"@typescript-eslint/await-thenable": "error",
		"@typescript-eslint/consistent-type-assertions": "error",
		"@typescript-eslint/consistent-type-definitions": "error",
		"@typescript-eslint/dot-notation": "error",
		"@typescript-eslint/explicit-function-return-type": "error",
		"@typescript-eslint/explicit-member-accessibility": [
			"error",
			{
				"accessibility": "explicit"
			}
		],
		"@typescript-eslint/explicit-module-boundary-types": "error",
		"@typescript-eslint/indent": [
			"off",
			"tab"
		],
		"@typescript-eslint/member-delimiter-style": [
			"error",
			{
				"multiline": {
					"delimiter": "none",
					"requireLast": true
				},
				"singleline": {
					"delimiter": "semi",
					"requireLast": false
				}
			}
		],
		"@typescript-eslint/member-ordering": "error",
		"@typescript-eslint/naming-convention": "error",
		"@typescript-eslint/no-empty-function": "error",
		"@typescript-eslint/no-empty-interface": "error",
		"@typescript-eslint/no-explicit-any": "error",
		"@typescript-eslint/no-extraneous-class": "error",
		"@typescript-eslint/no-floating-promises": "off",
		"@typescript-eslint/no-inferrable-types": [
			"error",
			{
				"ignoreParameters": true
			}
		],
		"@typescript-eslint/no-misused-new": "error",
		"@typescript-eslint/no-non-null-assertion": "error",
		"@typescript-eslint/no-require-imports": "error",
		"@typescript-eslint/no-this-alias": "error",
		"@typescript-eslint/no-unnecessary-boolean-literal-compare": "error",
		"@typescript-eslint/no-unnecessary-qualifier": "error",
		"@typescript-eslint/no-unnecessary-type-arguments": "error",
		"@typescript-eslint/no-unnecessary-type-assertion": "error",
		"@typescript-eslint/no-unused-expressions": "error",
		"@typescript-eslint/no-unused-vars": "error",
		"@typescript-eslint/no-use-before-define": "error",
		"@typescript-eslint/no-var-requires": "off",
		"@typescript-eslint/prefer-for-of": "error",
		"@typescript-eslint/prefer-function-type": "error",
		"@typescript-eslint/prefer-readonly": "error",
		"@typescript-eslint/promise-function-async": "error",
		"@typescript-eslint/quotes": [
			"error",
			"double"
		],
		"@typescript-eslint/semi": [
			"error"
		],
		"@typescript-eslint/tslint/config": [
			"error",
			{
				"rules": {
					"completed-docs": [
						true,
						{
							"classes": {
								"visibilities": [
									"exported"
								]
							}
						},
						{
							"enums": {
								"visibilities": [
									"exported"
								]
							}
						},
						"enum-members",
						{
							"functions": {
								"overloads": true,
								"visibilities": [
									"exported"
								]
							}
						},
						{
							"interfaces": {
								"visibilities": [
									"exported"
								]
							}
						},
						{
							"namespaces": {
								"visibilities": [
									"exported"
								]
							}
						},
						{
							"types": {
								"visibilities": [
									"exported"
								]
							}
						},
						{
							"variables": {
								"visibilities": [
									"exported"
								]
							}
						},
						{
							"methods": {
								"overloads": true,
								"privacies": [
									"public"
								]
							}
						},
						{
							"properties": {
								"privacies": [
									"public"
								]
							}
						}
					],
					"import-spacing": true,
					"invalid-void": true,
					"no-dynamic-delete": true,
					"no-inferred-empty-object-type": true,
					"no-null-undefined-union": true,
					"no-promise-as-boolean": true,
					"no-tautology-expression": true,
					"no-unnecessary-callback-wrapper": true,
					"number-literal-format": true,
					"object-literal-sort-keys": true,
					"prefer-while": true,
					"static-this": true,
					"typedef": [
						true,
						"call-signature",
						"parameter",
						"property-declaration",
						"member-variable",
						"object-destructuring",
						"array-destructuring"
					],
					"unnecessary-else": true,
					"whitespace": [
						true,
						"check-decl",
						"check-module",
						"check-separator",
						"check-rest-spread",
						"check-type",
						"check-typecast",
						"check-type-operator"
					]
				}
			}
		],
		"@typescript-eslint/unbound-method": "error",
		"arrow-body-style": "error",
		"arrow-parens": [
			"off",
			"always"
		],
		"class-methods-use-this": "error",
		"comma-dangle": "off",
		"constructor-super": "error",
		"curly": "error",
		"eol-last": "error",
		"eqeqeq": [
			"error",
			"always"
		],
		"id-blacklist": [
			"error",
			"any",
			"Number",
			"number",
			"String",
			"string",
			"Boolean",
			"boolean",
			"Undefined",
			"undefined"
		],
		"id-match": "error",
		"import/no-deprecated": "warn",
		"import/order": "off",
		"jsdoc/check-alignment": "error",
		"jsdoc/check-indentation": "error",
		"jsdoc/newline-after-description": "error",
		"jsdoc/no-types": "error",
		"linebreak-style": [
			"error",
			"unix"
		],
		"max-classes-per-file": "off",
		"max-len": [
			"error",
			{
				"code": 140
			}
		],
		"new-parens": "error",
		"no-caller": "error",
		"no-console": [
			"error",
			{
				"allow": [
					"assert",
					"clear",
					"Console",
					"context",
					"count",
					"countReset",
					"dir",
					"dirxml",
					"error",
					"group",
					"groupCollapsed",
					"groupEnd",
					"info",
					"log",
					"profile",
					"profileEnd",
					"table",
					"timeLog",
					"timeStamp",
					"warn"
				]
			}
		],
		"no-debugger": "error",
		"no-duplicate-case": "error",
		"no-else-return": [
			"error",
			{
				"allowElseIf": false
			}
		],
		"no-empty": "error",
		"no-eval": "error",
		"no-extra-bind": "error",
		"no-fallthrough": "error",
		"no-invalid-this": "error",
		"no-multiple-empty-lines": "off",
		"no-new-func": "error",
		"no-redeclare": "error",
		"no-restricted-imports": [
			"error",
			"rxjs/Rx"
		],
		"no-return-await": "error",
		"no-shadow": [
			"error",
			{
				"hoist": "all"
			}
		],
		"no-sparse-arrays": "error",
		"no-template-curly-in-string": "error",
		"no-throw-literal": "error",
		"no-trailing-spaces": "error",
		"no-undef-init": "error",
		"no-underscore-dangle": "error",
		"no-unsafe-finally": "error",
		"no-useless-constructor": "error",
		"no-var": "error",
		"one-var": [
			"error",
			"never"
		],
		"prefer-const": "error",
		"prefer-object-spread": "error",
		"prefer-template": "error",
		"quote-props": [
			"error",
			"as-needed"
		],
		"radix": "error",
		"use-isnan": "error"
	}
}
