Visual Studio Code: Fixing ESLint says “Parsing error: The keyword ‘let’ is reserved.”

If you install the esline plugin in Visual Studio Code, you get weird errors:

ESLint says "Parsing error: The keyword 'let' is reserved."

To fix this, you need to set up a config file in the root of your project.

You can do this by running:

eslint --init

Here is an example file you can also use:

module.exports = {
    "env": {
        "es6": true
    "extends": "eslint:recommended",
    "parserOptions": {
        "ecmaFeatures": {
            "experimentalObjectRestSpread": true,
            "jsx": true
        "sourceType": "module"
    "plugins": [
    "rules": {
        "indent": [2, 2],
        "linebreak-style": [
        "quotes": [
        "semi": [

Interested in JavaScript? I send out weekly, personalized emails with articles and conference talks. Click here to see an example and subscribe.

1 reply

Leave a Reply

Want to join the discussion?
Feel free to contribute!

Leave a Reply

Your email address will not be published. Required fields are marked *