restrictedIdentifiers
Disallows specific identifier names in binding positions.
✅ This rule is included in the ts stylisticStrict presets.
Some projects like to ban specific identifiers, or names, in code.
This rule provides a deny option that can be used to disallow specific identifier names.
Options
Section titled “Options”Type:
string[]
Identifier names to globally disallow.
json.rules({ restrictedIdentifiers: { deny: ["cb", "val"], },});44AEco44AEfunc44AEfunc44AEimWhen Not To Use It
Section titled “When Not To Use It”This rule is only relevant for projects that have established conventions of names that should not be used. If you’re not particular about banning specific identifier names, you likely don’t need this rule.
Equivalents in Other Linters
Section titled “Equivalents in Other Linters”- ESLint:
id-denylist - Oxlint:
eslint/id-denylist
