> ## Documentation Index
> Fetch the complete documentation index at: https://docs.sourcery.ai/llms.txt
> Use this file to discover all available pages before exploring further.

# Refactorings

These are the built-in rules for Sourcery's original refactoring tool, which
suggests automatic code improvements. The tool is still available, and each
page shows what a rule looks for and the change it suggests. There are 212
rules today.

These are distinct from [review rules](/reviews/review-rules/), which your team
writes to guide code review.

## Python

-   [Assign If Expression](/reference/refactorings/python/assign-if-exp/) – Replaces conditional assignment to a variable with an if expression
-   [Augmented Assign](/reference/refactorings/python/aug-assign/) – Replaces assignments with augmented assignments
-   [Avoid Builtin Shadow](/reference/refactorings/python/avoid-builtin-shadow/) – Don't assign to builtin variables, such as list.
-   [Aware datetime For UTC](/reference/refactorings/python/aware-datetime-for-utc/) – For getting the current time in UTC, use an aware datetime object with the timezone explicitly set to UTC.
-   [Binary Operator Identity](/reference/refactorings/python/bin-op-identity/) – Replaces binary operations between a value and itself with known identities:
-   [Boolean If Expression Identity](/reference/refactorings/python/boolean-if-exp-identity/) – Simplifies boolean if expressions by removing unnecessary explicit references to True or False states
-   [Break-Or-Continue-Outside-Loop](/reference/refactorings/python/break-or-continue-outside-loop/) – Remove break or continue statement found outside for or while loop
-   [Chain Compares](/reference/refactorings/python/chain-compares/) – Combine two compares on same value into a chained compare
-   [Class Extract Method](/reference/refactorings/python/class-extract-method/) – Extracts duplicate pieces of code in different functions in a class into their own methods
-   [Class Method First Parameter Should Be `cls`](/reference/refactorings/python/class-method-first-arg-name/) – Suggests that class methods should rename their first parameter to cls.
-   [Collection to Comprehension](/reference/refactorings/python/collection-builtin-to-comprehension/) – Use list, set or dictionary comprehensions directly instead of calling list(), dict() or set()
-   [Collection Into Set](/reference/refactorings/python/collection-into-set/) – Use set when checking membership of a collection of literals
-   [Collection to Bool](/reference/refactorings/python/collection-to-bool/) – Replace constant collection with boolean in boolean contexts
-   [Compare Via Equals](/reference/refactorings/python/compare-via-equals/) – Use == or != to compare str, bytes, int, and float.
-   [Comprehension to Generator](/reference/refactorings/python/comprehension-to-generator/) – Replace unneeded comprehension with generator
-   [Convert Any to In](/reference/refactorings/python/convert-any-to-in/) – Converts any() functions to simpler in statements
-   [Convert to Enumerate](/reference/refactorings/python/convert-to-enumerate/) – Replaces manual loop counter with call to enumerate
-   [DataFrame Append to Concat](/reference/refactorings/python/dataframe-append-to-concat/) – Use pandas.concat() instead of the deprecated DataFrame.append().
-   [De Morgan's Laws](/reference/refactorings/python/de-morgan/) – Simplifies conditional logic using De Morgan's laws
-   [Default Get](/reference/refactorings/python/default-get/) – Simplify dictionary access by using the default get method
-   [Default Mutable Arguments](/reference/refactorings/python/default-mutable-arg/) – Replaces use of default mutable arguments in a function
-   [Del Comprehension](/reference/refactorings/python/del-comprehension/) – Replaces cases where deletions are made via for loops with comprehensions
-   [Dict Assign-Update to Union](/reference/refactorings/python/dict-assign-update-to-union/) – Changes dictionary assignments and updates to use the union operator.
-   [Dictionary Comprehension](/reference/refactorings/python/dict-comprehension/) – Replaces dictionaries created with for loops with dictionary comprehensions
-   [Dict-Literal](/reference/refactorings/python/dict-literal/) – Replace `dict()` with `{}`
-   [Do Not Use Bare Except](/reference/refactorings/python/do-not-use-bare-except/) – Use except: Exception rather than bare except
-   [Dont-Import-Test-Modules](/reference/refactorings/python/dont-import-test-modules/) – Don't import test modules.
-   [Ensure File Closed](/reference/refactorings/python/ensure-file-closed/) – Use with when opening file to ensure closure
-   [Equality Identity](/reference/refactorings/python/equality-identity/) – Simplify equality comparisons that are always True or False
-   [Extract Duplicate Method](/reference/refactorings/python/extract-duplicate-method/) – Identifies duplicate sections of code in a function and extracts these into their own method
-   [Extract Method](/reference/refactorings/python/extract-method/) – Extracts complex pieces of functions into their own methods
-   [Flatten Nested Try](/reference/refactorings/python/flatten-nested-try/) – Merge nested try-statement into a single try
-   [Flip Comparison](/reference/refactorings/python/flip-comparison/) – Moves variables from the right side to the left side of comparisons
-   [For Append To Extend](/reference/refactorings/python/for-append-to-extend/) – Replace a for append loop with list extend
-   [For Index Replacement](/reference/refactorings/python/for-index-replacement/) – Replace item lookups in loops using the index with direct reference to the items
-   [Replace For Index with Underscore](/reference/refactorings/python/for-index-underscore/) – Replaces an unused index in a for loop or comprehension with an underscore
-   [Guard](/reference/refactorings/python/guard/) – Adds in guard clause to a conditional
-   [Hoist If from If](/reference/refactorings/python/hoist-if-from-if/) – Moves if statements that match a conditional out of that conditional
-   [Hoist Loop from If](/reference/refactorings/python/hoist-loop-from-if/) – Moves loops that occur in all cases of an if statement outside of the conditional
-   [Hoist Repeated If Condition](/reference/refactorings/python/hoist-repeated-if-condition/) – Move a repeated condition to a parent if block.
-   [Hoist Similar Statements from If](/reference/refactorings/python/hoist-similar-statement-from-if/) – Hoist nested repeated code outside conditional statements
-   [Hoist Statements from If](/reference/refactorings/python/hoist-statement-from-if/) – Moves statements that occur in all cases of an if statement outside of the conditional
-   [Hoist Statement from Loop](/reference/refactorings/python/hoist-statement-from-loop/) – Moves statements that are constant across all cases of a loop outside of the loop
-   [Identity Comprehensions](/reference/refactorings/python/identity-comprehension/) – Convert list/set/tuple comprehensions that do not change the input elements into
-   [Inline Immediately Returned Variables](/reference/refactorings/python/inline-immediately-returned-variable/) – Inlines a variable to a return in the case when the variable being declared is immediately returned
-   [Inline Immediately Yielded Variable](/reference/refactorings/python/inline-immediately-yielded-variable/) – Inline variable that is immediately yielded
-   [Inline Variable](/reference/refactorings/python/inline-variable/) – Inline variable that is only used once
-   [Instance Method First Parameter Should Be `self`](/reference/refactorings/python/instance-method-first-arg-name/) – Suggests that instance methods should rename their first parameter to self.
-   [Introduce Default Else](/reference/refactorings/python/introduce-default-else/) – Move default state of variable into else branch
-   [Invert Any/All in Body](/reference/refactorings/python/invert-any-all-body/) – Simplifies any and all statements that can be inverted
-   [Invert Any/All](/reference/refactorings/python/invert-any-all/) – Switches not any or not all statements to all or any statements respectively
-   [Last if statement guard](/reference/refactorings/python/last-if-guard/) – Convert the final conditional into a guard clause
-   [Lift Duplicated Conditional](/reference/refactorings/python/lift-duplicated-conditional/) – Lift repeated conditional into its own if statement
-   [Lift Return into If](/reference/refactorings/python/lift-return-into-if/) – Lift return into if
-   [List Comprehension](/reference/refactorings/python/list-comprehension/) – Converts a for loop into a list comprehension
-   [List Literal](/reference/refactorings/python/list-literal/) – Replaces lists created with list() with []
-   [Low Code Quality](/reference/refactorings/python/low-code-quality/) – Low code quality found in function.
-   [Max/min Default](/reference/refactorings/python/max-min-default/) – Use max/min default argument instead of if statement
-   [Merge Assignment and Augmented Assignment](/reference/refactorings/python/merge-assign-and-aug-assign/) – Replaces an assignment and an augmented assignment with a single assignment.
-   [Merge Comparisons](/reference/refactorings/python/merge-comparisons/) – Consolidates multiple comparisons into a single comparison
-   [Merge Dictionary Assignments](/reference/refactorings/python/merge-dict-assign/) – Declare the dictionary with values rather than creating an empty one and assigning to it
-   [Merge Duplicate Blocks](/reference/refactorings/python/merge-duplicate-blocks/) – Restructure conditional to merge duplicate branches together
-   [Merge Else If Into Elif](/reference/refactorings/python/merge-else-if-into-elif/) – Merge else clause's nested if statement into elif
-   [Merge Exception Handlers](/reference/refactorings/python/merge-except-handler/) – Merge exception handlers with the same body into a single except handler.
-   [Merge isinstance](/reference/refactorings/python/merge-isinstance/) – Combines together multiple isinstance functions
-   [Merge List Append](/reference/refactorings/python/merge-list-append/) – Create the list with values instead of creating an empty list and appending to it
-   [Merge List Appends Into Extend](/reference/refactorings/python/merge-list-appends-into-extend/) – Merge consecutive list appends into a single extend.
-   [Merge List Extend](/reference/refactorings/python/merge-list-extend/) – Create the list with values instead of creating an empty list and extending it with another list
-   [Merge-Nested-Ifs](/reference/refactorings/python/merge-nested-ifs/) – Merge nested if conditions
-   [Merge Repeated Ifs](/reference/refactorings/python/merge-repeated-ifs/) – Merges together the interior contents of if statements with identical conditions
-   [Merge Set Add](/reference/refactorings/python/merge-set-add/) – Create the set with values instead of declaring an empty set and adding to it
-   [Method_chaining](/reference/refactorings/python/method_chaining/) – Chaining methods improves readability
-   [Min/Max identity](/reference/refactorings/python/min-max-identity/) – Replaces duplicate conditionals looking for the minimum or maximum value of multiple variables with a min or max function
-   [Missing Dict Items](/reference/refactorings/python/missing-dict-items/) – Add missing .items() call when unpacking a dictionary
-   [Move Assign In Block](/reference/refactorings/python/move-assign-in-block/) – Moves assignment of variables closer to their usage within a block
-   [Move Assign](/reference/refactorings/python/move-assign/) – Moves assignment of variables closer to their usage
-   [No-Conditionals-In-Tests](/reference/refactorings/python/no-conditionals-in-tests/) – Avoid conditionals in tests.
-   [No-Loop-In-Tests](/reference/refactorings/python/no-loop-in-tests/) – Avoid loops in tests.
-   [Non Equal Comparison](/reference/refactorings/python/non-equal-comparison/) – Simplify comparison of non equal values
-   [None Compare](/reference/refactorings/python/none-compare/) – Replaces == with is when comparing to None
-   [Or-If-Exp-Identity](/reference/refactorings/python/or-if-exp-identity/) – Replace if-expression with `or`
-   [Pandas: Avoid inplace](/reference/refactorings/python/pandas-avoid-inplace/) – Don't use inplace for methods that always create a copy under the hood.
-   [pathlib.Path Read](/reference/refactorings/python/path-read/) – Simplify basic file reads with pathlib.
-   [Raise From Previous Error](/reference/refactorings/python/raise-from-previous-error/) – Suggests raising from a previously-raised exception.
-   [Raise-Specific-Error](/reference/refactorings/python/raise-specific-error/) – Raise a specific error instead of the general `Exception` or `BaseException`
-   [Reintroduce Else](/reference/refactorings/python/reintroduce-else/) – Lift code into else after break in control flow
-   [Remove Assert True](/reference/refactorings/python/remove-assert-true/) – Remove assert True statements
-   [Remove Dict Items](/reference/refactorings/python/remove-dict-items/) – Remove unnecessary calls to dict.items when the values are not used.
-   [Remove Dictionary Keys](/reference/refactorings/python/remove-dict-keys/) – Removes unnecessary call to keys() when iterating over a dictionary
-   [Remove Duplicate Dict Key](/reference/refactorings/python/remove-duplicate-dict-key/) – Remove duplicate keys when instantiating dicts.
-   [Remove Duplicate Set Key](/reference/refactorings/python/remove-duplicate-set-key/) – Remove duplicate keys when instantiating sets.
-   [Remove Empty Nested Block](/reference/refactorings/python/remove-empty-nested-block/) – Remove nested block which has no effect
-   [Remove-None-From-Default-Get](/reference/refactorings/python/remove-none-from-default-get/) – Replace `dict.get(x, None)` with `dict.get(x)`
-   [Remove Pass From Body](/reference/refactorings/python/remove-pass-body/) – Removes a pass from the body of a conditional by inverting it
-   [Remove Pass From Elif](/reference/refactorings/python/remove-pass-elif/) – Removes a pass from the elif section of a conditional
-   [Remove Redundant Boolean](/reference/refactorings/python/remove-redundant-boolean/) – Removes redundant booleans from tests.
-   [Remove Redundant Condition](/reference/refactorings/python/remove-redundant-condition/) – Remove a redundant condition used during variable assignment
-   [Remove Redundant Constructor in Dict Union](/reference/refactorings/python/remove-redundant-constructor-in-dict-union/)
-   [Remove Redundant Continue](/reference/refactorings/python/remove-redundant-continue/) – Remove redundant continue statement
-   [Remove Redundant Except Handler](/reference/refactorings/python/remove-redundant-except-handler/) – Removes exception handlers that can never trigger (as the exceptions have already been caught)
-   [Remove Redundant Exception](/reference/refactorings/python/remove-redundant-exception/) – Remove redundant exceptions from an except clause.
-   [Remove Redundant f-string](/reference/refactorings/python/remove-redundant-fstring/) – If an f-string has no replacements turn it into a regular string.
-   [Remove Redundant If Statements](/reference/refactorings/python/remove-redundant-if/) – Removes conditional tests where the conditional is always True or False
-   [Remove Redundant Pass](/reference/refactorings/python/remove-redundant-pass/) – Removes unnecessary pass statements
-   [Remove-Redundant-Path-Exists](/reference/refactorings/python/remove-redundant-path-exists/) – Remove unnecessary `path.exists()` check.
-   [Remove Redundant Slice Index](/reference/refactorings/python/remove-redundant-slice-index/) – Removes unnecessary slice indices.
-   [Remove Str From Fstring](/reference/refactorings/python/remove-str-from-fstring/) – Remove unnecessary calls to str() within formatted values in f-strings
-   [Remove str() from call to print()](/reference/refactorings/python/remove-str-from-print/) – Removes unnecessary calls to str() from within print()
-   [Remove-Unit-Step-From-Range](/reference/refactorings/python/remove-unit-step-from-range/) – Replace range(x, y, 1) with range(x, y)
-   [Remove Unnecessary Cast](/reference/refactorings/python/remove-unnecessary-cast/) – Remove unnecessary casts to int, str, float and bool
-   [Remove Unnecessary Else](/reference/refactorings/python/remove-unnecessary-else/) – Remove unnecessary else after guard condition
-   [Remove Unreachable Code](/reference/refactorings/python/remove-unreachable-code/) – Removes code that will never be executed
-   [Remove Unused Enumerate](/reference/refactorings/python/remove-unused-enumerate/) – Remove unnecessary calls to enumerate when the index variable is not used.
-   [Remove-Zero-From-Range](/reference/refactorings/python/remove-zero-from-range/) – Replace range(0, x) with range(x)
-   [Replace `apply` With Method Call](/reference/refactorings/python/replace-apply-with-method-call/) – Replace .apply with a call to a DataFrame's or Series's method.
-   [Replace apply With NumPy Operation](/reference/refactorings/python/replace-apply-with-numpy-operation/) – Replace apply with a NumPy operation.
-   [Replace Dict Items with Values](/reference/refactorings/python/replace-dict-items-with-values/) – Replace calls to dict.items with dict.values when the keys are not used.
-   [Replace Interpolation With Fstring](/reference/refactorings/python/replace-interpolation-with-fstring/) – Replace usage of string interpolation % operator with f-strings
-   [Return or Yield Outside Function](/reference/refactorings/python/return-or-yield-outside-function/) – Remove return or yield statements found outside function definitions.
-   [Set Comprehension](/reference/refactorings/python/set-comprehension/) – Replaces sets created with for loops with set comprehensions
-   [Simplify Boolean Comparison](/reference/refactorings/python/simplify-boolean-comparison/) – Removes unnecessarily verbose boolean comparisons
-   [Simplify-Constant-Sum](/reference/refactorings/python/simplify-constant-sum/) – Simplify constant sum() call
-   [Simplify Dictionary Update](/reference/refactorings/python/simplify-dictionary-update/) – Add single value to dictionary directly rather than using update()
-   [Simplify Division](/reference/refactorings/python/simplify-division/) – Use Python's built-in feature for succinct division syntax.
-   [Simplify Empty Collection Comparison](/reference/refactorings/python/simplify-empty-collection-comparison/) – Replace an empty collection comparison with a more idiomatic unary operator.
-   [Simplify f-string Formatting](/reference/refactorings/python/simplify-fstring-formatting/) – Simplify the formatting of replacements within an f-string.
-   [Simplify Generator](/reference/refactorings/python/simplify-generator/) – An identity generator (a for a in coll) can be replaced directly with the collection coll
-   [Simplify Length Comparison](/reference/refactorings/python/simplify-len-comparison/) – Removes unnecessarily verbose length comparisons
-   [Simplify Negative Index](/reference/refactorings/python/simplify-negative-index/) – Replaces a[len(a)-1] with negative index lookup a[-1]
-   [Simplify Numeric Comparison](/reference/refactorings/python/simplify-numeric-comparison/) – Consolidates any mathematical operations in a numeric comparison so there is a direct comparison of variable to number
-   [Simplify Single Exception Tuple](/reference/refactorings/python/simplify-single-exception-tuple/) – Replace length-one exception tuple with exception.
-   [Simplify String Length Comparison](/reference/refactorings/python/simplify-str-len-comparison/) – Changes an indirect comparison of a string's length to 0 into a direct comparison of the string to the empty string.
-   [Simplify substring search](/reference/refactorings/python/simplify-substring-search/) – Simplify finding if substrings are present in strings by using in
-   [Skip Sorted List Construction](/reference/refactorings/python/skip-sorted-list-construction/) – Removes an unnecessary intermediate construction call for a sorted list, in favour of the sorted builtin.
-   [Split or ifs](/reference/refactorings/python/split-or-ifs/) – Splits out conditions combined with an or in an if statement into their own if statement.
-   [Square Identity](/reference/refactorings/python/square-identity/) – Replaces cases of a variable being multiplied by itself with squaring that variable
-   [Str Prefix Suffix](/reference/refactorings/python/str-prefix-suffix/) – Replace explicit str prefix/suffix check with call to startswith/endswith.
-   [Sum Comprehension](/reference/refactorings/python/sum-comprehension/) – Replaces summed values created with for loops with sum comprehensions
-   [Swap If Else Branches](/reference/refactorings/python/swap-if-else-branches/) – Swaps if and else branches of conditionals
-   [Swap-If-Expression](/reference/refactorings/python/swap-if-expression/) – Swap if/else branches of if expression to remove negation
-   [Swap Nested Ifs](/reference/refactorings/python/swap-nested-ifs/) – Swaps the order of nested if statements
-   [Swap Variable](/reference/refactorings/python/swap-variable/) – Swap variable values with tuple assignment
-   [Switch](/reference/refactorings/python/switch/) – Simplify conditionals into a form more like a switch statement
-   [Ternary to If Expression](/reference/refactorings/python/ternary-to-if-expression/) – Replace boolean ternary with inline if expression.
-   [Tuple-Literal](/reference/refactorings/python/tuple-literal/) – Replace `tuple()` with `()`
-   [Unwrap Iterable Construction](/reference/refactorings/python/unwrap-iterable-construction/) – Unwrap an iterable constructor into a literal iterable.
-   [Use Any](/reference/refactorings/python/use-any/) – Use any rather than a for loop
-   [Use Assigned Variable](/reference/refactorings/python/use-assigned-variable/) – Uses a variable that was previously defined in the function instead of repeating what was defined in the variable
-   [Use `contextlib.suppress`](/reference/refactorings/python/use-contextlib-suppress/) – Use contextlib's suppress method to silence a specific error, instead of passing in an exception handler. This refactoring will add an import for…
-   [Use Count](/reference/refactorings/python/use-count/) – Replaces sum() with count() where appropriate
-   [Use Datetime Now Not Today](/reference/refactorings/python/use-datetime-now-not-today/) – Replace calls to datetime.datetime.today() with datetime.datetime.now(). They are functionally equivalent, but now is a more expressive name.
-   [Use Dictionary Items](/reference/refactorings/python/use-dict-items/) – Use dictionary.items() in for loops to access both key and value at same time
-   [Use Dictionary Union](/reference/refactorings/python/use-dictionary-union/) – Replace a sequence of unpacked dictionaries with a use of the dictionary union operator.
-   [Use File Iterator](/reference/refactorings/python/use-file-iterator/) – Use the in-built file iterator rather than calling readlines()
-   [Use Fstring For Concatenation](/reference/refactorings/python/use-fstring-for-concatenation/) – Use f-strings for concatenating strings instead of '+'
-   [Use FString For Formatting](/reference/refactorings/python/use-fstring-for-formatting/) – Replace calls to string.format() with f-strings.
-   [Use Getitem For Re Match Groups](/reference/refactorings/python/use-getitem-for-re-match-groups/) – Access groups in re.Match objects using getitem
-   [Use-Isna](/reference/refactorings/python/use-isna/) – Use `.isna()` or `.isnull()` instead of `== np.nan` for detecting missing values.
-   [Use `itertools.product`](/reference/refactorings/python/use-itertools-product/) – Replaces a nested for loop over independent iterables with itertools.product. This refactoring won't be activated if either iterable is a literal such as…
-   [Use str.join()](/reference/refactorings/python/use-join/) – Use str.join() instead of for loop
-   [Use len()](/reference/refactorings/python/use-len/) – Replaces sum() with len where appropriate
-   [Use Named Expression](/reference/refactorings/python/use-named-expression/) – Merge assignment followed by conditional check using a named expression.
-   [Use Next](/reference/refactorings/python/use-next/) – Use the built-in function next instead of a for-loop.
-   [Use-Or-For-Fallback](/reference/refactorings/python/use-or-for-fallback/) – Use `or` for providing a fallback value
-   [Use String Remove Affix](/reference/refactorings/python/use-string-remove-affix/) – Replaces string slicing with the Python 3.9 features removesuffix and removeprefix.
-   [Use_iloc](/reference/refactorings/python/use_iloc/) – Use the [`.iloc`](https://pandas.pydata.org/docs/reference/api/pandas.DataFrame.iloc.html) attribute for index-based selection
-   [Useless-Else-On-Loop](/reference/refactorings/python/useless-else-on-loop/) – Loop's else clause is always executed - move code to same level as loop
-   [While-Guard-To-Condition](/reference/refactorings/python/while-guard-to-condition/) – Move a guard clause in a while statement's body into its test
-   [Replace while with for](/reference/refactorings/python/while-to-for/) – Replaces a while loop with a counter by a for loop
-   [Yield from](/reference/refactorings/python/yield-from/) – Replaces yield as part of for loops with yield from

## JavaScript

-   [Assignment-Operator](/reference/refactorings/javascript/assignment-operator/) – Replace assignment with assignment operator
-   [Avoid-Function-Declarations-In-Blocks](/reference/refactorings/javascript/avoid-function-declarations-in-blocks/) – Avoid function declarations, favouring function assignment expressions, inside blocks.
-   [Avoid-Infinite-Loops](/reference/refactorings/javascript/avoid-infinite-loops/) – Avoid loops with missing or constant end conditions.
-   [Avoid-Jumping-In-Finally](/reference/refactorings/javascript/avoid-jumping-in-finally/) – Avoid the use of jump statements in `finally` blocks.
-   [Avoid-Using-Var](/reference/refactorings/javascript/avoid-using-var/) – Use `const` or `let` instead of `var`.
-   [Binary-Operator-Identity](/reference/refactorings/javascript/binary-operator-identity/) – Simplify binary operation
-   [Combine-Object-Destructuring](/reference/refactorings/javascript/combine-object-destructuring/) – Combine destructure assignments.
-   [Dont-Concatenate-String-Literals](/reference/refactorings/javascript/dont-concatenate-string-literals/) – Do not concatenate string literals
-   [Dont-Negate-Is-Instanceof-Operands](/reference/refactorings/javascript/dont-negate-is-instanceof-operands/) – `in` and `instanceof` have lower precedence than negation operators.
-   [Dont-Reassign-Caught-Exceptions](/reference/refactorings/javascript/dont-reassign-caught-exceptions/) – Don't reassign the bound exception ${exc}
-   [Dont-Reassign-Foreach-Variables](/reference/refactorings/javascript/dont-reassign-foreach-variables/) – Don't reassign the for-each variable ${var}
-   [Dont-Reassign-Parameters](/reference/refactorings/javascript/dont-reassign-parameters/) – Don't reassign parameter - ${param}
-   [Dont-Self-Assign-Variables](/reference/refactorings/javascript/dont-self-assign-variables/) – Assigning a variable to itself has no effect.
-   [Dont-Shadow-Arguments](/reference/refactorings/javascript/dont-shadow-arguments/) – Don't shadow `arguments`.
-   [Dont-Use-With](/reference/refactorings/javascript/dont-use-with/) – Avoid using `with` statements.
-   [Dont-Use-Wrappers-For-Builtins](/reference/refactorings/javascript/dont-use-wrappers-for-builtins/) – Don't use `new` syntax with `String`, `Number` and `Boolean` objects
-   [Flatten-Nested-Try](/reference/refactorings/javascript/flatten-nested-try/) – Merge nested try-statement into a single try
-   [Flip-Comparison](/reference/refactorings/javascript/flip-comparison/) – Moves variables from the right side to the left side of comparisons
-   [Generators-Should-Yield](/reference/refactorings/javascript/generators-should-yield/) – Avoid writing generators that don't `yield` any values.
-   [Inline-Immediately-Returned-Variable](/reference/refactorings/javascript/inline-immediately-returned-variable/) – Inline variable that is immediately returned
-   [Invert-Ternary](/reference/refactorings/javascript/invert-ternary/) – Invert ternary operator to remove negation
-   [Max-Min-Identity](/reference/refactorings/javascript/max-min-identity/) – Use max/min instead of if statement
-   [Merge-Else-If](/reference/refactorings/javascript/merge-else-if/) – Merge else clause's nested if statement into `else if`
-   [Merge-Nested-Ifs](/reference/refactorings/javascript/merge-nested-ifs/) – Merge nested if conditions
-   [Misplaced-Break-Or-Continue](/reference/refactorings/javascript/misplaced-break-or-continue/) – This `break` or `continue` does not refer to any valid loop or statement.
-   [No-Eval](/reference/refactorings/javascript/no-eval/) – Never use `eval()`
-   [No-New-Function](/reference/refactorings/javascript/no-new-function/) – Never use the `Function` constructor.
-   [No-New-Symbol](/reference/refactorings/javascript/no-new-symbol/) – An instance of `Symbol` can only be created using `Symbol` as a function
-   [Only-Delete-Object-Properties](/reference/refactorings/javascript/only-delete-object-properties/) – Delete should only be used for object properties.
-   [Possible-Incorrect-Bitwise-Operator](/reference/refactorings/javascript/possible-incorrect-bitwise-operator/) – Flags possibly incorrect use of bitwise operators `|` and `&`.
-   [Remove-Redundant-Boolean](/reference/refactorings/javascript/remove-redundant-boolean/) – Remove unnecessary boolean value
-   [Remove-Redundant-If-Statement](/reference/refactorings/javascript/remove-redundant-if-statement/) – Remove an `if` statement where the condition is `true`.
-   [Remove-Redundant-Slice-Index](/reference/refactorings/javascript/remove-redundant-slice-index/) – Remove a redundant index from the array `.slice()` method.
-   [Remove-Unreachable-Code](/reference/refactorings/javascript/remove-unreachable-code/) – Remove unreachable code.
-   [Return-Outside-Function](/reference/refactorings/javascript/return-outside-function/) – Cannot use `return` outside a function definition
-   [Simplify-Ternary](/reference/refactorings/javascript/simplify-ternary/) – Avoid unneeded ternary statements
-   [Throw-New-Errors](/reference/refactorings/javascript/throw-new-errors/) – New errors should not be created without being thrown.
-   [Use-Array-Literal](/reference/refactorings/javascript/use-array-literal/) – Use literal syntax for array creation.
-   [Use-Object-Destructuring](/reference/refactorings/javascript/use-object-destructuring/) – Prefer object destructuring when accessing and using properties.
-   [Use-Ternary-Operator](/reference/refactorings/javascript/use-ternary-operator/) – Replace if statement with ternary operator
-   [While-Guard-To-Condition](/reference/refactorings/javascript/while-guard-to-condition/) – Move a guard clause in a while statement's body into its test
-   [Yield-Outside-Generator](/reference/refactorings/javascript/yield-outside-generator/) – Cannot use `yield` outside a generator function
