{"id":3715,"date":"2016-04-15T01:05:21","date_gmt":"2016-04-15T01:05:21","guid":{"rendered":"http:\/\/www.garysieling.com\/blog\/?p=3715"},"modified":"2016-04-15T01:05:21","modified_gmt":"2016-04-15T01:05:21","slug":"visual-studio-code-fixing-eslint-says-parsing-error-keyword-let-reserved","status":"publish","type":"post","link":"https:\/\/www.garysieling.com\/blog\/visual-studio-code-fixing-eslint-says-parsing-error-keyword-let-reserved\/","title":{"rendered":"Visual Studio Code: Fixing ESLint says &#8220;Parsing error: The keyword &#8216;let&#8217; is reserved.&#8221;"},"content":{"rendered":"<p>If you install the esline plugin in Visual Studio Code, you get weird errors: <\/p>\n<pre>\nESLint says \"Parsing error: The keyword 'let' is reserved.\"\n<\/pre>\n<p><img alt='' class='alignnone size-full wp-image-3717' src='http:\/\/172.104.26.128\/wp-content\/uploads\/2016\/04\/img_57103d4d99891.png' \/><\/p>\n<p>To fix this, you need to set up a config file in the root of your project.<\/p>\n<p>You can do this by running:<\/p>\n<pre lang=\"bash\">\neslint --init\n<\/pre>\n<p>Here is an example file you can also use:<\/p>\n<pre lang=\"javascript\">\nmodule.exports = {\n    \"env\": {\n        \"es6\": true\n    },\n    \"extends\": \"eslint:recommended\",\n    \"parserOptions\": {\n        \"ecmaFeatures\": {\n            \"experimentalObjectRestSpread\": true,\n            \"jsx\": true\n        },\n        \"sourceType\": \"module\"\n    },\n    \"plugins\": [\n        \"react\"\n    ],\n    \"rules\": {\n        \"indent\": [2, 2],\n        \"linebreak-style\": [\n            \"error\",\n            \"windows\"\n        ],\n        \"quotes\": [\n            \"error\",\n            \"double\"\n        ],\n        \"semi\": [\n            \"error\",\n            \"always\"\n        ]\n    }\n};\n<\/pre>\n","protected":false},"excerpt":{"rendered":"<p>Fixing eslint errors in Visual Studio Code<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"om_disable_all_campaigns":false,"_monsterinsights_skip_tracking":false,"_monsterinsights_sitenote_active":false,"_monsterinsights_sitenote_note":"","_monsterinsights_sitenote_category":0,"footnotes":""},"categories":[9],"tags":[199,200,302,573],"aioseo_notices":[],"amp_enabled":true,"_links":{"self":[{"href":"https:\/\/www.garysieling.com\/blog\/wp-json\/wp\/v2\/posts\/3715"}],"collection":[{"href":"https:\/\/www.garysieling.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.garysieling.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.garysieling.com\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.garysieling.com\/blog\/wp-json\/wp\/v2\/comments?post=3715"}],"version-history":[{"count":0,"href":"https:\/\/www.garysieling.com\/blog\/wp-json\/wp\/v2\/posts\/3715\/revisions"}],"wp:attachment":[{"href":"https:\/\/www.garysieling.com\/blog\/wp-json\/wp\/v2\/media?parent=3715"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.garysieling.com\/blog\/wp-json\/wp\/v2\/categories?post=3715"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.garysieling.com\/blog\/wp-json\/wp\/v2\/tags?post=3715"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}