# Class: NodeModulesReferenceDetector

@boll/rules-typescriptGlobalsNodeModulesReferenceDetector

# Class: NodeModulesReferenceDetector

NodeModulesReferenceDetector will detect references to the node_modules directory in code and imports.

Imports should only be done from packages explicitly declared in package.json.

# Hierarchy

  • NodeModulesReferenceDetector

# Implements

  • PackageRule

# Index

# Accessors

# Methods

# Accessors

# name

get name(): string

Defined in node-modules-reference-detector.ts:22

Returns: string

# Methods

# check

check(fileContext: FileContext): Promise‹Result[]›

Defined in node-modules-reference-detector.ts:26

Parameters:

Name Type
fileContext FileContext

Returns: Promise‹Result[]›


# checkParsedSourceLines

checkParsedSourceLines(fileName: BollFile, parsedSourceLines: SourceLineAndLineNumber[]): Result[]

Defined in node-modules-reference-detector.ts:30

Parameters:

Name Type
fileName BollFile
parsedSourceLines SourceLineAndLineNumber[]

Returns: Result[]


# getParsedSourceLines

getParsedSourceLines(sourceFile: SourceFile): SourceLineAndLineNumber[]

Defined in node-modules-reference-detector.ts:50

Parameters:

Name Type
sourceFile SourceFile

Returns: SourceLineAndLineNumber[]