Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR TYPESCRIPT

Parsing error: Unexpected token eslint


// error:
const o = {};
const a = o?.a; // Parsing error: Unexpected token .eslint

// solution for eslint config:
module.exports = {
  env: { es2021: true },
  parserOptions: { ecmaVersion: 12 },
  rules: {...},
}
 
PREVIOUS NEXT
Tagged: #Parsing #Unexpected #token #eslint
ADD COMMENT
Topic
Name
3+8 =