X-Git-Url: https://git.immae.eu/?a=blobdiff_plain;f=.eslintrc.json;h=770913bf103e6ead70beca46f52267cf179a9c16;hb=190ac9df7c95cdae5294596764afae7ce78d108d;hp=a86c5bbbab1b333deb037702fce407947f55ce36;hpb=2ad9dcda240ee843c5e4a5b98cc94f7b2aab2c89;p=github%2FChocobozzz%2FPeerTube.git diff --git a/.eslintrc.json b/.eslintrc.json index a86c5bbba..770913bf1 100644 --- a/.eslintrc.json +++ b/.eslintrc.json @@ -23,6 +23,7 @@ "consistent-as-needed" ], "padded-blocks": "off", + "prefer-regex-literals": "off", "no-async-promise-executor": "off", "dot-notation": "off", "promise/param-names": "off", @@ -37,12 +38,15 @@ } } ], + "quotes": "off", "@typescript-eslint/indent": [ "error", 2, { "SwitchCase": 1, - "MemberExpression": "off" + "MemberExpression": "off", + // https://github.com/eslint/eslint/issues/15299 + "ignoredNodes": ["PropertyDefinition"] } ], "@typescript-eslint/consistent-type-assertions": [ @@ -63,16 +67,42 @@ "allowNumber": "true" } ], - "@typescript-eslint/quotes": "off", + "@typescript-eslint/no-this-alias": [ + "error", + { + "allowDestructuring": true, // Allow `const { props, state } = this`; false by default + "allowedNames": ["self"] // Allow `const self = this`; `[]` by default + } + ], + + "@typescript-eslint/return-await": "off", + "@typescript-eslint/dot-notation": "off", + "@typescript-eslint/method-signature-style": "off", + "@typescript-eslint/no-base-to-string": "off", + "@typescript-eslint/quotes": [ + "error", + "single", + { + "avoidEscape": true, + "allowTemplateLiterals": true + } + ], "@typescript-eslint/no-var-requires": "off", "@typescript-eslint/explicit-function-return-type": "off", "@typescript-eslint/promise-function-async": "off", "@typescript-eslint/no-dynamic-delete": "off", + "@typescript-eslint/no-unnecessary-boolean-literal-compare": "off", "@typescript-eslint/strict-boolean-expressions": "off", "@typescript-eslint/consistent-type-definitions": "off", "@typescript-eslint/no-misused-promises": "off", "@typescript-eslint/no-namespace": "off", + "@typescript-eslint/no-empty-interface": "off", "@typescript-eslint/no-extraneous-class": "off", + "@typescript-eslint/no-use-before-define": "off", + + "require-await": "off", + "@typescript-eslint/require-await": "error", + // bugged but useful "@typescript-eslint/restrict-plus-operands": "off" }, @@ -80,8 +110,12 @@ "node_modules/" ], "parserOptions": { + "EXPERIMENTAL_useSourceOfProjectReferenceRedirect": true, "project": [ "./tsconfig.json", + "./shared/tsconfig.json", + "./scripts/tsconfig.json", + "./server/tsconfig.json", "./server/tools/tsconfig.json" ] }