From d594a23fbb2154ae039393286cdb3d7f8fc2cead Mon Sep 17 00:00:00 2001 From: Navy Date: Mon, 7 Oct 2024 14:00:44 +0300 Subject: [PATCH] update eslint rules --- .eslintrc.json | 34 ++++++++++++++++++++++++---------- 1 file changed, 24 insertions(+), 10 deletions(-) diff --git a/.eslintrc.json b/.eslintrc.json index 7057957..ab27940 100644 --- a/.eslintrc.json +++ b/.eslintrc.json @@ -12,7 +12,8 @@ ], "globals": { "Atomics": "readonly", - "SharedArrayBuffer": "readonly" + "SharedArrayBuffer": "readonly", + "BigInt": true }, "parserOptions": { "ecmaVersion": 2022, @@ -86,7 +87,7 @@ "warn", "never" ], - "eqeqeq": "warn", + "eqeqeq": "error", "func-call-spacing": "warn", "func-name-matching": "warn", "func-names": "warn", @@ -103,7 +104,13 @@ "warn", 4, { - "SwitchCase": 1 + "SwitchCase": 1, + "VariableDeclarator": "first", + "FunctionDeclaration": {"parameters": "first"}, + "CallExpression": {"arguments": "first"}, + "ArrayExpression": "first", + "ObjectExpression": "first", + "ImportDeclaration": "first" } ], "init-declarations": "warn", @@ -112,14 +119,15 @@ "single" ], "jsx-quotes": [ - "warn", + "error", "prefer-single" ], "key-spacing": [ "warn", { "beforeColon": false, - "afterColon": true + "afterColon": true, + "align": "value" } ], "keyword-spacing": [ @@ -158,7 +166,6 @@ "new-parens": "warn", "no-alert": "warn", "no-array-constructor": "warn", - // "no-bitwise": "warn", "no-buffer-constructor": "warn", "no-caller": "warn", "no-console": "warn", @@ -168,7 +175,7 @@ "no-duplicate-imports": "warn", "no-else-return": "warn", "no-empty-function": "warn", - "no-eq-null": "warn", + "no-eq-null": "off", "no-eval": "warn", "no-extend-native": "warn", "no-extra-bind": "warn", @@ -186,7 +193,14 @@ "no-loop-func": "warn", "no-mixed-requires": "warn", "no-multi-assign": "warn", - "no-multi-spaces": "warn", + "no-multi-spaces": [ + "warn", { + "ignoreEOLComments": true, + "exceptions": { + "ImportDeclaration": true + } + } + ], "no-multi-str": "warn", "no-multiple-empty-lines": "warn", "no-native-reassign": "warn", @@ -217,7 +231,7 @@ "no-sequences": "warn", "no-setter-return": "warn", "no-spaced-func": "warn", - "no-tabs": "warn", + "no-tabs": "error", "no-template-curly-in-string": "error", "no-throw-literal": "warn", "no-trailing-spaces": "warn", @@ -233,7 +247,6 @@ "no-useless-rename": "warn", "no-useless-return": "warn", "no-var": "warn", - // "no-void": "warn", "no-whitespace-before-property": "error", "nonblock-statement-body-position": [ "warn", @@ -256,6 +269,7 @@ "warn", "before" ], + "padding-line-between-statements": "warn", "padded-blocks": [ "warn", {