no_octal

package
v0.5.2 Latest Latest
Warning

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

Go to latest
Published: May 7, 2026 License: MIT Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var NoOctalRule = rule.Rule{
	Name: "no-octal",
	Run: func(ctx rule.RuleContext, options any) rule.RuleListeners {
		return rule.RuleListeners{
			ast.KindNumericLiteral: func(node *ast.Node) {

				raw := utils.TrimmedNodeText(ctx.SourceFile, node)
				if isOctalLiteralRaw(raw) {
					ctx.ReportNode(node, rule.RuleMessage{
						Id:          "noOctal",
						Description: "Octal literals should not be used.",
					})
				}
			},
		}
	},
}

https://eslint.org/docs/latest/rules/no-octal

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