📄 no-useless-constructor¶
📊 Analysis Summary¶
| Metric | Count |
|---|---|
| 🔧 Functions | 3 |
| 📦 Imports | 6 |
| 📑 Type Aliases | 2 |
📚 Table of Contents¶
🛠️ File Location:¶
📂 packages/eslint-plugin/src/rules/no-useless-constructor.ts
📤 Default Export¶
| Property | Value |
|---|---|
name |
'no-useless-constructor' |
meta.type |
'problem' |
meta.docs.description |
'Disallow unnecessary constructors' |
meta.docs.extendsBaseRule |
true |
meta.docs.recommended |
'strict' |
meta.hasSuggestions |
baseRule.meta.hasSuggestions |
meta.messages |
baseRule.meta.messages |
meta.schema |
baseRule.meta.schema |
defaultOptions |
[] |
Entry point: create — documented under Functions.
📦 Imports¶
| Name | Source |
|---|---|
TSESTree |
@typescript-eslint/utils |
AST_NODE_TYPES |
@typescript-eslint/utils |
InferMessageIdsTypeFromRule |
../util |
InferOptionsTypeFromRule |
../util |
createRule |
../util |
getESLintCoreRule |
../util/getESLintCoreRule |
Functions¶
create(context: any): { MethodDefinition(node: any): void; }¶
Parameters:
contextany
Returns: { MethodDefinition(node: any): void; }
Calls:
baseRule.createcheckAccessibilitycheckParamsrules.MethodDefinition
Code
checkAccessibility(node: TSESTree.MethodDefinition): boolean¶
Check if method with accessibility is not useless
Code
checkParams(node: TSESTree.MethodDefinition): boolean¶
Check if method is not useless due to typescript parameter properties and decorators
Raw JSDoc
Calls:
node.value.params.some
Code
Type Aliases¶
Options¶
MessageIds¶
Generated by Syntax Scribe