Error codes
quick-lint-js can find the following warnings and errors in your code:
- E0001: variable assigned before its declaration
- E0002: assignment to const global variable
- E0003: assignment to const variable
- E0004: assignment to const variable before its declaration
- E0005: BigInt literal contains decimal point
- E0006: BigInt literal contains exponent
- E0007: classes cannot be named 'let'
- E0008: let statement cannot declare variables named 'let'
- E0009: cannot export variable named 'let'
- E0010: cannot import 'let'
- E0011: character is not allowed in identifiers
- E0012: escaped character is not allowed in identifiers
- E0013: code point out of range
- E0014: expected expression before newline
- E0015: expected expression before semicolon
- E0016: expected hexadecimal digits in Unicode escape sequence
- E0017: if statement needs parentheses around condition
- E0018: if statement is missing '(' or ')' around condition
- E0019: escaping '-' is not allowed in tag names; write '-' instead
- E0020: invalid expression left of assignment
- E0021: invalid lone literal in object literal
- E0022: invalid UTF-8 sequence
- E0023: keywords cannot contain escape sequences
- E0024: const/let/var with no bindings
- E0025: missing comma between object literal entries
- E0026: missing operand for operator
- E0027: missing semicolon after statement
- E0028: number literal contains consecutive underscores
- E0029: number literal contains trailing underscores
- E0030: octal literal may not have exponent
- E0031: octal literal may not have decimal
- E0032: legacy octal literal may not be BigInt
- E0033: redeclaration of global variable
- E0034: redeclaration of variable
- E0035: RegExp literal flags cannot contain Unicode escapes
- E0036: stray comma in let statement
- E0037: unclosed block comment
- E0038: unclosed identifier escape sequence
- E0039: unclosed regexp literal
- E0040: unclosed string literal
- E0041: unclosed template
- E0042: unexpected '@'
- E0043: unexpected '\' in identifier
- E0044: unexpected characters in number literal
- E0045: unexpected control character
- E0046: unexpected characters in binary literal
- E0047: unexpected characters in octal literal
- E0048: unexpected characters in hex literal
- E0049: binary number literal has no digits
- E0050: hex number literal has no digits
- E0051: octal number literal has no digits
- E0052: unexpected '#'
- E0053: missing property name between '.' and '.'
- E0054: unexpected token
- E0055: unmatched indexing bracket
- E0056: unmatched parenthesis
- E0057: use of undeclared variable
- E0058: variable used before declaration
- E0059: assignment to undeclared variable
- E0060: invalid hex escape sequence
- E0061: missing name in function statement
- E0062: missing name or parentheses for function
- E0063: missing operator between expression and arrow function
- E0064: missing body for 'if' statement
- E0065: 'else' has no corresponding 'if'
- E0066: exporting requires '{' and '}'
- E0067: exporting requires 'default'
- E0068: extra ',' is not allowed between function call arguments
- E0069: cannot declare 'await' inside async function
- E0070: commas are not allowed after spread parameter
- E0071: cannot declare 'yield' inside generator function
- E0072: methods should not use the 'function' keyword
- E0073: missing function parameter list
- E0074: '.' operator needs a key name; use + to concatenate strings; use [] to access with a dynamic key
- E0075: indexing requires an expression
- E0076: cannot declare and export variable with 'export default'
- E0077: function call before declaration in blocked scope
- E0078: missing expression between parentheses
- E0079: missing name of exported function
- E0080: missing name of class
- E0081: missing name of exported class
- E0082: assigning to 'async' in a for-of loop requires parentheses
- E0083: missing value for object property
- E0084: do-while loop needs parentheses around condition
- E0085: do-while loop is missing '(' or ')' around condition
- E0086: redundant delete statement on variable
- E0087: while loop needs parentheses around condition
- E0088: while loop is missing '(' or ')' around condition
- E0089: with statement needs parentheses around expression
- E0090: with statement is missing '(' or ')' around expression
- E0091: switch statement needs parentheses around condition
- E0092: switch statement is missing '(' or ')' around condition
- E0093: C-style for loop is missing its third component
- E0094: missing body for 'for' loop
- E0095: Unicode byte order mark (BOM) cannot appear before #! at beginning of script
- E0096: missing for loop header
- E0097: for loop needs an iterable, or condition and update clauses
- E0098: for loop needs an iterable, or condition and update clauses
- E0099: missing semicolon between init and condition parts of for loop
- E0100: missing semicolon between condition and update parts of for loop
- E0101: missing body for do-while loop
- E0102: C-style for loops have only three semicolon-separated components
- E0103: missing 'while (condition)' for do-while statement
- E0104: missing body for while loop
- E0105: missing parameters for arrow function
- E0106: missing body for 'switch' statement
- E0107: expected '{'
- E0108: 'in' disallowed in C-style for loop initializer
- E0109: for-of loop expression cannot have semicolons
- E0110: for-in loop expression cannot have semicolons
- E0111: missing body for class
- E0112: unexpected token in export; expected 'export default ...' or 'export {name}' or 'export * from ...' or 'export class' or 'export function' or 'export let'
- E0113: incomplete export; expected 'export default ...' or 'export {name}' or 'export * from ...' or 'export class' or 'export function' or 'export let'
- E0114: unexpected token in variable declaration; expected variable name
- E0115: unexpected 'case' outside switch statement
- E0116: unexpected 'default' outside switch statement
- E0117: unexpected 'catch' without 'try'
- E0118: unexpected 'finally' without 'try'
- E0119: missing body for catch clause
- E0120: missing body for try statement
- E0121: missing body for finally clause
- E0122: missing catch or finally clause for try statement
- E0123: missing variable name
- E0124: cannot declare variable named keyword
- E0125: missing header and body for 'for' loop
- E0126: expected 'as' between '*' and variable
- E0127: TypeScript's 'enum' feature is not allowed in JavaScript
- E0128: expected 'from' before module specifier
- E0129: expected 'from "name_of_module.mjs"'
- E0130: missing catch variable name between parentheses
- E0131: expected ',' between object literal entries
- E0132: missing ',' between variable declarations
- E0133: error generator function star belongs before name
- E0134: unclosed code block; expected '}' by end of file
- E0135: expected variable name for 'catch'
- E0136: cannot update variable with '+=' while declaring it
- E0137: missing condition for switch statement
- E0138: missing condition for if statement
- E0139: missing condition for while statement
- E0140: expected expression after 'case'
- E0141: expected ')' to close function call
- E0142: missing property name after '.' operator
- E0143: unmatched '}'
- E0144: cannot export variable named keyword
- E0145: cannot import variable named keyword
- E0146: missing ':' in conditional expression
- E0147: unexpected identifier in expression; missing operator before
- E0148: missing body for statement; a function statement is not allowed as the body of statement
- E0149: missing body for statement; a class statement is not allowed as the body of statement
- E0150: missing body for statement; a lexical declaration is not allowed as the body of statement
- E0151: invalid function parameter
- E0152: legacy octal literals may not contain underscores
- E0153: forwarding exports are only allowed in export-from
- E0154: unexpected expression; missing key for object entry
- E0155: cannot reference private variables without object; use 'this.'
- E0156: private properties are not allowed in object literals
- E0157: missing end of array; expected ']'
- E0158: unexpected '=>'; expected parameter for arrow function, but got a literal instead
- E0159: unexpected literal in parameter list; expected parameter name
- E0160: unexpected '=>'; expected parameter for arrow function, but got an expression instead
- E0161: unclosed object literal; expected '}'
- E0162: 'await' is only allowed in async functions
- E0163: newline is not allowed between 'async' and arrow function parameter list
- E0164: JSON syntax error
- E0165: TypeScript style const field
- E0166: "globals" descriptor "shadowable" property must be a boolean
- E0167: "globals" descriptor "writable" property must be a boolean
- E0168: "globals" must be an object
- E0169: "global-groups" must be a boolean or an array
- E0170: "global-groups" entries must be strings
- E0171: "globals" descriptor must be a boolean or an object
- E0172: missing body for function
- E0173: cannot assign to loop variable in for of/in loop
- E0174: functions/methods should not have '=>'
- E0175: expected variable name for 'import'-'as'
- E0176: missing arrow operator for arrow function
- E0177: React/JSX is not yet implemented
- E0178: 'await' cannot be followed by an arrow function; use 'async' instead
- E0179: return statement returns nothing (undefined)
- E0180: stray comma in function parameter
- E0181: unclosed string literal
- E0182: '>' is not allowed directly in JSX text; write {'>'} or > instead
- E0183: '}' is not allowed directly in JSX text; write {'}'} instead
- E0184: missing 'if' after 'else'
- E0185: assignment to imported variable; imported variable declared here
- E0186: missing '...' in JSX attribute spread
- E0187: mismatched JSX tags; expected </foo>
- E0188: '=' changes variables; to compare, use '===' instead
- E0189: missing '<>' and '</>' to enclose multiple children
- E0190: missing comparison; '===' does not extend to the right side of '||'
- E0191: event attributes must be camelCase
- E0192: attribute has wrong capitalization
- E0193: misspelled React attribute; write 'className' instead
-
E0194: missing parentheses around left-hand side of
**
;**
operator cannot be used after unary-
without parentheses -
E0195: missing parentheses around operand of
typeof
;typeof
operator cannot be used before**
without parentheses - E0196: new variable shadows existing variable
- E0197: '“' is not allowed for strings; use " instead
- E0199: unclosed class; expected '}' by end of file
- E0200: break can only be used inside of a loop or switch
- E0201: continue can only be used inside of a loop
- E0202: missing '=' after variable
- E0203: depth limit exceeded
- E0204: error generator function star belongs after keyword function
- E0205: error missing initializer in const declaration
- E0206: label named 'await' not allowed in async function
- E0207: code point in Unicode escape sequence must not be greater than U+10FFFF
- E0208: cannot access private identifier outside class
- E0209: commas are not allowed between class methods
- E0210: unopened block comment
- E0211: missing parentheses around self-invoked function
- E0212: integer cannot be represented and will be rounded
- E0213: TypeScript's 'interface' feature is not allowed in JavaScript code
- E0214: use of undeclared type
- E0215: unclosed interface; expected '}' by end of file
- E0269: 'async static' is not allowed; write 'static async' instead
- E0283: TypeScript <Type> casts are not allowed in JSX mode