Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

docs(eslint-plugin): standardize rule description format#4976

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 ourterms of service andprivacy statement. We’ll occasionally send you account related emails.

Already on GitHub?Sign in to your account

Merged
Show file tree
Hide file tree
Changes fromall 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
194 changes: 97 additions & 97 deletionspackages/eslint-plugin/README.md
View file
Open in desktop

Large diffs are not rendered by default.

196 changes: 97 additions & 99 deletionspackages/eslint-plugin/docs/rules/README.md
View file
Open in desktop

Large diffs are not rendered by default.

View file
Open in desktop
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
# `adjacent-overload-signatures`

Require that member overloads be consecutive.
Requires that member overloads be consecutive.

Grouping overloaded members together can improve readability of the code.

Expand Down
2 changes: 1 addition & 1 deletionpackages/eslint-plugin/docs/rules/ban-ts-comment.md
View file
Open in desktop
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
# `ban-ts-comment`

Bans `@ts-<directive>` comments from being used or requires descriptions after directive.
Disallows `@ts-<directive>` comments or requires descriptions after directive.

TypeScript provides several directive comments that can be used to alter how it processes files.
Using these to suppress TypeScript Compiler Errors reduces the effectiveness of TypeScript overall.
Expand Down
View file
Open in desktop
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
# `ban-tslint-comment`

Bans `// tslint:<rule-flag>` comments from being used.
Disallows `// tslint:<rule-flag>` comments.

Useful when migrating from TSLint to ESLint. Once TSLint has been removed, this rule helps locate TSLint annotations (e.g. `// tslint:disable`).

Expand Down
2 changes: 1 addition & 1 deletionpackages/eslint-plugin/docs/rules/ban-types.md
View file
Open in desktop
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
# `ban-types`

Bans specific types from being used.
Disallows certain types.

Some builtin types have aliases, some types are considered dangerous or harmful.
It's often a good idea to ban certain types to help with consistency and safety.
Expand Down
2 changes: 1 addition & 1 deletionpackages/eslint-plugin/docs/rules/brace-style.md
View file
Open in desktop
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
# `brace-style`

Enforce consistent brace style for blocks.
Enforces consistent brace style for blocks.

## Rule Details

Expand Down
View file
Open in desktop
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
# `class-literal-property-style`

Ensures that literals on classes are exposed in a consistent style.
Enforces that literals on classes are exposed in a consistent style.

When writing TypeScript applications, it's typically safe to store literal values on classes using fields with the `readonly` modifier to prevent them from being reassigned.
When writing TypeScript libraries that could be used by JavaScript users however, it's typically safer to expose these literals using `getter`s, since the `readonly` modifier is enforced at compile type.
Expand Down
2 changes: 1 addition & 1 deletionpackages/eslint-plugin/docs/rules/comma-dangle.md
View file
Open in desktop
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
# `comma-dangle`

Require ordisallow trailingcomma.
Requires ordisallows trailingcommas.

## Rule Details

Expand Down
View file
Open in desktop
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
# `consistent-indexed-object-style`

Enforce ordisallow theuse of the record type.
Requires ordisallows the`Record` type.

TypeScript supports defining object show keys can be flexible using an index signature. TypeScript also has a builtin type named `Record` to create an empty object defining only an index signature. For example, the following types are equal:

Expand Down
View file
Open in desktop
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
# `consistent-type-definitions`

Consistent withtypedefinition either `interface` or `type`.
Enforcestypedefinitions to consistently use either `interface` or `type`.

There are two ways to define a type.

Expand Down
View file
Open in desktop
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
# `default-param-last`

Enforce default parameters to be last.
Enforces default parameters to be last.

## Rule Details

Expand Down
2 changes: 1 addition & 1 deletionpackages/eslint-plugin/docs/rules/dot-notation.md
View file
Open in desktop
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
# `dot-notation`

enforce dot notation whenever possible.
Enforces dot notation whenever possible.

## Rule Details

Expand Down
View file
Open in desktop
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
# `explicit-function-return-type`

Require explicit return types on functions and class methods.
Requires explicit return types on functions and class methods.

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
View file
Open in desktop
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
# `explicit-member-accessibility`

Require explicit accessibility modifiers on class properties and methods.
Requires explicit accessibility modifiers on class properties and methods.

Leaving off accessibility modifier and making everything public can make
your interface hard to use by others.
Expand Down
View file
Open in desktop
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
# `explicit-module-boundary-types`

Require explicit return and argument types on exported functions' and classes' public class methods.
Requires explicit return and argument types on exported functions' and classes' public class methods.

Explicit types for function return values and arguments makes it clear to any calling code what is the module boundary's input and output.

Expand Down
2 changes: 1 addition & 1 deletionpackages/eslint-plugin/docs/rules/func-call-spacing.md
View file
Open in desktop
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
# `func-call-spacing`

Require ordisallow spacing between function identifiers and their invocations.
Requires ordisallows spacing between function identifiers and their invocations.

## Rule Details

Expand Down
2 changes: 1 addition & 1 deletionpackages/eslint-plugin/docs/rules/indent.md
View file
Open in desktop
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
# `indent`

Enforce consistent indentation.
Enforces consistent indentation.

## Warning

Expand Down
2 changes: 1 addition & 1 deletionpackages/eslint-plugin/docs/rules/init-declarations.md
View file
Open in desktop
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
# `init-declarations`

require ordisallow initialization in variable declarations.
Requires ordisallows initialization in variable declarations.

## Rule Details

Expand Down
2 changes: 1 addition & 1 deletionpackages/eslint-plugin/docs/rules/keyword-spacing.md
View file
Open in desktop
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
# `keyword-spacing`

Enforce consistent spacing before and after keywords.
Enforces consistent spacing before and after keywords.

## Rule Details

Expand Down
View file
Open in desktop
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
# `lines-between-class-members`

Require ordisallow an empty line between class members.
Requires ordisallows an empty line between class members.

This rule improves readability by enforcing lines between class members. It will not check empty lines before the first member and after the last member. This rule require or disallow an empty line between class members.

Expand Down
View file
Open in desktop
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
# `member-delimiter-style`

Require a specific member delimiter style for interfaces and type literals.
Requires a specific member delimiter style for interfaces and type literals.

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 deletionpackages/eslint-plugin/docs/rules/member-ordering.md
View file
Open in desktop
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
# `member-ordering`

Require a consistent member declaration order.
Requires a consistent member declaration order.

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
View file
Open in desktop
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
# `no-array-constructor`

Disallow generic `Array` constructors.
Disallows generic `Array` constructors.

## Rule Details

Expand Down
2 changes: 1 addition & 1 deletionpackages/eslint-plugin/docs/rules/no-base-to-string.md
View file
Open in desktop
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
# `no-base-to-string`

Requiresthat`.toString()`is only called on objects which provide useful information when stringified.
Requires `.toString()`to only be called on objects which provide useful information when stringified.

JavaScript will call `toString()` on an object when it is converted to a string, such as when `+` adding to a string or in `${}` template literals.

Expand Down
View file
Open in desktop
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
# `no-confusing-non-null-assertion`

Disallow non-null assertion in locations that may be confusing.
Disallows non-null assertion in locations that may be confusing.

## Rule Details

Expand Down
View file
Open in desktop
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
# `no-dupe-class-members`

Disallow duplicate class members.
Disallows duplicate class members.

## Rule Details

Expand Down
View file
Open in desktop
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
# `no-duplicate-enum-values`

Disallow duplicate enum member values.
Disallows duplicate enum member values.

Although TypeScript supports duplicate enum member values, people usually expect members to have unique values within the same enum. Duplicate values can lead to bugs that are hard to track down.

Expand Down
View file
Open in desktop
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
# `no-duplicate-imports`

Disallow duplicate imports.
Disallows duplicate imports.

## DEPRECATED

Expand Down
2 changes: 1 addition & 1 deletionpackages/eslint-plugin/docs/rules/no-dynamic-delete.md
View file
Open in desktop
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
# `no-dynamic-delete`

Disallowthe delete operatorwith computed key expressions.
Disallows usingthe`delete` operatoron computed key expressions.

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

Expand Down
2 changes: 1 addition & 1 deletionpackages/eslint-plugin/docs/rules/no-empty-function.md
View file
Open in desktop
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
# `no-empty-function`

Disallow empty functions.
Disallows empty functions.

## Rule Details

Expand Down
View file
Open in desktop
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
# `no-empty-interface`

Disallow the declaration of empty interfaces.
Disallows the declaration of empty interfaces.

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 deletionpackages/eslint-plugin/docs/rules/no-explicit-any.md
View file
Open in desktop
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
# `no-explicit-any`

Disallow usage of the `any` type.
Disallows the `any` type.

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
View file
Open in desktop
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
# `no-extra-non-null-assertion`

Disallow extra non-null assertion.
Disallows extra non-null assertion.

## Rule Details

Expand Down
2 changes: 1 addition & 1 deletionpackages/eslint-plugin/docs/rules/no-extra-parens.md
View file
Open in desktop
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
# `no-extra-parens`

Disallow unnecessary parentheses.
Disallows unnecessary parentheses.

## Rule Details

Expand Down
2 changes: 1 addition & 1 deletionpackages/eslint-plugin/docs/rules/no-extra-semi.md
View file
Open in desktop
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
# `no-extra-semi`

Disallow unnecessary semicolons.
Disallows unnecessary semicolons.

## Rule Details

Expand Down
View file
Open in desktop
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
# `no-extraneous-class`

Forbids the use ofclasses as namespaces.
Disallowsclasses used as namespaces.

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

Expand Down
2 changes: 1 addition & 1 deletionpackages/eslint-plugin/docs/rules/no-for-in-array.md
View file
Open in desktop
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
# `no-for-in-array`

Disallow iterating over an array with a for-in loop.
Disallows iterating over an array with a for-in loop.

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

Expand Down
View file
Open in desktop
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
# `no-implicit-any-catch`

Disallow usage of the implicit `any` type in catch clauses.
Disallows usage of the implicit `any` type in catch clauses.

TypeScript 4.0 added support for adding an explicit `any` or `unknown` type annotation on a catch clause variable.

Expand Down
2 changes: 1 addition & 1 deletionpackages/eslint-plugin/docs/rules/no-implied-eval.md
View file
Open in desktop
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
# `no-implied-eval`

Disallow the use of `eval()`-like methods.
Disallows the use of `eval()`-like methods.

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 deletionpackages/eslint-plugin/docs/rules/no-invalid-this.md
View file
Open in desktop
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
# `no-invalid-this`

Disallow `this` keywords outside of classes or class-like objects.
Disallows `this` keywords outside of classes or class-like objects.

## Rule Details

Expand Down
View file
Open in desktop
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
# `no-invalid-void-type`

Disallowsusage of`void` type outside of generic or return types.
Disallows `void` type outside of generic or return types.

Disallows usage of `void` type outside of return types or generic type arguments.
If `void` is used as return type, it shouldn’t be a part of intersection/union type with most other types.
Expand Down
2 changes: 1 addition & 1 deletionpackages/eslint-plugin/docs/rules/no-loop-func.md
View file
Open in desktop
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
# `no-loop-func`

Disallow function declarations that contain unsafe references inside loop statements.
Disallows function declarations that contain unsafe references inside loop statements.

## Rule Details

Expand Down
View file
Open in desktop
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
# `no-loss-of-precision`

Disallow literal numbers that lose precision.
Disallows literal numbers that lose precision.

## Rule Details

Expand Down
2 changes: 1 addition & 1 deletionpackages/eslint-plugin/docs/rules/no-magic-numbers.md
View file
Open in desktop
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
# `no-magic-numbers`

Disallow magic numbers.
Disallows magic numbers.

## Rule Details

Expand Down
View file
Open in desktop
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
# `no-meaningless-void-operator`

Disallow the `void` operator except when used to discard a value.
Disallows the `void` operator except when used to discard a value.

Disallow the `void` operator when its argument is already of type `void` or `undefined`.
Disallows the `void` operator when its argument is already of type `void` or `undefined`.

## Rule Details

Expand Down
2 changes: 1 addition & 1 deletionpackages/eslint-plugin/docs/rules/no-misused-new.md
View file
Open in desktop
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
# `no-misused-new`

Enforce valid definition of `new` and `constructor`.
Enforces valid definition of `new` and `constructor`.

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

Expand Down
View file
Open in desktop
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
# `no-misused-promises`

Avoid using Promises in places not designed to handle them.
Disallows Promises in places not designed to handle them.

This rule forbids providing Promises to logical locations such as if statements in places where the TypeScript compiler allows them but they are not handled properly.
These situations can often arise due to a missing `await` keyword or just a misunderstanding of the way async
Expand Down
2 changes: 1 addition & 1 deletionpackages/eslint-plugin/docs/rules/no-namespace.md
View file
Open in desktop
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
# `no-namespace`

Disallow the use of custom TypeScript modules and namespaces.
Disallows custom TypeScript modules and namespaces.

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
View file
Open in desktop
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
# `no-non-null-asserted-nullish-coalescing`

Disallowsusing anon-nullassertion in the left operand ofthe nullish coalescing operator.
Disallows non-nullassertions in the left operand ofa nullish coalescing operator.

## Rule Details

Expand Down
View file
Open in desktop
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
# `no-non-null-asserted-optional-chain`

Disallowsusing anon-nullassertion after an optional chain expression.
Disallows non-nullassertions after an optional chain expression.

## Rule Details

Expand Down
Loading

[8]ページ先頭

©2009-2025 Movatter.jp