2019-06-13 12:37:14 +02:00
|
|
|
{
|
|
|
|
"parser": "@typescript-eslint/parser",
|
|
|
|
"parserOptions": {
|
|
|
|
"warnOnUnsupportedTypeScriptVersion": false,
|
|
|
|
"ecmaVersion": 6,
|
2019-08-14 11:33:58 +02:00
|
|
|
"sourceType": "module"
|
2019-06-13 12:37:14 +02:00
|
|
|
},
|
|
|
|
"env": {
|
|
|
|
"browser": false,
|
|
|
|
"node": true,
|
|
|
|
"es6": true
|
|
|
|
},
|
|
|
|
"plugins": [
|
2019-07-24 06:17:16 +02:00
|
|
|
"@typescript-eslint", "jsdoc", "no-null", "import"
|
2019-06-13 12:37:14 +02:00
|
|
|
],
|
|
|
|
"rules": {
|
2019-06-19 14:42:32 +02:00
|
|
|
"@typescript-eslint/adjacent-overload-signatures": "error",
|
2019-08-08 20:30:18 +02:00
|
|
|
"@typescript-eslint/array-type": "error",
|
2019-08-20 10:22:30 +02:00
|
|
|
|
2019-06-13 12:37:14 +02:00
|
|
|
"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-08-20 10:22:30 +02:00
|
|
|
|
2019-06-14 11:20:48 +02:00
|
|
|
"@typescript-eslint/class-name-casing": "error",
|
2019-07-24 13:08:55 +02:00
|
|
|
"@typescript-eslint/consistent-type-definitions": ["error", "interface"],
|
2019-06-20 09:12:18 +02:00
|
|
|
"@typescript-eslint/interface-name-prefix": "error",
|
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",
|
2019-06-14 09:16:19 +02:00
|
|
|
"@typescript-eslint/no-this-alias": "error",
|
2020-02-04 23:43:25 +01:00
|
|
|
|
|
|
|
"no-unused-expressions": "off",
|
|
|
|
"@typescript-eslint/no-unused-expressions": ["error", { "allowTernary": true }],
|
|
|
|
|
2019-06-13 12:37:14 +02:00
|
|
|
"@typescript-eslint/prefer-for-of": "error",
|
2019-06-20 09:58:31 +02:00
|
|
|
"@typescript-eslint/prefer-function-type": "error",
|
2019-06-14 13:52:36 +02:00
|
|
|
"@typescript-eslint/prefer-namespace-keyword": "error",
|
2019-08-20 10:22:30 +02:00
|
|
|
|
|
|
|
"quotes": "off",
|
|
|
|
"@typescript-eslint/quotes": ["error", "double", { "avoidEscape": true, "allowTemplateLiterals": true }],
|
|
|
|
|
2019-06-13 12:37:14 +02:00
|
|
|
"semi": "off",
|
2019-06-14 08:46:02 +02:00
|
|
|
"@typescript-eslint/semi": "error",
|
2019-08-20 10:22:30 +02:00
|
|
|
|
2020-02-04 23:43:25 +01:00
|
|
|
"space-before-function-paren": "off",
|
|
|
|
"@typescript-eslint/space-before-function-paren": ["error", {
|
|
|
|
"asyncArrow": "always",
|
|
|
|
"anonymous": "always",
|
|
|
|
"named": "never"
|
|
|
|
}],
|
|
|
|
|
2019-07-19 09:30:40 +02:00
|
|
|
"@typescript-eslint/triple-slash-reference": "error",
|
2019-06-14 10:29:00 +02:00
|
|
|
"@typescript-eslint/type-annotation-spacing": "error",
|
2019-06-20 10:47:12 +02:00
|
|
|
"@typescript-eslint/unified-signatures": "error",
|
2019-06-13 12:37:14 +02:00
|
|
|
|
2019-08-04 13:27:55 +02:00
|
|
|
// scripts/eslint/rules
|
2019-07-24 06:17:16 +02:00
|
|
|
"object-literal-surrounding-space": "error",
|
|
|
|
"no-type-assertion-whitespace": "error",
|
|
|
|
"type-operator-spacing": "error",
|
|
|
|
"only-arrow-functions": ["error", {
|
2019-06-20 11:46:02 +02:00
|
|
|
"allowNamedFunctions": true ,
|
|
|
|
"allowDeclarations": true
|
|
|
|
}],
|
2019-07-24 06:17:16 +02:00
|
|
|
"no-double-space": "error",
|
|
|
|
"boolean-trivia": "error",
|
|
|
|
"no-in-operator": "error",
|
2019-08-04 13:27:55 +02:00
|
|
|
"simple-indent": "error",
|
2019-07-24 06:17:16 +02:00
|
|
|
"debug-assert": "error",
|
|
|
|
"no-keywords": "error",
|
2019-11-27 22:44:31 +01:00
|
|
|
"one-namespace-per-file": "error",
|
2019-06-13 12:37:14 +02:00
|
|
|
|
2019-08-04 13:27:55 +02:00
|
|
|
// eslint-plugin-import
|
2019-07-18 09:50:38 +02:00
|
|
|
"import/no-extraneous-dependencies": ["error", { "optionalDependencies": false }],
|
|
|
|
|
2019-08-04 13:27:55 +02:00
|
|
|
// eslint-plugin-no-null
|
2019-07-18 09:50:38 +02:00
|
|
|
"no-null/no-null": "error",
|
2019-07-05 20:55:05 +02:00
|
|
|
|
2019-08-04 13:27:55 +02:00
|
|
|
// eslint-plugin-jsdoc
|
2019-07-18 11:23:22 +02:00
|
|
|
"jsdoc/check-alignment": "error",
|
|
|
|
|
2019-08-04 13:27:55 +02:00
|
|
|
// eslint
|
2019-06-14 09:51:09 +02:00
|
|
|
"brace-style": ["error", "stroustrup", { "allowSingleLine": true }],
|
2019-06-13 12:37:14 +02:00
|
|
|
"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
|
|
|
"eqeqeq": "error",
|
2019-06-14 10:58:42 +02:00
|
|
|
"linebreak-style": ["error", "windows"],
|
2019-06-13 12:37:14 +02:00
|
|
|
"new-parens": "error",
|
|
|
|
"no-caller": "error",
|
|
|
|
"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",
|
2019-06-21 17:32:22 +02:00
|
|
|
"no-fallthrough": "error",
|
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-return-await": "error",
|
2019-06-14 09:12:06 +02:00
|
|
|
"no-restricted-globals": ["error",
|
|
|
|
{ "name": "setTimeout" },
|
|
|
|
{ "name": "clearTimeout" },
|
2019-08-14 11:33:58 +02:00
|
|
|
{ "name": "setInterval" },
|
|
|
|
{ "name": "clearInterval" },
|
2019-06-14 09:12:06 +02:00
|
|
|
{ "name": "setImmediate" },
|
|
|
|
{ "name": "clearImmediate" }
|
|
|
|
],
|
2019-06-13 12:37:14 +02:00
|
|
|
"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",
|
|
|
|
"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-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 09:33:03 +02:00
|
|
|
"space-in-parens": "error",
|
2019-06-13 12:37:14 +02:00
|
|
|
"unicode-bom": ["error", "never"],
|
2019-08-04 13:27:55 +02:00
|
|
|
"use-isnan": "error"
|
2019-08-14 11:33:58 +02:00
|
|
|
}
|
2019-06-13 12:37:14 +02:00
|
|
|
}
|