TypeScript/.eslintrc

137 lines
5.3 KiB
Plaintext
Raw Normal View History

2019-06-13 12:37:14 +02:00
{
"parser": "@typescript-eslint/parser",
"parserOptions": {
"warnOnUnsupportedTypeScriptVersion": false,
"ecmaVersion": 6,
"sourceType": "module",
"project": "./src/tsconfig-base.json"
},
"env": {
"browser": false,
"node": true,
"es6": true
},
"plugins": [
"@typescript-eslint", "microsoft-typescript"
],
"rules": {
"@typescript-eslint/adjacent-overload-signatures": "error",
2019-06-13 12:37:14 +02:00
"@typescript-eslint/array-type": "off",
"@typescript-eslint/ban-types": "off",
"camelcase": "off",
2019-06-19 16:30:28 +02:00
"@typescript-eslint/camelcase": ["error", { "properties": "never", "allow": ["^[A-Za-z][a-zA-Za-z]+_[A-Za-z]+$"] }],
2019-06-14 11:20:48 +02:00
"@typescript-eslint/class-name-casing": "error",
2019-06-13 12:37:14 +02:00
"@typescript-eslint/explicit-member-accessibility": "off",
"@typescript-eslint/import/order": "off",
"indent": "off",
"@typescript-eslint/indent": "off",
"@typescript-eslint/interface-name-prefix": "error",
2019-06-13 12:37:14 +02:00
"@typescript-eslint/member-ordering": "off",
"@typescript-eslint/no-angle-bracket-type-assertion": "off",
"@typescript-eslint/no-empty-interface": "off",
"@typescript-eslint/no-explicit-any": "off",
2019-06-14 10:21:43 +02:00
"@typescript-eslint/no-inferrable-types": "error",
2019-06-13 12:37:14 +02:00
"@typescript-eslint/no-misused-new": "error",
"@typescript-eslint/no-namespace": "off",
"@typescript-eslint/no-object-literal-type-assertion": "off",
"@typescript-eslint/no-parameter-properties": "off",
2019-06-14 09:16:19 +02:00
"@typescript-eslint/no-this-alias": "error",
2019-06-13 12:37:14 +02:00
"@typescript-eslint/no-triple-slash-reference": "off",
"@typescript-eslint/no-unnecessary-qualifier": "error",
"@typescript-eslint/no-unnecessary-type-assertion": "error",
2019-06-13 12:37:14 +02:00
"@typescript-eslint/no-use-before-define": "off",
"@typescript-eslint/no-var-requires": "off",
"@typescript-eslint/prefer-for-of": "error",
"@typescript-eslint/prefer-function-type": "error",
2019-06-14 10:25:18 +02:00
"@typescript-eslint/prefer-interface": "error",
"@typescript-eslint/prefer-namespace-keyword": "error",
2019-06-13 12:37:14 +02:00
"semi": "off",
2019-06-14 08:46:02 +02:00
"@typescript-eslint/semi": "error",
"@typescript-eslint/type-annotation-spacing": "error",
2019-06-13 12:37:14 +02:00
"@typescript-eslint/unified-signatures": "off",
"microsoft-typescript/object-literal-surrounding-space": "error",
2019-06-13 12:37:14 +02:00
"microsoft-typescript/no-type-assertion-whitespace": "error",
"microsoft-typescript/type-operator-spacing": "error",
2019-06-13 12:37:14 +02:00
"microsoft-typescript/only-arrow-functions": "off",
2019-06-14 10:52:48 +02:00
"microsoft-typescript/no-double-space": "error",
2019-06-14 10:17:49 +02:00
"microsoft-typescript/boolean-trivia": "error",
2019-06-13 12:37:14 +02:00
"microsoft-typescript/no-in-operator": "off",
2019-06-14 09:00:33 +02:00
"microsoft-typescript/debug-assert": "error",
2019-06-13 12:37:14 +02:00
"microsoft-typescript/no-keywords": "off",
"arrow-body-style": "off",
"arrow-parens": "off",
2019-06-14 09:51:09 +02:00
"brace-style": ["error", "stroustrup", { "allowSingleLine": true }],
2019-06-13 12:37:14 +02:00
"comma-dangle": "off",
"complexity": "off",
"constructor-super": "error",
"curly": ["error", "multi-line"],
2019-06-14 09:44:19 +02:00
"dot-notation": "error",
2019-06-13 12:37:14 +02:00
"eol-last": "off",
"eqeqeq": "error",
"guard-for-in": "off",
2019-06-14 10:58:42 +02:00
"linebreak-style": ["error", "windows"],
2019-06-13 12:37:14 +02:00
"max-classes-per-file": "off",
"max-len": "off",
"new-parens": "error",
"no-bitwise": "off",
"no-caller": "error",
"no-cond-assign": "off",
"no-console": "off",
"no-debugger": "off",
"no-duplicate-case": "error",
"no-duplicate-imports": "error",
2019-06-14 09:21:51 +02:00
"no-empty": "error",
2019-06-14 09:25:02 +02:00
"no-eval": "error",
2019-06-13 12:37:14 +02:00
"no-extra-bind": "error",
"no-fallthrough": "off",
"no-invalid-this": "off",
"no-multiple-empty-lines": "off",
2019-06-14 10:02:15 +02:00
"no-new-func": "error",
2019-06-13 12:37:14 +02:00
"no-new-wrappers": "error",
"no-redeclare": "off",
"no-return-await": "error",
2019-06-14 09:12:06 +02:00
"no-restricted-globals": ["error",
{ "name": "setTimeout" },
{ "name": "setInterval" },
{ "name": "clearTimeout" },
{ "name": "setImmediate" },
{ "name": "clearImmediate" }
],
2019-06-13 12:37:14 +02:00
"no-sequences": "off",
"no-shadow": "off",
"no-sparse-arrays": "error",
2019-06-19 15:42:05 +02:00
"no-template-curly-in-string": "error",
2019-06-14 09:54:11 +02:00
"no-throw-literal": "error",
2019-06-14 11:05:25 +02:00
"no-trailing-spaces": "error",
2019-06-13 12:37:14 +02:00
"no-undef-init": "error",
"no-unsafe-finally": "error",
2019-06-19 16:01:53 +02:00
"no-unused-expressions": "error",
2019-06-13 12:37:14 +02:00
"no-unused-labels": "error",
2019-06-20 09:51:29 +02:00
"no-var": "error",
2019-06-14 09:38:45 +02:00
"object-shorthand": "error",
2019-06-13 12:37:14 +02:00
"one-var": "off",
2019-06-19 16:58:49 +02:00
"prefer-const": "error",
2019-06-13 12:37:14 +02:00
"prefer-object-spread": "error",
"quote-props": ["error", "consistent-as-needed"],
2019-06-14 11:18:27 +02:00
"quotes": ["error", "double", { "avoidEscape": true, "allowTemplateLiterals": true }],
2019-06-13 12:37:14 +02:00
"radix": "off",
"sort-keys": "off",
"space-before-function-paren": "off",
2019-06-14 09:33:03 +02:00
"space-in-parens": "error",
2019-06-13 12:37:14 +02:00
"unicode-bom": ["error", "never"],
"use-isnan": "error",
"valid-typeof": "off"
},
"overrides": [{
"files": ["src/lib/*.d.ts"],
"rules": {
2019-06-20 09:51:29 +02:00
"@typescript-eslint/interface-name-prefix": "off",
"@typescript-eslint/prefer-function-type": "off",
2019-06-20 09:51:29 +02:00
"no-var": "off"
}
}]
2019-06-13 12:37:14 +02:00
}