Update .eslintrc.js based on com.woltlab.wcf.conversation
authorTim Düsterhus <duesterhus@woltlab.com>
Wed, 13 Sep 2023 07:39:52 +0000 (09:39 +0200)
committerTim Düsterhus <duesterhus@woltlab.com>
Wed, 13 Sep 2023 07:39:52 +0000 (09:39 +0200)
snippets/typescript/.eslintrc.js

index e77864370833aac3ba1eb0098a1cc02353f4b3e8..99c4b8bd99d430e2bac3d1d95b075183ad67e97d 100644 (file)
@@ -1,37 +1,34 @@
 module.exports = {
-    root: true,
-    parser: "@typescript-eslint/parser",
-    parserOptions: {
-        tsconfigRootDir: __dirname,
-        project: ["./tsconfig.json"]
-    },
-    plugins: ["@typescript-eslint"],
-    extends: [
-        "eslint:recommended",
-        "plugin:@typescript-eslint/recommended",
-        "plugin:@typescript-eslint/recommended-requiring-type-checking",
-        "prettier",
-        "prettier/@typescript-eslint"
+  root: true,
+  parser: "@typescript-eslint/parser",
+  parserOptions: {
+    tsconfigRootDir: __dirname,
+    project: ["./tsconfig.json"]
+  },
+  plugins: ["@typescript-eslint"],
+  extends: [
+    "eslint:recommended",
+    "plugin:@typescript-eslint/recommended",
+    "plugin:@typescript-eslint/recommended-type-checked",
+    "plugin:@typescript-eslint/strict",
+    "plugin:@typescript-eslint/strict-type-checked",
+    "plugin:@typescript-eslint/stylistic",
+    "plugin:@typescript-eslint/stylistic-type-checked",
+    "prettier"
+  ],
+  rules: {
+    "@typescript-eslint/no-non-null-assertion": 0,
+    "@typescript-eslint/consistent-type-definitions": 0,
+    "@typescript-eslint/prefer-nullish-coalescing": 0,
+    "@typescript-eslint/no-unused-vars": [
+      "error", {
+        "argsIgnorePattern": "^_"
+      }
     ],
-    rules: {
-        "@typescript-eslint/ban-types": [
-            "error", {
-                types: {
-                    "object": false
-                },
-                extendDefaults: true
-            }
-        ],
-        "@typescript-eslint/no-explicit-any": 0,
-        "@typescript-eslint/no-non-null-assertion": 0,
-        "@typescript-eslint/no-unsafe-assignment": 0,
-        "@typescript-eslint/no-unsafe-call": 0,
-        "@typescript-eslint/no-unsafe-member-access": 0,
-        "@typescript-eslint/no-unsafe-return": 0,
-        "@typescript-eslint/no-unused-vars": [
-            "error", {
-                "argsIgnorePattern": "^_"
-            }
-        ]
-    }
-};
\ No newline at end of file
+    "@typescript-eslint/strict-boolean-expressions": [
+      "error", {
+        "allowNullableBoolean": true
+      }
+    ],
+  }
+};