⬅️ Back to Table of Contents
📄 naming-convention-utils/types
📊 Analysis Summary
| Metric |
Count |
| 📦 Imports |
16 |
| 📐 Interfaces |
4 |
| 📑 Type Aliases |
3 |
📚 Table of Contents
🛠️ File Location:
📂 packages/eslint-plugin/src/rules/naming-convention-utils/types.ts
📦 Imports
| Name |
Source |
TSESLint |
@typescript-eslint/utils |
TSESTree |
@typescript-eslint/utils |
MessageIds |
../naming-convention |
Options |
../naming-convention |
IndividualAndMetaSelectorsString |
./enums |
MetaSelectors |
./enums |
Modifiers |
./enums |
ModifiersString |
./enums |
PredefinedFormats |
./enums |
PredefinedFormatsString |
./enums |
Selectors |
./enums |
SelectorsString |
./enums |
TypeModifiers |
./enums |
TypeModifiersString |
./enums |
UnderscoreOptions |
./enums |
UnderscoreOptionsString |
./enums |
Interfaces
MatchRegex
Interface Code
export interface MatchRegex {
match: boolean;
regex: string;
}
Properties
| Name |
Type |
Optional |
Description |
match |
boolean |
✗ |
not shown |
regex |
string |
✗ |
not shown |
Selector
Interface Code
export interface Selector {
custom?: MatchRegex;
filter?: string | MatchRegex;
// format options
format: PredefinedFormatsString[] | null;
leadingUnderscore?: UnderscoreOptionsString;
modifiers?: ModifiersString[];
prefix?: string[];
// selector options
selector:
IndividualAndMetaSelectorsString | IndividualAndMetaSelectorsString[];
suffix?: string[];
trailingUnderscore?: UnderscoreOptionsString;
types?: TypeModifiersString[];
}
Properties
| Name |
Type |
Optional |
Description |
custom |
MatchRegex |
✓ |
not shown |
filter |
string \| MatchRegex |
✓ |
not shown |
format |
PredefinedFormatsString[] \| null |
✗ |
not shown |
leadingUnderscore |
UnderscoreOptionsString |
✓ |
not shown |
modifiers |
ModifiersString[] |
✓ |
not shown |
prefix |
string[] |
✓ |
not shown |
selector |
IndividualAndMetaSelectorsString \| IndividualAndMetaSelectorsString[] |
✗ |
not shown |
suffix |
string[] |
✓ |
not shown |
trailingUnderscore |
UnderscoreOptionsString |
✓ |
not shown |
types |
TypeModifiersString[] |
✓ |
not shown |
NormalizedMatchRegex
Interface Code
export interface NormalizedMatchRegex {
match: boolean;
regex: RegExp;
}
Properties
| Name |
Type |
Optional |
Description |
match |
boolean |
✗ |
not shown |
regex |
RegExp |
✗ |
not shown |
NormalizedSelector
Interface Code
export interface NormalizedSelector {
custom: NormalizedMatchRegex | null;
filter: NormalizedMatchRegex | null;
// format options
format: PredefinedFormats[] | null;
leadingUnderscore: UnderscoreOptions | null;
modifiers: Modifiers[] | null;
// calculated ordering weight based on modifiers
modifierWeight: number;
prefix: string[] | null;
// selector options
selector: MetaSelectors | Selectors;
suffix: string[] | null;
trailingUnderscore: UnderscoreOptions | null;
types: TypeModifiers[] | null;
}
Properties
| Name |
Type |
Optional |
Description |
custom |
NormalizedMatchRegex \| null |
✗ |
not shown |
filter |
NormalizedMatchRegex \| null |
✗ |
not shown |
format |
PredefinedFormats[] \| null |
✗ |
not shown |
leadingUnderscore |
UnderscoreOptions \| null |
✗ |
not shown |
modifiers |
Modifiers[] \| null |
✗ |
not shown |
modifierWeight |
number |
✗ |
not shown |
prefix |
string[] \| null |
✗ |
not shown |
selector |
MetaSelectors \| Selectors |
✗ |
not shown |
suffix |
string[] \| null |
✗ |
not shown |
trailingUnderscore |
UnderscoreOptions \| null |
✗ |
not shown |
types |
TypeModifiers[] \| null |
✗ |
not shown |
Type Aliases
ValidatorFunction
type ValidatorFunction = (
node: TSESTree.Identifier | TSESTree.Literal | TSESTree.PrivateIdentifier,
modifiers?: Set<Modifiers>,
) => void;
ParsedOptions
type ParsedOptions = Record<SelectorsString, ValidatorFunction>;
Context
type Context = Readonly<TSESLint.RuleContext<MessageIds, Options>>;
Generated by Syntax Scribe