darul75 / web-react

:diamond_shape_with_a_dot_inside: Another React Dev Kit with Webpack and NodeJS
https://react-web.herokuapp.com/
81 stars 8 forks source link

babel or eslint issue for js ? #2

Closed darul75 closed 9 years ago

darul75 commented 9 years ago

ERROR in ./app/routes.js

/Users/julienvalery/Documents/Dev/Git/website-apis/app/routes.js 2:1 error Illegal import declaration

✖ 1 problem (1 error, 0 warnings)

ERROR in ./app/stores/AppStore.js

/Users/julienvalery/Documents/Dev/Git/website-apis/app/stores/AppStore.js 1:1 error Illegal import declaration

✖ 1 problem (1 error, 0 warnings)

ERROR in ./app/actions/AppActions.js

/Users/julienvalery/Documents/Dev/Git/website-apis/app/actions/AppActions.js 3:1 error Unexpected reserved word

✖ 1 problem (1 error, 0 warnings)

darul75 commented 9 years ago

means you forget to put .eslintrc file :

{
  "parser": "babel-eslint",
  "plugins": [
    "react"
  ],
  "env": {
    "browser": true,
    "node": true,
    "es6": true
  },
  "globals": {
    "__DEV__": true,
    "__SERVER__": true
  },
  "ecmaFeatures": {
    "jsx": true
  },
  "rules": {
    // Strict mode
    "strict": [2, "never"],

    // Code style
    "indent": [2, 2],
    "quotes": [2, "single"]
  }
}