X-Git-Url: https://git.immae.eu/?a=blobdiff_plain;f=.eslintrc.json;h=df928488204eac05c58af2dc6f848ee7ea625b09;hb=4899138ec5995075c3681ccbd9f6b163fb915991;hp=dd3821398021703a3e9a576c6f561ed012ca849a;hpb=b8a4afa4c2ba8ed8ebfc4530f002f0e5037a0cf3;p=github%2FChocobozzz%2FPeerTube.git diff --git a/.eslintrc.json b/.eslintrc.json index dd3821398..df9284882 100644 --- a/.eslintrc.json +++ b/.eslintrc.json @@ -38,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": [ @@ -76,7 +79,14 @@ "@typescript-eslint/dot-notation": "off", "@typescript-eslint/method-signature-style": "off", "@typescript-eslint/no-base-to-string": "off", - "@typescript-eslint/quotes": "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", @@ -94,7 +104,26 @@ "@typescript-eslint/require-await": "error", // bugged but useful - "@typescript-eslint/restrict-plus-operands": "off" + "@typescript-eslint/restrict-plus-operands": "off", + + // Requires strictNullChecks + "@typescript-eslint/prefer-nullish-coalescing": "off", + "@typescript-eslint/consistent-type-imports": "off", + "@typescript-eslint/consistent-indexed-object-style": "off", + "@typescript-eslint/no-confusing-void-expression": "off", + "@typescript-eslint/consistent-type-exports": "off", + "@typescript-eslint/key-spacing": "off", + + "@typescript-eslint/ban-types": [ + "error", + { + "types": { + "{}": false, + "Function": false + }, + "extendDefaults": true + } + ] }, "ignorePatterns": [ "node_modules/"