From 4e77741d22778bd09b772fc53f1cbd64107e3d24 Mon Sep 17 00:00:00 2001 From: toasted-nutbread Date: Fri, 16 Feb 2024 19:37:01 -0500 Subject: Even more eslint rules (#696) * capitalized-comments * Turn rules on * Add miscellaneous rules * More rules --- .eslintrc.json | 36 ++++++++++++++++++++++++++++++++++-- 1 file changed, 34 insertions(+), 2 deletions(-) (limited to '.eslintrc.json') diff --git a/.eslintrc.json b/.eslintrc.json index 30d495d2..361e5f24 100644 --- a/.eslintrc.json +++ b/.eslintrc.json @@ -42,18 +42,42 @@ "/dev/lib/handlebars/" ], "rules": { + "accessor-pairs": "error", + "capitalized-comments": [ + "error", + "always", + { + "ignorePattern": "case|[a-z]+[A-Z0-9]|[a-z]+\\.\\w", + "ignoreInlineComments": true, + "ignoreConsecutiveComments": true + } + ], "curly": ["error", "all"], + "default-case-last": "error", "dot-notation": "error", "eqeqeq": "error", "func-names": ["error", "always"], "guard-for-in": "error", + "grouped-accessor-pairs": "error", + "new-cap": "error", + "no-alert": "error", "no-case-declarations": "error", + "no-caller": "error", "no-const-assign": "error", - "no-constant-condition": "off", + "no-constant-condition": ["error", {"checkLoops": false}], + "no-constructor-return": "error", + "no-duplicate-imports": "error", + "no-eval": "error", + "no-extend-native": "error", "no-global-assign": "error", "no-implicit-globals": "error", + "no-implied-eval": "error", "no-new": "error", + "no-new-native-nonconstructor": "error", + "no-octal": "off", + "no-octal-escape": "off", "no-param-reassign": "off", + "no-promise-executor-return": "error", "no-prototype-builtins": "error", "no-restricted-syntax": [ "error", @@ -66,7 +90,11 @@ "selector": "MemberExpression[property.name=json]" } ], - "no-shadow": ["off", {"builtinGlobals": false}], + "no-self-compare": "error", + "no-sequences": "error", + "no-shadow": ["error", {"builtinGlobals": false}], + "no-shadow-restricted-names": "error", + "no-template-curly-in-string": "error", "no-undef": "error", "no-undefined": "error", "no-underscore-dangle": ["error", {"allowAfterThis": true, "allowAfterSuper": false, "allowAfterThisConstructor": false}], @@ -75,8 +103,12 @@ "no-unused-vars": ["error", {"vars": "local", "args": "after-used", "argsIgnorePattern": "^_", "caughtErrors": "none"}], "no-unused-expressions": "error", "no-var": "error", + "no-with": "error", "prefer-const": ["error", {"destructuring": "all"}], + "radix": "error", "require-atomic-updates": "off", + "sort-imports": "off", + "yoda": ["error", "never"], "@stylistic/array-bracket-newline": ["error", "consistent"], "@stylistic/array-bracket-spacing": ["error", "never"], -- cgit v1.2.3