Skip to content

docs(eslint-plugin): correct issues in documentation #1396

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 7 commits into from
Jan 2, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
28 changes: 14 additions & 14 deletions packages/eslint-plugin/README.md

Large diffs are not rendered by default.

Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Require that member overloads be consecutive (adjacent-overload-signatures)
# Require that member overloads be consecutive (`adjacent-overload-signatures`)

Grouping overloaded members together can improve readability of the code.

Expand Down
2 changes: 1 addition & 1 deletion packages/eslint-plugin/docs/rules/array-type.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Requires using either `T[]` or `Array<T>` for arrays (array-type)
# Requires using either `T[]` or `Array<T>` for arrays (`array-type`)

Using the same style for array definitions across your codebase makes it easier for your developers to read and understand the types.

Expand Down
2 changes: 1 addition & 1 deletion packages/eslint-plugin/docs/rules/await-thenable.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Disallows awaiting a value that is not a Promise (`await-thenable`)
# Disallows awaiting a value that is not a Thenable (`await-thenable`)

This rule disallows awaiting a value that is not a "Thenable" (an object which has `then` method, such as a Promise).
While it is valid JavaScript to await a non-`Promise`-like value (it will resolve immediately), this pattern is often a programmer error, such as forgetting to add parenthesis to call a function that returns a Promise.
Expand Down
2 changes: 1 addition & 1 deletion packages/eslint-plugin/docs/rules/ban-ts-ignore.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Bans “// @ts-ignore” comments from being used (ban-ts-ignore)
# Bans “// @ts-ignore” comments from being used (`ban-ts-ignore`)

Suppressing TypeScript Compiler Errors can be hard to discover.

Expand Down
2 changes: 1 addition & 1 deletion packages/eslint-plugin/docs/rules/ban-types.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Bans specific types from being used (ban-types)
# Bans specific types from being used (`ban-types`)

This rule bans specific types and can suggest alternatives. It does not ban the
corresponding runtime objects from being used.
Expand Down
2 changes: 1 addition & 1 deletion packages/eslint-plugin/docs/rules/brace-style.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Enforce consistent brace style for blocks
# Enforce consistent brace style for blocks (`brace-style`)

## Rule Details

Expand Down
2 changes: 1 addition & 1 deletion packages/eslint-plugin/docs/rules/class-name-casing.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Require PascalCase class and interface names (class-name-casing)
# Require PascalCased class and interface names (`class-name-casing`)

This rule enforces PascalCase names for classes and interfaces.

Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Enforces consistent usage of type assertions. (consistent-type-assertions)
# Enforces consistent usage of type assertions (`consistent-type-assertions`)

## Rule Details

Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Consistent with type definition either `interface` or `type` (consistent-type-definitions)
# Consistent with type definition either `interface` or `type` (`consistent-type-definitions`)

There are two ways to define a type.

Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Require explicit return types on functions and class methods (explicit-function-return-type)
# Require explicit return types on functions and class methods (`explicit-function-return-type`)

Explicit types for function return values makes it clear to any calling code what type is returned.
This ensures that the return value is assigned to a variable of the correct type; or in the case
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Require explicit accessibility modifiers on class properties and methods (explicit-member-accessibility)
# Require explicit accessibility modifiers on class properties and methods (`explicit-member-accessibility`)

Leaving off accessibility modifier and making everything public can make
your interface hard to use by others.
Expand Down
2 changes: 1 addition & 1 deletion packages/eslint-plugin/docs/rules/func-call-spacing.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# require or disallow spacing between function identifiers and their invocations (`func-call-spacing`)
# Require or disallow spacing between function identifiers and their invocations (`func-call-spacing`)

When calling a function, developers may insert optional whitespace between the function’s name and the parentheses that invoke it.
This rule requires or disallows spaces between the function name and the opening parenthesis that calls it.
Expand Down
2 changes: 1 addition & 1 deletion packages/eslint-plugin/docs/rules/generic-type-naming.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Enforces naming of generic type variables (generic-type-naming)
# Enforces naming of generic type variables (`generic-type-naming`)

It can be helpful to enforce a consistent naming style for generic type variables used within a type.
For example, prefixing them with `T` and ensuring a somewhat descriptive name, or enforcing Hungarian notation.
Expand Down
2 changes: 1 addition & 1 deletion packages/eslint-plugin/docs/rules/indent.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Enforce consistent indentation (indent)
# Enforce consistent indentation (`indent`)

There are several common guidelines which require specific indentation of nested blocks and statements, like:

Expand Down
2 changes: 1 addition & 1 deletion packages/eslint-plugin/docs/rules/interface-name-prefix.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Require that interface names be prefixed with `I` (interface-name-prefix)
# Require that interface names should or should not prefixed with `I` (`interface-name-prefix`)

Interfaces often represent important software contracts, so it can be helpful to prefix their names with `I`.
The unprefixed name is then available for a class that provides a standard implementation of the interface.
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Require a specific member delimiter style for interfaces and type literals (member-delimiter-style)
# Require a specific member delimiter style for interfaces and type literals (`member-delimiter-style`)

Enforces a consistent member delimiter style in interfaces and type literals. There are three member delimiter styles primarily used in TypeScript:

Expand Down
2 changes: 1 addition & 1 deletion packages/eslint-plugin/docs/rules/member-naming.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Enforces naming conventions for class members by visibility. (member-naming)
# Enforces naming conventions for class members by visibility (`member-naming`)

It can be helpful to enforce naming conventions for `private` (and sometimes `protected`) members of an object. For example, prefixing private properties with a `_` allows them to be easily discerned when being inspected by tools that do not have knowledge of TypeScript (such as most debuggers).

Expand Down
2 changes: 1 addition & 1 deletion packages/eslint-plugin/docs/rules/member-ordering.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Require a consistent member declaration order (member-ordering)
# Require a consistent member declaration order (`member-ordering`)

A consistent ordering of fields, methods and constructors can make interfaces, type literals, classes and class
expressions easier to read, navigate and edit.
Expand Down
2 changes: 1 addition & 1 deletion packages/eslint-plugin/docs/rules/no-array-constructor.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Disallow generic `Array` constructors (no-array-constructor)
# Disallow generic `Array` constructors (`no-array-constructor`)

Use of the `Array` constructor to construct a new array is generally discouraged in favor of array literal notation because of the single-argument pitfall and because the `Array` global may be redefined. Two exceptions are when the Array constructor is used to intentionally create sparse arrays of a specified size by giving the constructor a single numeric argument, or when using TypeScript type parameters to specify the type of the items of the array (`new Array<Foo>()`).

Expand Down
2 changes: 1 addition & 1 deletion packages/eslint-plugin/docs/rules/no-dynamic-delete.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Disallow the delete operator with computed key expressions (no-dynamic-delete)
# Disallow the delete operator with computed key expressions (`no-dynamic-delete`)

Deleting dynamically computed keys can be dangerous and in some cases not well optimized.

Expand Down
2 changes: 1 addition & 1 deletion packages/eslint-plugin/docs/rules/no-empty-function.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Disallow Empty Functions (no-empty-function)
# Disallow empty functions (`no-empty-function`)

Empty functions can reduce readability because readers need to guess whether it’s intentional or not. So writing a clear comment for empty functions is a good practice.

Expand Down
2 changes: 1 addition & 1 deletion packages/eslint-plugin/docs/rules/no-empty-interface.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Disallow the declaration of empty interfaces (no-empty-interface)
# Disallow the declaration of empty interfaces (`no-empty-interface`)

An empty interface is equivalent to its supertype. If the interface does not implement a supertype, then
the interface is equivalent to an empty object (`{}`). In both cases it can be omitted.
Expand Down
2 changes: 1 addition & 1 deletion packages/eslint-plugin/docs/rules/no-explicit-any.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Disallow usage of the `any` type (no-explicit-any)
# Disallow usage of the `any` type (`no-explicit-any`)

Using the `any` type defeats the purpose of using TypeScript.
When `any` is used, all compiler type checks around that value are ignored.
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Disallow extra non-null assertion
# Disallow extra non-null assertion (`no-extra-non-null-assertion`)

## Rule Details

Expand Down
2 changes: 1 addition & 1 deletion packages/eslint-plugin/docs/rules/no-extra-parens.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# disallow unnecessary parentheses (`no-extra-parens`)
# Disallow unnecessary parentheses (`no-extra-parens`)

This rule restricts the use of parentheses to only where they are necessary.

Expand Down
2 changes: 1 addition & 1 deletion packages/eslint-plugin/docs/rules/no-extra-semi.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Disallow unnecessary semicolons
# Disallow unnecessary semicolons (`no-extra-semi`)

## Rule Details

Expand Down
2 changes: 1 addition & 1 deletion packages/eslint-plugin/docs/rules/no-extraneous-class.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Forbids the use of classes as namespaces (no-extraneous-class)
# Forbids the use of classes as namespaces (`no-extraneous-class`)

This rule warns when a class is accidentally used as a namespace.

Expand Down
2 changes: 1 addition & 1 deletion packages/eslint-plugin/docs/rules/no-floating-promises.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Requires Promise-like values to be handled appropriately (no-floating-promises)
# Requires Promise-like values to be handled appropriately (`no-floating-promises`)

This rule forbids usage of Promise-like values in statements without handling
their errors appropriately. Unhandled promises can cause several issues, such
Expand Down
2 changes: 1 addition & 1 deletion packages/eslint-plugin/docs/rules/no-for-in-array.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Disallow iterating over an array with a for-in loop (no-for-in-array)
# Disallow iterating over an array with a for-in loop (`no-for-in-array`)

This rule prohibits iterating over an array with a for-in loop.

Expand Down
2 changes: 1 addition & 1 deletion packages/eslint-plugin/docs/rules/no-implied-eval.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Disallow the use of `eval()`-like methods (`@typescript-eslint/no-implied-eval`)
# Disallow the use of `eval()`-like methods (`no-implied-eval`)

It's considered a good practice to avoid using `eval()`. There are security and performance implications involved with doing so, which is why many linters recommend disallowing `eval()`. However, there are some other ways to pass a string and have it interpreted as JavaScript code that have similar concerns.

Expand Down
2 changes: 1 addition & 1 deletion packages/eslint-plugin/docs/rules/no-inferrable-types.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Disallows explicit type declarations for variables or parameters initialized to a number, string, or boolean. (no-inferrable-types)
# Disallows explicit type declarations for variables or parameters initialized to a number, string, or boolean (`no-inferrable-types`)

Explicit types where they can be easily inferred may add unnecessary verbosity.

Expand Down
2 changes: 1 addition & 1 deletion packages/eslint-plugin/docs/rules/no-magic-numbers.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Disallow Magic Numbers (`no-magic-numbers`)
# Disallow magic numbers (`no-magic-numbers`)

'Magic numbers' are numbers that occur multiple times in code without an explicit meaning.
They should preferably be replaced by named constants.
Expand Down
2 changes: 1 addition & 1 deletion packages/eslint-plugin/docs/rules/no-misused-new.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Enforce valid definition of `new` and `constructor`. (no-misused-new)
# Enforce valid definition of `new` and `constructor` (`no-misused-new`)

Warns on apparent attempts to define constructors for interfaces or `new` for classes.

Expand Down
2 changes: 1 addition & 1 deletion packages/eslint-plugin/docs/rules/no-misused-promises.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Avoid using promises in places not designed to handle them (no-misused-promises)
# Avoid using promises in places not designed to handle them (`no-misused-promises`)

This rule forbids using promises in places where the TypeScript compiler
allows them but they are not handled properly. These situations can often arise
Expand Down
2 changes: 1 addition & 1 deletion packages/eslint-plugin/docs/rules/no-namespace.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Disallow the use of custom TypeScript modules and namespaces (no-namespace)
# Disallow the use of custom TypeScript modules and namespaces (`no-namespace`)

Custom TypeScript modules (`module foo {}`) and namespaces (`namespace foo {}`) are considered outdated
ways to organize TypeScript code. ES2015 module syntax is now preferred (`import`/`export`).
Expand Down
2 changes: 1 addition & 1 deletion packages/eslint-plugin/docs/rules/no-non-null-assertion.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Disallows non-null assertions using the `!` postfix operator (no-non-null-assertion)
# Disallows non-null assertions using the `!` postfix operator (`no-non-null-assertion`)

## Rule Details

Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Disallow the use of parameter properties in class constructors. (no-parameter-properties)
# Disallow the use of parameter properties in class constructors (`no-parameter-properties`)

Parameter properties can be confusing to those new to TypeScript as they are less explicit than other ways
of declaring and initializing class members.
Expand Down
2 changes: 1 addition & 1 deletion packages/eslint-plugin/docs/rules/no-require-imports.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Disallows invocation of `require()` (no-require-imports)
# Disallows invocation of `require()` (`no-require-imports`)

Prefer the newer ES6-style imports over `require()`.

Expand Down
2 changes: 1 addition & 1 deletion packages/eslint-plugin/docs/rules/no-this-alias.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Disallow aliasing `this` (no-this-alias)
# Disallow aliasing `this` (`no-this-alias`)

This rule prohibits assigning variables to `this`.

Expand Down
2 changes: 1 addition & 1 deletion packages/eslint-plugin/docs/rules/no-throw-literal.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Restrict what can be thrown as an exception (`@typescript-eslint/no-throw-literal`)
# Disallow throwing literals as exceptions (`no-throw-literal`)

It is considered good practice to only `throw` the `Error` object itself or an object using the `Error` object as base objects for user-defined exceptions.
The fundamental benefit of `Error` objects is that they automatically keep track of where they were built and originated.
Expand Down
2 changes: 1 addition & 1 deletion packages/eslint-plugin/docs/rules/no-type-alias.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Disallow the use of type aliases (no-type-alias)
# Disallow the use of type aliases (`no-type-alias`)

In TypeScript, type aliases serve three purposes:

Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Condition expressions must be necessary
# Prevents conditionals where the type is always truthy or always falsy (`no-unnecessary-condition`)

Any expression being used as a condition must be able to evaluate as truthy or falsy in order to be considered "necessary". Conversely, any expression that always evaluates to truthy or always evaluates to falsy, as determined by the type of the expression, is considered unnecessary and will be flagged by this rule.

Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Warns when a namespace qualifier is unnecessary. (no-unnecessary-qualifier)
# Warns when a namespace qualifier is unnecessary (`no-unnecessary-qualifier`)

## Rule Details

Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Enforces that type arguments will not be used if not required (no-unnecessary-type-arguments)
# Enforces that type arguments will not be used if not required (`no-unnecessary-type-arguments`)

Warns if an explicitly specified type argument is the default for that type parameter.

Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Warns if a type assertion does not change the type of an expression (no-unnecessary-type-assertion)
# Warns if a type assertion does not change the type of an expression (`no-unnecessary-type-assertion`)

This rule prohibits using a type assertion that does not change the type of an expression.

Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Disallow untyped public methods (no-untyped-public-signature)
# Disallow untyped public methods (`no-untyped-public-signature`)

public methods are meant to be used by code outside of your class. By typing both the parameters and the return type of public methods they will be more readable and easy to use.

Expand Down
2 changes: 1 addition & 1 deletion packages/eslint-plugin/docs/rules/no-unused-expressions.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Disallow Unused Expressions (no-unused-expressions)
# Disallow unused expressions (`no-unused-expressions`)

This rule aims to eliminate unused expressions which have no effect on the state of the program.

Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Disallow unused variables and arguments (no-unused-vars-experimental)
# Disallow unused variables and arguments (`no-unused-vars-experimental`)

Variables that are declared and not used anywhere in the code are most likely an error due to incomplete refactoring. Such variables take up space in the code and can lead to confusion by readers.

Expand Down
2 changes: 1 addition & 1 deletion packages/eslint-plugin/docs/rules/no-unused-vars.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Disallow unused variables (no-unused-vars)
# Disallow unused variables (`no-unused-vars`)

Variables that are declared and not used anywhere in the code are most likely an error due to incomplete refactoring. Such variables take up space in the code and can lead to confusion by readers.

Expand Down
2 changes: 1 addition & 1 deletion packages/eslint-plugin/docs/rules/no-use-before-define.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Disallow the use of variables before they are defined (no-use-before-define)
# Disallow the use of variables before they are defined (`no-use-before-define`)

In JavaScript, prior to ES6, variable and function declarations are hoisted to the top of a scope, so it's possible to use identifiers before their formal declarations in code. This can be confusing and some believe it is best to always declare variables and functions before using them.

Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Disallow unnecessary constructors (no-useless-constructor)
# Disallow unnecessary constructors (`no-useless-constructor`)

ES2015 provides a default class constructor if one is not specified. As such, it is unnecessary to provide an empty constructor or one that simply delegates into its parent class, as in the following examples:

Expand Down
2 changes: 1 addition & 1 deletion packages/eslint-plugin/docs/rules/no-var-requires.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Disallows the use of require statements except in import statements (no-var-requires)
# Disallows the use of require statements except in import statements (`no-var-requires`)

In other words, the use of forms such as `var foo = require("foo")` are banned. Instead use ES6 style imports or `import foo = require("foo")` imports.

Expand Down
2 changes: 1 addition & 1 deletion packages/eslint-plugin/docs/rules/prefer-for-of.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Use for-of loops instead of standard for loops over arrays (prefer-for-of)
# Prefer a ‘for-of’ loop over a standard for’ loop if the index is only used to access the array being iterated (`prefer-for-of`)

This rule recommends a for-of loop when the loop index is only used to read from an array that is being iterated.

Expand Down
2 changes: 1 addition & 1 deletion packages/eslint-plugin/docs/rules/prefer-function-type.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Use function types instead of interfaces with call signatures (prefer-function-type)
# Use function types instead of interfaces with call signatures (`prefer-function-type`)

## Rule Details

Expand Down
2 changes: 1 addition & 1 deletion packages/eslint-plugin/docs/rules/prefer-includes.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Enforce `includes` method over `indexOf` method (prefer-includes)
# Enforce `includes` method over `indexOf` method (`prefer-includes`)

Until ES5, we were using `String#indexOf` method to check whether a string contains an arbitrary substring or not.
Until ES2015, we were using `Array#indexOf` method to check whether an array contains an arbitrary value or not.
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Require the use of the `namespace` keyword instead of the `module` keyword to declare custom TypeScript modules. (prefer-namespace-keyword)
# Require the use of the `namespace` keyword instead of the `module` keyword to declare custom TypeScript modules (`prefer-namespace-keyword`)

In an effort to prevent further confusion between custom TypeScript modules and the new ES2015 modules, starting
with TypeScript `v1.5` the keyword `namespace` is now the preferred way to declare custom TypeScript modules.
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Enforce the usage of the nullish coalescing operator instead of logical chaining (prefer-nullish-coalescing)
# Enforce the usage of the nullish coalescing operator instead of logical chaining (`prefer-nullish-coalescing`)

TypeScript 3.7 added support for the nullish coalescing operator.
This operator allows you to safely cascade a value when dealing with `null` or `undefined`.
Expand Down
2 changes: 1 addition & 1 deletion packages/eslint-plugin/docs/rules/prefer-optional-chain.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Prefer using concise optional chain expressions instead of chained logical ands (prefer-optional-chain)
# Prefer using concise optional chain expressions instead of chained logical ands (`prefer-optional-chain`)

TypeScript 3.7 added support for the optional chain operator.
This operator allows you to safely access properties and methods on objects when they are potentially `null` or `undefined`.
Expand Down
2 changes: 1 addition & 1 deletion packages/eslint-plugin/docs/rules/prefer-readonly.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# require never-modified private members be marked as `readonly` (prefer-readonly)
# Requires that private members are marked as `readonly` if they're never modified outside of the constructor (`prefer-readonly`)

This rule enforces that private members are marked as `readonly` if they're never modified outside of the constructor.

Expand Down
2 changes: 1 addition & 1 deletion packages/eslint-plugin/docs/rules/prefer-regexp-exec.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Enforce to use `RegExp#exec` over `String#match` (prefer-regexp-exec)
# Enforce that `RegExp#exec` is used instead of `String#match` if no global flag is provided (`prefer-regexp-exec`)

`RegExp#exec` is faster than `String#match` and both work the same when not using the `/g` flag.

Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Enforce the use of `String#startsWith` and `String#endsWith` instead of other equivalent methods of checking substrings (prefer-string-starts-ends-with)
# Enforce the use of `String#startsWith` and `String#endsWith` instead of other equivalent methods of checking substrings (`prefer-string-starts-ends-with`)

There are multiple ways to verify if a string starts or ends with a specific string, such as `foo.indexOf('bar') === 0`.

Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Functions that return promises must be async (promise-function-async)
# Requires any function or method that returns a Promise to be marked async (`promise-function-async`)

Requires any function or method that returns a Promise to be marked async.
Ensures that each function is only capable of:
Expand Down
2 changes: 1 addition & 1 deletion packages/eslint-plugin/docs/rules/quotes.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Enforce the consistent use of either backticks, double, or single quotes
# Enforce the consistent use of either backticks, double, or single quotes (`quotes`)

## Rule Details

Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Enforce giving `compare` argument to `Array#sort` (require-array-sort-compare)
# Enforce giving `compare` argument to `Array#sort` (`require-array-sort-compare`)

This rule prevents to invoke `Array#sort()` method without `compare` argument.

Expand Down
Loading