web/global.d.ts
comment must start with a space Open
Open
//eslint-disable-next-line @typescript-eslint/no-empty-interface
- Read upRead up
- Create a ticketCreate a ticket
- Exclude checks
Rule: comment-format
Enforces formatting rules for single-line comments.
Rationale
Helps maintain a consistent, readable style in your codebase.
Notes
- Has Fix
Config
Four arguments may be optionally provided:
-
"check-space"
requires that all single-line comments must begin with a space, as in// comment
- note that for comments starting with multiple slashes, e.g.
///
, leading slashes are ignored - TypeScript reference comments are ignored completely
- note that for comments starting with multiple slashes, e.g.
-
"check-lowercase"
requires that the first non-whitespace character of a comment must be lowercase, if applicable. -
"check-uppercase"
requires that the first non-whitespace character of a comment must be uppercase, if applicable. -
"allow-trailing-lowercase"
allows that only the first comment of a series of comments needs to be uppercase.- requires
"check-uppercase"
- comments must start at the same position
- requires
Exceptions to "check-lowercase"
or "check-uppercase"
can be managed with object that may be passed as last
argument.
One of two options can be provided in this object:
-
"ignore-words"
- array of strings - words that will be ignored at the beginning of the comment. -
"ignore-pattern"
- string - RegExp pattern that will be ignored at the beginning of the comment.
Examples
"comment-format": true,check-space,check-uppercase,allow-trailing-lowercase
"comment-format": true,check-lowercase,[object Object]
"comment-format": true,check-lowercase,[object Object]
Schema
{
"type": "array",
"items": {
"anyOf": [
{
"type": "string",
"enum": [
"check-space",
"check-lowercase",
"check-uppercase",
"allow-trailing-lowercase"
]
},
{
"type": "object",
"properties": {
"ignore-words": {
"type": "array",
"items": {
"type": "string"
}
},
"ignore-pattern": {
"type": "string"
}
},
"minProperties": 1,
"maxProperties": 1
}
]
},
"minLength": 1,
"maxLength": 5
}
For more information see this page.
An interface declaring no members is equivalent to its supertype. Open
Open
export interface DefaultTheme extends Theme {}
- Read upRead up
- Create a ticketCreate a ticket
- Exclude checks
Rule: no-empty-interface
Forbids empty interfaces.
Rationale
An empty interface is equivalent to its supertype (or {}
).
Notes
- TypeScript Only
Config
Not configurable.
For more information see this page.