esvalid
esvalid copied to clipboard
Categorize reported errors.
For example:
- Structural Context (SC)
- Duplication Not Allowed (DNA)
- Restricted Names (RN)
- Incorrect Type (IT)
- Nullability (N)
- Structural Context 543: ReturnStatement must be nested within a FunctionExpression or FunctionDeclaration node
- Structural Context 175: BreakStatement must have an IterationStatement or SwitchStatement as an ancestor
- Structural Context 180: labelled BreakStatement must have a matching LabeledStatement ancestor
- Structural Context 231: ContinueStatement must have an IterationStatement as an ancestor
- Structural Context 236: labelled ContinueStatement must have a matching LabeledStatement ancestor
- Structural Context 377: IfStatement with null
alternatemust not be theconsequentof an IfStatement with a non-nullalternate - Duplication 393: LabeledStatement must not be nested within a LabeledStatement with the same label
- Duplication 514: duplicate data property in object literal not allowed in strict mode
- Duplication: duplicate parameter names in function decl/expr not allowed in strict mode
- Restricted Names: In strict mode,
evalandargumentscannot appear at:- function parameters
- setter parameters
- AssignmentExpression.left
- function names
- catch variable
- variable declarations
- Restricted Names 363: Identifier
namemember must a valid IdentifierName - Restricted Names 365: Identifier
namemember must not be a ReservedWord - Restricted Names 365: Identifier
namemember must not be a FutureReservedWord - Incorrect Type 415: numeric Literal nodes must not be NaN
- Incorrect Type 418: numeric Literal nodes must not be negative
- Incorrect Type 420: numeric Literal nodes must be finite
- Incorrect Type 642: TryStatement must have a non-null
handlermember or a non-nullfinalizermember - Incorrect Type 452: static MemberExpression
propertymember must have a valid IdentifierNamenamemember - Incorrect Type 556: SequenceExpression
expressionsmember length must be >= 2 - Incorrect Type 596: SwitchStatement
casesmember length must be >= 1 - Incorrect Type 606: SwitchStatement
casesmember must contain no more than one SwitchCase with a nulltestmember - Incorrect Type 668: VariableDeclaration
declarationsmember must be non-empty - Incorrect Type: with Statement in strict mode
Strict Mode related:
- Duplication 514: duplicate data property in object literal not allowed in strict mode
- Duplication: duplicate parameter names in function decl/expr not allowed in strict mode
- Restricted Names: In strict mode,
evalandargumentscannot appear at: ... - Restricted Names 365: Identifier
namemember must not be a FutureReservedWord - Incorrect Type: with Statement in strict mode
@ikarienator What do the numbers mean? Are they intended to be unique identifiers for the specific error types?
As I understood it, they are just unique numbers, which would be sufficient for most purposes. Maybe @ikarienator meant to imply some sort of categorisation?