javascript

package
v0.6.1 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Mar 28, 2025 License: MIT Imports: 4 Imported by: 0

Documentation

Overview

scope resolution implementation for JS and TS files

Index

Constants

This section is empty.

Variables

View Source
var NoDoubleEq *analysis.Analyzer = &analysis.Analyzer{
	Name:        "no-double-eq",
	Language:    analysis.LangJs,
	Description: "This checker checks for the usage of '==' in JavaScript code. It reports an issue if '==' is used for comparison. It suggests using '===' instead.",
	Category:    analysis.CategoryBugRisk,
	Severity:    analysis.SeverityWarning,
	Run:         noDoubleEq,
}
View Source
var SQLInjection = &analysis.Analyzer{
	Name:        "sql_injection",
	Language:    analysis.LangJs,
	Description: "Using raw SQL queries with unvalidated input can lead to SQL injection vulnerabilities",
	Category:    analysis.CategorySecurity,
	Severity:    analysis.SeverityCritical,
	Run:         detectSQLInjection,
}
View Source
var ScopeAnalyzer = &analysis.Analyzer{
	Name:       "js-scope",
	ResultType: reflect.TypeOf(&analysis.ScopeTree{}),
	Run:        buildScopeTree,
	Language:   analysis.LangJs,
}
View Source
var UnusedImport = &analysis.Analyzer{
	Name:        "unused-import",
	Requires:    []*analysis.Analyzer{ScopeAnalyzer},
	Run:         checkUnusedImports,
	Language:    analysis.LangJs,
	Description: "This checker checks for unused imports in JavaScript code. Unused imports can be removed to reduce the size of the bundle. Unused imports are also a code smell and can indicate that the code is not well-organized.",
	Category:    analysis.CategoryAntipattern,
	Severity:    analysis.SeverityInfo,
}

Functions

This section is empty.

Types

This section is empty.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL