<commit_before># Rules

Rules in ESLint are divided into several categories to help you better understand their value. Additionally, not all rules are enabled by default. Those that are not enabled by default are marked as being off.

## Possible Errors

The following rules point out areas where you might have made mistakes.

* [comma-dangle](comma-dangle.md) - disallow or enforce trailing commas
* [no-comma-dangle](no-comma-dangle.md) - **(deprecated)** disallow trailing commas in object literals (off by default)
* [no-cond-assign](no-cond-assign.md) - disallow assignment in conditional expressions
* [no-console](no-console.md) - disallow use of `console` (off by default in the node environment)
* [no-constant-condition](no-constant-condition.md) - disallow use of constant expressions in conditions
* [no-control-regex](no-control-regex.md) - disallow control characters in regular expressions
* [no-debugger](no-debugger.md) - disallow use of `debugger`
* [no-dupe-args](no-dupe-args.md) - disallow duplicate arguments in functions
* [no-dupe-keys](no-dupe-keys.md) - disallow duplicate keys when creating object literals
* [no-duplicate-case](no-duplicate-case.md) - disallow a duplicate case label.
* [no-empty-class](no-empty-class.md) - disallow the use of empty character classes in regular expressions
* [no-empty](no-empty.md) - disallow empty statements
* [no-ex-assign](no-ex-assign.md) - disallow assigning to the exception in a `catch` block
* [no-extra-boolean-cast](no-extra-boolean-cast.md) - disallow double-negation boolean casts in a boolean context
* [no-extra-parens](no-extra-parens.md) - disallow unnecessary parentheses (off by default)
* [no-extra-semi](no-extra-semi.md) - disallow unnecessary semicolons
* [no-func-assign](no-func-assign.md) - disallow overwriting functions written as function declarations
* [no-inner-declarations](no-inner-declarations.md) - disallow function or variable declarations in nested blocks
* [no-invalid-regexp](no-invalid-regexp.md) - disallow invalid regular expression strings in the `RegExp` constructor
* [no-irregular-whitespace](no-irregular-whitespace.md) - disallow irregular whitespace outside of strings and comments
* [no-negated-in-lhs](no-negated-in-lhs.md) - disallow negation of the left operand of an `in` expression
* [no-obj-calls](no-obj-calls.md) - disallow the use of object properties of the global object (`Math` and `JSON`) as functions
* [no-regex-spaces](no-regex-spaces.md) - disallow multiple spaces in a regular expression literal
* [no-reserved-keys](no-reserved-keys.md) - disallow reserved words being used as object literal keys (off by default)
* [no-sparse-arrays](no-sparse-arrays.md) - disallow sparse arrays
* [no-unreachable](no-unreachable.md) - disallow unreachable statements after a return, throw, continue, or break statement
* [use-isnan](use-isnan.md) - disallow comparisons with the value `NaN`
* [valid-jsdoc](valid-jsdoc.md) - Ensure JSDoc comments are valid (off by default)
* [valid-typeof](valid-typeof.md) - Ensure that the results of typeof are compared against a valid string

## Best Practices

These are rules designed to prevent you from making mistakes. They either prescribe a better way of doing something or help you avoid footguns.

* [block-scoped-var](block-scoped-var.md) - treat `var` statements as if they were block scoped (off by default)
* [complexity](complexity.md) - specify the maximum cyclomatic complexity allowed in a program (off by default)
* [consistent-return](consistent-return.md) - require `return` statements to either always or never specify values
* [curly](curly.md) - specify curly brace conventions for all control statements
* [default-case](default-case.md) - require `default` case in `switch` statements (off by default)
* [dot-notation](dot-notation.md) - encourages use of dot notation whenever possible
* [dot-location](dot-location.md) - enforces consistent newlines before or after dots (off by default)
* [eqeqeq](eqeqeq.md) - require the use of `===` and `!==`
* [guard-for-in](guard-for-in.md) - make sure `for-in` loops have an `if` statement (off by default)
* [no-alert](no-alert.md) - disallow the use of `alert`, `confirm`, and `prompt`
* [no-caller](no-caller.md) - disallow use of `arguments.caller` or `arguments.callee`
* [no-div-regex](no-div-regex.md) - disallow division operators explicitly at beginning of regular expression (off by default)
* [no-else-return](no-else-return.md) - disallow `else` after a `return` in an `if` (off by default)
* [no-empty-label](no-empty-label.md) - disallow use of labels for anything other then loops and switches
* [no-eq-null](no-eq-null.md) - disallow comparisons to null without a type-checking operator (off by default)
* [no-eval](no-eval.md) - disallow use of `eval()`
* [no-extend-native](no-extend-native.md) - disallow adding to native types
* [no-extra-bind](no-extra-bind.md) - disallow unnecessary function binding
* [no-fallthrough](no-fallthrough.md) - disallow fallthrough of `case` statements
* [no-floating-decimal](no-floating-decimal.md) - disallow the use of leading or trailing decimal points in numeric literals (off by default)
* [no-implied-eval](no-implied-eval.md) - disallow use of `eval()`-like methods
* [no-iterator](no-iterator.md) - disallow usage of `__iterator__` property
* [no-labels](no-labels.md) - disallow use of labeled statements
* [no-lone-blocks](no-lone-blocks.md) - disallow unnecessary nested blocks
* [no-loop-func](no-loop-func.md) - disallow creation of functions within loops
* [no-multi-spaces](no-multi-spaces.md) - disallow use of multiple spaces
* [no-multi-str](no-multi-str.md) - disallow use of multiline strings
* [no-native-reassign](no-native-reassign.md) - disallow reassignments of native objects
* [no-new-func](no-new-func.md) - disallow use of new operator for `Function` object
* [no-new-wrappers](no-new-wrappers.md) - disallows creating new instances of `String`,`Number`, and `Boolean`
* [no-new](no-new.md) - disallow use of new operator when not part of the assignment or comparison
* [no-octal-escape](no-octal-escape.md) - disallow use of octal escape sequences in string literals, such as `var foo = "Copyright \251";`
* [no-octal](no-octal.md) - disallow use of octal literals
* [no-param-reassign](no-param-reassign.md) - disallow reassignment of function parameters (off by default)
* [no-process-env](no-process-env.md) - disallow use of `process.env` (off by default)
* [no-proto](no-proto.md) - disallow usage of `__proto__` property
* [no-redeclare](no-redeclare.md) - disallow declaring the same variable more then once
* [no-return-assign](no-return-assign.md) - disallow use of assignment in `return` statement
* [no-script-url](no-script-url.md) - disallow use of javascript: urls.
* [no-self-compare](no-self-compare.md) - disallow comparisons where both sides are exactly the same (off by default)
* [no-sequences](no-sequences.md) - disallow use of comma operator
* [no-throw-literal](no-throw-literal.md) - restrict what can be thrown as an exception (off by default)
* [no-unused-expressions](no-unused-expressions.md) - disallow usage of expressions in statement position
* [no-void](no-void.md) - disallow use of `void` operator (off by default)
* [no-warning-comments](no-warning-comments.md) - disallow usage of configurable warning terms in comments - e.g. `TODO` or `FIXME` (off by default)
* [no-with](no-with.md) - disallow use of the `with` statement
* [radix](radix.md) - require use of the second argument for `parseInt()` (off by default)
* [vars-on-top](vars-on-top.md) - requires to declare all vars on top of their containing scope (off by default)
* [wrap-iife](wrap-iife.md) - require immediate function invocation to be wrapped in parentheses (off by default)
* [yoda](yoda.md) - require or disallow Yoda conditions

## Strict Mode

These rules relate to using strict mode.

* [global-strict](global-strict.md) - **(deprecated)** require or disallow the `"use strict"` pragma in the global scope (off by default in the node environment)
* [no-extra-strict](no-extra-strict.md) - **(deprecated)** disallow unnecessary use of `"use strict";` when already in strict mode
* [strict](strict.md) - controls location of Use Strict Directives

## Variables

These rules have to do with variable declarations.

* [no-catch-shadow](no-catch-shadow.md) - disallow the catch clause parameter name being the same as a variable in the outer scope (off by default in the node environment)<commit_msg>Docs: Fix typo (then -> than)<commit_after># Rules

Rules in ESLint are divided into several categories to help you better understand their value. Additionally, not all rules are enabled by default. Those that are not enabled by default are marked as being off.

## Possible Errors

The following rules point out areas where you might have made mistakes.

* [comma-dangle](comma-dangle.md) - disallow or enforce trailing commas
* [no-comma-dangle](no-comma-dangle.md) - **(deprecated)** disallow trailing commas in object literals (off by default)
* [no-cond-assign](no-cond-assign.md) - disallow assignment in conditional expressions
* [no-console](no-console.md) - disallow use of `console` (off by default in the node environment)
* [no-constant-condition](no-constant-condition.md) - disallow use of constant expressions in conditions
* [no-control-regex](no-control-regex.md) - disallow control characters in regular expressions
* [no-debugger](no-debugger.md) - disallow use of `debugger`
* [no-dupe-args](no-dupe-args.md) - disallow duplicate arguments in functions
* [no-dupe-keys](no-dupe-keys.md) - disallow duplicate keys when creating object literals
* [no-duplicate-case](no-duplicate-case.md) - disallow a duplicate case label.
* [no-empty-class](no-empty-class.md) - disallow the use of empty character classes in regular expressions
* [no-empty](no-empty.md) - disallow empty statements
* [no-ex-assign](no-ex-assign.md) - disallow assigning to the exception in a `catch` block
* [no-extra-boolean-cast](no-extra-boolean-cast.md) - disallow double-negation boolean casts in a boolean context
* [no-extra-parens](no-extra-parens.md) - disallow unnecessary parentheses (off by default)
* [no-extra-semi](no-extra-semi.md) - disallow unnecessary semicolons
* [no-func-assign](no-func-assign.md) - disallow overwriting functions written as function declarations
* [no-inner-declarations](no-inner-declarations.md) - disallow function or variable declarations in nested blocks
* [no-invalid-regexp](no-invalid-regexp.md) - disallow invalid regular expression strings in the `RegExp` constructor
* [no-irregular-whitespace](no-irregular-whitespace.md) - disallow irregular whitespace outside of strings and comments
* [no-negated-in-lhs](no-negated-in-lhs.md) - disallow negation of the left operand of an `in` expression
* [no-obj-calls](no-obj-calls.md) - disallow the use of object properties of the global object (`Math` and `JSON`) as functions
* [no-regex-spaces](no-regex-spaces.md) - disallow multiple spaces in a regular expression literal
* [no-reserved-keys](no-reserved-keys.md) - disallow reserved words being used as object literal keys (off by default)
* [no-sparse-arrays](no-sparse-arrays.md) - disallow sparse arrays
* [no-unreachable](no-unreachable.md) - disallow unreachable statements after a return, throw, continue, or break statement
* [use-isnan](use-isnan.md) - disallow comparisons with the value `NaN`
* [valid-jsdoc](valid-jsdoc.md) - Ensure JSDoc comments are valid (off by default)
* [valid-typeof](valid-typeof.md) - Ensure that the results of typeof are compared against a valid string

## Best Practices

These are rules designed to prevent you from making mistakes. They either prescribe a better way of doing something or help you avoid footguns.

* [block-scoped-var](block-scoped-var.md) - treat `var` statements as if they were block scoped (off by default)
* [complexity](complexity.md) - specify the maximum cyclomatic complexity allowed in a program (off by default)
* [consistent-return](consistent-return.md) - require `return` statements to either always or never specify values
* [curly](curly.md) - specify curly brace conventions for all control statements
* [default-case](default-case.md) - require `default` case in `switch` statements (off by default)
* [dot-notation](dot-notation.md) - encourages use of dot notation whenever possible
* [dot-location](dot-location.md) - enforces consistent newlines before or after dots (off by default)
* [eqeqeq](eqeqeq.md) - require the use of `===` and `!==`
* [guard-for-in](guard-for-in.md) - make sure `for-in` loops have an `if` statement (off by default)
* [no-alert](no-alert.md) - disallow the use of `alert`, `confirm`, and `prompt`
* [no-caller](no-caller.md) - disallow use of `arguments.caller` or `arguments.callee`
* [no-div-regex](no-div-regex.md) - disallow division operators explicitly at beginning of regular expression (off by default)
* [no-else-return](no-else-return.md) - disallow `else` after a `return` in an `if` (off by default)
* [no-empty-label](no-empty-label.md) - disallow use of labels for anything other then loops and switches
* [no-eq-null](no-eq-null.md) - disallow comparisons to null without a type-checking operator (off by default)
* [no-eval](no-eval.md) - disallow use of `eval()`
* [no-extend-native](no-extend-native.md) - disallow adding to native types
* [no-extra-bind](no-extra-bind.md) - disallow unnecessary function binding
* [no-fallthrough](no-fallthrough.md) - disallow fallthrough of `case` statements
* [no-floating-decimal](no-floating-decimal.md) - disallow the use of leading or trailing decimal points in numeric literals (off by default)
* [no-implied-eval](no-implied-eval.md) - disallow use of `eval()`-like methods
* [no-iterator](no-iterator.md) - disallow usage of `__iterator__` property
* [no-labels](no-labels.md) - disallow use of labeled statements
* [no-lone-blocks](no-lone-blocks.md) - disallow unnecessary nested blocks
* [no-loop-func](no-loop-func.md) - disallow creation of functions within loops
* [no-multi-spaces](no-multi-spaces.md) - disallow use of multiple spaces
* [no-multi-str](no-multi-str.md) - disallow use of multiline strings
* [no-native-reassign](no-native-reassign.md) - disallow reassignments of native objects
* [no-new-func](no-new-func.md) - disallow use of new operator for `Function` object
* [no-new-wrappers](no-new-wrappers.md) - disallows creating new instances of `String`,`Number`, and `Boolean`
* [no-new](no-new.md) - disallow use of new operator when not part of the assignment or comparison
* [no-octal-escape](no-octal-escape.md) - disallow use of octal escape sequences in string literals, such as `var foo = "Copyright \251";`
* [no-octal](no-octal.md) - disallow use of octal literals
* [no-param-reassign](no-param-reassign.md) - disallow reassignment of function parameters (off by default)
* [no-process-env](no-process-env.md) - disallow use of `process.env` (off by default)
* [no-proto](no-proto.md) - disallow usage of `__proto__` property
* [no-redeclare](no-redeclare.md) - disallow declaring the same variable more than once
* [no-return-assign](no-return-assign.md) - disallow use of assignment in `return` statement
* [no-script-url](no-script-url.md) - disallow use of javascript: urls.
* [no-self-compare](no-self-compare.md) - disallow comparisons where both sides are exactly the same (off by default)
* [no-sequences](no-sequences.md) - disallow use of comma operator
* [no-throw-literal](no-throw-literal.md) - restrict what can be thrown as an exception (off by default)
* [no-unused-expressions](no-unused-expressions.md) - disallow usage of expressions in statement position
* [no-void](no-void.md) - disallow use of `void` operator (off by default)
* [no-warning-comments](no-warning-comments.md) - disallow usage of configurable warning terms in comments - e.g. `TODO` or `FIXME` (off by default)
* [no-with](no-with.md) - disallow use of the `with` statement
* [radix](radix.md) - require use of the second argument for `parseInt()` (off by default)
* [vars-on-top](vars-on-top.md) - requires to declare all vars on top of their containing scope (off by default)
* [wrap-iife](wrap-iife.md) - require immediate function invocation to be wrapped in parentheses (off by default)
* [yoda](yoda.md) - require or disallow Yoda conditions

## Strict Mode

These rules relate to using strict mode.

* [global-strict](global-strict.md) - **(deprecated)** require or disallow the `"use strict"` pragma in the global scope (off by default in the node environment)
* [no-extra-strict](no-extra-strict.md) - **(deprecated)** disallow unnecessary use of `"use strict";` when already in strict mode
* [strict](strict.md) - controls location of Use Strict Directives

## Variables

These rules have to do with variable declarations.

* [no-catch-shadow](no-catch-shadow.md) - disallow the catch clause parameter name being the same as a variable in the outer scope (off by default in the node environment)
{'fraction_non_alphanumeric': 0.12450152474783016, 'fraction_numerical': 0.0003518648838845883, 'mean_word_length': 4.667331339315387, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 4, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '4782631', 'n_tokens_mistral': 5245, 'n_tokens_neox': 5154, 'n_words': 1743}