Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Parsing Error The Keyword import is Reserved (SublimeLinter-contrib-eslint)

I have a problem with eslint, it gives me [Parsing Error The keyword import is reserve] this is only occur in sublime, in atom editor work well. I have eslint

.eslintrc.js

module.exports = {     "extends": "airbnb",     "plugins": [         "react"     ] }; 

package.json

{   "name": "paint",   "version": "0.0.0",   "description": "paint on the browser",   "main": "index.js",   "scripts": {     "test": "echo \"Error: no test specified\" && exit 1"   },   "keywords": [     "paint",     "javascript"   ],   "author": "",   "license": "ISC",   "devDependencies": {     "browserify": "^11.2.0",     "eslint": "^2.2.0",     "eslint-config-airbnb": "^2.1.1",     "eslint-plugin-react": "^3.11.2",     "gulp-babel": "^5.2.1",     "gulp-clean": "^0.3.1",     "gulp-stylus": "^2.2.0",     "vinyl-source-stream": "^1.1.0"   } } 
like image 668
pedro luis Avatar asked Mar 15 '16 03:03

pedro luis


1 Answers

Add this to the root of your .eslintrc.json (formerly .eslintrc)

"parser": "babel-eslint" 

and make sure to run:

npm install babel-eslint --save-dev 
like image 141
Iman Mohamadi Avatar answered Sep 29 '22 12:09

Iman Mohamadi